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

Jonas Gorski jogo at openwrt.org
Mon Aug 11 09:21:58 EDT 2014

On Mon, Aug 11, 2014 at 2:57 PM, Luka Perkov <luka at openwrt.org> wrote:
> 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.

cgroups and kexec are exactly what I'm talking about what won't work
with the IB.

Say you create an IB (with the default profile selected). Now if you
run make PROFILE="foo", where foo selects cgroups or kexec, the
resulting kernel won't actually have this enabled as this would
require a recompilation of the kernel, which isn't possible in IB.

And when building from source, you also can't build a
release-compatible image when selecting a profile selecting
cgroups/kexec, as the kernel's hash will not match the releases's
config, unless the default profile also does that.

So in effect if we do that we need to build a separate packages feed
and a separate SDK and IB for each of the profiles. I don't think this
is feasable.

And further, in your approach you directly select the options, not
just change the defaults (in contrast to the default packages), so you
can't even deselect them anymore.

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

More information about the openwrt-devel mailing list