* [PATCH] compat-drivers: Add possibility to build every subsystem separately
@ 2013-02-03 18:33 Ozan Çağlayan
2013-02-03 19:10 ` Hauke Mehrtens
0 siblings, 1 reply; 10+ messages in thread
From: Ozan Çağlayan @ 2013-02-03 18:33 UTC (permalink / raw)
To: backports; +Cc: Ozan Çağlayan
Currently we're enabling both drm and network drivers in
scripts/admin-update.sh by default.
One of the problems is that I don't want to build network drivers at
all. If I change admin-update.sh to disable network drivers, another
problem arises: Makefile tries to add objects without looking at all
what subsystem is enabled.
This patch addresses this problem by keeping the names of enabled
subsystems in a text file called ".enabled_subsystems". Makefile then
looks in it to conditionally enable drm, network or both.
Signed-off-by: Ozan Çağlayan <ozancag@gmail.com>
---
Makefile | 22 +++++++++++++---------
scripts/admin-clean.sh | 1 +
scripts/admin-update.sh | 8 +++++---
3 files changed, 19 insertions(+), 12 deletions(-)
diff --git a/Makefile b/Makefile
index e986a09..1f42511 100644
--- a/Makefile
+++ b/Makefile
@@ -40,10 +40,13 @@ NOSTDINC_FLAGS := \
obj-y := compat/
-obj-$(CONFIG_COMPAT_RFKILL) += net/rfkill/
-obj-$(CONFIG_COMPAT_VIDEO_MODULES) += drivers/gpu/drm/
-ifeq ($(BT),)
+ifneq (,$(findstring drm, $(SUBSYSTEMS)))
+ obj-$(CONFIG_COMPAT_VIDEO_MODULES) += drivers/gpu/drm/
+endif
+
+ifneq (,$(findstring network, $(SUBSYSTEMS)))
+obj-$(CONFIG_COMPAT_RFKILL) += net/rfkill/
obj-$(CONFIG_COMPAT_WIRELESS) += net/wireless/ net/mac80211/
obj-$(CONFIG_COMPAT_WIRELESS_MODULES) += drivers/net/wireless/
@@ -56,14 +59,14 @@ obj-$(CONFIG_COMPAT_VAR_MODULES) += drivers/ssb/
obj-$(CONFIG_COMPAT_VAR_MODULES) += drivers/bcma/
obj-$(CONFIG_COMPAT_VAR_MODULES) += drivers/misc/eeprom/
+obj-$(CONFIG_COMPAT_BLUETOOTH) += net/bluetooth/
+obj-$(CONFIG_COMPAT_BLUETOOTH_MODULES) += drivers/bluetooth/
+
ifeq ($(CONFIG_STAGING_EXCLUDE_BUILD),)
endif
endif
-obj-$(CONFIG_COMPAT_BLUETOOTH) += net/bluetooth/
-obj-$(CONFIG_COMPAT_BLUETOOTH_MODULES) += drivers/bluetooth/
-
else
export PWD := $(shell pwd)
@@ -90,6 +93,7 @@ export COMPAT_AUTOCONF=include/linux/compat_autoconf.h
export CREL=$(shell cat $(PWD)/.compat_version)
export CREL_PRE:=.compat_autoconf_
export CREL_CHECK:=$(PWD)/$(CREL_PRE)$(CREL)
+export SUBSYSTEMS = $(shell cat $(PWD)/.enabled_subsystems)
all: modules
@@ -102,7 +106,7 @@ modules: $(CREL_CHECK)
bt: $(CREL_CHECK)
+@./scripts/check_config.sh
- $(MAKE) -C $(KLIB_BUILD) M=$(PWD) BT=TRUE modules
+ $(MAKE) -C $(KLIB_BUILD) M=$(PWD) modules
@touch $@
# We use a CREL_CHECK variable which will depend on the environment used to
@@ -124,7 +128,7 @@ $(CREL_CHECK):
btinstall: btuninstall bt-install-modules
bt-install-modules: bt
- $(MAKE) -C $(KLIB_BUILD) M=$(PWD) $(KMODDIR_ARG) $(KMODPATH_ARG) BT=TRUE \
+ $(MAKE) -C $(KLIB_BUILD) M=$(PWD) $(KMODDIR_ARG) $(KMODPATH_ARG) \
modules_install
@/sbin/depmod -ae
@echo
@@ -145,7 +149,7 @@ btuninstall:
@echo
btclean:
- $(MAKE) -C /lib/modules/$(shell uname -r)/build M=$(PWD) BT=TRUE clean
+ $(MAKE) -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
@rm -f $(CREL_PRE)*
install: uninstall install-modules install-scripts
diff --git a/scripts/admin-clean.sh b/scripts/admin-clean.sh
index dd26670..2579046 100755
--- a/scripts/admin-clean.sh
+++ b/scripts/admin-clean.sh
@@ -10,5 +10,6 @@ rm -rf udev
rm -f .compat_base_tree
rm -f .compat_base_tree_version
rm -f .compat_version
+rm -f .enabled_subsystems
rm -f code-metrics.txt
echo "Cleaned compat-drivers"
diff --git a/scripts/admin-update.sh b/scripts/admin-update.sh
index 73f0cea..5a63064 100755
--- a/scripts/admin-update.sh
+++ b/scripts/admin-update.sh
@@ -222,8 +222,8 @@ copyDirectories() {
# drivers will be fetched in from the GIT repository. To retain
# compatibility with compat-wireless, wlan/bt/eth drivers are
# fetched in by default.
-ENABLE_NETWORK=1
-ENABLE_DRM=1
+ENABLE_NETWORK=0
+ENABLE_DRM=0
ENABLE_UNIFIED=0
SUBSYSTEMS=
UNIFIED_DRIVERS=
@@ -576,7 +576,6 @@ if [ $# -ge 1 ]; then
;;
"network")
ENABLE_NETWORK=1
- ENABLE_DRM=0
shift
;;
"drm")
@@ -606,6 +605,9 @@ if [[ "$ENABLE_DRM" == "1" ]]; then
SUBSYSTEMS+=" drm"
fi
+# Write down enabled subsystems
+echo "$SUBSYSTEMS" > .enabled_subsystems
+
if [[ "$ENABLE_NETWORK" == "1" ]]; then
# WLAN and bluetooth files
copyFiles "$INCLUDE_LINUX_WLAN" "include/linux"
--
1.8.1.2
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH] compat-drivers: Add possibility to build every subsystem separately
2013-02-03 18:33 [PATCH] compat-drivers: Add possibility to build every subsystem separately Ozan Çağlayan
@ 2013-02-03 19:10 ` Hauke Mehrtens
2013-02-03 19:19 ` Ozan Çağlayan
0 siblings, 1 reply; 10+ messages in thread
From: Hauke Mehrtens @ 2013-02-03 19:10 UTC (permalink / raw)
To: Ozan Çağlayan; +Cc: backports
On 02/03/2013 07:33 PM, Ozan Çağlayan wrote:
> Currently we're enabling both drm and network drivers in
> scripts/admin-update.sh by default.
>
> One of the problems is that I don't want to build network drivers at
> all. If I change admin-update.sh to disable network drivers, another
> problem arises: Makefile tries to add objects without looking at all
> what subsystem is enabled.
>
> This patch addresses this problem by keeping the names of enabled
> subsystems in a text file called ".enabled_subsystems". Makefile then
> looks in it to conditionally enable drm, network or both.
>
> Signed-off-by: Ozan Çağlayan <ozancag@gmail.com>
> ---
> Makefile | 22 +++++++++++++---------
> scripts/admin-clean.sh | 1 +
> scripts/admin-update.sh | 8 +++++---
> 3 files changed, 19 insertions(+), 12 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index e986a09..1f42511 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -40,10 +40,13 @@ NOSTDINC_FLAGS := \
>
> obj-y := compat/
>
> -obj-$(CONFIG_COMPAT_RFKILL) += net/rfkill/
> -obj-$(CONFIG_COMPAT_VIDEO_MODULES) += drivers/gpu/drm/
>
> -ifeq ($(BT),)
> +ifneq (,$(findstring drm, $(SUBSYSTEMS)))
> + obj-$(CONFIG_COMPAT_VIDEO_MODULES) += drivers/gpu/drm/
> +endif
> +
> +ifneq (,$(findstring network, $(SUBSYSTEMS)))
> +obj-$(CONFIG_COMPAT_RFKILL) += net/rfkill/
> obj-$(CONFIG_COMPAT_WIRELESS) += net/wireless/ net/mac80211/
> obj-$(CONFIG_COMPAT_WIRELESS_MODULES) += drivers/net/wireless/
>
> @@ -56,14 +59,14 @@ obj-$(CONFIG_COMPAT_VAR_MODULES) += drivers/ssb/
> obj-$(CONFIG_COMPAT_VAR_MODULES) += drivers/bcma/
> obj-$(CONFIG_COMPAT_VAR_MODULES) += drivers/misc/eeprom/
>
> +obj-$(CONFIG_COMPAT_BLUETOOTH) += net/bluetooth/
> +obj-$(CONFIG_COMPAT_BLUETOOTH_MODULES) += drivers/bluetooth/
> +
Why are you removing the ifeq ($(BT),) here?
> ifeq ($(CONFIG_STAGING_EXCLUDE_BUILD),)
> endif
>
> endif
>
> -obj-$(CONFIG_COMPAT_BLUETOOTH) += net/bluetooth/
> -obj-$(CONFIG_COMPAT_BLUETOOTH_MODULES) += drivers/bluetooth/
> -
> else
>
> export PWD := $(shell pwd)
> @@ -90,6 +93,7 @@ export COMPAT_AUTOCONF=include/linux/compat_autoconf.h
> export CREL=$(shell cat $(PWD)/.compat_version)
> export CREL_PRE:=.compat_autoconf_
> export CREL_CHECK:=$(PWD)/$(CREL_PRE)$(CREL)
> +export SUBSYSTEMS = $(shell cat $(PWD)/.enabled_subsystems)
>
> all: modules
>
> @@ -102,7 +106,7 @@ modules: $(CREL_CHECK)
>
> bt: $(CREL_CHECK)
> +@./scripts/check_config.sh
> - $(MAKE) -C $(KLIB_BUILD) M=$(PWD) BT=TRUE modules
> + $(MAKE) -C $(KLIB_BUILD) M=$(PWD) modules
> @touch $@
>
> # We use a CREL_CHECK variable which will depend on the environment used to
> @@ -124,7 +128,7 @@ $(CREL_CHECK):
> btinstall: btuninstall bt-install-modules
>
> bt-install-modules: bt
> - $(MAKE) -C $(KLIB_BUILD) M=$(PWD) $(KMODDIR_ARG) $(KMODPATH_ARG) BT=TRUE \
> + $(MAKE) -C $(KLIB_BUILD) M=$(PWD) $(KMODDIR_ARG) $(KMODPATH_ARG) \
> modules_install
> @/sbin/depmod -ae
> @echo
> @@ -145,7 +149,7 @@ btuninstall:
> @echo
>
> btclean:
> - $(MAKE) -C /lib/modules/$(shell uname -r)/build M=$(PWD) BT=TRUE clean
> + $(MAKE) -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
> @rm -f $(CREL_PRE)*
>
> install: uninstall install-modules install-scripts
> diff --git a/scripts/admin-clean.sh b/scripts/admin-clean.sh
> index dd26670..2579046 100755
> --- a/scripts/admin-clean.sh
> +++ b/scripts/admin-clean.sh
> @@ -10,5 +10,6 @@ rm -rf udev
> rm -f .compat_base_tree
> rm -f .compat_base_tree_version
> rm -f .compat_version
> +rm -f .enabled_subsystems
> rm -f code-metrics.txt
> echo "Cleaned compat-drivers"
> diff --git a/scripts/admin-update.sh b/scripts/admin-update.sh
> index 73f0cea..5a63064 100755
> --- a/scripts/admin-update.sh
> +++ b/scripts/admin-update.sh
> @@ -222,8 +222,8 @@ copyDirectories() {
> # drivers will be fetched in from the GIT repository. To retain
> # compatibility with compat-wireless, wlan/bt/eth drivers are
> # fetched in by default.
> -ENABLE_NETWORK=1
> -ENABLE_DRM=1
> +ENABLE_NETWORK=0
> +ENABLE_DRM=0
I think it is better to add all (gpu and network) when nothing specific
was given, this way the script does the same when the same parameters
are given than it did before.
> ENABLE_UNIFIED=0
> SUBSYSTEMS=
> UNIFIED_DRIVERS=
> @@ -576,7 +576,6 @@ if [ $# -ge 1 ]; then
> ;;
> "network")
> ENABLE_NETWORK=1
> - ENABLE_DRM=0
> shift
> ;;
> "drm")
> @@ -606,6 +605,9 @@ if [[ "$ENABLE_DRM" == "1" ]]; then
> SUBSYSTEMS+=" drm"
> fi
>
> +# Write down enabled subsystems
> +echo "$SUBSYSTEMS" > .enabled_subsystems
> +
> if [[ "$ENABLE_NETWORK" == "1" ]]; then
> # WLAN and bluetooth files
> copyFiles "$INCLUDE_LINUX_WLAN" "include/linux"
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] compat-drivers: Add possibility to build every subsystem separately
2013-02-03 19:10 ` Hauke Mehrtens
@ 2013-02-03 19:19 ` Ozan Çağlayan
2013-02-12 21:18 ` Hauke Mehrtens
0 siblings, 1 reply; 10+ messages in thread
From: Ozan Çağlayan @ 2013-02-03 19:19 UTC (permalink / raw)
To: Hauke Mehrtens; +Cc: backports
>
> Why are you removing the ifeq ($(BT),) here?
Well I didn't get what it does. (It seems to switch on/off bluetooth
but not in an intuitive way) Also it was always set to True without
user's intervention so I removed it to provoke a discussion about its
functionality :p
> I think it is better to add all (gpu and network) when nothing specific
> was given, this way the script does the same when the same parameters
> are given than it did before.
Well yes you are right but then we have to change the parameter logic
to support disabling subsystems, e.g.
admin-update.sh --disable-network.
--
Ozan Çağlayan
Research Assistant
Galatasaray University - Computer Engineering Dept.
http://www.ozancaglayan.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] compat-drivers: Add possibility to build every subsystem separately
2013-02-03 19:19 ` Ozan Çağlayan
@ 2013-02-12 21:18 ` Hauke Mehrtens
2013-03-12 9:13 ` Ozan Çağlayan
0 siblings, 1 reply; 10+ messages in thread
From: Hauke Mehrtens @ 2013-02-12 21:18 UTC (permalink / raw)
To: Ozan Çağlayan; +Cc: backports
On 02/03/2013 08:19 PM, Ozan Çağlayan wrote:
>>
>> Why are you removing the ifeq ($(BT),) here?
>
> Well I didn't get what it does. (It seems to switch on/off bluetooth
> but not in an intuitive way) Also it was always set to True without
> user's intervention so I removed it to provoke a discussion about its
> functionality :p
I do not get it neither. ;-)
Could you remove it in a separate patch., in the long term it be nice to
deactivate it like gpu and network independently from the other network
stuff.
>> I think it is better to add all (gpu and network) when nothing specific
>> was given, this way the script does the same when the same parameters
>> are given than it did before.
>
> Well yes you are right but then we have to change the parameter logic
> to support disabling subsystems, e.g.
>
> admin-update.sh --disable-network.
Isn't there a away to treat everything as selected if nothing is given
and if something was given just build that particular subsystem.
Hmm, the longer I think about it this also does not sound very nice. I
think your first approach is better, just add the selected subsystems
But a help page should be displayed when nothing was given explaining
what to do.
Hauke
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] compat-drivers: Add possibility to build every subsystem separately
2013-02-12 21:18 ` Hauke Mehrtens
@ 2013-03-12 9:13 ` Ozan Çağlayan
2013-03-12 10:51 ` Luis R. Rodriguez
0 siblings, 1 reply; 10+ messages in thread
From: Ozan Çağlayan @ 2013-03-12 9:13 UTC (permalink / raw)
To: Hauke Mehrtens; +Cc: backports, mcgrof
Bringing this again. Luis, what do you think?
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] compat-drivers: Add possibility to build every subsystem separately
2013-03-12 9:13 ` Ozan Çağlayan
@ 2013-03-12 10:51 ` Luis R. Rodriguez
2013-03-12 12:12 ` Ozan Çağlayan
0 siblings, 1 reply; 10+ messages in thread
From: Luis R. Rodriguez @ 2013-03-12 10:51 UTC (permalink / raw)
To: Ozan Çağlayan; +Cc: Hauke Mehrtens, backports, mcgrof
On Tue, Mar 12, 2013 at 2:13 AM, Ozan =C3=87a=C4=9Flayan <ozancag@gmail.com=
> wrote:
> Bringing this again. Luis, what do you think?
I read this thread when I got back from the mountains and agreed with
Hauke's recommendation.
Luis
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] compat-drivers: Add possibility to build every subsystem separately
2013-03-12 10:51 ` Luis R. Rodriguez
@ 2013-03-12 12:12 ` Ozan Çağlayan
2013-03-12 20:36 ` Luis R. Rodriguez
0 siblings, 1 reply; 10+ messages in thread
From: Ozan Çağlayan @ 2013-03-12 12:12 UTC (permalink / raw)
To: Luis R. Rodriguez; +Cc: Hauke Mehrtens, backports, mcgrof
> I read this thread when I got back from the mountains and agreed with
> Hauke's recommendation.
>
> Luis
Can you clarify what does $BT, BT=3DTrue achieve? It looks like it was
some kind of switch to enable/disable BT but I can't be sure.
On the other part, Hauke first suggested a different thing and then another=
way.
Should we enable all by default and --disable the unwanted ones or
should we disable and print a usage by default and add --enable
switches to enable subsystems?
Thanks :)
--=20
Ozan =C3=87a=C4=9Flayan
Research Assistant
Galatasaray University - Computer Engineering Dept.
http://www.ozancaglayan.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] compat-drivers: Add possibility to build every subsystem separately
2013-03-12 12:12 ` Ozan Çağlayan
@ 2013-03-12 20:36 ` Luis R. Rodriguez
2013-03-15 8:48 ` Luis R. Rodriguez
0 siblings, 1 reply; 10+ messages in thread
From: Luis R. Rodriguez @ 2013-03-12 20:36 UTC (permalink / raw)
To: Ozan Çağlayan
Cc: Luis R. Rodriguez, Hauke Mehrtens, backports, mcgrof
On Tue, Mar 12, 2013 at 02:12:15PM +0200, Ozan Çağlayan wrote:
> > I read this thread when I got back from the mountains and agreed with
> > Hauke's recommendation.
> >
> > Luis
>
> Can you clarify what does $BT, BT=True achieve? It looks like it was
> some kind of switch to enable/disable BT but I can't be sure.
Yeah that's legacy junk, nuke it at your liking.
> On the other part, Hauke first suggested a different thing and then another
> way.
I think the concern was to not build everything on the stock
vanilla release.
> Should we enable all by default and --disable the unwanted ones or
> should we disable and print a usage by default and add --enable
> switches to enable subsystems?
How about something very simple:
* Enable all by default
* Use Kconfig to allow us to select 4 subsystems:
- Ethernet
- WiFi
- Bluetooth
- DRM
This way we'd keep the logic easy for an initial implementation
to support Kconfig (scripts/kconfig/mconf.c) and then build on
top of it to expand specifics.
Luis
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] compat-drivers: Add possibility to build every subsystem separately
2013-03-12 20:36 ` Luis R. Rodriguez
@ 2013-03-15 8:48 ` Luis R. Rodriguez
2013-03-15 9:09 ` Ozan Çağlayan
0 siblings, 1 reply; 10+ messages in thread
From: Luis R. Rodriguez @ 2013-03-15 8:48 UTC (permalink / raw)
To: Ozan Çağlayan
Cc: Luis R. Rodriguez, Hauke Mehrtens, backports, mcgrof
On Tue, Mar 12, 2013 at 1:36 PM, Luis R. Rodriguez
<rodrigue@qca.qualcomm.com> wrote:
> On Tue, Mar 12, 2013 at 02:12:15PM +0200, Ozan =C3=87a=C4=9Flayan wrote:
>> > I read this thread when I got back from the mountains and agreed with
>> > Hauke's recommendation.
>> >
>> > Luis
>>
>> Can you clarify what does $BT, BT=3DTrue achieve? It looks like it was
>> some kind of switch to enable/disable BT but I can't be sure.
>
> Yeah that's legacy junk, nuke it at your liking.
>
>> On the other part, Hauke first suggested a different thing and then anot=
her
>> way.
>
> I think the concern was to not build everything on the stock
> vanilla release.
>
>> Should we enable all by default and --disable the unwanted ones or
>> should we disable and print a usage by default and add --enable
>> switches to enable subsystems?
>
> How about something very simple:
>
> * Enable all by default
>
> * Use Kconfig to allow us to select 4 subsystems:
> - Ethernet
> - WiFi
> - Bluetooth
> - DRM
>
> This way we'd keep the logic easy for an initial implementation
> to support Kconfig (scripts/kconfig/mconf.c) and then build on
> top of it to expand specifics.
But I think I get the issue you were pointing out though -- its not
about the building you are concerned about separating, its about the
admin work of fixing patches that might be broken for other subystems.
You want the option to say you don't care about a subsystem at
admin-update time. Is that right?
Luis
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] compat-drivers: Add possibility to build every subsystem separately
2013-03-15 8:48 ` Luis R. Rodriguez
@ 2013-03-15 9:09 ` Ozan Çağlayan
0 siblings, 0 replies; 10+ messages in thread
From: Ozan Çağlayan @ 2013-03-15 9:09 UTC (permalink / raw)
To: Luis R. Rodriguez; +Cc: Hauke Mehrtens, backports, mcgrof
> But I think I get the issue you were pointing out though -- its not
> about the building you are concerned about separating, its about the
> admin work of fixing patches that might be broken for other subystems.
> You want the option to say you don't care about a subsystem at
> admin-update time. Is that right?
No not at all. Just for building. I just want to build DRM drivers for
example and it is not quiet easy to do this by hand. You have to
modify the makefile, etc.
--=20
Ozan =C3=87a=C4=9Flayan
Research Assistant
Galatasaray University - Computer Engineering Dept.
http://www.ozancaglayan.com
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2013-03-15 9:09 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-03 18:33 [PATCH] compat-drivers: Add possibility to build every subsystem separately Ozan Çağlayan
2013-02-03 19:10 ` Hauke Mehrtens
2013-02-03 19:19 ` Ozan Çağlayan
2013-02-12 21:18 ` Hauke Mehrtens
2013-03-12 9:13 ` Ozan Çağlayan
2013-03-12 10:51 ` Luis R. Rodriguez
2013-03-12 12:12 ` Ozan Çağlayan
2013-03-12 20:36 ` Luis R. Rodriguez
2013-03-15 8:48 ` Luis R. Rodriguez
2013-03-15 9:09 ` Ozan Çağlayan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.