Skip to contentSkip to conversation

distro: Add new feature to indicate thumb-interworking.

PATCH In review Khem Raj 2 participants 4 messages Jul 21, 2010 – Jul 24, 2010

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 distro: Add new feature to indicate thumb-interworking.

* This would be used to decide if we can use BX in return instructions in uclibc.

---
 conf/distro/include/angstrom.inc |    3 +++
 conf/distro/include/kaeilos.inc  |    3 +++
 conf/distro/include/slugos.inc   |    9 +++++++++
 conf/distro/minimal-uclibc.conf  |    1 +
 conf/distro/minimal.conf         |    1 +
 recipes/uclibc/uclibc-config.inc |    6 ++----
 6 files changed, 19 insertions(+), 4 deletions(-)
conf/distro/include/angstrom.inc +3 -0
index f13cc22..3ba94fa 100644
@@ -204,3 +204,6 @@ DISTRO_FEATURES = "largefile ipv4 ipv6 nfs smbfs wifi ppp alsa bluetooth ext2 vf
 
 # Use-like features
 DISTRO_FEATURES += "tk"
+
+# Add thumb-interwork to feature list if selected machine supports it.
+DISTRO_FEATURES += ' ${@["", "thumb-interwork"][bb.data.getVar('THUMB_INTERWORK', d, 1) == "yes"]}'
conf/distro/include/kaeilos.inc +3 -0
index bdc4aad..edbad69 100644
@@ -214,3 +214,6 @@ DISTRO_FEATURES = "nfs smbfs wifi ppp alsa bluetooth ext2 vfat irda pcmcia usbga
 
 # Use-like features
 DISTRO_FEATURES += "tk"
+
+# Add thumb-interwork to feature list if selected machine supports it.
+DISTRO_FEATURES += ' ${@["", "thumb-interwork"][bb.data.getVar('THUMB_INTERWORK', d, 1) == "yes"]}'
conf/distro/include/slugos.inc +9 -0
index 807d45d..8d53ffc 100644
@@ -23,9 +23,18 @@ DISTRO_VERSION ?= "${SLUGOS_VERSION}${DISTRO_REVISION}-${DISTRO_TYPE}"
 # DISTRO_FEED ?= "${SLUGOS_VERSION}-${DISTRO_TYPE}"
 DISTRO_FEED ?= "unstable"
 
+THUMB_INTERWORK = "yes"
+# "yes" "no"
+#    Whether to compile with code to allow interworking between the two
+#    instruction sets.  This allows thumb code to be executed on a primarily
+#    arm system and vice versa.  It is strongly recommended that DISTROs not
+#    turn this off - the actual cost is very small.
 # We want images supporting the following features (for task-base)
 DISTRO_FEATURES = "nfs smbfs wifi ppp alsa bluetooth ext2 vfat irda pcmcia usbgadget usbhost pci"
 
+# Add thumb-interwork to feature list if selected machine supports it.
+DISTRO_FEATURES += ' ${@["", "thumb-interwork"][bb.data.getVar('THUMB_INTERWORK', d, 1) == "yes"]}'
+
 IMAGE_BASENAME = "${@['slugos${SITEINFO_ENDIANESS}', 'ucslugc'][bb.data.getVar('TARGET_OS', d, 1) == 'linux-uclibc']}"
 
 # The following need not be set, the defaults should be adequate
conf/distro/minimal-uclibc.conf +1 -0
index 44805cf..287d6de 100644
@@ -44,3 +44,4 @@ DISTRO_FEATURES += "pam"
 DISTRO_FEATURES += "largefile"
 # glib-2.0 nneds ipv6 and there is no knob to control it
 DISTRO_FEATURES += "ipv4 ipv6"
+DISTRO_FEATURES += ' ${@["", "thumb-interwork"][bb.data.getVar('THUMB_INTERWORK', d, 1) == "yes"]}'
conf/distro/minimal.conf +1 -0
index 9a08130..5fbbc33 100644
@@ -33,6 +33,7 @@ DISTRO_FEATURES += "eabi"
 # or higher
 
 DISTRO_FEATURES += "mplt"
+DISTRO_FEATURES += ' ${@["", "thumb-interwork"][bb.data.getVar('THUMB_INTERWORK', d, 1) == "yes"]}'
 
 #############################################################################
 # LIBRARY NAMES
recipes/uclibc/uclibc-config.inc +2 -4
index 5a6fbe8..ef4385e 100644
@@ -94,10 +94,8 @@ def uclibc_cfg(feature, features, tokens, cnf, rem):
 # Map distro and machine features to config settings
 def features_to_uclibc_settings(d):
 	cnf, rem = ([], [])
-	distro_features = bb.data.getVar('DISTRO_FEATURES', d).split()
-	if bb.data.getVar('THUMB_INTERWORKING', d, 1) == "yes":
-		distro_features += "thumb-interworking"
-	#machine_features = bb.data.getVar('MACHINE_FEATURES', d).split()
+	distro_features = bb.data.getVar('DISTRO_FEATURES', d, True).split()
+	#machine_features = bb.data.getVar('MACHINE_FEATURES', d, True).split()
 	uclibc_cfg('ipv4',      distro_features, 'UCLIBC_HAS_IPV4', cnf, rem)
 	uclibc_cfg('ipv6',      distro_features, 'UCLIBC_HAS_IPV6', cnf, rem)
 	uclibc_cfg('largefile', distro_features, 'UCLIBC_HAS_LFS', cnf, rem)
Signature · 1 line
1.7.0.4
#1 lore raw

Review

Quoted 2 lines · Khem Raj
(quoted diff) +2 -0
+# Add thumb-interwork to feature list if selected machine supports it.
+DISTRO_FEATURES += ' ${@["", "thumb-interwork"][bb.data.getVar('THUMB_INTERWORK', d, 1) == "yes"]}'

Would it not be better to put this in some generic place (maybe even bitbake.conf) rather than adding it to every DISTRO individually?

Quoted 4 lines
conf/distro/include/slugos.inc +0 -0
@@ -23,9 +23,18 @@ DISTRO_VERSION ?= "${SLUGOS_VERSION}${DISTRO_REVISION}-${DISTRO_TYPE}"
 # DISTRO_FEED ?= "${SLUGOS_VERSION}-${DISTRO_TYPE}"

conf/distro/include/slugos.inc DISTRO_VERSION ?= "${SLUGOS_VERSION}${DISTRO_REVISION}-${DISTRO_TYPE}" · line 33

Quoted 10 lines
conf/distro/include/slugos.inc +6 -0
 DISTRO_FEED ?= "unstable"
 
+THUMB_INTERWORK = "yes"
+# "yes" "no"
+#    Whether to compile with code to allow interworking between the two
+#    instruction sets.  This allows thumb code to be executed on a primarily
+#    arm system and vice versa.  It is strongly recommended that DISTROs not
+#    turn this off - the actual cost is very small.
 # We want images supporting the following features (for task-base)
 DISTRO_FEATURES = "nfs smbfs wifi ppp alsa bluetooth ext2 vfat irda pcmcia usbgadget usbhost pci"

Is this a policy change for slugos? If so, are the SlugOS people happy with it?

p.

author
#2 lore raw
Quoted 13 lines · Phil Blundell

Review

Quoted 2 lines · Khem Raj
(quoted diff) +2 -0
+# Add thumb-interwork to feature list if selected machine supports it.
+DISTRO_FEATURES += ' ${@["", "thumb-interwork"][bb.data.getVar('THUMB_INTERWORK', d, 1) == "yes"]}'

Would it not be better to put this in some generic place (maybe even bitbake.conf) rather than adding it to every DISTRO individually?

Quoted 6 lines
conf/distro/include/slugos.inc +0 -0
@@ -23,9 +23,18 @@ DISTRO_VERSION ?= "${SLUGOS_VERSION}${DISTRO_REVISION}-${DISTRO_TYPE}"
  # DISTRO_FEED ?= "${SLUGOS_VERSION}-${DISTRO_TYPE}"

 DISTRO_FEED ?= "unstable"

Quoted 12 lines
Quoted 8 lines
conf/distro/include/slugos.inc +6 -0
+THUMB_INTERWORK = "yes"
+# "yes" "no"
+#    Whether to compile with code to allow interworking between the two
+#    instruction sets.  This allows thumb code to be executed on a primarily
+#    arm system and vice versa.  It is strongly recommended that DISTROs not
+#    turn this off - the actual cost is very small.

 # We want images supporting the following features (for task-base) DISTRO_FEATURES = "nfs smbfs wifi ppp alsa bluetooth ext2 vfat irda pcmcia usbgadget usbhost pci"

Is this a policy change for slugos?  If so, are the SlugOS people happy with it?

argggh I did not want to push it just yet. I will revert it. git push pushes staged commits on all branches
I will have to modify my scripts to only push specific branch.

Quoted 8 lines

p.

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

author
#3 lore raw
In reply to Phil Blundell
Quoted 6 lines · Phil Blundell

Review

Quoted 2 lines · Khem Raj
(quoted diff) +2 -0
+# Add thumb-interwork to feature list if selected machine supports it.
+DISTRO_FEATURES += ' ${@["", "thumb-interwork"][bb.data.getVar('THUMB_INTERWORK', d, 1) == "yes"]}'

Would it not be better to put this in some generic place (maybe even bitbake.conf) rather than adding it to every DISTRO individually?

yes thats better I guess.

Quoted 7 lines
Quoted 7 lines
conf/distro/include/slugos.inc +0 -0
@@ -23,9 +23,18 @@ DISTRO_VERSION ?= "${SLUGOS_VERSION}${DISTRO_REVISION}-${DISTRO_TYPE}"
  # DISTRO_FEED ?= "${SLUGOS_VERSION}-${DISTRO_TYPE}"

 DISTRO_FEED ?= "unstable"

Quoted 11 lines
Quoted 8 lines
conf/distro/include/slugos.inc +6 -0
+THUMB_INTERWORK = "yes"
+# "yes" "no"
+#    Whether to compile with code to allow interworking between the two
+#    instruction sets.  This allows thumb code to be executed on a primarily
+#    arm system and vice versa.  It is strongly recommended that DISTROs not
+#    turn this off - the actual cost is very small.

 # We want images supporting the following features (for task-base) DISTRO_FEATURES = "nfs smbfs wifi ppp alsa bluetooth ext2 vfat irda pcmcia usbgadget usbhost pci"

Is this a policy change for slugos?  If so, are the SlugOS people happy with it?

I have tried to build for slugos and the device nslu2 is based on xscale so I this this should be needed for slugos.

Quoted 9 lines

p.

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel