My goflex home can't boot after kirkwood 5.16.5 upgrade
April 02, 2022 08:55AM
Using UBoot with FDT support. Have done upgrade many times without issues since 4.1. Last version was 5.12.6

Not sure what I did wrong this time. The console shows problem at bootm 0x800000 0x1100000 0x1c00000

Reset IDE: Bus 0: OK Bus 1: not available
  Device 0: Model: ST31000524AS Firm: JC45 Ser#: 9VPC55YG
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 953869.7 MB = 931.5 GB (1953525168 x 512)
10257 bytes read in 710 ms (13.7 KiB/s)      <----  ext2load ide 0:1 0x1c00000 /boot/dts/kirkwood-goflexhome.dtb
5669000 bytes read in 5646 ms (980.5 KiB/s)       <----  ext2load ide 0:1 0x800000 /boot/uImage
11782486 bytes read in 5392 ms (2.1 MiB/s)        <----  ext2load ide 0:1 0x1100000 /boot/uInitrd
## Booting kernel from Legacy Image at 00800000 ...           <----  bootm 0x800000 0x1100000 0x1c00000
   Image Name:   Linux-5.16.5-kirkwood-tld-1
   Created:      2022-03-30   9:31:42 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5668936 Bytes = 5.4 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-5.16.5-kirkwood-tld-1
   Created:      2022-03-30   9:31:54 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    11782422 Bytes = 11.2 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
ERROR: Did not find a cmdline Flattened Device Tree
Could not find a valid device tree


How do I fix this?

========
Moderator edit: please use code tags (formatted code button) to post log.



Edited 1 time(s). Last edit at 04/02/2022 03:48PM by bodhi.
Re: My goflex home can't boot after kirkwood 5.16.5 upgrade
April 02, 2022 09:07AM
Your uInitrd has grown too big. 0x1100000 + 11782486 = 0x1C3C956, so that overwrites the fdt on 0x1c00000. You can either create a smaller uInitrd, or change the loadaddress of fdt. (to 0x1D00000 or higher). And of course in the latter case you'll also have to change the boot command to meet the new load address.
Re: My goflex home can't boot after kirkwood 5.16.5 upgrade
April 02, 2022 03:51PM
sylvester,

> Using UBoot with FDT support. Have done upgrade
> many times without issues since 4.1. Last version
> was 5.12.6

Not sure the version numbers refer to? Linux kernel? And which u-boot version you are running on this box?

Power up, interrupt serial console and

printenv
boot
Please post the entire serial boot log (from the u-boot banner until when it stops booting).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 04/02/2022 03:53PM by bodhi.
Re: My goflex home can't boot after kirkwood 5.16.5 upgrade
April 02, 2022 10:20PM
Mijzelf Wrote:
-------------------------------------------------------
> Your uInitrd has grown too big. 0x1100000 +
> 11782486 = 0x1C3C956, so that overwrites the fdt
> on 0x1c00000. You can either create a smaller
> uInitrd, or change the loadaddress of fdt. (to
> 0x1D00000 or higher). And of course in the latter
> case you'll also have to change the boot command
> to meet the new load address.


Thanks for pointing me to the right direction. It has been many years since I set my goflex home up. The UBoot was last updated in 2017 when the 2017.07 version came out. Since then I just followed bodhi's guide to update the kernel. Looking at my backups, the size of uInitrd has grown from 6.17MB for kernel 4.1.0 to 11.24MB for kernel 5.16.5. Is there a way to create a smaller uInitrd?

I checked bodhi's UBoot guide again and it does mention a default limit of 11M for uInitrd and suggests an address of 0x2c00000 for the dtb if a larger uInitrd is required. I just use the suggested load address and it boots without problem.

By the way, is this the address in the NAND? Just wonder how much uInitrd can grow.
Re: My goflex home can't boot after kirkwood 5.16.5 upgrade
April 02, 2022 10:31PM
sylvester,

> I checked bodhi's UBoot guide again and it does
> mention a default limit of 11M for uInitrd and
> suggests an address of 0x2c00000 for the dtb if a
> larger uInitrd is required. I just use the
> suggested load address and it boots without
> problem.
>
> By the way, is this the address in the NAND? Just
> wonder how much uInitrd can grow.

No, it is RAM address. Changing it to 0x2c00000 added 16MB to the reserved space. So it will be quite a long time before you see that runs out. If you install large package such as OMV, the initrd will growth substantially, so just be aware and check that.

BTW, these addresses are just load locations in RAM, u-boot will relocate them to different appropriate locations, as it figures out where. So the addresses could be changed as you need too.

And yes, there are ways to make initrd smaller. I'll see if I can add a note in the rootfs installation.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 04/02/2022 10:32PM by bodhi.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: