[U-Boot] [PATCH v2 3/3] image: Allow images to indicate they're loadable at any address

Linus Walleij linus.walleij at linaro.org
Sat Dec 10 23:42:43 CET 2011


On Tue, Nov 8, 2011 at 2:10 AM, Simon Glass <sjg at chromium.org> wrote:

> Can I assume that we have (or can have) a 'make uImage' target or
> similar in the kernel which can pack together:
>
> - a compressed kernel (not zImage, I mean something that U-Boot can
> decompress), with a rel_offset of 32KB

As explained by Nico, having the boot loader decompress the
kernel is *bad*.

> - a DTB
> - a ramdisk

When testing various systems I already usually use a uImage with
zImage+initramfs+DTB. This is frowned upon in some places but
it works like this:

I attach the initramfs from a cpio file rather than from giving a file
path list. This is rather popular in some embedded systems.

I configure it in like this with the config script
(you can also use menuconfig or interactive config...):

scripts/config --file .config \
        --enable BLK_DEV_INITRD \
        --set-str INITRAMFS_SOURCE rootfs.cpio \
        --enable INITRAMFS_COMPRESSION_GZIP \
        --enable RD_GZIP

Since this was so convenient I made a patch to attach a DTB
the same way which was floated on devicetree-discuss:
http://www.mail-archive.com/devicetree-discuss@lists.ozlabs.org/msg07256.html

Nico didn't like that:
http://www.mail-archive.com/devicetree-discuss@lists.ozlabs.org/msg06828.html

Alas, I'm still using that patch though. For systems where I cannot
influence the boot loader it's easiest, since I just add another
config snippet when I want to run them with DT:

scripts/config --file .config \
        --enable USE_OF \
        --enable ARM_APPENDED_DTB \
        --enable ARM_ATAG_DTB_COMPAT \
        --enable PROC_DEVICETREE \
        --set-str ARM_APPENDED_DTB_FILE my-device-tree.dtb

Yours,
Linus Walleij


More information about the U-Boot mailing list