192b42cb3SPatrick Williams# 292b42cb3SPatrick Williams# Copyright OpenEmbedded Contributors 392b42cb3SPatrick Williams# 492b42cb3SPatrick Williams# SPDX-License-Identifier: MIT 592b42cb3SPatrick Williams# 692b42cb3SPatrick Williams 792b42cb3SPatrick Williamsinherit package 892b42cb3SPatrick Williams 992b42cb3SPatrick WilliamsIMAGE_PKGTYPE ?= "ipk" 1092b42cb3SPatrick Williams 1192b42cb3SPatrick WilliamsIPKGCONF_TARGET = "${WORKDIR}/opkg.conf" 1292b42cb3SPatrick WilliamsIPKGCONF_SDK = "${WORKDIR}/opkg-sdk.conf" 1392b42cb3SPatrick WilliamsIPKGCONF_SDK_TARGET = "${WORKDIR}/opkg-sdk-target.conf" 1492b42cb3SPatrick Williams 1592b42cb3SPatrick WilliamsPKGWRITEDIRIPK = "${WORKDIR}/deploy-ipks" 1692b42cb3SPatrick Williams 1792b42cb3SPatrick Williams# Program to be used to build opkg packages 1892b42cb3SPatrick WilliamsOPKGBUILDCMD ??= 'opkg-build -Z xz -a "${XZ_DEFAULTS}"' 1992b42cb3SPatrick Williams 2092b42cb3SPatrick WilliamsOPKG_ARGS += "--force_postinstall --prefer-arch-to-version" 2192b42cb3SPatrick WilliamsOPKG_ARGS += "${@['', '--no-install-recommends'][d.getVar("NO_RECOMMENDATIONS") == "1"]}" 2292b42cb3SPatrick WilliamsOPKG_ARGS += "${@['', '--add-exclude ' + ' --add-exclude '.join((d.getVar('PACKAGE_EXCLUDE') or "").split())][(d.getVar("PACKAGE_EXCLUDE") or "").strip() != ""]}" 2392b42cb3SPatrick Williams 2492b42cb3SPatrick WilliamsOPKGLIBDIR ??= "${localstatedir}/lib" 2592b42cb3SPatrick Williams 2692b42cb3SPatrick Williamspython do_package_ipk () { 2792b42cb3SPatrick Williams workdir = d.getVar('WORKDIR') 2892b42cb3SPatrick Williams outdir = d.getVar('PKGWRITEDIRIPK') 2992b42cb3SPatrick Williams tmpdir = d.getVar('TMPDIR') 3092b42cb3SPatrick Williams pkgdest = d.getVar('PKGDEST') 3192b42cb3SPatrick Williams if not workdir or not outdir or not tmpdir: 3292b42cb3SPatrick Williams bb.error("Variables incorrectly set, unable to package") 3392b42cb3SPatrick Williams return 3492b42cb3SPatrick Williams 3592b42cb3SPatrick Williams packages = d.getVar('PACKAGES') 3692b42cb3SPatrick Williams if not packages or packages == '': 3792b42cb3SPatrick Williams bb.debug(1, "No packages; nothing to do") 3892b42cb3SPatrick Williams return 3992b42cb3SPatrick Williams 4092b42cb3SPatrick Williams # We're about to add new packages so the index needs to be checked 4192b42cb3SPatrick Williams # so remove the appropriate stamp file. 4292b42cb3SPatrick Williams if os.access(os.path.join(tmpdir, "stamps", "IPK_PACKAGE_INDEX_CLEAN"), os.R_OK): 4392b42cb3SPatrick Williams os.unlink(os.path.join(tmpdir, "stamps", "IPK_PACKAGE_INDEX_CLEAN")) 4492b42cb3SPatrick Williams 4592b42cb3SPatrick Williams oe.utils.multiprocess_launch(ipk_write_pkg, packages.split(), d, extraargs=(d,)) 4692b42cb3SPatrick Williams} 4792b42cb3SPatrick Williamsdo_package_ipk[vardeps] += "ipk_write_pkg" 4892b42cb3SPatrick Williamsdo_package_ipk[vardepsexclude] = "BB_NUMBER_THREADS" 4992b42cb3SPatrick Williams 50*ac13d5f3SPatrick Williams# FILE isn't included by default but we want the recipe to change if basename() changes 51*ac13d5f3SPatrick WilliamsIPK_RECIPE_FILE = "${@os.path.basename(d.getVar('FILE'))}" 52*ac13d5f3SPatrick WilliamsIPK_RECIPE_FILE[vardepvalue] = "${IPK_RECIPE_FILE}" 53*ac13d5f3SPatrick Williams 5492b42cb3SPatrick Williamsdef ipk_write_pkg(pkg, d): 5592b42cb3SPatrick Williams import re, copy 5692b42cb3SPatrick Williams import subprocess 5792b42cb3SPatrick Williams import textwrap 5892b42cb3SPatrick Williams import collections 5992b42cb3SPatrick Williams import glob 6092b42cb3SPatrick Williams 6192b42cb3SPatrick Williams def cleanupcontrol(root): 6292b42cb3SPatrick Williams for p in ['CONTROL', 'DEBIAN']: 6392b42cb3SPatrick Williams p = os.path.join(root, p) 6492b42cb3SPatrick Williams if os.path.exists(p): 6592b42cb3SPatrick Williams bb.utils.prunedir(p) 6692b42cb3SPatrick Williams 6792b42cb3SPatrick Williams outdir = d.getVar('PKGWRITEDIRIPK') 6892b42cb3SPatrick Williams pkgdest = d.getVar('PKGDEST') 69*ac13d5f3SPatrick Williams recipesource = d.getVar('IPK_RECIPE_FILE') 7092b42cb3SPatrick Williams 7192b42cb3SPatrick Williams localdata = bb.data.createCopy(d) 7292b42cb3SPatrick Williams root = "%s/%s" % (pkgdest, pkg) 7392b42cb3SPatrick Williams 7492b42cb3SPatrick Williams lf = bb.utils.lockfile(root + ".lock") 7592b42cb3SPatrick Williams try: 7692b42cb3SPatrick Williams localdata.setVar('ROOT', '') 7792b42cb3SPatrick Williams localdata.setVar('ROOT_%s' % pkg, root) 7892b42cb3SPatrick Williams pkgname = localdata.getVar('PKG:%s' % pkg) 7992b42cb3SPatrick Williams if not pkgname: 8092b42cb3SPatrick Williams pkgname = pkg 8192b42cb3SPatrick Williams localdata.setVar('PKG', pkgname) 8292b42cb3SPatrick Williams 8392b42cb3SPatrick Williams localdata.setVar('OVERRIDES', d.getVar("OVERRIDES", False) + ":" + pkg) 8492b42cb3SPatrick Williams 8592b42cb3SPatrick Williams basedir = os.path.join(os.path.dirname(root)) 8692b42cb3SPatrick Williams arch = localdata.getVar('PACKAGE_ARCH') 8792b42cb3SPatrick Williams 8892b42cb3SPatrick Williams if localdata.getVar('IPK_HIERARCHICAL_FEED', False) == "1": 8992b42cb3SPatrick Williams # Spread packages across subdirectories so each isn't too crowded 9092b42cb3SPatrick Williams if pkgname.startswith('lib'): 9192b42cb3SPatrick Williams pkg_prefix = 'lib' + pkgname[3] 9292b42cb3SPatrick Williams else: 9392b42cb3SPatrick Williams pkg_prefix = pkgname[0] 9492b42cb3SPatrick Williams 9592b42cb3SPatrick Williams # Keep -dbg, -dev, -doc, -staticdev, -locale and -locale-* packages 9692b42cb3SPatrick Williams # together. These package suffixes are taken from the definitions of 9792b42cb3SPatrick Williams # PACKAGES and PACKAGES_DYNAMIC in meta/conf/bitbake.conf 9892b42cb3SPatrick Williams if pkgname[-4:] in ('-dbg', '-dev', '-doc'): 9992b42cb3SPatrick Williams pkg_subdir = pkgname[:-4] 10092b42cb3SPatrick Williams elif pkgname.endswith('-staticdev'): 10192b42cb3SPatrick Williams pkg_subdir = pkgname[:-10] 10292b42cb3SPatrick Williams elif pkgname.endswith('-locale'): 10392b42cb3SPatrick Williams pkg_subdir = pkgname[:-7] 10492b42cb3SPatrick Williams elif '-locale-' in pkgname: 10592b42cb3SPatrick Williams pkg_subdir = pkgname[:pkgname.find('-locale-')] 10692b42cb3SPatrick Williams else: 10792b42cb3SPatrick Williams pkg_subdir = pkgname 10892b42cb3SPatrick Williams 10992b42cb3SPatrick Williams pkgoutdir = "%s/%s/%s/%s" % (outdir, arch, pkg_prefix, pkg_subdir) 11092b42cb3SPatrick Williams else: 11192b42cb3SPatrick Williams pkgoutdir = "%s/%s" % (outdir, arch) 11292b42cb3SPatrick Williams 11392b42cb3SPatrick Williams bb.utils.mkdirhier(pkgoutdir) 11492b42cb3SPatrick Williams os.chdir(root) 11592b42cb3SPatrick Williams cleanupcontrol(root) 11692b42cb3SPatrick Williams g = glob.glob('*') 11792b42cb3SPatrick Williams if not g and localdata.getVar('ALLOW_EMPTY', False) != "1": 11892b42cb3SPatrick Williams bb.note("Not creating empty archive for %s-%s-%s" % (pkg, localdata.getVar('PKGV'), localdata.getVar('PKGR'))) 11992b42cb3SPatrick Williams return 12092b42cb3SPatrick Williams 12192b42cb3SPatrick Williams controldir = os.path.join(root, 'CONTROL') 12292b42cb3SPatrick Williams bb.utils.mkdirhier(controldir) 12392b42cb3SPatrick Williams ctrlfile = open(os.path.join(controldir, 'control'), 'w') 12492b42cb3SPatrick Williams 12592b42cb3SPatrick Williams fields = [] 12692b42cb3SPatrick Williams pe = d.getVar('PKGE') 12792b42cb3SPatrick Williams if pe and int(pe) > 0: 12892b42cb3SPatrick Williams fields.append(["Version: %s:%s-%s\n", ['PKGE', 'PKGV', 'PKGR']]) 12992b42cb3SPatrick Williams else: 13092b42cb3SPatrick Williams fields.append(["Version: %s-%s\n", ['PKGV', 'PKGR']]) 13192b42cb3SPatrick Williams fields.append(["Description: %s\n", ['DESCRIPTION']]) 13292b42cb3SPatrick Williams fields.append(["Section: %s\n", ['SECTION']]) 13392b42cb3SPatrick Williams fields.append(["Priority: %s\n", ['PRIORITY']]) 13492b42cb3SPatrick Williams fields.append(["Maintainer: %s\n", ['MAINTAINER']]) 13592b42cb3SPatrick Williams fields.append(["License: %s\n", ['LICENSE']]) 13692b42cb3SPatrick Williams fields.append(["Architecture: %s\n", ['PACKAGE_ARCH']]) 13792b42cb3SPatrick Williams fields.append(["OE: %s\n", ['PN']]) 13892b42cb3SPatrick Williams if d.getVar('HOMEPAGE'): 13992b42cb3SPatrick Williams fields.append(["Homepage: %s\n", ['HOMEPAGE']]) 14092b42cb3SPatrick Williams 14192b42cb3SPatrick Williams def pullData(l, d): 14292b42cb3SPatrick Williams l2 = [] 14392b42cb3SPatrick Williams for i in l: 14492b42cb3SPatrick Williams l2.append(d.getVar(i)) 14592b42cb3SPatrick Williams return l2 14692b42cb3SPatrick Williams 14792b42cb3SPatrick Williams ctrlfile.write("Package: %s\n" % pkgname) 14892b42cb3SPatrick Williams # check for required fields 14992b42cb3SPatrick Williams for (c, fs) in fields: 15092b42cb3SPatrick Williams for f in fs: 15192b42cb3SPatrick Williams if localdata.getVar(f, False) is None: 15292b42cb3SPatrick Williams raise KeyError(f) 15392b42cb3SPatrick Williams # Special behavior for description... 15492b42cb3SPatrick Williams if 'DESCRIPTION' in fs: 15592b42cb3SPatrick Williams summary = localdata.getVar('SUMMARY') or localdata.getVar('DESCRIPTION') or "." 15692b42cb3SPatrick Williams ctrlfile.write('Description: %s\n' % summary) 15792b42cb3SPatrick Williams description = localdata.getVar('DESCRIPTION') or "." 15892b42cb3SPatrick Williams description = textwrap.dedent(description).strip() 15992b42cb3SPatrick Williams if '\\n' in description: 16092b42cb3SPatrick Williams # Manually indent: multiline description includes a leading space 16192b42cb3SPatrick Williams for t in description.split('\\n'): 16292b42cb3SPatrick Williams ctrlfile.write(' %s\n' % (t.strip() or ' .')) 16392b42cb3SPatrick Williams else: 16492b42cb3SPatrick Williams # Auto indent 16592b42cb3SPatrick Williams ctrlfile.write('%s\n' % textwrap.fill(description, width=74, initial_indent=' ', subsequent_indent=' ')) 16692b42cb3SPatrick Williams else: 16792b42cb3SPatrick Williams ctrlfile.write(c % tuple(pullData(fs, localdata))) 16892b42cb3SPatrick Williams 169517393d9SAndrew Geissler custom_fields_chunk = oe.packagedata.get_package_additional_metadata("ipk", localdata) 17092b42cb3SPatrick Williams if custom_fields_chunk is not None: 17192b42cb3SPatrick Williams ctrlfile.write(custom_fields_chunk) 17292b42cb3SPatrick Williams ctrlfile.write("\n") 17392b42cb3SPatrick Williams 174517393d9SAndrew Geissler oe.packagedata.mapping_rename_hook(localdata) 17592b42cb3SPatrick Williams 17692b42cb3SPatrick Williams def debian_cmp_remap(var): 17792b42cb3SPatrick Williams # In debian '>' and '<' do not mean what it appears they mean 17892b42cb3SPatrick Williams # '<' = less or equal 17992b42cb3SPatrick Williams # '>' = greater or equal 18092b42cb3SPatrick Williams # adjust these to the '<<' and '>>' equivalents 18192b42cb3SPatrick Williams # Also, "=" specifiers only work if they have the PR in, so 1.2.3 != 1.2.3-r0 18292b42cb3SPatrick Williams # so to avoid issues, map this to ">= 1.2.3 << 1.2.3.0" 18392b42cb3SPatrick Williams for dep in var: 18492b42cb3SPatrick Williams for i, v in enumerate(var[dep]): 18592b42cb3SPatrick Williams if (v or "").startswith("< "): 18692b42cb3SPatrick Williams var[dep][i] = var[dep][i].replace("< ", "<< ") 18792b42cb3SPatrick Williams elif (v or "").startswith("> "): 18892b42cb3SPatrick Williams var[dep][i] = var[dep][i].replace("> ", ">> ") 18992b42cb3SPatrick Williams elif (v or "").startswith("= ") and "-r" not in v: 19092b42cb3SPatrick Williams ver = var[dep][i].replace("= ", "") 19192b42cb3SPatrick Williams var[dep][i] = var[dep][i].replace("= ", ">= ") 19292b42cb3SPatrick Williams var[dep].append("<< " + ver + ".0") 19392b42cb3SPatrick Williams 19492b42cb3SPatrick Williams rdepends = bb.utils.explode_dep_versions2(localdata.getVar("RDEPENDS") or "") 19592b42cb3SPatrick Williams debian_cmp_remap(rdepends) 19692b42cb3SPatrick Williams rrecommends = bb.utils.explode_dep_versions2(localdata.getVar("RRECOMMENDS") or "") 19792b42cb3SPatrick Williams debian_cmp_remap(rrecommends) 19892b42cb3SPatrick Williams rsuggests = bb.utils.explode_dep_versions2(localdata.getVar("RSUGGESTS") or "") 19992b42cb3SPatrick Williams debian_cmp_remap(rsuggests) 20092b42cb3SPatrick Williams # Deliberately drop version information here, not wanted/supported by ipk 20192b42cb3SPatrick Williams rprovides = dict.fromkeys(bb.utils.explode_dep_versions2(localdata.getVar("RPROVIDES") or ""), []) 20292b42cb3SPatrick Williams rprovides = collections.OrderedDict(sorted(rprovides.items(), key=lambda x: x[0])) 20392b42cb3SPatrick Williams debian_cmp_remap(rprovides) 20492b42cb3SPatrick Williams rreplaces = bb.utils.explode_dep_versions2(localdata.getVar("RREPLACES") or "") 20592b42cb3SPatrick Williams debian_cmp_remap(rreplaces) 20692b42cb3SPatrick Williams rconflicts = bb.utils.explode_dep_versions2(localdata.getVar("RCONFLICTS") or "") 20792b42cb3SPatrick Williams debian_cmp_remap(rconflicts) 20892b42cb3SPatrick Williams 20992b42cb3SPatrick Williams if rdepends: 21092b42cb3SPatrick Williams ctrlfile.write("Depends: %s\n" % bb.utils.join_deps(rdepends)) 21192b42cb3SPatrick Williams if rsuggests: 21292b42cb3SPatrick Williams ctrlfile.write("Suggests: %s\n" % bb.utils.join_deps(rsuggests)) 21392b42cb3SPatrick Williams if rrecommends: 21492b42cb3SPatrick Williams ctrlfile.write("Recommends: %s\n" % bb.utils.join_deps(rrecommends)) 21592b42cb3SPatrick Williams if rprovides: 21692b42cb3SPatrick Williams ctrlfile.write("Provides: %s\n" % bb.utils.join_deps(rprovides)) 21792b42cb3SPatrick Williams if rreplaces: 21892b42cb3SPatrick Williams ctrlfile.write("Replaces: %s\n" % bb.utils.join_deps(rreplaces)) 21992b42cb3SPatrick Williams if rconflicts: 22092b42cb3SPatrick Williams ctrlfile.write("Conflicts: %s\n" % bb.utils.join_deps(rconflicts)) 22192b42cb3SPatrick Williams ctrlfile.write("Source: %s\n" % recipesource) 22292b42cb3SPatrick Williams ctrlfile.close() 22392b42cb3SPatrick Williams 22492b42cb3SPatrick Williams for script in ["preinst", "postinst", "prerm", "postrm"]: 22592b42cb3SPatrick Williams scriptvar = localdata.getVar('pkg_%s' % script) 22692b42cb3SPatrick Williams if not scriptvar: 22792b42cb3SPatrick Williams continue 22892b42cb3SPatrick Williams scriptfile = open(os.path.join(controldir, script), 'w') 22992b42cb3SPatrick Williams scriptfile.write(scriptvar) 23092b42cb3SPatrick Williams scriptfile.close() 23192b42cb3SPatrick Williams os.chmod(os.path.join(controldir, script), 0o755) 23292b42cb3SPatrick Williams 233517393d9SAndrew Geissler conffiles_str = ' '.join(oe.package.get_conffiles(pkg, d)) 23492b42cb3SPatrick Williams if conffiles_str: 23592b42cb3SPatrick Williams conffiles = open(os.path.join(controldir, 'conffiles'), 'w') 23692b42cb3SPatrick Williams for f in conffiles_str.split(): 23792b42cb3SPatrick Williams if os.path.exists(oe.path.join(root, f)): 23892b42cb3SPatrick Williams conffiles.write('%s\n' % f) 23992b42cb3SPatrick Williams conffiles.close() 24092b42cb3SPatrick Williams 24192b42cb3SPatrick Williams os.chdir(basedir) 24292b42cb3SPatrick Williams subprocess.check_output("PATH=\"%s\" %s %s %s" % (localdata.getVar("PATH"), 24392b42cb3SPatrick Williams d.getVar("OPKGBUILDCMD"), pkg, pkgoutdir), 24492b42cb3SPatrick Williams stderr=subprocess.STDOUT, 24592b42cb3SPatrick Williams shell=True) 24692b42cb3SPatrick Williams 24792b42cb3SPatrick Williams if d.getVar('IPK_SIGN_PACKAGES') == '1': 24892b42cb3SPatrick Williams ipkver = "%s-%s" % (localdata.getVar('PKGV'), localdata.getVar('PKGR')) 24992b42cb3SPatrick Williams ipk_to_sign = "%s/%s_%s_%s.ipk" % (pkgoutdir, pkgname, ipkver, localdata.getVar('PACKAGE_ARCH')) 25092b42cb3SPatrick Williams sign_ipk(d, ipk_to_sign) 25192b42cb3SPatrick Williams 25292b42cb3SPatrick Williams finally: 25392b42cb3SPatrick Williams cleanupcontrol(root) 25492b42cb3SPatrick Williams bb.utils.unlockfile(lf) 25592b42cb3SPatrick Williams 25692b42cb3SPatrick Williams# Have to list any variables referenced as X_<pkg> that aren't in pkgdata here 25792b42cb3SPatrick WilliamsIPKEXTRAVARS = "PRIORITY MAINTAINER PACKAGE_ARCH HOMEPAGE PACKAGE_ADD_METADATA_IPK" 25892b42cb3SPatrick Williamsipk_write_pkg[vardeps] += "${@gen_packagevar(d, 'IPKEXTRAVARS')}" 25992b42cb3SPatrick Williams 26092b42cb3SPatrick Williams# Otherwise allarch packages may change depending on override configuration 26192b42cb3SPatrick Williamsipk_write_pkg[vardepsexclude] = "OVERRIDES" 26292b42cb3SPatrick Williams 26392b42cb3SPatrick Williams 26492b42cb3SPatrick WilliamsSSTATETASKS += "do_package_write_ipk" 26592b42cb3SPatrick Williamsdo_package_write_ipk[sstate-inputdirs] = "${PKGWRITEDIRIPK}" 26692b42cb3SPatrick Williamsdo_package_write_ipk[sstate-outputdirs] = "${DEPLOY_DIR_IPK}" 26792b42cb3SPatrick Williams 26892b42cb3SPatrick Williamspython do_package_write_ipk_setscene () { 26992b42cb3SPatrick Williams tmpdir = d.getVar('TMPDIR') 27092b42cb3SPatrick Williams 27192b42cb3SPatrick Williams if os.access(os.path.join(tmpdir, "stamps", "IPK_PACKAGE_INDEX_CLEAN"), os.R_OK): 27292b42cb3SPatrick Williams os.unlink(os.path.join(tmpdir, "stamps", "IPK_PACKAGE_INDEX_CLEAN")) 27392b42cb3SPatrick Williams 27492b42cb3SPatrick Williams sstate_setscene(d) 27592b42cb3SPatrick Williams} 27692b42cb3SPatrick Williamsaddtask do_package_write_ipk_setscene 27792b42cb3SPatrick Williams 27892b42cb3SPatrick Williamspython () { 27992b42cb3SPatrick Williams if d.getVar('PACKAGES') != '': 28092b42cb3SPatrick Williams deps = ' opkg-utils-native:do_populate_sysroot virtual/fakeroot-native:do_populate_sysroot xz-native:do_populate_sysroot' 28192b42cb3SPatrick Williams d.appendVarFlag('do_package_write_ipk', 'depends', deps) 28292b42cb3SPatrick Williams d.setVarFlag('do_package_write_ipk', 'fakeroot', "1") 283*ac13d5f3SPatrick Williams 284*ac13d5f3SPatrick Williams # Needed to ensure PKG_xxx renaming of dependency packages works 285*ac13d5f3SPatrick Williams d.setVarFlag('do_package_write_ipk', 'deptask', "do_packagedata") 286*ac13d5f3SPatrick Williams d.setVarFlag('do_package_write_ipk', 'rdeptask', "do_packagedata") 28792b42cb3SPatrick Williams} 28892b42cb3SPatrick Williams 28992b42cb3SPatrick Williamspython do_package_write_ipk () { 29092b42cb3SPatrick Williams bb.build.exec_func("read_subpackage_metadata", d) 29192b42cb3SPatrick Williams bb.build.exec_func("do_package_ipk", d) 29292b42cb3SPatrick Williams} 29392b42cb3SPatrick Williamsdo_package_write_ipk[dirs] = "${PKGWRITEDIRIPK}" 29492b42cb3SPatrick Williamsdo_package_write_ipk[cleandirs] = "${PKGWRITEDIRIPK}" 29592b42cb3SPatrick Williamsdo_package_write_ipk[depends] += "${@oe.utils.build_depends_string(d.getVar('PACKAGE_WRITE_DEPS'), 'do_populate_sysroot')}" 29692b42cb3SPatrick Williamsaddtask package_write_ipk after do_packagedata do_package do_deploy_source_date_epoch before do_build 29792b42cb3SPatrick Williamsdo_build[rdeptask] += "do_package_write_ipk" 29892b42cb3SPatrick Williams 29992b42cb3SPatrick WilliamsPACKAGEINDEXDEPS += "opkg-utils-native:do_populate_sysroot" 30092b42cb3SPatrick WilliamsPACKAGEINDEXDEPS += "opkg-native:do_populate_sysroot" 301