diff options
Diffstat (limited to 'meta/recipes-core')
-rw-r--r-- | meta/recipes-core/base-passwd/base-passwd_3.5.29.bb | 29 | ||||
-rw-r--r-- | meta/recipes-core/glibc/glibc-initial.inc | 19 | ||||
-rw-r--r-- | meta/recipes-core/glibc/glibc.inc | 2 | ||||
-rw-r--r-- | meta/recipes-core/meta/build-sysroots.bb | 38 | ||||
-rw-r--r-- | meta/recipes-core/meta/meta-environment-extsdk.bb | 4 | ||||
-rw-r--r-- | meta/recipes-core/meta/meta-extsdk-toolchain.bb | 2 | ||||
-rw-r--r-- | meta/recipes-core/meta/meta-world-pkgdata.bb | 2 | ||||
-rw-r--r-- | meta/recipes-core/musl/musl.inc | 1 |
8 files changed, 52 insertions, 45 deletions
diff --git a/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb b/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb index 10457b2dec..e43bc0a007 100644 --- a/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb +++ b/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb @@ -23,8 +23,6 @@ UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/b/base-passwd/" inherit autotools -SSTATEPOSTINSTFUNCS += "base_passwd_sstate_postinst" - do_install () { install -d -m 755 ${D}${sbindir} install -o root -g root -p -m 755 ${B}/update-passwd ${D}${sbindir}/ @@ -45,23 +43,16 @@ do_install () { install -p -m 644 ${S}/debian/copyright ${D}${docdir}/${BPN}/ } -base_passwd_sstate_postinst() { - if [ "${BB_CURRENTTASK}" = "populate_sysroot" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ] - then - # Staging does not copy ${sysconfdir} files into the - # target sysroot, so we need to do so manually. We - # put these files in the target sysroot so they can - # be used by recipes which use custom user/group - # permissions. - # Install passwd.master and group.master to sysconfdir and mv - # them to make sure they are atomically install. - install -d -m 755 ${STAGING_DIR_TARGET}${sysconfdir} - for i in passwd group; do - install -p -m 644 ${STAGING_DIR_TARGET}${datadir}/base-passwd/$i.master \ - ${STAGING_DIR_TARGET}${sysconfdir}/ - mv ${STAGING_DIR_TARGET}${sysconfdir}/$i.master ${STAGING_DIR_TARGET}${sysconfdir}/$i - done - fi +SYSROOT_DIRS += "${sysconfdir}" +SYSROOT_PREPROCESS_FUNCS += "base_passwd_tweaksysroot" + +base_passwd_tweaksysroot () { + # Install passwd.master and group.master to sysconfdir + install -d -m 755 ${SYSROOT_DESTDIR}${sysconfdir} + for i in passwd group; do + install -p -m 644 ${SYSROOT_DESTDIR}${datadir}/base-passwd/$i.master \ + ${SYSROOT_DESTDIR}${sysconfdir}/$i + done } python populate_packages_prepend() { diff --git a/meta/recipes-core/glibc/glibc-initial.inc b/meta/recipes-core/glibc/glibc-initial.inc index 2e3bc8104a..7380bdbcac 100644 --- a/meta/recipes-core/glibc/glibc-initial.inc +++ b/meta/recipes-core/glibc/glibc-initial.inc @@ -6,7 +6,6 @@ PACKAGES_DYNAMIC = "" STAGINGCC = "gcc-cross-initial-${TARGET_ARCH}" STAGINGCC_class-nativesdk = "gcc-crosssdk-initial-${SDK_SYS}" -TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TCBOOTSTRAP}" do_configure () { (cd ${S} && gnu-configize) || die "failure in running gnu-configize" @@ -42,10 +41,6 @@ do_install () { if [ -e ${B}/bits/stdio_lim.h ]; then cp ${B}/bits/stdio_lim.h ${D}${includedir}/bits/ fi - # add links to linux-libc-headers: final glibc build need this. - for t in linux asm asm-generic; do - ln -s ${STAGING_DIR_TARGET}${includedir}/$t ${D}${includedir}/ - done } do_install_locale() { @@ -56,20 +51,6 @@ do_siteconfig () { : } -SSTATEPOSTINSTFUNCS += "glibcinitial_sstate_postinst" -glibcinitial_sstate_postinst() { - if [ "${BB_CURRENTTASK}" = "populate_sysroot" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ] - then - # Recreate the symlinks to ensure they point to the correct location - for t in linux asm asm-generic; do - rm -f ${STAGING_DIR_TCBOOTSTRAP}${includedir}/$t - ln -s ${STAGING_DIR_TARGET}${includedir}/$t ${STAGING_DIR_TCBOOTSTRAP}${includedir}/ - done - fi -} - -do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR_TCBOOTSTRAP}/" - # We don't install any scripts so there is nothing to evacuate do_evacuate_scripts () { : diff --git a/meta/recipes-core/glibc/glibc.inc b/meta/recipes-core/glibc/glibc.inc index 823e60e771..21bbdc2ad0 100644 --- a/meta/recipes-core/glibc/glibc.inc +++ b/meta/recipes-core/glibc/glibc.inc @@ -6,8 +6,6 @@ STAGINGCC = "gcc-cross-initial-${TARGET_ARCH}" STAGINGCC_class-nativesdk = "gcc-crosssdk-initial-${SDK_SYS}" PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.${STAGINGCC}:" -TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TCBOOTSTRAP}" - python () { opt_effective = "-O" for opt in d.getVar('SELECTED_OPTIMIZATION').split(): diff --git a/meta/recipes-core/meta/build-sysroots.bb b/meta/recipes-core/meta/build-sysroots.bb new file mode 100644 index 0000000000..7a712e2f38 --- /dev/null +++ b/meta/recipes-core/meta/build-sysroots.bb @@ -0,0 +1,38 @@ +INHIBIT_DEFAULT_DEPS = "1" +LICENSE = "MIT" + +STANDALONE_SYSROOT = "${STAGING_DIR}/${MACHINE}" +STANDALONE_SYSROOT_NATIVE = "${STAGING_DIR}/${BUILD_ARCH}" +PACKAGE_ARCH = "${MACHINE_ARCH}" +EXCLUDE_FROM_WORLD = "1" + +inherit nopackages +deltask fetch +deltask unpack +deltask patch +deltask prepare_recipe_sysroot +deltask populate_lic +deltask configure +deltask compile +deltask install +deltask populate_sysroot + +python do_build_native_sysroot () { + targetsysroot = d.getVar("STANDALONE_SYSROOT") + nativesysroot = d.getVar("STANDALONE_SYSROOT_NATIVE") + staging_populate_sysroot_dir(targetsysroot, nativesysroot, True, d) +} +do_build_native_sysroot[cleandirs] = "${STANDALONE_SYSROOT_NATIVE}" +do_build_native_sysroot[nostamp] = "1" +addtask do_build_native_sysroot before do_build + +python do_build_target_sysroot () { + targetsysroot = d.getVar("STANDALONE_SYSROOT") + nativesysroot = d.getVar("STANDALONE_SYSROOT_NATIVE") + staging_populate_sysroot_dir(targetsysroot, nativesysroot, False, d) +} +do_build_target_sysroot[cleandirs] = "${STANDALONE_SYSROOT}" +do_build_target_sysroot[nostamp] = "1" +addtask do_build_target_sysroot before do_build + +do_clean[cleandirs] += "${STANDALONE_SYSROOT} ${STANDALONE_SYSROOT_NATIVE}" diff --git a/meta/recipes-core/meta/meta-environment-extsdk.bb b/meta/recipes-core/meta/meta-environment-extsdk.bb index 757afc154f..2076b56f25 100644 --- a/meta/recipes-core/meta/meta-environment-extsdk.bb +++ b/meta/recipes-core/meta/meta-environment-extsdk.bb @@ -5,8 +5,8 @@ require meta-environment.bb PN = "meta-environment-extsdk-${MACHINE}" create_sdk_files_append() { - local sysroot=${SDKPATH}/tmp/${@os.path.relpath(d.getVar('STAGING_DIR_TARGET'), d.getVar('TMPDIR'))} - local sdkpathnative=${SDKPATH}/tmp/${@os.path.relpath(d.getVar('STAGING_DIR_NATIVE'), d.getVar('TMPDIR'))} + local sysroot=${SDKPATH}/tmp/${@os.path.relpath(d.getVar('STAGING_DIR'), d.getVar('TMPDIR'))}/${MACHINE} + local sdkpathnative=${SDKPATH}/tmp/${@os.path.relpath(d.getVar('STAGING_DIR'), d.getVar('TMPDIR'))}/${BUILD_ARCH} toolchain_create_sdk_env_script '' '' $sysroot '' ${bindir_native} ${prefix_native} $sdkpathnative } diff --git a/meta/recipes-core/meta/meta-extsdk-toolchain.bb b/meta/recipes-core/meta/meta-extsdk-toolchain.bb index fc6d6de99a..0b8fcf08dc 100644 --- a/meta/recipes-core/meta/meta-extsdk-toolchain.bb +++ b/meta/recipes-core/meta/meta-extsdk-toolchain.bb @@ -15,7 +15,7 @@ LOCKED_SIGS_INDIR = "${D}/locked-sigs" addtask do_locked_sigs after do_populate_sysroot SSTATETASKS += "do_locked_sigs" do_locked_sigs[sstate-inputdirs] = "${LOCKED_SIGS_INDIR}" -do_locked_sigs[sstate-outputdirs] = "${STAGING_DIR_HOST}/locked-sigs" +do_locked_sigs[sstate-outputdirs] = "${STAGING_DIR}/${PACKAGE_ARCH}/${PN}/locked-sigs" python do_locked_sigs() { import oe.copy_buildsystem diff --git a/meta/recipes-core/meta/meta-world-pkgdata.bb b/meta/recipes-core/meta/meta-world-pkgdata.bb index 0ce378ea2b..617f96a33e 100644 --- a/meta/recipes-core/meta/meta-world-pkgdata.bb +++ b/meta/recipes-core/meta/meta-world-pkgdata.bb @@ -32,7 +32,7 @@ do_configure[noexec] = "1" do_compile[noexec] = "1" do_install[noexec] = "1" -do_configure[deptask] = "" +do_prepare_recipe_sysroot[deptask] = "" WORLD_PKGDATA_EXCLUDE ?= "" diff --git a/meta/recipes-core/musl/musl.inc b/meta/recipes-core/musl/musl.inc index 7ed931c6da..56c9d7fe17 100644 --- a/meta/recipes-core/musl/musl.inc +++ b/meta/recipes-core/musl/musl.inc @@ -12,7 +12,6 @@ SECTION = "libs" LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=7928b7ad32ceda04932478e330e52f7f" PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.${STAGINGCC}:" -TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TCBOOTSTRAP}" INHIBIT_DEFAULT_DEPS = "1" |