New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FS#2124 - zyxel P-2812HNU-F1 errors out on bad crc for trunk after installing through Luci #6014
Comments
chunkeey:
NAND read: device 0 offset 0x60000, size 0x200000
[...]
Data Size: 2119245 Bytes = 2 MiB
There's the problem. The bootloader only reads 0x200000 = 2097152 bytes So, in order to fix this you need to update the uboot's nboot env variable.
setenv nboot 'nand read 0x80800000 0x60000 0x300000; bootm 0x80800000'
saveenv
(This is a bit of a stop-gap measure, ideally you would want to use and then enter:
run bootcmd
If this works, please let us know so the wiki can be updated. Thanks. |
Mafketel: thnx for the suggestion and your time sadly it did not help Anything else I can do apart from checking this website more often ;) since I did not get a notification. just updated the settings should receive emails with updates now ;)
|
chunkeey:
NAND read: device 0 offset 0x60000, size 0x300000
3145728 bytes read: OK
## Booting kernel from Legacy Image at 80800000 ...
Image Name: MIPS OpenWrt Linux-4.14.101
Created: 2019-02-20 22:06:16 UTC
Image Type: MIPS Linux Kernel Image (lzma compressed)
Data Size: 2119765 Bytes = 2 MiB
Load Address: 80002000
Entry Point: 80002000
Verifying Checksum ... Bad Data CRC
ERROR: can't get kernel image!
P-2812HNU-Fx #
Well, looking at the [[https://oldwiki.archive.openwrt.org/toh/zyxel/p2812hnu-f1|flashing instructions]] step 3-5
Step 3: Upload kernel image
So, only 2MiB of the image was ever written to the nand, so there's no full image to be had, Now, question is: does the u-boot support tftp command set the "$filesize" or not?
Step 3: Upload kernel image
and check if "echo $filesize" returned something in the 2110000 - 2120000 range.
Step 4: Erase NAND
(and then run bootcmd) |
Mafketel: tftboot updates that variable and the uImage you are referring to in the wiki is an old one that is less then 2mb. Apart from the old uImages and initramfs available on scapi's github there are none available, not in trunk 18 or 17 version of openwrt. To install openwrt you need to first get CC on the modem and then from within luci upgrade. I am not following the very old wiki directly anymore as it is outdated and not complete. currently this is the steps I take to get from empty nand to working 18.6.2 or earlier files are from: short to gnd r17 and wait for the uart boot mode send the openwrt-lantiq-p2812hnufx_ram-u-boot.asc (works from 18.6.2 and trunk and old version) wait for it to finish then at the prompt
turn off power (otherwise you stay in the uart mode) from here on you need to use the the CC version of files
upgrade to newer firmware through luci and I checked the checksum and they were the same. there are no recent full images of the p-2812 I will attach the serial log in a file ps this is from the successful 18.06.2 installation(except for the wireless eeprom), if you upgrade to trunk from luci you get the errors I described in the beginning. |
Mafketel: slightly related the bug report of the missing files for the p-2812 |
Mafketel: would it be helpful to load the kernel in memory manually? so get kernel file from sysupgrade file with binwalk -e go to the u-boot prompt and tftpboot kernel bootm $fileaddr I have very little confidence it will boot all the way but I hope it at least tests the crc... and starts booting |
Mafketel: Well that was a surprise ..... ;) That actually worked and booted Can I manually write the kernel image to the nand? ......serial log
|
Mafketel: .... after typing a lot .... trying now how to resize MTD partition 3 and 4.
mtd2 should be enlarged to 3mb or more, dunno what to expect in kernel size in the future, as there is 128mb of nand flash should not be to skimpy in the u-boot environment there do not seem to be mtd partitions defined
even if I change the mtdparts in u-boot the linux comes up with the same 4 partitions
tried this as well
but the kernel does not like that ;) notice that mtdblock 2 is still 2megabytes and not 3mb attached serial log and a second one where I changed mtdblocks |
Mafketel: It seems like one needs to adjust this file. Is my understanding correct that the standard would be: or Maybe follow the original layout since it was already a U-boot linux-kernel box to begin with p.s. the f3 version needs to be adjusted as well |
Mafketel: I can confirm that is the file to edit and it boots after that change without crc error |
Mafketel: Any change this can be integrated in the tree snapshot and into the release as well without me doing that? changes needed: and https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=target/linux/lantiq/files-4.9/arch/mips/boot/dts/P2812HNUF1.dts;h=911a2d6afee0ef878d4ec9b8ea8e775b6b7ffcad; into |
chunkeey:
Thank you, yes for the most part this should be possible. The change is easy enough and given that the device seem to have plenty of space and the current images are bricking devices already I don't think there would be much of a push-back. (Another alternative would have been trying to shrinking the kernel, but that's easier said than done) What's a bit of a issue is that your name is will be required for a [[https://www.kernel.org/doc/html/v4.17/process/submitting-patches.html#using-reported-by-tested-by-reviewed-by-suggested-by-and-fixes|Reported-By: / Suggested-By]] tag. If you want to take a peek at the possible commit (more suggestions?), I added it to my |
Mafketel: One small change needed in the commit, for the rest better written then I would have ;) B.T.W. do you want to include the same change to the 4.9 kernel dts file? For I only see the change in the 4.14 kernel dts file. partition@260000 { should be partition@360000 { as we moved the partition by 1 megabyte. |
Mafketel:
Supply the following if possible:
zyxel P-2812HNU-F1
trunk
flash trunk firmware to modem via Luci, see below for output.
I have tried both with keep settings and with delete settings same error
serial console output
ROM VER: 1.0.5
CFG 06
NAND
NAND Read OK
U-Boot SPL 2013.10-openwrt5 (Nov 18 2014 - 19:54:01)
SPL: initializing NAND flash
SPL: checking U-Boot image
SPL: loading U-Boot to RAM
SPL: decompressing U-Boot with LZO
SPL: jumping to U-Boot
U-Boot 2013.10-openwrt5 (Nov 18 2014 - 19:54:01) P-2812HNU-Fx
Board: ZyXEL P-2812HNU-Fx
SoC: Lantiq VRX288 v1.1
CPU: 500 MHz
IO: 250 MHz
BUS: 250 MHz
BOOT: NAND
DRAM: 128 MiB
NAND: 128 MiB
In: serial
Out: serial
Err: serial
Net: ltq-eth
Hit any key to stop autoboot: 0
NAND read: device 0 offset 0x60000, size 0x200000
2097152 bytes read: OK
Booting kernel from Legacy Image at 80800000 ...
Image Name: MIPS OpenWrt Linux-4.14.98
Created: 2019-02-13 9:37:36 UTC
Image Type: MIPS Linux Kernel Image (lzma compressed)
Data Size: 2119245 Bytes = 2 MiB
Load Address: 80002000
Entry Point: 80002000
Verifying Checksum ... Bad Data CRC
ERROR: can't get kernel image!
P-2812HNU-Fx #
serial console output flash proces
Watchdog handover: fd=3
killall: dropbear: no process killed
killall: ash: no process killed
Sending TERM to remaining processes ... logd rpcd netifd odhcpd vdsl_cpe_contro ntpd dnsmasq sh sysupgrade ubus ubusd askfirst
Sending KILL to remaining processes ...
Unlocking kernel ...
Writing from to kernel ... [e]Failed to get erase block status
removing ubiblock0_0
[ 103.424000] UBI: ubiblock0_0 released
Volume ID 0, size 23 LEBs (2967552 bytes, 2.8 MiB), LEB size 129024 bytes (126.0 KiB), dynamic, name "rootfs", alignment 1
Set volume size to 123604992
Volume ID 1, size 958 LEBs (123604992 bytes, 117.9 MiB), LEB size 129024 bytes (126.0 KiB), dynamic, name "rootfs_data", alignment 1
sysupgrade successful
[ 104.356000] reboot: Reÿ
ROM VER: 1.0.5
CFG 06
NAND
NAND Read OK
U-Boot SPL 2013.10-openwrt5 (Nov 18 2014 - 19:54:01)
SPL: initializing NAND flash
SPL: checking U-Boot image
SPL: loading U-Boot to RAM
SPL: decompressing U-Boot with LZO
SPL: jumping to U-Boot
U-Boot 2013.10-openwrt5 (Nov 18 2014 - 19:54:01) P-2812HNU-Fx
Board: ZyXEL P-2812HNU-Fx
SoC: Lantiq VRX288 v1.1
CPU: 500 MHz
IO: 250 MHz
BUS: 250 MHz
BOOT: NAND
DRAM: 128 MiB
NAND: 128 MiB
In: serial
Out: serial
Err: serial
Net: ltq-eth
Hit any key to stop autoboot: 0
NAND read: device 0 offset 0x60000, size 0x200000
2097152 bytes read: OK
Booting kernel from Legacy Image at 80800000 ...
Image Name: MIPS OpenWrt Linux-4.14.98
Created: 2019-02-13 9:37:36 UTC
Image Type: MIPS Linux Kernel Image (lzma compressed)
Data Size: 2119245 Bytes = 2 MiB
Load Address: 80002000
Entry Point: 80002000
Verifying Checksum ... Bad Data CRC
ERROR: can't get kernel image!
P-2812HNU-Fx #
The text was updated successfully, but these errors were encountered: