[OpenWrt-Devel] [PATCH 1/3] build: add support for options
luka at openwrt.org
Mon Aug 11 11:06:42 EDT 2014
On Mon, Aug 11, 2014 at 03:21:58PM +0200, Jonas Gorski wrote:
> 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.
Ok. Those specific options can be limited to target, not profile. I
don't see this as a problem.
> 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.
Same comment as above. Those options which would require kernel re-build
can be set globally on target if maintainer wants to.
> 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.
You can deselect options with this series. That was the goal and that is
why there are HAVE_* options present. Give it a try.
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
More information about the openwrt-devel