diff --git a/iopsys-econet/README.md b/iopsys-econet/README.md index 7bd08527f280cd0d233bb144de7090cd9278ebaa..3a1e42a7b743ed01aff90b0509f0526562b2bc4b 100644 --- a/iopsys-econet/README.md +++ b/iopsys-econet/README.md @@ -23,32 +23,60 @@ Preparing the board for first time Raw boards must be prepared before booting iopsys image for first time: -Dump wifi calibration data (cat /etc/Wireless/RT2860AP_AC/RT30xxEEPROM.bin | hexdump https://project.iopsys.eu/issues/4822) -Precompiled bootloader is located in [repository](https://dev.iopsys.eu/feed/econet/-/blob/devel/dl/iopboot.bin) - -It is also copied to bin dir during the build process Connect UART console -cp ./bin/targets/iopsys-econet/en7562/iopboot.bin ~/tftp; -cp ./bin/targets/iopsys-econet/en7562/ubilinux ~/tftp; -cp ./bin/targets/iopsys-econet/en7562/ubi_root.bin ~/tftp; + cp ./bin/targets/iopsys-econet/en7562/iopboot.bin ~/tftp; + cp ./bin/targets/iopsys-econet/en7562/ubilinux ~/tftp; + cp ./bin/targets/iopsys-econet/en7562/ubi_root.bin ~/tftp; + cp ./bin/targets/iopsys-econet/en7562/last.itb ~/tftp; -[...] -Log into uboot console -ECNT> tftpboot iopboot.bin -ECNT> flash erase 0x0 ${filesize} -ECNT> flash write 0x0 ${filesize} ${loadaddr} -ECNT> reset -ECNT> tftpboot ubilinux -ECNT> flash erase 0x100000 0xA00000 -ECNT> flash write 0x100000 ${filesize} ${loadaddr} -ECNT> flash write 0x600000 ${filesize} ${loadaddr} -ECNT> tftpboot ubi_root.bin -ECNT> flash erase 0xb00000 0xA100000 -ECNT> flash write 0xb00000 ${filesize} ${loadaddr} -ECNT> setenv rootfstype ubifs; saveenv -ECNT> reset +Setup your local network + + ECNT> setenv serverip 192.168.1.100; setenv ipaddr 192.168.1.1; ping 192.168.1.100; saveenv ; + +Download bootloader and flash + + ECNT> tftpboot iopboot.bin + ECNT> flash erase 0x0 ${filesize} ; flash write 0x0 ${filesize} ${loadaddr} + +Download kernel and flash both banks + + ECNT> tftpboot ubilinux ; flash erase 0x100000 0xA00000 ; flash write 0x100000 ${filesize} ${loadaddr} ; flash write 0x600000 ${filesize} ${loadaddr} ; + +Download rootFS and flash both banks + + ECNT> tftpboot root.squashfs ; flash erase 0xb00000 0x8C00000 ; flash write 0xb00000 ${filesize} ${loadaddr} ;flash write 0x5100000 ${filesize} ${loadaddr} + +Reboot and store uboot envs + + ECNT> reset + ECNT> setenv serverip 192.168.1.100 ; setenv ipaddr 192.168.1.1 ; setenv ethaddr 00:21:94:71:5B:90 ; saveenv ; reset + +Boot board and install overlay + + root@iopsys:~# flash_erase /dev/mtd8 0 0 + root@iopsys:~# ubidetach -m 8 + root@iopsys:~# ubiformat /dev/mtd8 + root@iopsys:~# ubiattach -p /dev/mtd8 + root@iopsys:~# ubimkvol /dev/ubi0 -n 6 -N overlay1 -s 10MiB + root@iopsys:~# ubimkvol /dev/ubi0 -n 7 -N overlay2 -s 10MiB + root@iopsys:~# reboot + +Dump art partition and test sysupgrade + + root@iopsys:~# cd /tmp ; ifconfig br-lan 192.168.1.1 up ; + root@iopsys:~# nanddump /dev/mtd9 -f ./[!BASE_MAC!].art + root@iopsys:~# tftp -p -l ./*.art 192.168.1.100 ; scp bg@192.168.1.100:/home/bg/tftp/last.itb ./ + root@iopsys:~# sysupgrade -n ./last.itb + +Check BASE MAC + + root@iopsys:~# ifconfig br-lan + +Chect BOOT BANKS contants. Bank B should be active + + root@iopsys:~# ubus call fwbank dump Network configuration -- @@ -85,12 +113,12 @@ Flashing an IOPSYSWRT OS image To flash an image from **linux console**, type in this command: ``` -scp ./bin/targets/iopsys-econet/en7562/last-ubifs.itb root@<board>:/tmp +scp ./bin/targets/iopsys-econet/en7562/last.itb root@<board>:/tmp ``` and on the \<board\> (ssh \<board\>) ``` [...] -root@iopsys:~# sysupgrade /tmp/last-ubifs.itb +root@iopsys:~# sysupgrade /tmp/last.itb ``` Board recovery diff --git a/iopsys-econet/image/upgrade-bundle/upgrade b/iopsys-econet/image/upgrade-bundle/upgrade index 2d46ea6ed9c015c1acb352931c3443d92f551cbd..48f7a37637db9f8f2fdde06b892c3d2e471ecbce 100755 --- a/iopsys-econet/image/upgrade-bundle/upgrade +++ b/iopsys-econet/image/upgrade-bundle/upgrade @@ -85,15 +85,6 @@ do_squashfs_update() { nandwrite -p /dev/$next_bank_rootfs_mtd /tmp/squashfs.bin rm /tmp/squashfs.bin - log "- Install overlay partition if not present -" - if [[ "1" != "$(fw_printenv -n overlay_installed)" ]]; then - flash_erase /dev/$ubicontainer_mtd 0 0 - ubiformat /dev/$ubicontainer_mtd - ubiattach -p /dev/$ubicontainer_mtd - ubimkvol /dev/ubi0 -n 6 -N overlay1 -s 10MiB - ubimkvol /dev/ubi0 -n 7 -N overlay2 -s 10MiB - fw_setenv overlay_installed "1" - fi } case $invocation in