Dear Kevin Hilman,
On Tue, 20 May 2014 11:37:01 -0700, Kevin Hilman wrote:
I believe Kevin is already using appended DTB, because the bootloader on the OpenBlocks platform does not have DT support at all, so appended DTB is really the only way to get a mainline kernel to work on this platform.
So what you suggest is that Kevin could use the /chosen/bootargs DT node to encode the initrd address, and then make sure he loads the initrd from the bootloader at the corresponding address?
I'm finally getting around to testing big endian, and I can confirm that using initrd= on the command-line (via DT chosen/bootargs) is working fine for loading an initrd.
The problem now is how to automate this when I'm given a zImage, a pre-built DTB (binary), and a separate ramdisk. Especially when that same unmodified DTB can boot fine for other kernels.
It would be much easier if I could just change the cmdline via u-boot, but since the ATAGs dont' work, the kernel doesn't get the u-boot command-line either (even with CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER=y).
That leaves me with needing to modify a (binary) DTB. Ugh.
Unfortunately, there aren't much solutions:
*) As far as I'm aware there is no DT-capable bootloader for this platform (OpenBlocks AX-3). So having the bootloader modify the DT is not possible.
*) There is no support for ATAGs compatibility in BE mode.
Possible solutions:
*) Use a shim layer between the bootloader and the kernel to adjust the DTB as needed. Jason Cooper has worked on an impedance matcher to do such sort of DTB tweaking.
*) Change the way you do things, and assemble a bundled kernel image that contains the initramfs (using CONFIG_INITRAMFS_SOURCE) and is appended with the DTB. That's the solution I'm using.
Best regards,
Thomas