[OpenWrt-Devel] [PATCH 0/2] [RFC] build: allow selective per device initramfs

Petr Štetiar ynezz at true.cz
Sun May 5 16:14:18 EDT 2019


I've added "lantiq/xrx200: enable initramfs images" into my staging tree[1],
where this patch tries to fix shortcoming of the commit eae6cac6a3 ("lantiq:
add support for AVM FRITZ!Box 7362 SL"), as one needs an initramfs image to
flash OpenWrt from stock firmware (as described in the commit log). This patch
is simply going to enable build of initramfs images for all devices under
lantiq's xrx200 subtarget.

Then I've started a review of "ramips: Add support for Head Weblink
HDRM200"[2], where it's apparent, that this device needs initramfs as well ,
excerpt from commit message:

 In order to install OpenWRT, you first need to compile an initramfs
 (ramdisk)-image for the device. Once the image is ready, you need to do
 the following:

I find it quite weird to demand any kind of compilation by the end-users, but
I also find it quite wasteful to build initramfs images for all devices under
particular target (lantiq/xrx200 and ramips/mt7620), just because one (or
minority) of device needs this image.

So I've looked at the possible solutions, and with the limited time on hand
I've come up with the following patch series. I'm sure, that this is kind of a
weird workaround, but I find it less obtrusive then building of initramfs
images for all targets, with no apparent use.

Essential solution would be something like image recipe for initramfs, but
since it's quite complicated topic it would need a lot more time to fix it

So I'm wondering if such workaround to avoid building of unnecessary initramfs
images would be acceptable, or until there's a proper solution, we should
simply live with the `FEATURES += ramdisk` based "solution".

-- ynezz

1. https://git.openwrt.org/b0d143cf6d3905
2. https://patchwork.ozlabs.org/patch/1094927/

Petr Štetiar (2):
  build: allow selective per device building of initramfs
  lantiq: image: build initramfs only for FRITZ7362SL

 config/Config-images.in              |  2 +-
 include/image.mk                     | 11 ++++++++++-
 scripts/target-metadata.pl           |  1 +
 target/Config.in                     |  3 +++
 target/linux/lantiq/image/Makefile   |  1 +
 target/linux/lantiq/xrx200/target.mk |  2 +-
 6 files changed, 17 insertions(+), 3 deletions(-)


openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list