Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | ################################################################## |
| 2 | # Standard target filesystem paths. |
| 3 | ################################################################## |
| 4 | # |
| 5 | # If changing these values, beware that native/cross/nativesdk bbclass |
| 6 | # files may also need changes to keep in sync. |
| 7 | # |
| 8 | |
| 9 | # Used by multilib code to change the library paths |
| 10 | baselib = "${BASELIB}" |
| 11 | baselib[vardepvalue] = "${baselib}" |
| 12 | BASELIB = "lib" |
| 13 | BASELIB_powerpc64 = "lib64" |
| 14 | |
| 15 | # Path prefixes |
| 16 | export base_prefix = "" |
| 17 | export prefix = "/usr" |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 18 | export exec_prefix = "${prefix}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 19 | |
| 20 | # Base paths |
| 21 | export base_bindir = "${base_prefix}/bin" |
| 22 | export base_sbindir = "${base_prefix}/sbin" |
| 23 | export base_libdir = "${base_prefix}/${baselib}" |
| 24 | export nonarch_base_libdir = "${base_prefix}/lib" |
| 25 | |
| 26 | # Architecture independent paths |
| 27 | export sysconfdir = "${base_prefix}/etc" |
| 28 | export servicedir = "${base_prefix}/srv" |
| 29 | export sharedstatedir = "${base_prefix}/com" |
| 30 | export localstatedir = "${base_prefix}/var" |
| 31 | export datadir = "${prefix}/share" |
| 32 | export infodir = "${datadir}/info" |
| 33 | export mandir = "${datadir}/man" |
| 34 | export docdir = "${datadir}/doc" |
| 35 | export systemd_unitdir = "${nonarch_base_libdir}/systemd" |
| 36 | export systemd_system_unitdir = "${nonarch_base_libdir}/systemd/system" |
| 37 | export nonarch_libdir = "${exec_prefix}/lib" |
| 38 | export systemd_user_unitdir = "${nonarch_libdir}/systemd/user" |
| 39 | |
| 40 | # Architecture dependent paths |
| 41 | export bindir = "${exec_prefix}/bin" |
| 42 | export sbindir = "${exec_prefix}/sbin" |
| 43 | export libdir = "${exec_prefix}/${baselib}" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 44 | export libexecdir = "${exec_prefix}/libexec" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 45 | export includedir = "${exec_prefix}/include" |
| 46 | export oldincludedir = "${exec_prefix}/include" |
| 47 | localedir = "${libdir}/locale" |
| 48 | |
| 49 | # Linkage between native/cross/nativesdk layouts |
| 50 | base_bindir_native = "/bin" |
| 51 | base_sbindir_native = "/sbin" |
| 52 | sysconfdir_native = "/etc" |
| 53 | prefix_native = "/usr" |
| 54 | bindir_native = "${prefix_native}/bin" |
| 55 | sbindir_native = "${prefix_native}/sbin" |
| 56 | includedir_native = "${prefix_native}/include" |
| 57 | libdir_native = "${prefix_native}/lib" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 58 | libexecdir_native = "${prefix_native}/libexec" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 59 | base_libdir_native = "/lib" |
| 60 | datadir_native = "${prefix_native}/share" |
| 61 | bindir_cross = "/bin" |
| 62 | bindir_crossscripts = "${bindir}/crossscripts" |
| 63 | prefix_nativesdk = "/usr" |
| 64 | bindir_nativesdk = "${prefix_nativesdk}/bin" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 65 | sbindir_nativesdk = "${prefix_nativesdk}/sbin" |
| 66 | base_bindir_nativesdk = "/bin" |
| 67 | base_sbindir_nativesdk = "/sbin" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 68 | includedir_nativesdk = "${prefix_nativesdk}/include" |
| 69 | libdir_nativesdk = "${prefix_nativesdk}/lib" |
| 70 | base_libdir_nativesdk = "/lib" |
| 71 | localstatedir_nativesdk = "/var" |
| 72 | |
| 73 | # |
| 74 | # Cross recipes need to know about the target layout |
| 75 | # := is used carefully here |
| 76 | # |
| 77 | target_datadir := "${datadir}" |
| 78 | # Used to find env/perl/python |
| 79 | USRBINPATH = "${bindir}" |
| 80 | USRBINPATH_class-native = "/usr/bin" |
| 81 | USRBINPATH_class-nativesdk = "/usr/bin" |
| 82 | |
| 83 | # Root home directory |
| 84 | ROOT_HOME ??= "/home/root" |
| 85 | |
| 86 | ################################################################## |
| 87 | # Architecture-dependent build variables. |
| 88 | ################################################################## |
| 89 | |
| 90 | # Immediate expansion since there is no point in reapeatedly calling |
| 91 | # os.uname() throughout parsing |
| 92 | BUILD_ARCH := "${@os.uname()[4]}" |
| 93 | BUILD_OS := "${@os.uname()[0].lower()}" |
| 94 | BUILD_VENDOR = "" |
| 95 | BUILD_SYS = "${BUILD_ARCH}${BUILD_VENDOR}-${BUILD_OS}" |
| 96 | BUILD_PREFIX = "" |
| 97 | BUILD_CC_ARCH = "" |
| 98 | BUILD_LD_ARCH = "" |
| 99 | BUILD_AS_ARCH = "" |
| 100 | BUILD_EXEEXT = "" |
| 101 | |
| 102 | HOST_ARCH = "${TARGET_ARCH}" |
| 103 | HOST_OS = "${TARGET_OS}" |
| 104 | HOST_VENDOR = "${TARGET_VENDOR}" |
| 105 | HOST_SYS = "${HOST_ARCH}${HOST_VENDOR}-${HOST_OS}" |
| 106 | HOST_PREFIX = "${TARGET_PREFIX}" |
| 107 | HOST_CC_ARCH = "${TARGET_CC_ARCH}" |
| 108 | HOST_LD_ARCH = "${TARGET_LD_ARCH}" |
| 109 | HOST_AS_ARCH = "${TARGET_AS_ARCH}" |
| 110 | HOST_EXEEXT = "" |
| 111 | |
| 112 | TUNE_ARCH ??= "INVALID" |
| 113 | TUNE_CCARGS ??= "" |
| 114 | TUNE_CCARGS[vardepvalue] = "${TUNE_CCARGS}" |
| 115 | TUNE_LDARGS ??= "" |
| 116 | TUNE_ASARGS ??= "" |
| 117 | TUNE_FEATURES ??= "${TUNE_FEATURES_tune-${DEFAULTTUNE}}" |
| 118 | LIBCEXTENSION ??= "" |
| 119 | ABIEXTENSION ??= "" |
| 120 | USE_NLS ??= "${@bb.utils.contains('DISTRO_FEATURES', 'libc-locale-code', 'yes', 'no', d)}" |
| 121 | SDKUSE_NLS ??= "yes" |
| 122 | |
| 123 | TARGET_ARCH = "${TUNE_ARCH}" |
| 124 | TARGET_OS = "linux${LIBCEXTENSION}${ABIEXTENSION}" |
| 125 | TARGET_VENDOR = "-oe" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame^] | 126 | TARGET_SYS = "${TARGET_ARCH}${TARGET_VENDOR}${@['-' + d.getVar('TARGET_OS'), ''][d.getVar('TARGET_OS') == ('' or 'custom')]}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 127 | TARGET_PREFIX = "${TARGET_SYS}-" |
| 128 | TARGET_CC_ARCH = "${TUNE_CCARGS}" |
| 129 | TARGET_LD_ARCH = "${TUNE_LDARGS}" |
| 130 | TARGET_AS_ARCH = "${TUNE_ASARGS}" |
| 131 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 132 | SDKMACHINE ??= "x86_64" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 133 | SDK_OS = "${BUILD_OS}" |
| 134 | SDK_VENDOR = "-oesdk" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame^] | 135 | SDK_SYS = "${SDK_ARCH}${SDK_VENDOR}${@['-' + d.getVar('SDK_OS'), ''][d.getVar('SDK_OS') == ('' or 'custom')]}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 136 | SDK_PREFIX = "${SDK_SYS}-" |
| 137 | SDK_CC_ARCH = "${BUILD_CC_ARCH}" |
| 138 | SDKPKGSUFFIX = "nativesdk" |
| 139 | SDK_PACKAGE_ARCHS = "all any noarch ${SDK_ARCH}-${SDKPKGSUFFIX}" |
| 140 | SDK_LD_ARCH = "${BUILD_LD_ARCH}" |
| 141 | SDK_AS_ARCH = "${BUILD_AS_ARCH}" |
| 142 | |
| 143 | TUNE_PKGARCH ??= "" |
| 144 | PACKAGE_ARCH ??= "${TUNE_PKGARCH}" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame^] | 145 | MACHINE_ARCH = "${@[d.getVar('TUNE_PKGARCH'), d.getVar('MACHINE')][bool(d.getVar('MACHINE'))].replace('-', '_')}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 146 | PACKAGE_EXTRA_ARCHS ??= "${PACKAGE_EXTRA_ARCHS_tune-${DEFAULTTUNE}}" |
| 147 | PACKAGE_ARCHS = "all any noarch ${PACKAGE_EXTRA_ARCHS} ${MACHINE_ARCH}" |
| 148 | # MACHINE_ARCH shouldn't be included here as a variable dependency |
| 149 | # since machine specific packages are handled using multimachine |
| 150 | PACKAGE_ARCHS[vardepsexclude] = "MACHINE_ARCH" |
| 151 | |
| 152 | MULTIMACH_TARGET_SYS = "${PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 153 | |
| 154 | ################################################################## |
| 155 | # Date/time variables. |
| 156 | ################################################################## |
| 157 | |
| 158 | DATE := "${@time.strftime('%Y%m%d',time.gmtime())}" |
| 159 | TIME := "${@time.strftime('%H%M%S',time.gmtime())}" |
| 160 | DATETIME = "${DATE}${TIME}" |
| 161 | |
| 162 | ################################################################## |
| 163 | # Openembedded Software Prerequisites. |
| 164 | ################################################################## |
| 165 | |
| 166 | # python-native should be here but python relies on building |
| 167 | # its own in staging |
| 168 | ASSUME_PROVIDED = "\ |
| 169 | bzip2-native \ |
| 170 | chrpath-native \ |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 171 | file-native \ |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 172 | findutils-native \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 173 | git-native \ |
| 174 | grep-native \ |
| 175 | diffstat-native \ |
| 176 | patch-native \ |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 177 | libgcc-native \ |
| 178 | hostperl-runtime-native \ |
| 179 | hostpython-runtime-native \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 180 | tar-native \ |
| 181 | virtual/libintl-native \ |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 182 | virtual/libiconv-native \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 183 | texinfo-native \ |
| 184 | bash-native \ |
| 185 | sed-native \ |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 186 | wget-native \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 187 | " |
| 188 | # gzip-native should be listed above? |
| 189 | |
| 190 | ################################################################## |
| 191 | # Package default variables. |
| 192 | ################################################################## |
| 193 | |
| 194 | PN = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[0] or 'defaultpkgname'}" |
| 195 | PV = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[1] or '1.0'}" |
| 196 | PR = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[2] or 'r0'}" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 197 | PE = "" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 198 | PF = "${PN}-${EXTENDPE}${PV}-${PR}" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame^] | 199 | EXTENDPE = "${@['','${PE}_'][int(d.getVar('PE') or 0) > 0]}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 200 | P = "${PN}-${PV}" |
| 201 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 202 | PRAUTO = "" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame^] | 203 | EXTENDPRAUTO = "${@['.${PRAUTO}', ''][not d.getVar('PRAUTO')]}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 204 | PRAUTOINX = "${PF}" |
| 205 | |
| 206 | PKGV ?= "${PV}" |
| 207 | PKGR ?= "${PR}${EXTENDPRAUTO}" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame^] | 208 | PKGE ?= "${@['','${PE}'][int(d.getVar('PE') or 0) > 0]}" |
| 209 | EXTENDPKGEVER = "${@['','${PKGE}:'][d.getVar('PKGE').strip() != '']}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 210 | EXTENDPKGV ?= "${EXTENDPKGEVER}${PKGV}-${PKGR}" |
| 211 | |
| 212 | # Base package name |
| 213 | # Automatically derives "foo" from "foo-native", "foo-cross" or "foo-initial" |
| 214 | # otherwise it is the same as PN and P |
| 215 | SPECIAL_PKGSUFFIX = "-native -cross -initial -intermediate -crosssdk -cross-canadian" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame^] | 216 | BPN = "${@base_prune_suffix(d.getVar('PN'), d.getVar('SPECIAL_PKGSUFFIX').split(), d)}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 217 | BP = "${BPN}-${PV}" |
| 218 | |
| 219 | # Package info. |
| 220 | |
| 221 | SECTION = "base" |
| 222 | PRIORITY = "optional" |
| 223 | SUMMARY ?= "${PN} version ${PV}-${PR}" |
| 224 | DESCRIPTION ?= "${SUMMARY}." |
| 225 | |
| 226 | # The following two are commented out because they result in a recursive |
| 227 | # definition of the variable in some corner cases. These are left in |
| 228 | # to illustrate the intended behavior. |
| 229 | #SUMMARY_${PN} ?= "${SUMMARY}" |
| 230 | #DESCRIPTION_${PN} ?= "${DESCRIPTION}" |
| 231 | |
| 232 | SUMMARY_${PN}-dbg ?= "${SUMMARY} - Debugging files" |
| 233 | DESCRIPTION_${PN}-dbg ?= "${DESCRIPTION} \ |
| 234 | This package contains ELF symbols and related sources for debugging purposes." |
| 235 | |
| 236 | SUMMARY_${PN}-dev ?= "${SUMMARY} - Development files" |
| 237 | DESCRIPTION_${PN}-dev ?= "${DESCRIPTION} \ |
| 238 | This package contains symbolic links, header files, and \ |
| 239 | related items necessary for software development." |
| 240 | |
| 241 | SUMMARY_${PN}-staticdev ?= "${SUMMARY} - Development files (Static Libraries)" |
| 242 | DESCRIPTION_${PN}-staticdev?= "${DESCRIPTION} \ |
| 243 | This package contains static libraries for software development." |
| 244 | |
| 245 | SUMMARY_${PN}-doc ?= "${SUMMARY} - Documentation files" |
| 246 | DESCRIPTION_${PN}-doc ?= "${DESCRIPTION} \ |
| 247 | This package contains documentation." |
| 248 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 249 | LICENSE ??= "INVALID" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 250 | MAINTAINER = "OE-Core Developers <openembedded-core@lists.openembedded.org>" |
| 251 | HOMEPAGE = "" |
| 252 | |
| 253 | # Package dependencies and provides. |
| 254 | |
| 255 | # Ensure that -dev packages recommend the corresponding -dev packages of their |
| 256 | # deps, and the same for -dbg. |
| 257 | DEPCHAIN_PRE = "" |
| 258 | DEPCHAIN_POST = "-dev -dbg" |
| 259 | |
| 260 | DEPENDS = "" |
| 261 | RDEPENDS = "" |
| 262 | PROVIDES = "" |
| 263 | PROVIDES_prepend = "${PN} " |
| 264 | RPROVIDES = "" |
| 265 | |
| 266 | MULTI_PROVIDER_WHITELIST = "virtual/libintl virtual/libintl-native virtual/nativesdk-libintl virtual/xserver virtual/update-alternatives-native virtual/update-alternatives" |
| 267 | |
| 268 | SOLIBS = ".so.*" |
| 269 | SOLIBS_darwin = ".dylib" |
| 270 | |
| 271 | SOLIBSDEV = ".so" |
| 272 | # Due to the ordering of PACKAGES and the naming of the dev symlinks on darwin, |
| 273 | # we can't make the symlinks end up in the -dev packages easily at this point. This hack |
| 274 | # at least means builds aren't completely broken and symlinks don't take up much space. |
| 275 | SOLIBSDEV_darwin = ".dylibbroken" |
| 276 | |
| 277 | PACKAGE_BEFORE_PN ?= "" |
| 278 | PACKAGES = "${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale ${PACKAGE_BEFORE_PN} ${PN}" |
| 279 | PACKAGES_DYNAMIC = "^${PN}-locale-.*" |
| 280 | FILES = "" |
| 281 | |
| 282 | FILES_${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*${SOLIBS} \ |
| 283 | ${sysconfdir} ${sharedstatedir} ${localstatedir} \ |
| 284 | ${base_bindir}/* ${base_sbindir}/* \ |
| 285 | ${base_libdir}/*${SOLIBS} \ |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 286 | ${base_prefix}/lib/udev ${prefix}/lib/udev \ |
| 287 | ${base_libdir}/udev ${libdir}/udev \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 288 | ${datadir}/${BPN} ${libdir}/${BPN}/* \ |
| 289 | ${datadir}/pixmaps ${datadir}/applications \ |
| 290 | ${datadir}/idl ${datadir}/omf ${datadir}/sounds \ |
| 291 | ${libdir}/bonobo/servers" |
| 292 | |
| 293 | FILES_${PN}-bin = "${bindir}/* ${sbindir}/*" |
| 294 | |
| 295 | FILES_${PN}-doc = "${docdir} ${mandir} ${infodir} ${datadir}/gtk-doc \ |
| 296 | ${datadir}/gnome/help" |
| 297 | SECTION_${PN}-doc = "doc" |
| 298 | |
| 299 | FILES_SOLIBSDEV ?= "${base_libdir}/lib*${SOLIBSDEV} ${libdir}/lib*${SOLIBSDEV}" |
| 300 | FILES_${PN}-dev = "${includedir} ${FILES_SOLIBSDEV} ${libdir}/*.la \ |
| 301 | ${libdir}/*.o ${libdir}/pkgconfig ${datadir}/pkgconfig \ |
| 302 | ${datadir}/aclocal ${base_libdir}/*.o \ |
| 303 | ${libdir}/${BPN}/*.la ${base_libdir}/*.la" |
| 304 | SECTION_${PN}-dev = "devel" |
| 305 | ALLOW_EMPTY_${PN}-dev = "1" |
| 306 | RDEPENDS_${PN}-dev = "${PN} (= ${EXTENDPKGV})" |
| 307 | |
| 308 | FILES_${PN}-staticdev = "${libdir}/*.a ${base_libdir}/*.a ${libdir}/${BPN}/*.a" |
| 309 | SECTION_${PN}-staticdev = "devel" |
| 310 | RDEPENDS_${PN}-staticdev = "${PN}-dev (= ${EXTENDPKGV})" |
| 311 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 312 | FILES_${PN}-dbg = "/usr/lib/debug /usr/src/debug" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 313 | |
| 314 | SECTION_${PN}-dbg = "devel" |
| 315 | ALLOW_EMPTY_${PN}-dbg = "1" |
| 316 | |
| 317 | FILES_${PN}-locale = "${datadir}/locale" |
| 318 | |
| 319 | # File manifest |
| 320 | |
| 321 | FILE_DIRNAME = "${@os.path.dirname(d.getVar('FILE', False))}" |
| 322 | # FILESPATH is set in base.bbclass |
| 323 | #FILESPATH = "${FILE_DIRNAME}/${PF}:${FILE_DIRNAME}/${P}:${FILE_DIRNAME}/${PN}:${FILE_DIRNAME}/${BP}:${FILE_DIRNAME}/${BPN}:${FILE_DIRNAME}/files:${FILE_DIRNAME}" |
| 324 | # This default was only used for checking |
| 325 | FILESEXTRAPATHS ?= "__default:" |
| 326 | |
| 327 | ################################################################## |
| 328 | # General work and output directories for the build system. |
| 329 | ################################################################## |
| 330 | |
| 331 | TMPDIR ?= "${TOPDIR}/tmp" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame^] | 332 | CACHE = "${TMPDIR}/cache${@['', '/' + str(d.getVar('MACHINE'))][bool(d.getVar('MACHINE'))]}${@['', '/' + str(d.getVar('SDKMACHINE'))][bool(d.getVar('SDKMACHINE'))]}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 333 | # The persistent cache should be shared by all builds |
| 334 | PERSISTENT_DIR = "${TOPDIR}/cache" |
| 335 | LOG_DIR = "${TMPDIR}/log" |
| 336 | CO_DIR = "${DL_DIR}" |
| 337 | CVSDIR = "${CO_DIR}/cvs" |
| 338 | SVNDIR = "${CO_DIR}/svn" |
| 339 | GITDIR = "${CO_DIR}/git2" |
| 340 | BZRDIR = "${CO_DIR}/bzr" |
| 341 | HGDIR = "${CO_DIR}/hg" |
| 342 | |
| 343 | STAMPS_DIR ?= "${TMPDIR}/stamps" |
| 344 | STAMP = "${STAMPS_DIR}/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}" |
| 345 | STAMPCLEAN = "${STAMPS_DIR}/${MULTIMACH_TARGET_SYS}/${PN}/*-*" |
| 346 | BASE_WORKDIR ?= "${TMPDIR}/work" |
| 347 | WORKDIR = "${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}" |
| 348 | T = "${WORKDIR}/temp" |
| 349 | D = "${WORKDIR}/image" |
| 350 | S = "${WORKDIR}/${BP}" |
| 351 | B = "${S}" |
| 352 | |
| 353 | STAGING_DIR = "${TMPDIR}/sysroots" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame^] | 354 | COMPONENTS_DIR = "${STAGING_DIR}-components" |
| 355 | RECIPE_SYSROOT = "${WORKDIR}/recipe-sysroot" |
| 356 | RECIPE_SYSROOT_NATIVE = "${WORKDIR}/recipe-sysroot-native" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 357 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame^] | 358 | STAGING_DIR_NATIVE = "${RECIPE_SYSROOT_NATIVE}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 359 | STAGING_BINDIR_NATIVE = "${STAGING_DIR_NATIVE}${bindir_native}" |
| 360 | STAGING_BINDIR_CROSS = "${STAGING_BINDIR}/crossscripts" |
| 361 | STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${TARGET_ARCH}${TARGET_VENDOR}-${TARGET_OS}" |
| 362 | STAGING_LIBDIR_NATIVE = "${STAGING_DIR_NATIVE}${libdir_native}" |
| 363 | STAGING_LIBEXECDIR_NATIVE = "${STAGING_DIR_NATIVE}${libexecdir_native}" |
| 364 | STAGING_BASE_LIBDIR_NATIVE = "${STAGING_DIR_NATIVE}${base_libdir_native}" |
| 365 | STAGING_SBINDIR_NATIVE = "${STAGING_DIR_NATIVE}${sbindir_native}" |
| 366 | STAGING_INCDIR_NATIVE = "${STAGING_DIR_NATIVE}${includedir_native}" |
| 367 | STAGING_ETCDIR_NATIVE = "${STAGING_DIR_NATIVE}${sysconfdir_native}" |
| 368 | STAGING_DATADIR_NATIVE = "${STAGING_DIR_NATIVE}${datadir_native}" |
| 369 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame^] | 370 | STAGING_DIR_HOST = "${RECIPE_SYSROOT}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 371 | STAGING_BINDIR = "${STAGING_DIR_HOST}${bindir}" |
| 372 | STAGING_LIBDIR = "${STAGING_DIR_HOST}${libdir}" |
| 373 | STAGING_LIBEXECDIR = "${STAGING_DIR_HOST}${libexecdir}" |
| 374 | STAGING_BASELIBDIR = "${STAGING_DIR_HOST}${base_libdir}" |
| 375 | STAGING_INCDIR = "${STAGING_DIR_HOST}${includedir}" |
| 376 | STAGING_DATADIR = "${STAGING_DIR_HOST}${datadir}" |
| 377 | STAGING_EXECPREFIXDIR = "${STAGING_DIR_HOST}${exec_prefix}" |
| 378 | STAGING_LOADER_DIR = "${STAGING_DIR_HOST}/loader" |
| 379 | STAGING_FIRMWARE_DIR = "${STAGING_DIR_HOST}/firmware" |
| 380 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame^] | 381 | STAGING_DIR_TARGET = "${RECIPE_SYSROOT}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 382 | |
| 383 | # Setting DEPLOY_DIR outside of TMPDIR is helpful, when you are using |
| 384 | # packaged staging and/or multimachine. |
| 385 | DEPLOY_DIR ?= "${TMPDIR}/deploy" |
| 386 | DEPLOY_DIR_TAR = "${DEPLOY_DIR}/tar" |
| 387 | DEPLOY_DIR_IPK = "${DEPLOY_DIR}/ipk" |
| 388 | DEPLOY_DIR_RPM = "${DEPLOY_DIR}/rpm" |
| 389 | DEPLOY_DIR_DEB = "${DEPLOY_DIR}/deb" |
| 390 | DEPLOY_DIR_IMAGE ?= "${DEPLOY_DIR}/images/${MACHINE}" |
| 391 | DEPLOY_DIR_TOOLS = "${DEPLOY_DIR}/tools" |
| 392 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame^] | 393 | PKGDATA_DIR = "${TMPDIR}/pkgdata/${MACHINE}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 394 | |
| 395 | ################################################################## |
| 396 | # SDK variables. |
| 397 | ################################################################## |
| 398 | |
| 399 | SDK_NAME_PREFIX ?= "oecore" |
| 400 | SDK_NAME = "${SDK_NAME_PREFIX}-${SDK_ARCH}-${TUNE_PKGARCH}" |
| 401 | SDKPATH = "/usr/local/${SDK_NAME_PREFIX}-${SDK_ARCH}" |
| 402 | SDKPATHNATIVE = "${SDKPATH}/sysroots/${SDK_SYS}" |
| 403 | |
| 404 | ################################################################## |
| 405 | # Kernel info. |
| 406 | ################################################################## |
| 407 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 408 | OLDEST_KERNEL = "3.2.0" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 409 | OLDEST_KERNEL_aarch64 = "3.14" |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 410 | OLDEST_KERNEL_nios2 = "3.19" |
| 411 | |
Brad Bishop | 37a0e4d | 2017-12-04 01:01:44 -0500 | [diff] [blame] | 412 | # SDK_OLDEST_KERNEL can't be set using overrides since there are |
| 413 | # none for the SDK architecture. Best to set it from a machine-sdk |
| 414 | # include file if you need an SDK arch-specific value |
| 415 | SDK_OLDEST_KERNEL = "3.2.0" |
| 416 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 417 | # Define where the kernel headers are installed on the target as well as where |
| 418 | # they are staged. |
| 419 | KERNEL_SRC_PATH = "/usr/src/kernel" |
| 420 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 421 | STAGING_KERNEL_DIR = "${TMPDIR}/work-shared/${MACHINE}/kernel-source" |
| 422 | STAGING_KERNEL_BUILDDIR = "${TMPDIR}/work-shared/${MACHINE}/kernel-build-artifacts" |
| 423 | |
| 424 | ################################################################## |
| 425 | # Specific image creation and rootfs population info. |
| 426 | ################################################################## |
| 427 | |
| 428 | IMAGE_ROOTFS = "${WORKDIR}/rootfs" |
| 429 | IMAGE_BASENAME = "${PN}" |
| 430 | IMAGE_NAME = "${IMAGE_BASENAME}-${MACHINE}-${DATETIME}" |
| 431 | IMAGE_NAME[vardepsexclude] += "DATETIME" |
| 432 | IMAGE_LINK_NAME = "${IMAGE_BASENAME}-${MACHINE}" |
| 433 | |
| 434 | # This option allows for a percentage overage of the actual image size rather than a |
| 435 | # fixed extra space, this is space needed for initial startup and basic operations. |
| 436 | IMAGE_OVERHEAD_FACTOR ?= "1.3" |
| 437 | # This option allows for adding additional space in K above and beyond what the |
| 438 | # IMAGE_OVERHEAD_FACTOR might add. This space is for additional packages, user data, ... |
| 439 | # To set a fixed size then overriding IMAGE_ROOTFS_SIZE with the max size one wants |
| 440 | # should do the trick |
| 441 | IMAGE_ROOTFS_EXTRA_SPACE ?= "0" |
| 442 | |
| 443 | EXTRA_IMAGEDEPENDS = "" |
| 444 | |
| 445 | ################################################################## |
| 446 | # Toolchain info. |
| 447 | ################################################################## |
| 448 | |
| 449 | PATH_prepend = "${COREBASE}/scripts:${STAGING_BINDIR_TOOLCHAIN}:${STAGING_BINDIR_CROSS}:${STAGING_DIR_NATIVE}${sbindir_native}:${STAGING_BINDIR_NATIVE}:${STAGING_DIR_NATIVE}${base_sbindir_native}:${STAGING_DIR_NATIVE}${base_bindir_native}:" |
| 450 | export PATH |
| 451 | |
| 452 | ################################################################## |
| 453 | # Build utility info. |
| 454 | ################################################################## |
| 455 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame^] | 456 | # Directory where host tools are copied |
| 457 | HOSTTOOLS_DIR = "${TMPDIR}/hosttools" |
| 458 | |
| 459 | # Tools needed to run builds with OE-Core |
| 460 | HOSTTOOLS += " \ |
| 461 | [ ar as awk basename bash bzip2 cat chgrp chmod chown chrpath cmp cp cpio \ |
| 462 | cpp cut date dd diff diffstat dirname du echo egrep env expand expr false \ |
| 463 | fgrep file find flock g++ gawk gcc getconf getopt git grep gunzip gzip \ |
| 464 | head hostname install ld ldd ln ls make makeinfo md5sum mkdir mknod \ |
| 465 | mktemp mv nm objcopy objdump od patch perl pod2man pr printf pwd python python2 \ |
| 466 | python2.7 python3 ranlib readelf readlink rm rmdir rpcgen sed sh sha256sum \ |
| 467 | sleep sort split stat strings strip tail tar tee test touch tr true uname \ |
| 468 | uniq wc wget which xargs \ |
| 469 | " |
| 470 | |
| 471 | # Tools needed to run testimage runtime image testing |
| 472 | HOSTTOOLS += "ip ping ps scp ssh stty" |
| 473 | |
| 474 | # Link to these if present |
| 475 | HOSTTOOLS_NONFATAL += "aws ccache gcc-ar gpg ld.bfd ld.gold nc sftp socat sudo" |
| 476 | |
| 477 | # Temporary add few more detected in bitbake world |
| 478 | HOSTTOOLS_NONFATAL += "join nl size yes zcat" |
| 479 | |
| 480 | # Used by bzr fetcher |
| 481 | HOSTTOOLS_NONFATAL += "bzr" |
| 482 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 483 | CCACHE ??= "" |
| 484 | # Disable ccache explicitly if CCACHE is null since gcc may be a symlink |
| 485 | # of ccache some distributions (e.g., Fedora 17). |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame^] | 486 | export CCACHE_DISABLE ??= "${@[0,1][d.getVar('CCACHE') == '']}" |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 487 | # ccache < 3.1.10 will create CCACHE_DIR on startup even if disabled, and |
| 488 | # autogen sets HOME=/dev/null so in certain situations builds can fail. |
| 489 | # Explicitly export CCACHE_DIR until we can assume ccache >3.1.10 on the host. |
| 490 | export CCACHE_DIR ??= "${@os.getenv('HOME')}/.ccache" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 491 | |
| 492 | TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TARGET}" |
| 493 | |
| 494 | export CC = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" |
| 495 | export CXX = "${CCACHE}${HOST_PREFIX}g++ ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" |
| 496 | export FC = "${CCACHE}${HOST_PREFIX}gfortran ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" |
| 497 | export CPP = "${HOST_PREFIX}gcc -E${TOOLCHAIN_OPTIONS} ${HOST_CC_ARCH}" |
| 498 | export LD = "${HOST_PREFIX}ld${TOOLCHAIN_OPTIONS} ${HOST_LD_ARCH}" |
| 499 | export CCLD = "${CC}" |
| 500 | export AR = "${HOST_PREFIX}ar" |
| 501 | export AS = "${HOST_PREFIX}as ${HOST_AS_ARCH}" |
| 502 | export RANLIB = "${HOST_PREFIX}ranlib" |
| 503 | export STRIP = "${HOST_PREFIX}strip" |
| 504 | export OBJCOPY = "${HOST_PREFIX}objcopy" |
| 505 | export OBJDUMP = "${HOST_PREFIX}objdump" |
| 506 | export STRINGS = "${HOST_PREFIX}strings" |
| 507 | export NM = "${HOST_PREFIX}nm" |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 508 | export READELF = "${HOST_PREFIX}readelf" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 509 | PYTHON = "${@sys.executable}" |
| 510 | |
| 511 | export BUILD_CC = "${CCACHE}${BUILD_PREFIX}gcc ${BUILD_CC_ARCH}" |
| 512 | export BUILD_CXX = "${CCACHE}${BUILD_PREFIX}g++ ${BUILD_CC_ARCH}" |
| 513 | export BUILD_FC = "${CCACHE}${BUILD_PREFIX}gfortran ${BUILD_CC_ARCH}" |
| 514 | export BUILD_CPP = "${BUILD_PREFIX}gcc ${BUILD_CC_ARCH} -E" |
| 515 | export BUILD_LD = "${BUILD_PREFIX}ld ${BUILD_LD_ARCH}" |
| 516 | export BUILD_CCLD = "${BUILD_PREFIX}gcc ${BUILD_CC_ARCH}" |
| 517 | export BUILD_AR = "${BUILD_PREFIX}ar" |
| 518 | export BUILD_AS = "${BUILD_PREFIX}as ${BUILD_AS_ARCH}" |
| 519 | export BUILD_RANLIB = "${BUILD_PREFIX}ranlib" |
| 520 | export BUILD_STRIP = "${BUILD_PREFIX}strip" |
| 521 | export BUILD_NM = "${BUILD_PREFIX}nm" |
| 522 | |
| 523 | export MAKE = "make" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 524 | EXTRA_OEMAKE = "" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 525 | EXTRA_OECONF = "" |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 526 | export LC_ALL = "en_US.UTF-8" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 527 | |
| 528 | ################################################################## |
| 529 | # Patch handling. |
| 530 | ################################################################## |
| 531 | PATCHTOOL = "quilt" |
| 532 | PATCHRESOLVE = "noop" |
| 533 | |
| 534 | ################################################################## |
| 535 | # Build flags and options. |
| 536 | ################################################################## |
| 537 | |
| 538 | export BUILD_CPPFLAGS = "-isystem${STAGING_INCDIR_NATIVE}" |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 539 | BUILDSDK_CPPFLAGS = "" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 540 | export CPPFLAGS = "${TARGET_CPPFLAGS}" |
| 541 | export TARGET_CPPFLAGS = "" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 542 | |
| 543 | export BUILD_CFLAGS = "${BUILD_CPPFLAGS} ${BUILD_OPTIMIZATION}" |
| 544 | BUILDSDK_CFLAGS = "${BUILDSDK_CPPFLAGS} ${BUILD_OPTIMIZATION}" |
| 545 | export CFLAGS = "${TARGET_CFLAGS}" |
| 546 | export TARGET_CFLAGS = "${TARGET_CPPFLAGS} ${SELECTED_OPTIMIZATION}" |
| 547 | |
| 548 | export BUILD_CXXFLAGS = "${BUILD_CFLAGS}" |
| 549 | export CXXFLAGS = "${TARGET_CXXFLAGS}" |
| 550 | export TARGET_CXXFLAGS = "${TARGET_CFLAGS}" |
| 551 | |
| 552 | export BUILD_LDFLAGS = "-L${STAGING_LIBDIR_NATIVE} \ |
| 553 | -L${STAGING_BASE_LIBDIR_NATIVE} \ |
| 554 | -Wl,-rpath-link,${STAGING_LIBDIR_NATIVE} \ |
| 555 | -Wl,-rpath-link,${STAGING_BASE_LIBDIR_NATIVE} \ |
| 556 | -Wl,-rpath,${STAGING_LIBDIR_NATIVE} \ |
| 557 | -Wl,-rpath,${STAGING_BASE_LIBDIR_NATIVE} \ |
| 558 | -Wl,-O1" |
| 559 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 560 | BUILDSDK_LDFLAGS = "-Wl,-O1" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 561 | |
| 562 | LINKER_HASH_STYLE ??= "gnu" |
| 563 | # mips does not support GNU hash style therefore we override |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame^] | 564 | LINKER_HASH_STYLE_mipsarch = "sysv" |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 565 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame^] | 566 | TARGET_LINK_HASH_STYLE ?= "${@['-Wl,--hash-style=gnu',''][d.getVar('LINKER_HASH_STYLE') != 'gnu']}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 567 | |
| 568 | export LDFLAGS = "${TARGET_LDFLAGS}" |
| 569 | export TARGET_LDFLAGS = "-Wl,-O1 ${TARGET_LINK_HASH_STYLE}" |
| 570 | #export TARGET_LDFLAGS = "-L${STAGING_DIR_TARGET}${libdir} \ |
| 571 | # -Wl,-rpath-link,${STAGING_DIR_TARGET}${libdir} \ |
| 572 | # -Wl,-O1" |
| 573 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 574 | # Pass parallel make options to the compile task |
| 575 | EXTRA_OEMAKE_prepend_task-compile = "${PARALLEL_MAKE} " |
| 576 | PARALLEL_MAKEINST ??= "${PARALLEL_MAKE}" |
| 577 | # Pass parallel make options to the install task |
| 578 | EXTRA_OEMAKE_prepend_task-install = "${PARALLEL_MAKEINST} " |
| 579 | |
| 580 | ################################################################## |
| 581 | # Optimization flags. |
| 582 | ################################################################## |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 583 | DEBUG_PREFIX_MAP ?= "-fdebug-prefix-map=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR} \ |
| 584 | -fdebug-prefix-map=${STAGING_DIR_NATIVE}= \ |
| 585 | -fdebug-prefix-map=${STAGING_DIR_HOST}= \ |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 586 | " |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 587 | DEBUG_FLAGS ?= "-g -feliminate-unused-debug-types ${DEBUG_PREFIX_MAP}" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 588 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 589 | # Disabled until the option works properly -feliminate-dwarf2-dups |
| 590 | FULL_OPTIMIZATION = "-O2 -pipe ${DEBUG_FLAGS}" |
| 591 | DEBUG_OPTIMIZATION = "-O -fno-omit-frame-pointer ${DEBUG_FLAGS} -pipe" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame^] | 592 | SELECTED_OPTIMIZATION = "${@d.getVar(['FULL_OPTIMIZATION', 'DEBUG_OPTIMIZATION'][d.getVar('DEBUG_BUILD') == '1'])}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 593 | SELECTED_OPTIMIZATION[vardeps] += "FULL_OPTIMIZATION DEBUG_OPTIMIZATION" |
| 594 | BUILD_OPTIMIZATION = "-O2 -pipe" |
| 595 | |
| 596 | ################################################################## |
| 597 | # Settings used by bitbake-layers. |
| 598 | ################################################################## |
| 599 | BBLAYERS_LAYERINDEX_URL ??= "http://layers.openembedded.org/layerindex/" |
| 600 | BBLAYERS_FETCH_DIR ??= "${COREBASE}" |
| 601 | |
| 602 | ################################################################## |
| 603 | # Download locations and utilities. |
| 604 | ################################################################## |
| 605 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 606 | APACHE_MIRROR = "http://archive.apache.org/dist" |
Brad Bishop | 37a0e4d | 2017-12-04 01:01:44 -0500 | [diff] [blame] | 607 | DEBIAN_MIRROR = "http://ftp.debian.org/debian/pool" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 608 | GENTOO_MIRROR = "http://distfiles.gentoo.org/distfiles" |
| 609 | GNOME_GIT = "git://git.gnome.org" |
| 610 | GNOME_MIRROR = "http://ftp.gnome.org/pub/GNOME/sources" |
| 611 | GNU_MIRROR = "http://ftp.gnu.org/gnu" |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 612 | GNUPG_MIRROR = "https://www.gnupg.org/ftp/gcrypt" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 613 | GPE_MIRROR = "http://gpe.linuxtogo.org/download/source" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame^] | 614 | KERNELORG_MIRROR = "http://cdn.kernel.org/pub" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 615 | SOURCEFORGE_MIRROR = "http://downloads.sourceforge.net" |
| 616 | XLIBS_MIRROR = "http://xlibs.freedesktop.org/release" |
| 617 | XORG_MIRROR = "http://xorg.freedesktop.org/releases" |
| 618 | SAVANNAH_GNU_MIRROR = "http://download.savannah.gnu.org/releases" |
| 619 | SAVANNAH_NONGNU_MIRROR = "http://download.savannah.nongnu.org/releases" |
| 620 | CPAN_MIRROR = "http://search.cpan.org/CPAN" |
| 621 | |
| 622 | SRC_URI[vardepsexclude] += "\ |
| 623 | APACHE_MIRROR \ |
| 624 | CPAN_MIRROR \ |
| 625 | DEBIAN_MIRROR \ |
| 626 | GENTOO_MIRROR \ |
| 627 | GNOME_GIT \ |
| 628 | GNOME_MIRROR \ |
| 629 | GNU_MIRROR \ |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 630 | GNUPG_MIRROR \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 631 | GPE_MIRROR \ |
| 632 | KERNELORG_MIRROR \ |
| 633 | SAVANNAH_GNU_MIRROR \ |
| 634 | SAVANNAH_NONGNU_MIRROR \ |
| 635 | SOURCEFORGE_MIRROR \ |
| 636 | XLIBS_MIRROR \ |
| 637 | XORG_MIRROR \ |
| 638 | " |
| 639 | |
| 640 | # You can use the mirror of your country to get faster downloads by putting |
Brad Bishop | 37a0e4d | 2017-12-04 01:01:44 -0500 | [diff] [blame] | 641 | # export DEBIAN_MIRROR = "http://ftp.de.debian.org/debian/pool" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 642 | # into your local.conf |
| 643 | |
| 644 | FETCHCMD_svn = "/usr/bin/env svn --non-interactive --trust-server-cert" |
| 645 | FETCHCMD_cvs = "/usr/bin/env cvs" |
| 646 | FETCHCMD_wget = "/usr/bin/env wget -t 2 -T 30 -nv --passive-ftp --no-check-certificate" |
| 647 | FETCHCMD_bzr = "/usr/bin/env bzr" |
| 648 | FETCHCMD_hg = "/usr/bin/env hg" |
| 649 | |
| 650 | SRCDATE = "${DATE}" |
| 651 | SRCREV ??= "INVALID" |
| 652 | AUTOREV = "${@bb.fetch2.get_autorev(d)}" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 653 | # Set Dynamically in base.bbclass |
| 654 | # SRCPV = "${@bb.fetch2.get_srcrev(d)}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 655 | SRCPV[vardepvalue] = "${SRCPV}" |
| 656 | |
| 657 | SRC_URI = "" |
| 658 | |
| 659 | # Use pseudo as the fakeroot implementation |
| 660 | PSEUDO_LOCALSTATEDIR ?= "${WORKDIR}/pseudo/" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame^] | 661 | PSEUDO_PASSWD ?= "${STAGING_DIR_TARGET}:${PSEUDO_SYSROOT}" |
| 662 | PSEUDO_SYSROOT = "${COMPONENTS_DIR}/${BUILD_ARCH}/pseudo-native" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 663 | export PSEUDO_DISABLED = "1" |
| 664 | #export PSEUDO_PREFIX = "${STAGING_DIR_NATIVE}${prefix_native}" |
| 665 | #export PSEUDO_BINDIR = "${STAGING_DIR_NATIVE}${bindir_native}" |
| 666 | #export PSEUDO_LIBDIR = "${STAGING_DIR_NATIVE}$PSEUDOBINDIR/../lib/pseudo/lib |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame^] | 667 | FAKEROOTBASEENV = "PSEUDO_BINDIR=${PSEUDO_SYSROOT}${bindir_native} PSEUDO_LIBDIR=${PSEUDO_SYSROOT}${prefix_native}/lib/pseudo/lib PSEUDO_PREFIX=${PSEUDO_SYSROOT}${prefix_native} PSEUDO_DISABLED=1" |
| 668 | FAKEROOTCMD = "${PSEUDO_SYSROOT}${bindir_native}/pseudo" |
| 669 | FAKEROOTENV = "PSEUDO_PREFIX=${PSEUDO_SYSROOT}${prefix_native} PSEUDO_LOCALSTATEDIR=${PSEUDO_LOCALSTATEDIR} PSEUDO_PASSWD=${PSEUDO_PASSWD} PSEUDO_NOSYMLINKEXP=1 PSEUDO_DISABLED=0" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 670 | FAKEROOTNOENV = "PSEUDO_UNLOAD=1" |
| 671 | FAKEROOTDIRS = "${PSEUDO_LOCALSTATEDIR}" |
| 672 | PREFERRED_PROVIDER_virtual/fakeroot-native ?= "pseudo-native" |
| 673 | |
| 674 | ################################################################## |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 675 | # Not sure about the rest of this yet. |
| 676 | ################################################################## |
| 677 | |
| 678 | # Pre-build configuration output |
| 679 | BUILDCFG_HEADER = "Build Configuration:" |
| 680 | BUILDCFG_VARS = "BB_VERSION BUILD_SYS NATIVELSBSTRING TARGET_SYS MACHINE DISTRO DISTRO_VERSION TUNE_FEATURES TARGET_FPU" |
| 681 | BUILDCFG_VARS[type] = "list" |
| 682 | BUILDCFG_NEEDEDVARS = "TARGET_ARCH TARGET_OS" |
| 683 | BUILDCFG_NEEDEDVARS[type] = "list" |
| 684 | |
| 685 | # Other |
| 686 | |
| 687 | export PKG_CONFIG_DIR = "${STAGING_DIR_HOST}${libdir}/pkgconfig" |
| 688 | export PKG_CONFIG_PATH = "${PKG_CONFIG_DIR}:${STAGING_DATADIR}/pkgconfig" |
| 689 | export PKG_CONFIG_LIBDIR = "${PKG_CONFIG_DIR}" |
| 690 | export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR_HOST}" |
| 691 | export PKG_CONFIG_DISABLE_UNINSTALLED = "yes" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 692 | export PKG_CONFIG_SYSTEM_LIBRARY_PATH = "${base_libdir}:${libdir}" |
| 693 | export PKG_CONFIG_SYSTEM_INCLUDE_PATH = "${includedir}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 694 | |
| 695 | ### |
| 696 | ### Config file processing |
| 697 | ### |
| 698 | |
| 699 | # An empty distro leads to :: entries in OVERRIDES and FILEOVERRIDES which |
| 700 | # is a bad idea. Setting a dummy value is better than a ton of anonymous python. |
| 701 | DISTRO ??= "nodistro" |
| 702 | DISTRO_NAME ??= "OpenEmbedded" |
| 703 | # Overrides are processed left to right, so the ones that are named later take precedence. |
| 704 | # You generally want them to go from least to most specific. |
| 705 | # |
| 706 | # This means that an envionment variable named '<foo>_arm' overrides an |
| 707 | # environment variable '<foo>' (when ${TARGET_ARCH} is arm). |
| 708 | # An environment variable '<foo>_qemuarm' overrides '<foo>' and overrides |
| 709 | # '<foo>_arm' when ${MACHINE} is 'qemuarm'. |
| 710 | # If you use combination ie '<foo>_qemuarm_arm', then '<foo>_qemuarm_arm' will override |
| 711 | # '<foo>_qemuarm' and then '<foo>' will be overriden with that value from '<foo>_qemuarm'. |
| 712 | # And finally '<foo>_forcevariable' overrides any standard variable, with the highest priority. |
| 713 | # |
| 714 | # This works for functions as well, they are really just environment variables. |
| 715 | # Default OVERRIDES to make compilation fail fast in case of build system misconfiguration. |
| 716 | OVERRIDES = "${TARGET_OS}:${TRANSLATED_TARGET_ARCH}:build-${BUILD_OS}:pn-${PN}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}:${CLASSOVERRIDE}:forcevariable" |
| 717 | OVERRIDES[vardepsexclude] = "MACHINEOVERRIDES" |
| 718 | CLASSOVERRIDE ?= "class-target" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame^] | 719 | DISTROOVERRIDES ?= "${@d.getVar('DISTRO') or ''}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 720 | MACHINEOVERRIDES ?= "${MACHINE}" |
| 721 | MACHINEOVERRIDES[vardepsexclude] = "MACHINE" |
| 722 | |
| 723 | FILESOVERRIDES = "${TRANSLATED_TARGET_ARCH}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}" |
| 724 | |
| 725 | ################################################################## |
| 726 | # Include the rest of the config files. |
| 727 | ################################################################## |
| 728 | |
| 729 | require conf/abi_version.conf |
| 730 | include conf/site.conf |
| 731 | include conf/auto.conf |
| 732 | include conf/local.conf |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame^] | 733 | require conf/multiconfig/${BB_CURRENT_MC}.conf |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 734 | include conf/build/${BUILD_SYS}.conf |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 735 | include conf/machine/${MACHINE}.conf |
| 736 | include conf/machine-sdk/${SDKMACHINE}.conf |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame^] | 737 | include conf/target/${TARGET_SYS}.conf |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 738 | include conf/distro/${DISTRO}.conf |
| 739 | include conf/distro/defaultsetup.conf |
| 740 | include conf/documentation.conf |
| 741 | include conf/licenses.conf |
| 742 | require conf/sanity.conf |
| 743 | |
| 744 | ################################################################## |
| 745 | # Weak variables (usually to retain backwards compatibility) |
| 746 | ################################################################## |
| 747 | |
| 748 | DL_DIR ?= "${TOPDIR}/downloads" |
| 749 | SSTATE_DIR ?= "${TOPDIR}/sstate-cache" |
| 750 | IMAGE_FSTYPES ?= "tar.gz" |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 751 | IMAGE_FSTYPES_DEBUGFS ?= "${IMAGE_FSTYPES}" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 752 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 753 | INITRAMFS_FSTYPES ?= "cpio.gz" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 754 | # The maximum size in Kbytes for the generated initramfs image size. |
| 755 | # Usually, it should be less than 1/2 of ram size, or you may fail to |
| 756 | # boot it. |
| 757 | INITRAMFS_MAXSIZE ??= "131072" |
| 758 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 759 | DEFAULT_TASK_PROVIDER ?= "packagegroup-base" |
| 760 | MACHINE_TASK_PROVIDER ?= "${DEFAULT_TASK_PROVIDER}" |
| 761 | |
| 762 | # The size in Kbytes for the generated image if it is larger than |
| 763 | # the required size (du -ks IMAGE_ROOTFS * IMAGE_OVERHEAD_FACTOR), |
| 764 | # and no effect if less than it. |
| 765 | IMAGE_ROOTFS_SIZE ??= "65536" |
| 766 | |
| 767 | # Forcefully set CACHE now so future changes to things like |
| 768 | # MACHINE don't change the path to the cache |
| 769 | CACHE := "${CACHE}" |
| 770 | |
| 771 | # Default to setting automatically based on cpu count |
| 772 | BB_NUMBER_THREADS ?= "${@oe.utils.cpu_count()}" |
| 773 | |
| 774 | # Default to setting automatically based on cpu count |
| 775 | PARALLEL_MAKE ?= "-j ${@oe.utils.cpu_count()}" |
| 776 | |
| 777 | ################################################################## |
| 778 | # Magic Cookie for SANITY CHECK |
| 779 | ################################################################## |
| 780 | OES_BITBAKE_CONF = "1" |
| 781 | |
| 782 | ################################################################## |
| 783 | # Machine properties and packagegroup-base stuff |
| 784 | ################################################################## |
| 785 | |
| 786 | MACHINE_FEATURES ?= "" |
| 787 | DISTRO_FEATURES ?= "" |
| 788 | |
| 789 | DISTRO_EXTRA_RDEPENDS ?= "" |
| 790 | DISTRO_EXTRA_RRECOMMENDS ?= "" |
| 791 | MACHINE_EXTRA_RDEPENDS ?= "" |
| 792 | MACHINE_EXTRA_RRECOMMENDS ?= "" |
| 793 | MACHINE_ESSENTIAL_EXTRA_RDEPENDS ?= "" |
| 794 | MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS ?= "" |
| 795 | |
| 796 | EXTRA_IMAGE_FEATURES ??= "" |
| 797 | IMAGE_FEATURES += "${EXTRA_IMAGE_FEATURES}" |
| 798 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame^] | 799 | # Native distro features (will always be used for -native, even if they |
| 800 | # are not enabled for target) |
| 801 | DISTRO_FEATURES_NATIVE ?= "x11" |
| 802 | DISTRO_FEATURES_NATIVESDK ?= "x11 libc-charsets libc-locales libc-locale-code" |
| 803 | |
| 804 | # Normally target distro features will not be applied to native builds: |
| 805 | # Native distro features on this list will use the target feature value |
| 806 | DISTRO_FEATURES_FILTER_NATIVE ?= "api-documentation" |
| 807 | DISTRO_FEATURES_FILTER_NATIVESDK ?= "api-documentation" |
| 808 | |
| 809 | DISTRO_FEATURES_BACKFILL = "pulseaudio sysvinit bluez5 gobject-introspection-data ldconfig" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 810 | MACHINE_FEATURES_BACKFILL = "rtc qemu-usermode" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 811 | |
| 812 | COMBINED_FEATURES = "${@oe.utils.set_intersect('DISTRO_FEATURES', 'MACHINE_FEATURES', d)}" |
| 813 | COMBINED_FEATURES[vardeps] += "DISTRO_FEATURES MACHINE_FEATURES" |
| 814 | |
| 815 | SERIAL_CONSOLE ??= "" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame^] | 816 | SERIAL_CONSOLES ??= "${@d.getVar('SERIAL_CONSOLE').replace(' ', ';')}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 817 | |
| 818 | NO_RECOMMENDATIONS ?= "" |
| 819 | BAD_RECOMMENDATIONS ?= "" |
| 820 | |
| 821 | # Make sure MACHINE isn't exported |
| 822 | # (breaks binutils at least) |
| 823 | MACHINE[unexport] = "1" |
| 824 | |
| 825 | # Make sure TARGET_ARCH isn't exported |
| 826 | # (breaks Makefiles using implicit rules, e.g. quilt, as GNU make has this |
| 827 | # in them, undocumented) |
| 828 | TARGET_ARCH[unexport] = "1" |
| 829 | |
| 830 | # Make sure DISTRO isn't exported |
| 831 | # (breaks sysvinit at least) |
| 832 | DISTRO[unexport] = "1" |
| 833 | |
| 834 | # Make sure SHELL isn't exported |
| 835 | # (can break any number of things if the user's shell isn't POSIX-compliant, |
| 836 | # including the flock command). The user's shell shouldn't affect our builds. |
| 837 | SHELL[unexport] = "1" |
| 838 | |
| 839 | # Used by canadian-cross to handle string conversions on TARGET_ARCH where needed |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame^] | 840 | TRANSLATED_TARGET_ARCH ??= "${@d.getVar('TARGET_ARCH').replace("_", "-")}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 841 | |
| 842 | # Complete output from bitbake |
| 843 | BB_CONSOLELOG ?= "${LOG_DIR}/cooker/${MACHINE}/${DATETIME}.log" |
| 844 | |
| 845 | # Setup our default hash policy |
| 846 | BB_SIGNATURE_HANDLER ?= "OEBasicHash" |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 847 | BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH BBSERVER DL_DIR \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 848 | SSTATE_DIR THISDIR FILESEXTRAPATHS FILE_DIRNAME HOME LOGNAME SHELL TERM \ |
| 849 | USER FILESPATH STAGING_DIR_HOST STAGING_DIR_TARGET COREBASE PRSERV_HOST \ |
| 850 | PRSERV_DUMPDIR PRSERV_DUMPFILE PRSERV_LOCKDOWN PARALLEL_MAKE \ |
| 851 | CCACHE_DIR EXTERNAL_TOOLCHAIN CCACHE CCACHE_DISABLE LICENSE_PATH SDKPKGSUFFIX \ |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 852 | WARN_QA ERROR_QA WORKDIR STAMPCLEAN PKGDATA_DIR BUILD_ARCH SSTATE_PKGARCH \ |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame^] | 853 | BB_WORKERCONTEXT BB_LIMITEDDEPS extend_recipe_sysroot DEPLOY_DIR" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 854 | BB_HASHCONFIG_WHITELIST ?= "${BB_HASHBASE_WHITELIST} DATE TIME SSH_AGENT_PID \ |
| 855 | SSH_AUTH_SOCK PSEUDO_BUILD BB_ENV_EXTRAWHITE DISABLE_SANITY_CHECKS \ |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 856 | PARALLEL_MAKE BB_NUMBER_THREADS BB_ORIGENV BB_INVALIDCONF BBINCLUDED \ |
| 857 | GIT_PROXY_COMMAND ALL_PROXY all_proxy NO_PROXY no_proxy FTP_PROXY ftp_proxy \ |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 858 | HTTP_PROXY http_proxy HTTPS_PROXY https_proxy SOCKS5_USER SOCKS5_PASSWD \ |
| 859 | BB_SETSCENE_ENFORCE" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 860 | BB_SIGNATURE_EXCLUDE_FLAGS ?= "doc deps depends \ |
| 861 | lockfiles type vardepsexclude vardeps vardepvalue vardepvalueexclude \ |
| 862 | file-checksums python func task export unexport noexec nostamp dirs cleandirs \ |
| 863 | sstate-lockfile-shared prefuncs postfuncs export_func deptask rdeptask \ |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 864 | recrdeptask nodeprrecs stamp-extra-info sstate-outputdirs filename lineno \ |
| 865 | progress" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 866 | |
| 867 | MLPREFIX ??= "" |
| 868 | MULTILIB_VARIANTS ??= "" |