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 [2021/09/29 16:21] – [Installation] dgdodo | toh:zyxel:p-2812hnu-f1 [2022/10/04 13:35] – [Installing OpenWrt] minor fixes linus | ||
|---|---|---|---|
| Line 36: | Line 36: | ||
| -> [[docs: | -> [[docs: | ||
| - | Due to some issues of the initramfs there is a bit of a workaround needed for v19 and above releases. | + | **Due to some issues of the initramfs there is a bit of a workaround needed for v19 and above releases.** |
| Up to and including v18 the kernel image is smaller than 2MB and will fit in the reserved space of the older working initramfs image. | Up to and including v18 the kernel image is smaller than 2MB and will fit in the reserved space of the older working initramfs image. | ||
| - | However v19 and above + snapshots can be larger and need an adjustment in the reserved space for the kernel. | + | However |
| - | In able to install this larger reservation you need a kernel that is smaller then 2MB ;) see the catch 22 here ;) in order to solve this issue I had compiled a very barebone image a while ago which has a smaller kernel and this will fit into the 2MB reserved space. Use this file to update your modem first before updating to snapshot or v19 and above. | + | To install this larger reservation you need a kernel that is smaller then 2MB ;) see the catch 22 here ;) in order to solve this issue I had compiled a very barebone image a while ago which has a smaller kernel and this will fit into the 2MB reserved space. Use this file to update your modem first before updating to snapshot or v19 and above. |
| https:// | https:// | ||
| Line 48: | Line 48: | ||
| After you installed this one going back to v18 or below needs a full from scratch install (UART and all) as the start of the root fs has moved 1MB and you will get a kernel panic. | After you installed this one going back to v18 or below needs a full from scratch install (UART and all) as the start of the root fs has moved 1MB and you will get a kernel panic. | ||
| - | (DGDodo, Testing | + | (DGDodo, Testing |
| + | (Mafketel, obviously it will fit from V19 as it has already an adjusted mtd size ;) ) | ||
| ==== Replacement of factory U-Boot ==== | ==== Replacement of factory U-Boot ==== | ||
| The Out of the Box bootloader does not allow to load openwrt, so you have to replace the bootloader first. | The Out of the Box bootloader does not allow to load openwrt, so you have to replace the bootloader first. | ||
| Line 54: | Line 55: | ||
| You need the following files: | You need the following files: | ||
| - | - [[https://github.com/ScApi/P2812HNUFx-Pre-Build/blob/OpenWrt-Chaos-Calmer-r45578/F1%20OpenWRT/uboot-lantiq-p2812hnufx_ram/ | + | - [[https://downloads.openwrt.org/releases/22.03.0/targets/lantiq/xrx200/u-boot-p2812hnufx_ram/ |
| - [[https:// | - [[https:// | ||
| Line 60: | Line 61: | ||
| and [[https:// | and [[https:// | ||
| - | Power of board. | + | Power off the board. |
| - | Short the (R17) bootsel_1 and power on the router. | + | Short the (R17) bootsel_1 and power on the router. The usual method is to use a small flat screwdriver to short this while powering |
| When CFG 02 UART Popups in terminal You can disconnect/ | When CFG 02 UART Popups in terminal You can disconnect/ | ||
| Line 71: | Line 72: | ||
| </ | </ | ||
| + | Upload the U-Boot RAM image ([[https:// | ||
| + | | ||
| - | Upload U-Boot RAM image ([[https:// | + | * 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: '' |
| - | Wait for U-Boot to load and stop auto-boot process. | + | |
| + | This will take a minute or so. | ||
| + | |||
| + | On windows there are some more caveats, you can try terraterm first, if it does not work, which is indicated by * signs appearing on the prompt try to set a transmit delay of 1 msec/char. If that makes the upload excruciatingly slow try realterm with the same settings. It still won't be fast but cuts the waiting game from multiple hours to about 20 minutes. | ||
| + | |||
| + | After uploading the '' | ||
| < | < | ||
| Line 104: | Line 112: | ||
| Then: | Then: | ||
| - | PRE STEP 1 Make a backup of your NAND ! (optionally and only works with more recent asc files so for instance this one [[https:// | + | PRE STEP 1 Make a backup of your NAND ! (optionally and only works with more recent asc files so for instance this one [[https:// |
| Line 167: | 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 220: | 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 231: | 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!) | ||
| Continue further below | Continue further below | ||
| ==== Installing OpenWrt ==== | ==== Installing OpenWrt ==== | ||
| - | At the present time, the recent | + | To install OpenWrt into the NAND flash, you first have to boot an initramfs image. This is a version of the OpenWrt (with linux kernel and root filesystem) that executes only from RAM. You will use this to flash the resident version of OpenWrt into the NAND flash. |
| + | |||
| + | At the present time, the recent | ||
| - | NOTES: | + | 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 266: | 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 299: | 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 411: | 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. | ||