[OpenWrt-Devel] [PATCH 1/3] build: add support for options

Luka Perkov luka at openwrt.org
Mon Aug 11 08:57:33 EDT 2014

On Mon, Aug 11, 2014 at 01:17:04PM +0200, Jonas Gorski wrote:
> On Mon, Aug 11, 2014 at 10:47 AM, Luka Perkov <luka at openwrt.org> wrote:
> > This patch adds support for target DEFAULT_OPTIONS and profile OPTIONS
> > variables. Those are simmilar to existing DEFAULT_PACKAGES and PACKAGES
> > but one can use them to select other options by default in menuconfig.
> I don't think this is a good idea. This is very easy to abuse (add
> package configuration options, build options for the kernel etc) which
> is unexpected, and I am not sure if this will work properly with IB.

Why do you think this would not work properly with IB?
> Instead of adding more cludges working around the need for individual
> rootfs versions/contents for devices, we should rather work on
> removing the need for these options.

Even though this now is useful mainly for including kernel/dtb in rootfs
we could also use it for other options as well. For example on not
resource constraint platforms we could add support for kexec, cgroups,
namespaces and others if we wanted without hackery in config/ directory.


> Maybe we could invert the way the
> rootfs is built for ubi, i.e. instead of generating the ubi, then
> calling Image/Build, let Image/Build/ build the individual rootfs's
> itself.
> We could have something like
> define Image/PrepareUbifs
>         (copy prepared rootfs to rootfs-$(1))
>         (if $(3), copy contents of $() into rootfs-$(3))
>         (create ubifs using config $(2), calling it ubifs-$(1))
> endef
> so a create image with dtb + zImage could look like
> define Image/Build/foorouter
>         mkdir -p $(KDIR)/extra-foorouter/boot
>         $(CP) $(KDIR)/zImage $(KDIR)/extra-foorouter/boot/zImage
>         $(CP) $(DTS_DIR)/foorouter.dtb $(KDIR)/extra-foorouter/boot/dtb
>         $(Call Image/PrepareUbifs,foorouter,./foorouter-ubinize.cfg,
> $(KDIR)/extra-foorouter))
>         # do the usual image preparetion steps
> endef
> define Image/Build/ubi
>         $(call Image/Build/foorouter)
> endef
> Jonas
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list