[Buildroot] [PATCH v1 3/9] board/intel/common: Add possibility for adding ACPI tables to the initrd

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Fri Aug 26 13:28:03 UTC 2016


Hello,

On Fri, 26 Aug 2016 12:39:01 +0300, Mika Westerberg wrote:

> > What about instead having things done in step (2): install the AML
> > files at the appropriate places in $(TARGET_DIR) so that they
> > automatically end up in the rootfs.cpio generated by Buildroot?  
> 
> That would work but it them means that you cannot compress the resulting
> cpio archive. The kernel loader only looks for the first uncompressed
> one.

Ah, *that* is a good reason for having a separate initrd. In fact, I
was not even aware we could pass multiple initrd and that they were
merged together. That's good to know.

Back to your problem, then I guess it makes a lot of sense to have a
separate initrd, so that the biggest part of the initrd (the root
filesystem itself) can remain compressed.

I'm still on the opinion that a package should do all of this: download
the .aml files from some upstream project, compile them with acpica and
generate an uncompressed initrd image. Possibly this package can have
options such as a platform name to only build/install a subset of
the .aml files (and by default it builds all of them). Something along
the lines of (completely untested) :

config BR2_PACKAGE_INTEL_ACPI_TABLE_ADDONS
	bool "intel-acpi-table-addons"
	help
	  ....

	  http://....

if BR2_PACKAGE_INTEL_ACPI_TABLE_ADDONS_PLATFORMS
	string "platform list"
	help
	  Space-separated list of platforms for which the additional
	  ACPI tables should be built and installed. If left empty, all
	  ACPI tables will be built and installed.

endif

in the .mk file:

INTEL_ACPI_TABLE_ADDONS_VERSION = ...
INTEL_ACPI_TABLE_ADDONS_SITE = ...
INTEL_ACPI_TABLE_ADDONS_INSTALL_TARGET = NO
INTEL_ACPI_TABLE_ADDONS_INSTALL_IMAGES = NO
INTEL_ACPI_TABLE_ADDONS_DEPENDENCIES = host-acpica

INTEL_ACPI_TABLE_ADDONS_PLATFORMS = $(call qstrip,$(BR2_PACKAGE_INTEL_ACPI_TABLE_ADDONS_PLATFORMS))
ifeq ($(INTEL_ACPI_TABLE_ADDONS_PLATFORMS),)
INTEL_ACPI_TABLE_ADDONS_PLATFORMS = list of all platforms
endif

define INTEL_ACPI_TABLE_ADDONS_BUILD_CMDS
	$(foreach plat,$(INTEL_ACPI_TABLE_ADDONS_PLATFORMS),\
		$(HOST_DIR)/usr/bin/iasl -o $(@D)/... ....)
	... generate initrd in $(@D)
endef

define INTEL_ACPI_TABLE_ADDONS_INSTALL_IMAGE_CMDS
	... copy initrd from $(@D) to $(BINARIES_DIR) ...
endef

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com


More information about the buildroot mailing list