From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Petazzoni Date: Fri, 26 Aug 2016 15:28:03 +0200 Subject: [Buildroot] [PATCH v1 3/9] board/intel/common: Add possibility for adding ACPI tables to the initrd In-Reply-To: <20160826093901.GO1812@lahna.fi.intel.com> References: <1472133887-34746-1-git-send-email-andriy.shevchenko@linux.intel.com> <1472133887-34746-4-git-send-email-andriy.shevchenko@linux.intel.com> <7d61148d-f102-bc79-e177-3ec8f6f95b8e@mind.be> <20160826090454.GK1812@lahna.fi.intel.com> <20160826113022.2748b435@free-electrons.com> <20160826093901.GO1812@lahna.fi.intel.com> Message-ID: <20160826152803.7c026ac6@free-electrons.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: buildroot@busybox.net 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