[OpenWrt-Devel] [PATCH 1/3] build: add support for options
Jonas Gorski
jogo at openwrt.org
Mon Aug 11 07:17:04 EDT 2014
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.
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. 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
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list