[OE-core] [RFC] /etc/kernel/postinst.d/ support in kernel.bbclass

Koen Kooi koen at dominion.thruhere.net
Mon Feb 3 08:34:16 UTC 2014


Hi,

At FOSDEM last weekend I ran into Paul Barker and we chatted about our wishlists for package management. One of the items on my lists was drop in postinst scriplets. I've been working on support for the dracut initramfs generator in Angstrom and I have it working. In contrast to the current initramfs implementations in OE it does things a bit different:

1) The initramfs is generated at runtime using binaries from the target (with ldd magic to sort out libs)
2) It isn't builtin to the kernel[1]

On Fedora dracut drops a postinst script into /etc/kernel/postinst.d/ to ensure the initramfs gets regenerated every time the kernel packages gets updated.

My proposal is to add a few lines to pkg_postinst_kernel-image () in kernel.bbclass to run the scriptlets if present. What are your thoughts about that?

thanks,

Koen

[1] If you have the bootloader (grub, u-boot, gummiboot etc) pas an initrd and you do *NOT* set root to /dev/ram0, but to the one you want (e.g. /dev/mmcblk0p2) the kernel will treat the initrd as initramfs.


More information about the Openembedded-core mailing list