blob: c5c6426abb87af6b2530d1838d3d0cad5a0be630 [file] [log] [blame]
Patrick Williams92b42cb2022-09-03 06:53:57 -05001#
2# Copyright 2006-2007 Openedhand Ltd.
3#
4# SPDX-License-Identifier: MIT
5#
6
7ROOTFS_PKGMANAGE = "dpkg apt"
8
9do_rootfs[depends] += "dpkg-native:do_populate_sysroot apt-native:do_populate_sysroot"
10do_populate_sdk[depends] += "dpkg-native:do_populate_sysroot apt-native:do_populate_sysroot bzip2-native:do_populate_sysroot"
11do_rootfs[recrdeptask] += "do_package_write_deb do_package_qa"
12do_rootfs[vardeps] += "PACKAGE_FEED_URIS PACKAGE_FEED_BASE_PATHS PACKAGE_FEED_ARCHS"
13
14do_rootfs[lockfiles] += "${DEPLOY_DIR_DEB}/deb.lock"
15do_populate_sdk[lockfiles] += "${DEPLOY_DIR_DEB}/deb.lock"
16do_populate_sdk_ext[lockfiles] += "${DEPLOY_DIR_DEB}/deb.lock"
17
18python rootfs_deb_bad_recommendations() {
19 if d.getVar("BAD_RECOMMENDATIONS"):
20 bb.warn("Debian package install does not support BAD_RECOMMENDATIONS")
21}
22do_rootfs[prefuncs] += "rootfs_deb_bad_recommendations"
23
24DEB_POSTPROCESS_COMMANDS = ""
25
26opkglibdir = "${localstatedir}/lib/opkg"
27
28python () {
29 # Map TARGET_ARCH to Debian's ideas about architectures
30 darch = d.getVar('SDK_ARCH')
31 if darch in ["x86", "i486", "i586", "i686", "pentium"]:
32 d.setVar('DEB_SDK_ARCH', 'i386')
33 elif darch == "x86_64":
34 d.setVar('DEB_SDK_ARCH', 'amd64')
35 elif darch == "arm":
36 d.setVar('DEB_SDK_ARCH', 'armel')
37 elif darch == "aarch64":
38 d.setVar('DEB_SDK_ARCH', 'arm64')
39 else:
40 bb.fatal("Unhandled SDK_ARCH %s" % darch)
41}