[Buildroot] [PATCH] Add x-loader bootloader

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Tue Apr 19 20:25:02 UTC 2011


Hi Philippe,

Great to see such a patch. I really like the fact that you leveraged
the package infrastructure to add support for x-loader. Actually, I
think we should use the package infrastructure for all bootloaders and
for the kernel as well, so that we can easily benefits from
improvements made at the package infrastructure level.

On Wed, 13 Apr 2011 23:30:08 +0200
Philippe Reynes <tremyfr at yahoo.fr> wrote:

> +define XLOADER_INSTALL_TARGET_CMDS
> +	$(INSTALL) -D -m 0755 $(@D)/MLO $(BINARIES_DIR)/
> +endef

In order to properly support the kernel and bootloaders as packages, we
probably need to implement a <pkg>_INSTALL_IMAGES_CMDS thing, which
gets enabled on a per-package basis via a <pkg>_IMAGES_INSTALL = YES
value.

The kernel could for examples do :

 LINUX_IMAGES_INSTALL = YES

in order to tell that it wants to install the kernel image in
$(BINARIES_DIR), and it could also do :

 LINUX_TARGET_INSTALL = YES

in order to tell that it wants to install its kernel modules to the
target root filesystem. Same thing for U-Boot, which can build the
bootloader image, but also some target utilities like
fw_printenv/fw_setenv.

> +ifeq ($(BR2_TARGET_XLOADER),y)
> +TARGETS+=xloader

That should typically be done by the package infrastructure, but at the
moment, the package infrastructure assumes that the option is named
BR2_PACKAGE_<something>. We need to figure out to make this a little
bit more generic maybe.

Regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com



More information about the buildroot mailing list