Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v1 3/9] board/intel/common: Add possibility for adding ACPI tables to the initrd
Date: Fri, 26 Aug 2016 15:28:03 +0200	[thread overview]
Message-ID: <20160826152803.7c026ac6@free-electrons.com> (raw)
In-Reply-To: <20160826093901.GO1812@lahna.fi.intel.com>

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

  parent reply	other threads:[~2016-08-26 13:28 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-25 14:04 [Buildroot] [PATCH v1 0/9] board: introduce common infrastructure for Intel SoCs Andy Shevchenko
2016-08-25 14:04 ` [Buildroot] [PATCH v1 1/9] package/acpica: Add host configuration to the tool Andy Shevchenko
2016-08-25 21:44   ` Thomas Petazzoni
2016-08-26 10:50   ` Erico Nunes
2016-08-25 14:04 ` [Buildroot] [PATCH v1 2/9] board/intel/common: Add common files for x86 boards Andy Shevchenko
2016-08-25 21:37   ` Thomas Petazzoni
2016-08-26 16:42   ` Arnout Vandecappelle
2016-08-25 14:04 ` [Buildroot] [PATCH v1 3/9] board/intel/common: Add possibility for adding ACPI tables to the initrd Andy Shevchenko
2016-08-25 21:43   ` Thomas Petazzoni
2016-08-26  6:13   ` Arnout Vandecappelle
2016-08-26  8:39     ` Thomas Petazzoni
     [not found]     ` <20160826090454.GK1812@lahna.fi.intel.com>
2016-08-26  9:30       ` Thomas Petazzoni
     [not found]         ` <20160826093901.GO1812@lahna.fi.intel.com>
2016-08-26 13:28           ` Thomas Petazzoni [this message]
2016-08-26 16:30           ` Arnout Vandecappelle
     [not found]             ` <20160829065522.GV1812@lahna.fi.intel.com>
2016-08-29  7:45               ` Arnout Vandecappelle
     [not found]                 ` <20160829075810.GA1709@lahna.fi.intel.com>
2016-08-29  9:08                   ` Arnout Vandecappelle
2016-08-25 14:04 ` [Buildroot] [PATCH v1 4/9] board / intel: Add SPI peripherals for Minnowboard MAX Andy Shevchenko
2016-08-25 21:47   ` Thomas Petazzoni
     [not found]     ` <20160826090917.GL1812@lahna.fi.intel.com>
2016-08-26  9:26       ` Thomas Petazzoni
2016-08-25 14:04 ` [Buildroot] [PATCH v1 5/9] board / intel: Add SPI peripherals for Joule Andy Shevchenko
2016-08-25 14:04 ` [Buildroot] [PATCH v1 6/9] board / intel: Add Aosong AM2315 sensor for Intel Joule Andy Shevchenko
2016-08-25 14:04 ` [Buildroot] [PATCH v1 7/9] board / intel: Add GPIO LEDs " Andy Shevchenko
2016-08-25 14:04 ` [Buildroot] [PATCH v1 8/9] board / intel: Add GPIO LEDs for Intel Minnowboard Andy Shevchenko
2016-08-25 14:04 ` [Buildroot] [PATCH v1 9/9] board / intel: Add GPIO buttons " Andy Shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160826152803.7c026ac6@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox