Wifi and Bluetooth support in task-base
Our task-base is restructured now into separate task-base-* ones. Each feature got own metapackage and task-base contain all needed ones for machine.
But there comes problem. Many of our devices have PCI or Pcmcia/CF or USB Host functionality but do not have integrated Wifi or BT so users adds external 'cards/dongles' to get it. With current task-base they do not get them working without installing extra task-base-* packages.
I wrote small patch which change this. If Distro feature wifi then machine with pcmcia/pci/usbhost feature will get task-base-wifi added into task-base. Same goes for Bluetooth.
Someone can say that why not add usbhost support for pcmcia/pci machines - All our pci machines already feature usbhost. USB controllers for cf devices are expensive so only small amount of users have them.
Read patch, comment, complain.
Signature · 5 lines
JID: hrw-jabber.org
OpenEmbedded developer/consultant
Beware of Programmers who carry screwdrivers.
-- Leonard Brandwein#
# old_revision [a5563210e57ff1a3cb7ddee80670313b6e95fdaa] # # patch "packages/tasks/task-base.bb" # from [f42fce68f538f09a771fa2674b72feff0e5c88b4] # to [01ca51df062e419dcf92aca42814c26197770110] # ============================================================ --- packages/tasks/task-base.bb f42fce68f538f09a771fa2674b72feff0e5c88b4 +++ packages/tasks/task-base.bb 01ca51df062e419dcf92aca42814c26197770110 @@ -1,5 +1,5 @@ DESCRIPTION = "Merge machine and distro DESCRIPTION = "Merge machine and distro options to create a basic machine task/package" -PR = "r28" +PR = "r29"
PACKAGES = 'task-boot \
task-base \
@@ -105,7 +105,6 @@ RDEPENDS_task-base = "\
${@base_contains('COMBINED_FEATURES', 'usbgadget', 'task-base-usbgadget', '',d)} \
${@base_contains('COMBINED_FEATURES', 'usbhost', 'task-base-usbhost', '',d)} \
${@base_contains('COMBINED_FEATURES', 'bluetooth', 'task-base-bluetooth', '',d)} \
- ${@base_contains('COMBINED_FEATURES', 'wifi', 'task-base-wifi', '',d)} \
${@base_contains('COMBINED_FEATURES', 'uboot', 'task-base-uboot', '',d)} \
${@base_contains('COMBINED_FEATURES', 'redboot', 'task-base-redboot', '',d)} \
\
@@ -114,8 +113,31 @@ RDEPENDS_task-base = "\
${@base_contains('DISTRO_FEATURES', 'ipsec', 'task-base-ipsec', '',d)} \
${@base_contains('DISTRO_FEATURES', 'ppp', 'task-base-ppp', '',d)} \
${@base_contains('DISTRO_FEATURES', 'raid', 'task-base-raid', '',d)} \
+ \
+ ${ADD_WIFI} \
+ ${ADD_BT} \
"+ADD_WIFI = ""
+ADD_BT = ""
+
+python __anonymous () {
+ import bb + # If Distro want wifi and machine feature wifi/pci/pcmcia/usbhost (one of them) + # then include task-base-wifi in task-base
+
+ distro_features = bb.data.getVar("DISTRO_FEATURES", d, 1)
+ machine_features= bb.data.getVar("MACHINE_FEATURES", d, 1)
+
+ if distro_features.find("bluetooth") and not machine_features.find("bluetooth") and (machine_features.find("pcmcia") or machine_features.find("pci") or machine_features.find("usbhost")):
+ bb.data.setVar("ADD_BT", "task-base-bluetooth", d)
+
+ if distro_features.find("wifi") and not machine_features.find("wifi") and (machine_features.find("pcmcia") or machine_features.find("pci") or machine_features.find("usbhost")):
+ bb.data.setVar("ADD_WIFI", "task-base-wifi", d)
+}
+
+
+
#
# packages added by distribution #
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Marcin Juszkiewicz schreef:
Review
Quoted 4 lines
Read patch, comment, complain.
(quoted diff) +2
-0+ ${ADD_WIFI} \ + ${ADD_BT} \
Maybe DISTRO_ADD_WIFI or DISTRO_HAS_WIFI?
regards,
Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iD8DBQFGLM8KMkyGM64RGpERAk9fAKCjDX/3KUpmwK68fjHgyABu5eDJ3wCglPE/ egiTSzzX4pjaGPHPOUCOVf4=
=IxUh
-----END PGP SIGNATURE-----