Kernel 5.10.8 ix2-200 (kirkwood) doesn't boot [Solved]

This forum is for Marvell Kirkwood devices such as the GoFlex Home/Net, PogoPlug v1/v2, SheevaPlug, and ZyXEL devices.

Kernel 5.10.8 ix2-200 (kirkwood) doesn't boot [Solved]

Postby kriztioan » Wed Jan 20, 2021 1:55 am

After installing linux-kirkwood-dt-5.10.8-1-arm.pkg.tar.xz the system fails to boot. Following along on the UART shows the boot image loading, but not going any further, i.e., the ramdisk is not being loaded: $this->bbcode_second_pass_code('', 'NAND read: device 0 offset 0xa4000, size 0x600580
6292864 bytes read: OK

NAND read: device 0 offset 0x8a4000, size 0x528e0c
5410316 bytes read: OK
## Booting image at 02000000 ...
Image Name: Arch Linux ARM kernel
Created: 2021-01-20 1:18:48 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 6292800 Bytes = 6 MB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
OK')

Reverting back to linux-kirkwood-dt-5.8.13-1-arm.pkg.tar.xz solves the problem and shows: $this->bbcode_second_pass_code('', 'NAND read: device 0 offset 0xa4000, size 0x5e8e28
6196776 bytes read: OK

NAND read: device 0 offset 0x8a4000, size 0x528d80
5410176 bytes read: OK
## Booting image at 02000000 ...
Image Name: Arch Linux ARM kernel
Created: 2021-01-20 1:33:53 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 6196712 Bytes = 5.9 MB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 08004000 ...
Image Name: Arch Linux ARM initrd
Created: 2021-01-20 1:33:55 UTC
Image Type: ARM Linux RAMDisk Image (uncompressed)
Data Size: 5410112 Bytes = 5.2 MB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK

Starting kernel ...')

I've tried a number of things to possibly solve the problem, but to to no avail, including changing compression types, different load addresses and entry points. With some Googling I came across https://forum.doozan.com/read.php?2,12096. Perhaps those more knowledgeable can find some pointers there on what might be going on. Similarly for https://github.com/hardkernel/u-boot/issues/63, where it is mentioned that 5.10 removed TEXT_OFFSET support ...
Last edited by kriztioan on Thu Jan 21, 2021 7:58 am, edited 1 time in total.
kriztioan
 
Posts: 51
Joined: Sat Apr 29, 2017 1:32 am

Re: Kernel 5.10.8 ix2-200 (kirkwood) doesn't boot

Postby zkrx » Wed Jan 20, 2021 5:02 pm

Same problem here on my Synology DS211j (kirkwood). Same UART output. Downgrading to 5.8.13 works again.
zkrx
 
Posts: 4
Joined: Sun May 19, 2019 9:06 am

Re: Kernel 5.10.8 ix2-200 (kirkwood) doesn't boot

Postby kriztioan » Thu Jan 21, 2021 6:16 am

With the freshly available linux-kirkwood-dt-5.10.9-1-arm.pkg.tar.xz the system still doesn't boot and the UART output is now: $this->bbcode_second_pass_code('', 'NAND read: device 0 offset 0xa4000, size 0x600928
6293800 bytes read: OK

NAND read: device 0 offset 0x8a4000, size 0x528aa8
5409448 bytes read: OK
## Booting image at 02000000 ...
Image Name: Arch Linux ARM kernel
Created: 2021-01-21 3:37:34 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 6293736 Bytes = 6 MB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 00000000 ...
Bad Magic Number') At least the there is now an attempt to load the Ramdisk, but it is trying from the wrong address (0x00000000) and consequently fails with a Bad Magic Number. The correct address would be 0x08004000 (see working example in earlier post). Yes, the Load Address and Entry Point are 0x00000000 for the Ramdisk (mkimage -A arm -O linux -T ramdisk -C none -a 0x00000000 -e 0x00000000 -n "Arch Linux ARM initrd" -d /boot/initramfs-linux.img /boot/uInitrd), but as far as I can tell from the working example (see earlier post) they are ignored (starting at 0x00000000 would have the kernel loaded at 0x00008000 being overwritten by the Ramdisk).

Is the second parameter to u-boot's bootm-command not read by the kernel, and/or is the Ramdisk overwritting where this information is stored ... What is trying to load the Ramdisk, u-boot or the kernel? Is the kernel too big perhaps, or is some dma going on ... ?
kriztioan
 
Posts: 51
Joined: Sat Apr 29, 2017 1:32 am

Re: Kernel 5.10.8 ix2-200 (kirkwood) doesn't boot [Solved]

Postby kriztioan » Thu Jan 21, 2021 7:57 am

Success! $this->bbcode_second_pass_code('', 'Linux Twonky 5.10.9-1-ARCH #1 PREEMPT Wed Jan 20 01:42:49 UTC 2021 armv5tel GNU/Linux') It turned out moving the Load Address and Entry Point for the kernel both to 0x01000000 made it work: $this->bbcode_second_pass_code('', 'mkimage -A arm -O linux -T kernel -C none -a 0x01000000 -e 0x01000000 -n "Arch Linux ARM kernel" -d /boot/zImage uImage') My suspicion is that u-boot is using some of the address space directly above ~6MiB to do its work; the slightly larger kernel interferes when loaded at 32KiB. Moving the Load Address to 16MiB resolves this issue. Note that when the kernel starts it relocates itself back to 0x00008000 per /proc/iomem: $this->bbcode_second_pass_code('', '00008000-00b8bfff : Kernel code
00bd2000-00f0400f : Kernel data')
kriztioan
 
Posts: 51
Joined: Sat Apr 29, 2017 1:32 am


Return to Marvell Kirkwood

Who is online

Users browsing this forum: No registered users and 12 guests