From: Arnout Vandecappelle Date: Fri, 26 Aug 2016 18:30:47 +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: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: buildroot@busybox.net On 26-08-16 11:39, Mika Westerberg wrote: > On Fri, Aug 26, 2016 at 11:30:22AM +0200, Thomas Petazzoni wrote: [snip] >> Still not clear: Arnout doesn't suggest to generate multiple cpio >> archives, but rather to simply have the AML files within the cpio >> archive in the first place. >> >> The Buildroot process looks like this: >> >> 1. Build all packages >> 2. Run post-build scripts >> 3. Create filesystem images (including cpio one) >> 4. Run post-image scripts >> >> Right now, if I understand correctly, in step (4), you're generating an >> additional initrd with just the AML files. Is this correct? > > Yes, that's correct. > >> 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. That is rather stupid of the kernel :-) I guess it's because this acpi stuff is needed in early boot while normally the initrd is only unpacked at the end... I didn't even know that the kernel supported having multiple cpio archives in the initrd, and even with different compression! Is it still possible to use an ext3 as a rootfs rather than an initrd? I.e., use a cpio archive with just the acpi stuff but have the real rootfs (including /sbin/init) on SD card. We generally have a writeable and persistent rootfs in the defconfigs because it's more convenient for experimenting. If this possibility exists, then I think it would make sense to add a package (in the bootloader menu maybe?) that generates this cpio archive, like Thomas suggested. Appending the two archives, however, is still something for a post-image script I think. Regards, Arnout -- Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF