diff --git a/Makefile b/Makefile index ed470846..3bee544c 100644 --- a/Makefile +++ b/Makefile @@ -36,9 +36,14 @@ endef all: kernel-axe-modules kernel .PHONY: release -release: kernel-axe-modules out/idl4k.scr +release: kernel-axe-modules out/idl4k.scr out/idl4k.recovery -ls -la out +.PHONY: dist +dist: + -mkdir -p dist + cp out/*.fw out/*.usb out/*.flash dist + # # create CPIO # @@ -65,14 +70,25 @@ fs-list: # uboot # -out/idl4k.scr: patches/uboot.script out/satip-axe-$(VERSION).fw - rm -f out/*.scr +out/idl4k.recovery: patches/uboot-recovery.script + $(TOOLPATH)/mkimage -T script -C none \ + -n 'Restore original idl4k fw' \ + -d patches/uboot-recovery.script out/idl4k.recovery + +out/idl4k.scr: patches/uboot.script patches/uboot-flash.script out/satip-axe-$(VERSION).fw + rm -f out/*.scr out/*.usb out/*.flash out/*.recovery sed -e 's/@VERSION@/$(VERSION)/g' \ < patches/uboot.script > out/uboot.script + sed -e 's/@VERSION@/$(VERSION)/g' \ + < patches/uboot-flash.script > out/uboot-flash.script $(TOOLPATH)/mkimage -T script -C none \ -n 'SAT>IP AXE fw v$(VERSION)' \ - -d out/uboot.script out/idl4k.scr - -rm out/uboot.script + -d out/uboot.script out/satip-axe-$(VERSION).usb + $(TOOLPATH)/mkimage -T script -C none \ + -n 'SAT>IP AXE fw v$(VERSION)' \ + -d out/uboot-flash.script out/satip-axe-$(VERSION).flash + ln -sf satip-axe-$(VERSION).usb out/idl4k.scr + rm out/uboot.script out/uboot-flash.script out/satip-axe-$(VERSION).fw: kernel/arch/sh/boot/uImage.gz mkdir -p out diff --git a/README.md b/README.md index 6e5a0c57..f11ca312 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ A firmware with minisatip for Inverto IDL-400s/Grundig GSS.BOX/Telestar Digibit Releases: - - see to dist directory + - see to dist directory - README file Requirements: diff --git a/dist/README b/dist/README new file mode 100644 index 00000000..cd8274e9 --- /dev/null +++ b/dist/README @@ -0,0 +1,73 @@ +This directory contains USB firmware for + * Inverto IDL-400s + * Grundig GSS.BOX + * Inverto IDL-400S + +Installation: + + - setup a DHCP server for the box ethernet MAC address + - copy satip-axe-$(VERSION).usb as idl4k.scr (rename the file) to the USB stick + - copy satip-axe-$(VERSION).fw (no rename) to the USB stick + - both files should be in the root directory on the USB stick + - plug the USB stick to the upper USB port in box + - turn on the box + - the tuner LEDs must blink (Knight Rider effect) for few seconds + - box is accessible through telnet or ssh, IP address is obtained using DHCP + - the default login/password is root/satip + - the firmware is not written to the internal flash - when the USB stick + is not in the box, the original firmware will be booted + +Installation to flash: + + - WARNING! The original firmware will be overwritten! + - same steps, just replace satip-axe-$(VERSION).usb to satip-axe-$(VERSION).flash + - after boot of the new version, remove the USB stick to not write + the .fw file multiple times to flash (on each box start) + +Customization: + + - configuration file is in /etc/sysconfig/config + - localboot script can be in /etc/sysconfig/localboot + - passwd file is copied from /etc/sysconfig/passwd + - ssh authorized_keys file is copied from /etc/sysconfig/authorized_keys + +Recovery of the original firmware: + + - copy idl4k.recovery file as idl4k.scr file to the root directory on the USB stick + - plug the USB stick to the upper USB port in box + - turn on the box + - box is accessible through http (web browser) - original firmware + +Notes: + + - there is 128M SPI flash memory in the device + - 128k for u-boot (probably) + - 4M marked as system-nand0 (probably unused) + - the original firmware uses fw1-nand0 flash region (32M) + - the satip-axe firmware uses fw2-nand0 flash region (32M) + - data block is named data-nand0 - uses rest of flash + +Bugs: + + - the Inverto driver do not initialize properly sometimes + (minisatip is not started) + + demod900] setup [num_demods 4] + [pll6120] setup [num_plls:4] [clk:30000000] [bbgain:16] + [fe] Checking lut 0xC1ABEAF0 + [fe] Checking lut 0xC1ABEB26 + [fe] Checking lut 0xC1ABEAF0 + [fe] Checking lut 0xC1ABEB54 + [dmx] ... init 0 + [dmx-ts] ... init 0 + [i2c] I2C bus error /errno -121/!! + [i2c] I2C bus error /errno -121/!! + [i2c] I2C bus error /errno -121/!! + [pll6120] init error! + [fta_fe] FE Initialization done, res -1 + + - reboot command cannot be used (uboot usb init fails, hw init fails) + +History: + + diff --git a/patches/uboot-flash.script b/patches/uboot-flash.script new file mode 100644 index 00000000..6f8e4670 --- /dev/null +++ b/patches/uboot-flash.script @@ -0,0 +1,4 @@ +set filesize +fatload usb 0 $load_addr satip-axe-@VERSION@.fw +if test \"${filesize}\" != \"\"; then nand erase fw2-nand0; nand write.jffs2 $load_addr fw2-nand0 $filesize; fi +if test \"${satip-axe}\" = \"\"; then set bootcmd run\ updatefw\;set\ bootargs\ console\=ttyAS0\,115200\ bigphysarea\=20000\;nboot.jffs2\ \$load_addr fw2-nand0; set satip-axe 1; saveenv; fi diff --git a/patches/uboot-recovery.script b/patches/uboot-recovery.script new file mode 100644 index 00000000..935ef60e --- /dev/null +++ b/patches/uboot-recovery.script @@ -0,0 +1 @@ +if test \"${satip-axe}\" != \"\"; then set bootcmd run\ updatefw\;nboot.jffs2\ \$load_addr fw1-nand0; set satip-axe; saveenv; fi diff --git a/patches/uboot.script b/patches/uboot.script index 0e120e08..f3d1d8c6 100644 --- a/patches/uboot.script +++ b/patches/uboot.script @@ -1,3 +1,3 @@ -fatload usb 0 0x84000000 satip-axe-@VERSION@.fw +fatload usb 0 $load_addr satip-axe-@VERSION@.fw set bootargs console=ttyAS0,115200 bigphysarea=20000 -bootm 0x84000000 +bootm $load_addr