Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
| toh:zyxel:p-2812hnu-f1 [2022/10/01 18:30] – [Replacement of factory U-Boot] updated, instructions for Minicom linus | toh:zyxel:p-2812hnu-f1 [2022/10/04 13:35] – [Installing OpenWrt] minor fixes linus | ||
|---|---|---|---|
| Line 75: | Line 75: | ||
| | | ||
| - | * If you used cutecom for Linux, issue „Send File” | + | |
| - | * If you're using Minicom, you can suspend or quite minicom after seeing the message above, then issue the upload from the command line: '' | + | * If you're using Minicom, you can suspend or quite minicom after seeing the message above, then issue the upload from the command line: '' |
| This will take a minute or so. | This will take a minute or so. | ||
| Line 175: | Line 175: | ||
| Bytes transferred = 231813 (38985 hex) | Bytes transferred = 231813 (38985 hex) | ||
| </ | </ | ||
| + | |||
| + | If tftp is not working for you, you can also upload the u-boot image over the serial port using '' | ||
| **Step 5**: Type in console | **Step 5**: Type in console | ||
| Line 228: | Line 230: | ||
| mtdparts add nand0 - ubi | mtdparts add nand0 - ubi | ||
| setenv ethaddr XX: | setenv ethaddr XX: | ||
| - | setenv nboot 'nand read 0x80800000 | + | setenv nboot 'nand read 0x81000000 |
| setenv bootcmd 'run nboot' | setenv bootcmd 'run nboot' | ||
| saveenv | saveenv | ||
| Line 239: | Line 241: | ||
| Writing to NAND... OK | Writing to NAND... OK | ||
| </ | </ | ||
| - | |||
| - | (DGDodo, I've seen good working v21.02.0 with only the setenv-commands used + saveenv, no mtd settings adjusted!) (Mafketel these mtd settings are mostly cosmetic the mtd sizes are hardcoded while compiling the kernel, MAKE SURE you change the nboot line otherwise you need the ttl cable to boot and fix it) | ||
| - | |||
| - | Note: Starting with kernel 5.10 decompressing the kernel may take more space and will result in an overwrite error. | ||
| - | To make more space replace the nboot command above with: | ||
| - | < | ||
| - | setenv nboot 'nand read 0x81000000 0x60000 0x300000; bootm 0x81000000' | ||
| - | </ | ||
| Continue further below | Continue further below | ||
| ==== Installing OpenWrt ==== | ==== Installing OpenWrt ==== | ||
| - | At the present time, the recent openwrt releases do not include the proper | + | To install OpenWrt into the NAND flash, you first have to boot an initramfs image. |
| - | NOTES: | + | At the present time, the recent OpenWrt releases do not include a working initramfs image. Normally this would be the files named '' |
| + | |||
| + | NOTES: | ||
| **Step 1**: Place [[https:// | **Step 1**: Place [[https:// | ||
| - | **Step 2**: Set Your IP addres | + | **Step 2**: Set Your IP address |
| + | |||
| + | **Step 3**: Upload the initramfs image. | ||
| - | **Step 3**: Upload initramfs image | ||
| tftpboot openwrt-lantiq-xrx200-P2812HNUF1-uImage-initramfs | tftpboot openwrt-lantiq-xrx200-P2812HNUF1-uImage-initramfs | ||
| < | < | ||
| Line 280: | Line 277: | ||
| </ | </ | ||
| + | If tftp is not working for you, you can also upload the initramfs image over the serial port using '' | ||
| - | **Step 4**: Run initramfs image and wait till fully booted and press Enter to activate the console | + | **Step 4**: Run the initramfs image and wait till fully booted and press Enter to activate the console |
| bootm $fileaddr | bootm $fileaddr | ||
| Line 313: | Line 311: | ||
| </ | </ | ||
| + | **Step 5**: Obtain and flash flash this image **first**: | ||
| - | **Step 5**: set root passwd. | + | |
| - | passwd | + | If you use a newer image there will be erase block errors when writing |
| - | **Step 6**: Log into the modem on the web interface and go to System flash firmware and flash up to and including 18 release, if you want to install snapshots or 19 and above you need to increase | + | |
| - | (OpenWrt v21.02.0: **BEFORE** flashing to v21.02.0, really make sure you have set u-boot environment to 3MB kernel, otherwise your device get bricked | + | Log into the modem on the web interface |
| - | This assumes that your are able to enter the webinterface, | + | This assumes that your are able to enter the webinterface, |
| - | If not use Linux scp or [[https:// | + | |
| - | sysupgrade -n /tmp/openwrt-18.06.2-lantiq-xrx200-zyxel_p-2812hnu-f1-squashfs-sysupgrade.bin | + | cd /tmp |
| + | scp user@192.168.1.N: | ||
| + | | ||
| - | **Step | + | Since the Dropbear SSH version in the initramfs is quite old, this can lead to problems because new SSH servers will not accept the algorithms it supports. |
| + | |||
| + | Alternatively (if you have a web server on your 192.168.1.N machine): | ||
| + | |||
| + | cd /tmp | ||
| + | wget http:// | ||
| + | | ||
| + | |||
| + | You probably need a local web server that can use plain HTTP on port 80 because the initramfs image cannot handle SSL. | ||
| + | |||
| + | **Step | ||
| < | < | ||
| Line 425: | Line 434: | ||
| -------------------------------------------------- | -------------------------------------------------- | ||
| </ | </ | ||
| - | (DGDodo: Although this last log is still running 2MB kernel image, not **3MB**! 'NAND read: device 0 offset 0x60000, size 0x200000' | + | |
| + | **Step 7**: upgrade to the latest working release of OpenWrt | ||
| + | |||
| + | The last known working version of OpenWrt for this router | ||
| + | |||
| + | | ||
| + | |||
| + | The 22.03.0 version will brick the router and you have to reinstall from initramfs. (Back to **step 3**...) | ||
| ==== WIFI on openwrt ==== | ==== WIFI on openwrt ==== | ||
| For as long as the standard installation deletes the whole NAND, the information the wifi drivers need to start the chip are lost. | For as long as the standard installation deletes the whole NAND, the information the wifi drivers need to start the chip are lost. | ||