Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | SUMMARY = "Merge machine and distro options to create a basic machine task/package" |
| 2 | LICENSE = "MIT" |
| 3 | PR = "r83" |
| 4 | |
| 5 | # |
| 6 | # packages which content depend on MACHINE_FEATURES need to be MACHINE_ARCH |
| 7 | # |
| 8 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
| 9 | |
| 10 | inherit packagegroup |
| 11 | inherit bluetooth |
| 12 | |
| 13 | PROVIDES = "${PACKAGES}" |
| 14 | PACKAGES = ' \ |
| 15 | packagegroup-base \ |
| 16 | packagegroup-base-extended \ |
| 17 | packagegroup-distro-base \ |
| 18 | packagegroup-machine-base \ |
| 19 | \ |
| 20 | ${@bb.utils.contains("MACHINE_FEATURES", "acpi", "packagegroup-base-acpi", "",d)} \ |
| 21 | ${@bb.utils.contains("MACHINE_FEATURES", "alsa", "packagegroup-base-alsa", "", d)} \ |
| 22 | ${@bb.utils.contains("MACHINE_FEATURES", "apm", "packagegroup-base-apm", "", d)} \ |
| 23 | ${@bb.utils.contains("MACHINE_FEATURES", "ext2", "packagegroup-base-ext2", "", d)} \ |
| 24 | ${@bb.utils.contains("MACHINE_FEATURES", "vfat", "packagegroup-base-vfat", "", d)} \ |
| 25 | ${@bb.utils.contains("MACHINE_FEATURES", "irda", "packagegroup-base-irda", "",d)} \ |
| 26 | ${@bb.utils.contains("MACHINE_FEATURES", "keyboard", "packagegroup-base-keyboard", "", d)} \ |
| 27 | ${@bb.utils.contains("MACHINE_FEATURES", "pci", "packagegroup-base-pci", "",d)} \ |
| 28 | ${@bb.utils.contains("MACHINE_FEATURES", "pcmcia", "packagegroup-base-pcmcia", "", d)} \ |
| 29 | ${@bb.utils.contains("MACHINE_FEATURES", "phone", "packagegroup-base-phone", "", d)} \ |
| 30 | ${@bb.utils.contains("MACHINE_FEATURES", "serial", "packagegroup-base-serial", "", d)} \ |
| 31 | ${@bb.utils.contains("MACHINE_FEATURES", "usbgadget", "packagegroup-base-usbgadget", "", d)} \ |
| 32 | ${@bb.utils.contains("MACHINE_FEATURES", "usbhost", "packagegroup-base-usbhost", "", d)} \ |
| 33 | \ |
| 34 | ${@bb.utils.contains("DISTRO_FEATURES", "bluetooth", "packagegroup-base-bluetooth", "", d)} \ |
| 35 | ${@bb.utils.contains("DISTRO_FEATURES", "wifi", "packagegroup-base-wifi", "", d)} \ |
| 36 | ${@bb.utils.contains("DISTRO_FEATURES", "3g", "packagegroup-base-3g", "", d)} \ |
| 37 | ${@bb.utils.contains("DISTRO_FEATURES", "nfc", "packagegroup-base-nfc", "", d)} \ |
| 38 | ${@bb.utils.contains("DISTRO_FEATURES", "cramfs", "packagegroup-base-cramfs", "", d)} \ |
| 39 | ${@bb.utils.contains("DISTRO_FEATURES", "ipsec", "packagegroup-base-ipsec", "", d)} \ |
| 40 | ${@bb.utils.contains("DISTRO_FEATURES", "ipv6", "packagegroup-base-ipv6", "", d)} \ |
| 41 | ${@bb.utils.contains("DISTRO_FEATURES", "nfs", "packagegroup-base-nfs", "", d)} \ |
| 42 | ${@bb.utils.contains("DISTRO_FEATURES", "ppp", "packagegroup-base-ppp", "", d)} \ |
| 43 | ${@bb.utils.contains("DISTRO_FEATURES", "smbfs", "packagegroup-base-smbfs", "", d)} \ |
| 44 | ${@bb.utils.contains("DISTRO_FEATURES", "zeroconf", "packagegroup-base-zeroconf", "", d)} \ |
| 45 | \ |
| 46 | ' |
| 47 | |
| 48 | # Override by distro if needed |
| 49 | VIRTUAL-RUNTIME_keymaps ?= "keymaps" |
| 50 | |
| 51 | # |
| 52 | # packagegroup-base contain stuff needed for base system (machine related) |
| 53 | # |
| 54 | RDEPENDS_packagegroup-base = "\ |
| 55 | packagegroup-distro-base \ |
| 56 | packagegroup-machine-base \ |
| 57 | \ |
| 58 | sysfsutils \ |
| 59 | module-init-tools \ |
| 60 | ${@bb.utils.contains('MACHINE_FEATURES', 'apm', 'packagegroup-base-apm', '',d)} \ |
| 61 | ${@bb.utils.contains('MACHINE_FEATURES', 'acpi', 'packagegroup-base-acpi', '',d)} \ |
| 62 | ${@bb.utils.contains('MACHINE_FEATURES', 'keyboard', 'packagegroup-base-keyboard', '',d)} \ |
| 63 | ${@bb.utils.contains('MACHINE_FEATURES', 'phone', 'packagegroup-base-phone', '',d)} \ |
| 64 | \ |
| 65 | ${@bb.utils.contains('COMBINED_FEATURES', 'alsa', 'packagegroup-base-alsa', '',d)} \ |
| 66 | ${@bb.utils.contains('COMBINED_FEATURES', 'ext2', 'packagegroup-base-ext2', '',d)} \ |
| 67 | ${@bb.utils.contains('COMBINED_FEATURES', 'vfat', 'packagegroup-base-vfat', '',d)} \ |
| 68 | ${@bb.utils.contains('COMBINED_FEATURES', 'irda', 'packagegroup-base-irda', '',d)} \ |
| 69 | ${@bb.utils.contains('COMBINED_FEATURES', 'pci', 'packagegroup-base-pci', '',d)} \ |
| 70 | ${@bb.utils.contains('COMBINED_FEATURES', 'pcmcia', 'packagegroup-base-pcmcia', '',d)} \ |
| 71 | ${@bb.utils.contains('COMBINED_FEATURES', 'usbgadget', 'packagegroup-base-usbgadget', '',d)} \ |
| 72 | ${@bb.utils.contains('COMBINED_FEATURES', 'usbhost', 'packagegroup-base-usbhost', '',d)} \ |
| 73 | ${@bb.utils.contains('COMBINED_FEATURES', 'bluetooth', 'packagegroup-base-bluetooth', '',d)} \ |
| 74 | ${@bb.utils.contains('COMBINED_FEATURES', 'wifi', 'packagegroup-base-wifi', '',d)} \ |
| 75 | ${@bb.utils.contains('COMBINED_FEATURES', '3g', 'packagegroup-base-3g', '',d)} \ |
| 76 | ${@bb.utils.contains('COMBINED_FEATURES', 'nfc', 'packagegroup-base-nfc', '',d)} \ |
| 77 | \ |
| 78 | ${@bb.utils.contains('DISTRO_FEATURES', 'nfs', 'packagegroup-base-nfs', '',d)} \ |
| 79 | ${@bb.utils.contains('DISTRO_FEATURES', 'cramfs', 'packagegroup-base-cramfs', '',d)} \ |
| 80 | ${@bb.utils.contains('DISTRO_FEATURES', 'smbfs', 'packagegroup-base-smbfs', '',d)} \ |
| 81 | ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'packagegroup-base-ipv6', '',d)} \ |
| 82 | ${@bb.utils.contains('DISTRO_FEATURES', 'ipsec', 'packagegroup-base-ipsec', '',d)} \ |
| 83 | ${@bb.utils.contains('DISTRO_FEATURES', 'ppp', 'packagegroup-base-ppp', '',d)} \ |
| 84 | ${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'packagegroup-base-zeroconf', '',d)} \ |
| 85 | " |
| 86 | |
| 87 | |
| 88 | RRECOMMENDS_packagegroup-base = "\ |
| 89 | kernel-module-nls-utf8 \ |
| 90 | kernel-module-input \ |
| 91 | kernel-module-uinput \ |
| 92 | kernel-module-rtc-dev \ |
| 93 | kernel-module-rtc-proc \ |
| 94 | kernel-module-rtc-sysfs \ |
| 95 | kernel-module-unix" |
| 96 | |
| 97 | RDEPENDS_packagegroup-base-extended = "\ |
| 98 | packagegroup-base \ |
| 99 | ${ADD_WIFI} \ |
| 100 | ${ADD_BT} \ |
| 101 | ${ADD_3G} \ |
| 102 | ${ADD_NFC} \ |
| 103 | " |
| 104 | |
| 105 | ADD_WIFI = "" |
| 106 | ADD_BT = "" |
| 107 | ADD_3G = "" |
| 108 | ADD_NFC = "" |
| 109 | |
| 110 | python __anonymous () { |
| 111 | # If Distro want wifi and machine feature wifi/pci/pcmcia/usbhost (one of them) |
| 112 | # then include packagegroup-base-wifi in packagegroup-base |
| 113 | |
| 114 | distro_features = set(d.getVar("DISTRO_FEATURES", True).split()) |
| 115 | machine_features= set(d.getVar("MACHINE_FEATURES", True).split()) |
| 116 | |
| 117 | if "bluetooth" in distro_features and not "bluetooth" in machine_features and ("pcmcia" in machine_features or "pci" in machine_features or "usbhost" in machine_features): |
| 118 | d.setVar("ADD_BT", "packagegroup-base-bluetooth") |
| 119 | |
| 120 | if "wifi" in distro_features and not "wifi" in machine_features and ("pcmcia" in machine_features or "pci" in machine_features or "usbhost" in machine_features): |
| 121 | d.setVar("ADD_WIFI", "packagegroup-base-wifi") |
| 122 | |
| 123 | if "3g" in distro_features and not "3g" in machine_features and ("pcmcia" in machine_features or "pci" in machine_features or "usbhost" in machine_features): |
| 124 | d.setVar("ADD_3G", "packagegroup-base-3g") |
| 125 | |
| 126 | if "nfc" in distro_features and not "nfc" in machine_features and ("usbhost" in machine_features): |
| 127 | d.setVar("ADD_NFC", "packagegroup-base-nfc") |
| 128 | } |
| 129 | |
| 130 | # |
| 131 | # packages added by distribution |
| 132 | # |
| 133 | SUMMARY_packagegroup-distro-base = "${DISTRO} extras" |
| 134 | DEPENDS_packagegroup-distro-base = "${DISTRO_EXTRA_DEPENDS}" |
| 135 | RDEPENDS_packagegroup-distro-base = "${DISTRO_EXTRA_RDEPENDS}" |
| 136 | RRECOMMENDS_packagegroup-distro-base = "${DISTRO_EXTRA_RRECOMMENDS}" |
| 137 | |
| 138 | # |
| 139 | # packages added by machine config |
| 140 | # |
| 141 | SUMMARY_packagegroup-machine-base = "${MACHINE} extras" |
| 142 | SUMMARY_packagegroup-machine-base = "Extra packages required to fully support ${MACHINE} hardware" |
| 143 | RDEPENDS_packagegroup-machine-base = "${MACHINE_EXTRA_RDEPENDS}" |
| 144 | RRECOMMENDS_packagegroup-machine-base = "${MACHINE_EXTRA_RRECOMMENDS}" |
| 145 | |
| 146 | SUMMARY_packagegroup-base-keyboard = "Keyboard support" |
| 147 | RDEPENDS_packagegroup-base-keyboard = "\ |
| 148 | ${VIRTUAL-RUNTIME_keymaps}" |
| 149 | |
| 150 | SUMMARY_packagegroup-base-pci = "PCI bus support" |
| 151 | RDEPENDS_packagegroup-base-pci = "\ |
| 152 | pciutils" |
| 153 | |
| 154 | SUMMARY_packagegroup-base-acpi = "ACPI support" |
| 155 | RDEPENDS_packagegroup-base-acpi = "\ |
| 156 | acpid \ |
| 157 | libacpi " |
| 158 | |
| 159 | SUMMARY_packagegroup-base-apm = "APM support" |
| 160 | RDEPENDS_packagegroup-base-apm = "\ |
| 161 | ${VIRTUAL-RUNTIME_apm} \ |
| 162 | apmd" |
| 163 | |
| 164 | SUMMARY_packagegroup-base-ext2 = "ext2 filesystem support" |
| 165 | RDEPENDS_packagegroup-base-ext2 = "\ |
| 166 | hdparm \ |
| 167 | e2fsprogs \ |
| 168 | e2fsprogs-e2fsck \ |
| 169 | e2fsprogs-mke2fs" |
| 170 | |
| 171 | SUMMARY_packagegroup-base-vfat = "FAT filesystem support" |
| 172 | RRECOMMENDS_packagegroup-base-vfat = "\ |
| 173 | kernel-module-msdos \ |
| 174 | kernel-module-vfat \ |
| 175 | kernel-module-nls-iso8859-1 \ |
| 176 | kernel-module-nls-cp437 \ |
| 177 | dosfstools" |
| 178 | |
| 179 | SUMMARY_packagegroup-base-alsa = "ALSA sound support" |
| 180 | RDEPENDS_packagegroup-base-alsa = "\ |
| 181 | alsa-utils-alsactl \ |
| 182 | alsa-utils-alsamixer \ |
| 183 | ${VIRTUAL-RUNTIME_alsa-state}" |
| 184 | |
| 185 | RRECOMMENDS_packagegroup-base-alsa = "\ |
| 186 | kernel-module-snd-mixer-oss \ |
| 187 | kernel-module-snd-pcm-oss" |
| 188 | |
| 189 | SUMMARY_packagegroup-base-pcmcia = "PC card slot support" |
| 190 | RDEPENDS_packagegroup-base-pcmcia = "\ |
| 191 | pcmciautils \ |
| 192 | " |
| 193 | |
| 194 | RRECOMMENDS_packagegroup-base-pcmcia = "\ |
| 195 | kernel-module-pcmcia \ |
| 196 | kernel-module-airo-cs \ |
| 197 | kernel-module-pcnet-cs \ |
| 198 | kernel-module-serial-cs \ |
| 199 | kernel-module-ide-cs \ |
| 200 | kernel-module-ide-disk \ |
| 201 | ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'kernel-module-hostap-cs', '',d)} \ |
| 202 | ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'kernel-module-orinoco-cs', '',d)} \ |
| 203 | ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'kernel-module-spectrum-cs', '',d)}" |
| 204 | |
| 205 | SUMMARY_packagegroup-base-bluetooth = "Bluetooth support" |
| 206 | RDEPENDS_packagegroup-base-bluetooth = "\ |
| 207 | ${BLUEZ} \ |
| 208 | ${@bb.utils.contains('COMBINED_FEATURES', 'alsa', 'libasound-module-bluez', '',d)} \ |
| 209 | " |
| 210 | |
| 211 | RRECOMMENDS_packagegroup-base-bluetooth = "\ |
| 212 | kernel-module-bluetooth \ |
| 213 | kernel-module-l2cap \ |
| 214 | kernel-module-rfcomm \ |
| 215 | kernel-module-hci-vhci \ |
| 216 | kernel-module-bnep \ |
| 217 | kernel-module-hidp \ |
| 218 | kernel-module-hci-uart \ |
| 219 | kernel-module-sco \ |
| 220 | ${@bb.utils.contains('COMBINED_FEATURES', 'usbhost', 'kernel-module-hci-usb', '',d)} \ |
| 221 | ${@bb.utils.contains('COMBINED_FEATURES', 'pcmcia', 'kernel-module-bluetooth3c-cs', '',d)} \ |
| 222 | ${@bb.utils.contains('COMBINED_FEATURES', 'pcmcia', 'kernel-module-bluecard-cs', '',d)} \ |
| 223 | ${@bb.utils.contains('COMBINED_FEATURES', 'pcmcia', 'kernel-module-bluetoothuart-cs', '',d)} \ |
| 224 | ${@bb.utils.contains('COMBINED_FEATURES', 'pcmcia', 'kernel-module-dtl1-cs', '',d)} \ |
| 225 | " |
| 226 | |
| 227 | SUMMARY_packagegroup-base-irda = "IrDA support" |
| 228 | RDEPENDS_packagegroup-base-irda = "\ |
| 229 | irda-utils" |
| 230 | |
| 231 | RRECOMMENDS_packagegroup-base-irda = "\ |
| 232 | kernel-module-pxaficp-ir \ |
| 233 | kernel-module-irda \ |
| 234 | kernel-module-ircomm \ |
| 235 | kernel-module-ircomm-tty \ |
| 236 | kernel-module-irlan \ |
| 237 | ${@bb.utils.contains('DISTRO_FEATURES', 'ppp', 'kernel-module-irnet', '',d)} \ |
| 238 | kernel-module-irport \ |
| 239 | kernel-module-irtty \ |
| 240 | kernel-module-irtty-sir \ |
| 241 | kernel-module-sir-dev \ |
| 242 | ${@bb.utils.contains('COMBINED_FEATURES', 'usbhost', 'kernel-module-ir-usb', '',d)} " |
| 243 | |
| 244 | SUMMARY_packagegroup-base-usbgadget = "USB gadget support" |
| 245 | RRECOMMENDS_packagegroup-base-usbgadget = "\ |
| 246 | kernel-module-pxa27x_udc \ |
| 247 | kernel-module-gadgetfs \ |
| 248 | kernel-module-g-file-storage \ |
| 249 | kernel-module-g-serial \ |
| 250 | kernel-module-g-ether" |
| 251 | |
| 252 | SUMMARY_packagegroup-base-usbhost = "USB host support" |
| 253 | RDEPENDS_packagegroup-base-usbhost = "\ |
| 254 | usbutils " |
| 255 | |
| 256 | RRECOMMENDS_packagegroup-base-usbhost = "\ |
| 257 | kernel-module-uhci-hcd \ |
| 258 | kernel-module-ohci-hcd \ |
| 259 | kernel-module-ehci-hcd \ |
| 260 | kernel-module-usbcore \ |
| 261 | kernel-module-usbhid \ |
| 262 | kernel-module-usbnet \ |
| 263 | kernel-module-sd-mod \ |
| 264 | kernel-module-scsi-mod \ |
| 265 | kernel-module-usbmouse \ |
| 266 | kernel-module-mousedev \ |
| 267 | kernel-module-usbserial \ |
| 268 | kernel-module-usb-storage " |
| 269 | |
| 270 | SUMMARY_packagegroup-base-ppp = "PPP dial-up protocol support" |
| 271 | RDEPENDS_packagegroup-base-ppp = "\ |
| 272 | ppp \ |
| 273 | ppp-dialin" |
| 274 | |
| 275 | RRECOMMENDS_packagegroup-base-ppp = "\ |
| 276 | kernel-module-ppp-async \ |
| 277 | kernel-module-ppp-deflate \ |
| 278 | kernel-module-ppp-generic \ |
| 279 | kernel-module-ppp-mppe \ |
| 280 | kernel-module-slhc" |
| 281 | |
| 282 | SUMMARY_packagegroup-base-ipsec = "IPSEC support" |
| 283 | RDEPENDS_packagegroup-base-ipsec = "\ |
| 284 | " |
| 285 | |
| 286 | RRECOMMENDS_packagegroup-base-ipsec = "\ |
| 287 | kernel-module-ipsec" |
| 288 | |
| 289 | # |
| 290 | # packagegroup-base-wifi contain everything needed to get WiFi working |
| 291 | # WEP/WPA connection needs to be supported out-of-box |
| 292 | # |
| 293 | SUMMARY_packagegroup-base-wifi = "WiFi support" |
| 294 | RDEPENDS_packagegroup-base-wifi = "\ |
| 295 | ${VIRTUAL-RUNTIME_wireless-tools} \ |
| 296 | ${@bb.utils.contains('COMBINED_FEATURES', 'pcmcia', 'hostap-utils', '',d)} \ |
| 297 | ${@bb.utils.contains('COMBINED_FEATURES', 'pci', 'hostap-utils', '',d)} \ |
| 298 | wpa-supplicant" |
| 299 | |
| 300 | RRECOMMENDS_packagegroup-base-wifi = "\ |
| 301 | ${@bb.utils.contains('COMBINED_FEATURES', 'usbhost', 'kernel-module-zd1211rw', '',d)} \ |
| 302 | kernel-module-ieee80211-crypt \ |
| 303 | kernel-module-ieee80211-crypt-ccmp \ |
| 304 | kernel-module-ieee80211-crypt-tkip \ |
| 305 | kernel-module-ieee80211-crypt-wep \ |
| 306 | kernel-module-ecb \ |
| 307 | kernel-module-arc4 \ |
| 308 | kernel-module-crypto_algapi \ |
| 309 | kernel-module-cryptomgr \ |
| 310 | kernel-module-michael-mic \ |
| 311 | kernel-module-aes-generic \ |
| 312 | kernel-module-aes" |
| 313 | |
| 314 | SUMMARY_packagegroup-base-nfc = "Near Field Communication support" |
| 315 | RDEPENDS_packagegroup-base-nfc = "\ |
| 316 | neard" |
| 317 | |
| 318 | RRECOMMENDS_packagegroup-base-nfc = "\ |
| 319 | kernel-module-nfc" |
| 320 | |
| 321 | SUMMARY_packagegroup-base-3g = "Cellular data support" |
| 322 | RDEPENDS_packagegroup-base-3g = "\ |
| 323 | ofono" |
| 324 | |
| 325 | RRECOMMENDS_packagegroup-base-3g = "\ |
| 326 | kernel-module-cdc-acm \ |
| 327 | kernel-module-cdc-wdm" |
| 328 | |
| 329 | SUMMARY_packagegroup-base-smbfs = "SMB network filesystem support" |
| 330 | RRECOMMENDS_packagegroup-base-smbfs = "\ |
| 331 | kernel-module-cifs \ |
| 332 | kernel-module-smbfs" |
| 333 | |
| 334 | SUMMARY_packagegroup-base-cramfs = "cramfs filesystem support" |
| 335 | RRECOMMENDS_packagegroup-base-cramfs = "\ |
| 336 | kernel-module-cramfs" |
| 337 | |
| 338 | # |
| 339 | # packagegroup-base-nfs provides ONLY client support - server is in nfs-utils package |
| 340 | # |
| 341 | SUMMARY_packagegroup-base-nfs = "NFS network filesystem support" |
| 342 | RDEPENDS_packagegroup-base-nfs = "\ |
| 343 | rpcbind" |
| 344 | |
| 345 | RRECOMMENDS_packagegroup-base-nfs = "\ |
| 346 | kernel-module-nfs " |
| 347 | |
| 348 | SUMMARY_packagegroup-base-zeroconf = "Zeroconf support" |
| 349 | RDEPENDS_packagegroup-base-zeroconf = "\ |
| 350 | avahi-daemon" |
| 351 | RDEPENDS_packagegroup-base-zeroconf_append_libc-glibc = "\ |
| 352 | libnss-mdns \ |
| 353 | " |
| 354 | |
| 355 | SUMMARY_packagegroup-base-ipv6 = "IPv6 support" |
| 356 | RDEPENDS_packagegroup-base-ipv6 = "\ |
| 357 | " |
| 358 | |
| 359 | RRECOMMENDS_packagegroup-base-ipv6 = "\ |
| 360 | kernel-module-ipv6 " |
| 361 | |
| 362 | SUMMARY_packagegroup-base-serial = "Serial port support" |
| 363 | RDEPENDS_packagegroup-base-serial = "\ |
| 364 | setserial \ |
| 365 | lrzsz " |
| 366 | |
| 367 | SUMMARY_packagegroup-base-phone = "Cellular telephony (voice) support" |
| 368 | RDEPENDS_packagegroup-base-phone = "\ |
| 369 | ofono" |