initramfs for ACPI tables on x86

Florian Eckert fe at dev.tdt.de
Thu Sep 30 05:49:57 PDT 2021


Since the update of kernel from 5.4 to 5.10 in the openwrt master branch 
[1],
I have problems with additional hardware on the I2C (SMBus) of my APU3.

The Linux upstream removed the platform data support for my I2C 
IO-Expander mcp23s08 [3].
Because of this change I could not use my own written platform device 
specification anymore.

This is common for this kind of device on x86 which does not support 
device-tree.
See for exaple the platform init on the x86 geode board.[5]

If the device supports ACPI, this is now the why to do this [6].
I am still in the process of building the SSDT ACPI table for the i2c 
mcp23s08 device connect to the SMBus.

As I now know we could load these SSTD into the kernel during operation 
or via an initrd on boot.

As far as I have seen, no initrd is loaded during normal operation [4] 
on OpenWrt.

Is there any way to create an initrd to load the ACPI tables and then 
mount the initrd so the kernel can load this kind of files?
What would this look like in OpenWrt?

On other target we have the device-tree but on X86 this is not possible 
and we could only use ACPI for this kind of task.
To do this the acpica package is needed to generate an SSDT [7]

The initramfs that are created now run completely in RAM and are 
intended for development purposes only.

Does anyone have any experience or has already deal with this topic of 
ACPI and inird in OpenWrt?
I would be happy if someone shares their thoughts with me.

--
Regards Florian

[1] 
https://git.openwrt.org/?p=openwrt/openwrt.git;a=blobdiff;f=target/linux/x86/Makefile;h=fbad527e0ac3239647a9d1eabcaf8fd751396973;hp=0ab322d8bc4fd31a75cb16dba8665b1db315398f;hb=64be0eadc17988f29d0a4b89569840d917746498;hpb=c9042202ad39e447a21afd91ec777bbc6cc8b72c
[2] https://pcengines.ch/apu.htm
[3] 
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/drivers/pinctrl/pinctrl-mcp23s08.c?h=v5.10.70&id=6aba6ed879b3471903c8ada28ba968a268df6143
[4] 
https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=target/linux/x86/image/grub-pc.cfg;hb=fa13dd658f59df41b9184d4dc15a5b29530e7c2c
[5] 
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/arch/x86/platform/geode/alix.c?h=v5.10.70
[6] https://www.youtube.com/watch?v=nlKjUAv3RL0&ab_channel=OSDNConf
[7] https://github.com/openwrt/packages/pull/16775



More information about the openwrt-devel mailing list