Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
toh:zyxel:p-2812hnu-f1 [2022/10/01 18:59] – [Replacement of factory U-Boot] linustoh:zyxel:p-2812hnu-f1 [2022/10/04 13:35] – [Installing OpenWrt] minor fixes linus
Line 230: Line 230:
 mtdparts add nand0 - ubi mtdparts add nand0 - ubi
 setenv ethaddr XX:XX:XX:XX:XX:XX setenv ethaddr XX:XX:XX:XX:XX:XX
-setenv nboot 'nand read 0x80800000 0x60000 0x300000; bootm 0x80800000'+setenv nboot 'nand read 0x81000000 0x60000 0x300000; bootm 0x81000000'
 setenv bootcmd 'run nboot' setenv bootcmd 'run nboot'
 saveenv saveenv
Line 241: Line 241:
 Writing to NAND... OK Writing to NAND... OK
 </file> </file>
- 
-(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: 
-<code> 
-setenv nboot 'nand read 0x81000000 0x60000 0x300000; bootm 0x81000000' 
-</code> 
  
 Continue further below Continue further below
 ==== Installing OpenWrt ==== ==== Installing OpenWrt ====
-At the present timethe recent openwrt releases do not include the proper initramfs image. A working version is available at ScApi 's github, see aboveAt the end we will upgrade to the latest openwrt version.+To install OpenWrt into the NAND flashyou first have to boot an initramfs image. This is a version of the OpenWrt (with linux kernel and root filesystem) that executes only from RAMYou will use this to flash the resident version of OpenWrt into the NAND flash.
  
-NOTES: Future upgrades can be done by flashing *sysupgrade.bin from web interface.+At the present time, the recent OpenWrt releases do not include a working initramfs image. Normally this would be the files named ''zyxel_p-2812hnu-f1-initramfs-kernel.bin'' but these files in the release folders are broken. A working version is available at ScApi 's github, see above. At the end we will upgrade to the latest openwrt version. 
 + 
 +NOTES: After flashing the NAND from the initramfs, future upgrades can be done by flashing ''zyxel_p-2812hnu-f1-squashfs-sysupgrade.bin'' from each release through the web interface.
  
 **Step 1**: Place [[https://github.com/ScApi/P2812HNUFx-Pre-Build/blob/OpenWrt-Chaos-Calmer-r45578/F1%20OpenWRT/openwrt-lantiq-xrx200-P2812HNUF1-uImage-initramfs|openwrt-lantiq-xrx200-P2812HNUF1-uImage-initramfs]] in your tftp folder **Step 1**: Place [[https://github.com/ScApi/P2812HNUFx-Pre-Build/blob/OpenWrt-Chaos-Calmer-r45578/F1%20OpenWRT/openwrt-lantiq-xrx200-P2812HNUF1-uImage-initramfs|openwrt-lantiq-xrx200-P2812HNUF1-uImage-initramfs]] in your tftp folder
  
-**Step 2**: Set Your IP addres to "192.168.1.2" and start tftp server. See also above for instructions.+**Step 2**: Set Your IP address to "192.168.1.2" and start tftp server. See also above for instructions
 + 
 +**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
 <file> <file>
Line 282: Line 277:
 </file> </file>
  
 +If tftp is not working for you, you can also upload the initramfs image over the serial port using ''loady'' and then send the file using zmodem, e.g. in Minicom Ctrl+A followed by S, then select zmodem and the ''openwrt-lantiq-xrx200-P2812HNUF1-uImage-initramfs'' file. The file is a few megabytes so this will take some time.
  
-**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 315: Line 311:
 </file> </file>
  
 +**Step 5**: Obtain and flash flash this image **first**:
  
-**Step 5**set root passwd.+  [[https://github.com/Mafketel/p2812hnu-f1-files/blob/master/openwrt-lantiq-xrx200-zyxel_p-2812hnu-f1-squashfs-sysupgrade.bin|openwrt-lantiq-xrx200-zyxel_p-2812hnu-f1-squashfs-sysupgrade.bin]]
  
- passwd  root -d yoursecretpassword +If you use a newer image there will be erase block errors when writing the image.
-**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 the space reserved for the kernel. You do this by installing this image first https://github.com/Mafketel/p2812hnu-f1-files/blob/master/openwrt-lantiq-xrx200-zyxel_p-2812hnu-f1-squashfs-sysupgrade.bin and then go back into the web interface and flash the one you want.+
  
-(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 and can only be fixed with TTL-serial, i.e. you have to open the device and connect TTL-serialThe above mentioned firmware does **NOT** adjust this setting!)+Log into the modem on the web interface and go to System flash firmware.
  
-This assumes that your are able to enter the webinterface, if this does not workyou can continue in the serial console this way. +This assumes that your are able to enter the webinterface, if this does not workyou can use the serial console: upload ''openwrt-lantiq-xrx200-zyxel_p-2812hnu-f1-squashfs-sysupgrade.bin'' to /tmp using ''scp'' or ''wget''':
-If not use Linux scp or [[https://winscp.net/eng/download.php|WinSCP]] to upload [[http://downloads.openwrt.org/releases/18.06.2/targets/lantiq/xrx200/openwrt-18.06.2-lantiq-xrx200-zyxel_p-2812hnu-f1-squashfs-sysupgrade.bin|openwrt-18.06.2-lantiq-xrx200-zyxel_p-2812hnu-f1-squashfs-sysupgrade.bin]] to /tmp.+
  
-         sysupgrade -n /tmp/openwrt-18.06.2-lantiq-xrx200-zyxel_p-2812hnu-f1-squashfs-sysupgrade.bin+         cd /tmp 
 +         scp user@192.168.1.N:openwrt-lantiq-xrx200-zyxel_p-2812hnu-f1-squashfs-sysupgrade.bin 
 +         sysupgrade -n openwrt-lantiq-xrx200-zyxel_p-2812hnu-f1-squashfs-sysupgrade.bin
  
-**Step 7**: the router Reboots itself+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://192.168.1.N/openwrt-lantiq-xrx200-zyxel_p-2812hnu-f1-squashfs-sysupgrade.bin 
 +         sysupgrade -n openwrt-lantiq-xrx200-zyxel_p-2812hnu-f1-squashfs-sysupgrade.bin 
 + 
 +You probably need a local web server that can use plain HTTP on port 80 because the initramfs image cannot handle SSL. 
 + 
 +**Step 6**: the router Reboots itself
  
 <file> <file>
Line 427: Line 434:
 -------------------------------------------------- --------------------------------------------------
 </file> </file>
-(DGDodoAlthough 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 is the 21.02.3 release: 
 + 
 +  [[https://downloads.openwrt.org/releases/21.02.3/targets/lantiq/xrx200/openwrt-21.02.3-lantiq-xrx200-zyxel_p-2812hnu-f1-squashfs-sysupgrade.bin|openwrt-21.02.3-lantiq-xrx200-zyxel_p-2812hnu-f1-squashfs-sysupgrade.bin]] 
 + 
 +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.
  • Last modified: 2024/12/08 19:19
  • by idwv