* [PATCH v4 0/7] Fix for #7040 - Support for /usr merge
@ 2017-06-14 11:30 Amarnath Valluri
2017-06-14 11:30 ` [PATCH v4 1/7] bitbake.conf: support for merged usr with DISTRO_FEATURE usrmerge Amarnath Valluri
` (7 more replies)
0 siblings, 8 replies; 17+ messages in thread
From: Amarnath Valluri @ 2017-06-14 11:30 UTC (permalink / raw)
To: openembedded-core
Changes in v4:
- root symlinks creation for nativesdk images.
- added PACKAGECONFIG option for 'usrmerge' in systemd
Amarnath Valluri (7):
bitbake.conf: support for merged usr with DISTRO_FEATURE usrmerge
cross.bbclass: merged /usr support
systemd: changes to support merged /usr
image: create symlinks needed for merged /usr
insane.bbclass: Add package QA check for merged /usr.
meta/lib/oe/sdk.py: support added for executing pre-target commands
image.bbclass: create root symlinks in nativesdk target sysroot
meta/classes/cross.bbclass | 2 +-
meta/classes/image.bbclass | 32 ++++++++++++++++++++++++++++++++
meta/classes/insane.bbclass | 16 ++++++++++++++++
meta/classes/populate_sdk_base.bbclass | 3 +--
meta/conf/bitbake.conf | 10 ++++++----
meta/lib/oe/sdk.py | 6 ++++++
meta/recipes-core/systemd/systemd_232.bb | 8 ++++----
7 files changed, 66 insertions(+), 11 deletions(-)
--
2.7.4
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v4 1/7] bitbake.conf: support for merged usr with DISTRO_FEATURE usrmerge
2017-06-14 11:30 [PATCH v4 0/7] Fix for #7040 - Support for /usr merge Amarnath Valluri
@ 2017-06-14 11:30 ` Amarnath Valluri
2017-06-14 11:48 ` Richard Purdie
2017-06-14 11:30 ` [PATCH v4 2/7] cross.bbclass: merged /usr support Amarnath Valluri
` (6 subsequent siblings)
7 siblings, 1 reply; 17+ messages in thread
From: Amarnath Valluri @ 2017-06-14 11:30 UTC (permalink / raw)
To: openembedded-core
A new configuration variable ${root_prefix} added, which shall be used by all
base_{lib,bin,sbin}dir variables. When usrmerge DISTRO_FEATURE is enabled
${root_prefix} points to ${exec_prefix} otherwise to ${base_prefix}
Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
---
meta/conf/bitbake.conf | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 5d5ddec..8c497fd 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -17,11 +17,13 @@ export base_prefix = ""
export prefix = "/usr"
export exec_prefix = "${prefix}"
+export root_prefix = "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', '${exec_prefix}', '${base_prefix}', d)}"
+
# Base paths
-export base_bindir = "${base_prefix}/bin"
-export base_sbindir = "${base_prefix}/sbin"
-export base_libdir = "${base_prefix}/${baselib}"
-export nonarch_base_libdir = "${base_prefix}/lib"
+export base_bindir = "${root_prefix}/bin"
+export base_sbindir = "${root_prefix}/sbin"
+export base_libdir = "${root_prefix}/${baselib}"
+export nonarch_base_libdir = "${root_prefix}/lib"
# Architecture independent paths
export sysconfdir = "${base_prefix}/etc"
--
2.7.4
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v4 2/7] cross.bbclass: merged /usr support
2017-06-14 11:30 [PATCH v4 0/7] Fix for #7040 - Support for /usr merge Amarnath Valluri
2017-06-14 11:30 ` [PATCH v4 1/7] bitbake.conf: support for merged usr with DISTRO_FEATURE usrmerge Amarnath Valluri
@ 2017-06-14 11:30 ` Amarnath Valluri
2017-06-14 11:30 ` [PATCH v4 3/7] systemd: changes to support merged /usr Amarnath Valluri
` (5 subsequent siblings)
7 siblings, 0 replies; 17+ messages in thread
From: Amarnath Valluri @ 2017-06-14 11:30 UTC (permalink / raw)
To: openembedded-core
Use ${root_prefix} instead of ${base_prefix} while setting
${target_base_prefix}, otherwise we might loose the root prefix configuration
change in case of 'usrmerge' distro feature is enabled.
Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
---
meta/classes/cross.bbclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/classes/cross.bbclass b/meta/classes/cross.bbclass
index 8757303..4887317 100644
--- a/meta/classes/cross.bbclass
+++ b/meta/classes/cross.bbclass
@@ -50,7 +50,7 @@ SSTATE_SCAN_CMD ?= "${SSTATE_SCAN_CMD_NATIVE}"
# Path mangling needed by the cross packaging
# Note that we use := here to ensure that libdir and includedir are
# target paths.
-target_base_prefix := "${base_prefix}"
+target_base_prefix := "${root_prefix}"
target_prefix := "${prefix}"
target_exec_prefix := "${exec_prefix}"
target_base_libdir = "${target_base_prefix}/${baselib}"
--
2.7.4
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v4 3/7] systemd: changes to support merged /usr
2017-06-14 11:30 [PATCH v4 0/7] Fix for #7040 - Support for /usr merge Amarnath Valluri
2017-06-14 11:30 ` [PATCH v4 1/7] bitbake.conf: support for merged usr with DISTRO_FEATURE usrmerge Amarnath Valluri
2017-06-14 11:30 ` [PATCH v4 2/7] cross.bbclass: merged /usr support Amarnath Valluri
@ 2017-06-14 11:30 ` Amarnath Valluri
2017-06-14 11:30 ` [PATCH v4 4/7] image: create symlinks needed for " Amarnath Valluri
` (4 subsequent siblings)
7 siblings, 0 replies; 17+ messages in thread
From: Amarnath Valluri @ 2017-06-14 11:30 UTC (permalink / raw)
To: openembedded-core
- Enable/disable the split-usr support in systemd based on 'usrmerge'
DISTRO_FEATURE.
- Modify rootprefix to point to ${root_prefix}, rather than ${base_prefix}.
- And fixed firmware path to use ${nonarch_base_libdir} instead of hard-coded
'/lib', because when 'usrmege' distro feature enabled this path would be
'/usr/lib'.
Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
---
meta/recipes-core/systemd/systemd_232.bb | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/meta/recipes-core/systemd/systemd_232.bb b/meta/recipes-core/systemd/systemd_232.bb
index f843c58..d3903a6 100644
--- a/meta/recipes-core/systemd/systemd_232.bb
+++ b/meta/recipes-core/systemd/systemd_232.bb
@@ -41,7 +41,7 @@ SRC_URI_append_libc-uclibc = "\
SRC_URI_append_qemuall = " file://0001-core-device.c-Change-the-default-device-timeout-to-2.patch"
PACKAGECONFIG ??= "xz \
- ${@bb.utils.filter('DISTRO_FEATURES', 'efi pam selinux ldconfig', d)} \
+ ${@bb.utils.filter('DISTRO_FEATURES', 'efi pam selinux ldconfig usrmerge', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'rfkill', '', d)} \
binfmt \
@@ -122,6 +122,7 @@ PACKAGECONFIG[bzip2] = "--enable-bzip2,--disable-bzip2,bzip2"
PACKAGECONFIG[lz4] = "--enable-lz4,--disable-lz4,lz4"
PACKAGECONFIG[xz] = "--enable-xz,--disable-xz,xz"
PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib"
+PACKAGECONFIG[usrmerge] = "--disable-split-usr, --enable-split-usr"
CACHED_CONFIGUREVARS += "ac_cv_path_KILL=${base_bindir}/kill"
CACHED_CONFIGUREVARS += "ac_cv_path_KMOD=${base_bindir}/kmod"
@@ -131,7 +132,7 @@ CACHED_CONFIGUREVARS += "ac_cv_path_SULOGIN=${base_sbindir}/sulogin"
# Helper variables to clarify locations. This mirrors the logic in systemd's
# build system.
-rootprefix ?= "${base_prefix}"
+rootprefix ?= "${root_prefix}"
rootlibdir ?= "${base_libdir}"
rootlibexecdir = "${rootprefix}/lib"
@@ -149,10 +150,9 @@ CACHED_CONFIGUREVARS_class-target = "\
EXTRA_OECONF = " --with-rootprefix=${rootprefix} \
--with-rootlibdir=${rootlibdir} \
--with-roothomedir=${ROOT_HOME} \
- --enable-split-usr \
--without-python \
--with-sysvrcnd-path=${sysconfdir} \
- --with-firmware-path=/lib/firmware \
+ --with-firmware-path=${nonarch_base_libdir}/firmware \
--with-testdir=${PTEST_PATH} \
"
# per the systemd README, define VALGRIND=1 to run under valgrind
--
2.7.4
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v4 4/7] image: create symlinks needed for merged /usr
2017-06-14 11:30 [PATCH v4 0/7] Fix for #7040 - Support for /usr merge Amarnath Valluri
` (2 preceding siblings ...)
2017-06-14 11:30 ` [PATCH v4 3/7] systemd: changes to support merged /usr Amarnath Valluri
@ 2017-06-14 11:30 ` Amarnath Valluri
2017-06-14 11:30 ` [PATCH v4 5/7] insane.bbclass: Add package QA check " Amarnath Valluri
` (3 subsequent siblings)
7 siblings, 0 replies; 17+ messages in thread
From: Amarnath Valluri @ 2017-06-14 11:30 UTC (permalink / raw)
To: openembedded-core
Prepare the symlinks required for merged /usr at the time of rootfs creation.
The links created in rootfs are:
/bin --> /usr/sbin
/sbin --> /usr/sbin
/lib --> /usr/lib
/lib64 --> /usr/lib64
We cannot make these symlinks as part of 'base-files' or some other package.
Because at rootfs creation, installation of the package(say kernel) that depends
on these root folders/links fails, if package manager installs this package
prior to base-files.
These symbolic links in top level folder should be present as long as
- kernel tools use /lib/{module,firmware}
- shell scripts uses "#!/bin/sh"
Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
---
meta/classes/image.bbclass | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 85f6b9a..2a3c1e3 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -617,3 +617,24 @@ do_bundle_initramfs () {
:
}
addtask bundle_initramfs after do_image_complete
+
+# Prepare the root links to point to the /usr counterparts.
+create_merged_usr_symlinks() {
+ install -d ${IMAGE_ROOTFS}${base_bindir} ${IMAGE_ROOTFS}${base_sbindir} ${IMAGE_ROOTFS}${base_libdir}
+ lnr ${IMAGE_ROOTFS}${base_bindir} ${IMAGE_ROOTFS}/bin
+ lnr ${IMAGE_ROOTFS}${base_sbindir} ${IMAGE_ROOTFS}/sbin
+ lnr ${IMAGE_ROOTFS}${base_libdir} ${IMAGE_ROOTFS}/${baselib}
+
+ if [ "${nonarch_base_libdir}" != "${base_libdir}" ]; then
+ install -d ${IMAGE_ROOTFS}${nonarch_base_libdir}
+ lnr ${IMAGE_ROOTFS}${nonarch_base_libdir} ${IMAGE_ROOTFS}/lib
+ fi
+
+ # create base links for multilibs
+ multi_libdirs="${@d.getVar('MULTILIB_VARIANTS')}"
+ for d in $multi_libdirs; do
+ install -d ${IMAGE_ROOTFS}${exec_prefix}/$d
+ lnr ${IMAGE_ROOTFS}${exec_prefix}/$d ${IMAGE_ROOTFS}/$d
+ done
+}
+ROOTFS_PREPROCESS_COMMAND += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'create_merged_usr_symlinks; ', '',d)}"
--
2.7.4
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v4 5/7] insane.bbclass: Add package QA check for merged /usr.
2017-06-14 11:30 [PATCH v4 0/7] Fix for #7040 - Support for /usr merge Amarnath Valluri
` (3 preceding siblings ...)
2017-06-14 11:30 ` [PATCH v4 4/7] image: create symlinks needed for " Amarnath Valluri
@ 2017-06-14 11:30 ` Amarnath Valluri
2017-06-14 11:30 ` [PATCH v4 6/7] meta/lib/oe/sdk.py: support added for executing pre-target commands Amarnath Valluri
` (2 subsequent siblings)
7 siblings, 0 replies; 17+ messages in thread
From: Amarnath Valluri @ 2017-06-14 11:30 UTC (permalink / raw)
To: openembedded-core
This check makes sure that, when usrmerge distro feature enabled, no package
installs files to root (/bin, /sbin, /lib, /lib64) folders.
Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
---
meta/classes/insane.bbclass | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index f6fd7c7..1c11254 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -40,6 +40,9 @@ ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch pkgconfig la \
version-going-backwards expanded-d invalid-chars \
license-checksum dev-elf file-rdeps \
"
+# Add usrmerge QA check based on distro feature
+ERROR_QA_append = "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', ' usrmerge', '', d)}"
+
FAKEROOT_QA = "host-user-contaminated"
FAKEROOT_QA[doc] = "QA tests which need to run under fakeroot. If any \
enabled tests are listed here, the do_package_qa task will run under fakeroot."
@@ -998,6 +1001,18 @@ def package_qa_check_deps(pkg, pkgdest, skip, d):
check_valid_deps('RREPLACES')
check_valid_deps('RCONFLICTS')
+QAPKGTEST[usrmerge] = "package_qa_check_usrmerge"
+def package_qa_check_usrmerge(pkg, d, messages):
+ pkgdest = d.getVar('PKGDEST')
+ pkg_dir = pkgdest + os.sep + pkg + os.sep
+ merged_dirs = ['bin', 'sbin', 'lib'] + d.getVar('MULTILIB_VARIANTS').split()
+ for f in merged_dirs:
+ if os.path.exists(pkg_dir + f) and not os.path.islink(pkg_dir + f):
+ msg = "%s package is not obeying usrmerge distro feature. /%s should be relocated to /usr." % (pkg, f)
+ package_qa_add_message(messages, "usrmerge", msg)
+ return False
+ return True
+
QAPKGTEST[expanded-d] = "package_qa_check_expanded_d"
def package_qa_check_expanded_d(package, d, messages):
"""
@@ -1071,6 +1086,7 @@ def package_qa_check_host_user(path, name, d, elf, messages):
return False
return True
+
# The PACKAGE FUNC to scan each package
python do_package_qa () {
import subprocess
--
2.7.4
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v4 6/7] meta/lib/oe/sdk.py: support added for executing pre-target commands
2017-06-14 11:30 [PATCH v4 0/7] Fix for #7040 - Support for /usr merge Amarnath Valluri
` (4 preceding siblings ...)
2017-06-14 11:30 ` [PATCH v4 5/7] insane.bbclass: Add package QA check " Amarnath Valluri
@ 2017-06-14 11:30 ` Amarnath Valluri
2017-06-14 11:30 ` [PATCH v4 7/7] image.bbclass: create root symlinks in nativesdk target sysroot Amarnath Valluri
2017-06-30 7:03 ` [PATCH v4 0/7] Fix for #7040 - Support for /usr merge Valluri, Amarnath
7 siblings, 0 replies; 17+ messages in thread
From: Amarnath Valluri @ 2017-06-14 11:30 UTC (permalink / raw)
To: openembedded-core
Added a new POPULATE_SDK_PRE_TARTET_COMMAND variable, which can contain
functions need to be executed at pre traget sysroot creation phase.
classes/populate_sdk_base.bbclass: Added POPULATE_SDK_PRE_TARTET_COMMAND to sdk
command variables list.
Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
---
meta/classes/populate_sdk_base.bbclass | 3 +--
meta/lib/oe/sdk.py | 6 ++++++
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass
index 01960ee..20ba219 100644
--- a/meta/classes/populate_sdk_base.bbclass
+++ b/meta/classes/populate_sdk_base.bbclass
@@ -262,8 +262,7 @@ populate_sdk_log_check() {
}
def sdk_command_variables(d):
- return ['OPKG_PREPROCESS_COMMANDS','OPKG_POSTPROCESS_COMMANDS','POPULATE_SDK_POST_HOST_COMMAND','POPULATE_SDK_POST_TARGET_COMMAND','SDK_POSTPROCESS_COMMAND','RPM_PREPROCESS_COMMANDS',
- 'RPM_POSTPROCESS_COMMANDS']
+ return ['OPKG_PREPROCESS_COMMANDS','OPKG_POSTPROCESS_COMMANDS','POPULATE_SDK_POST_HOST_COMMAND','POPULATE_SDK_PRE_TARGET_COMMAND','POPULATE_SDK_POST_TARGET_COMMAND','SDK_POSTPROCESS_COMMAND','RPM_PREPROCESS_COMMANDS','RPM_POSTPROCESS_COMMANDS']
def sdk_variables(d):
variables = ['BUILD_IMAGES_FROM_FEEDS','SDK_OS','SDK_OUTPUT','SDKPATHNATIVE','SDKTARGETSYSROOT','SDK_DIR','SDK_VENDOR','SDKIMAGE_INSTALL_COMPLEMENTARY','SDK_PACKAGE_ARCHS','SDK_OUTPUT',
diff --git a/meta/lib/oe/sdk.py b/meta/lib/oe/sdk.py
index 1c5409e..30e1fb5 100644
--- a/meta/lib/oe/sdk.py
+++ b/meta/lib/oe/sdk.py
@@ -145,6 +145,8 @@ class RpmSdk(Sdk):
pm.install(pkgs_attempt, True)
def _populate(self):
+ execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_PRE_TARGET_COMMAND"))
+
bb.note("Installing TARGET packages")
self._populate_sysroot(self.target_pm, self.target_manifest)
@@ -226,6 +228,8 @@ class OpkgSdk(Sdk):
[False, True][pkg_type == Manifest.PKG_TYPE_ATTEMPT_ONLY])
def _populate(self):
+ execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_PRE_TARGET_COMMAND"))
+
bb.note("Installing TARGET packages")
self._populate_sysroot(self.target_pm, self.target_manifest)
@@ -308,6 +312,8 @@ class DpkgSdk(Sdk):
[False, True][pkg_type == Manifest.PKG_TYPE_ATTEMPT_ONLY])
def _populate(self):
+ execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_PRE_TARGET_COMMAND"))
+
bb.note("Installing TARGET packages")
self._populate_sysroot(self.target_pm, self.target_manifest)
--
2.7.4
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v4 7/7] image.bbclass: create root symlinks in nativesdk target sysroot
2017-06-14 11:30 [PATCH v4 0/7] Fix for #7040 - Support for /usr merge Amarnath Valluri
` (5 preceding siblings ...)
2017-06-14 11:30 ` [PATCH v4 6/7] meta/lib/oe/sdk.py: support added for executing pre-target commands Amarnath Valluri
@ 2017-06-14 11:30 ` Amarnath Valluri
2017-06-14 13:37 ` Peter Kjellerstedt
2017-06-30 7:03 ` [PATCH v4 0/7] Fix for #7040 - Support for /usr merge Valluri, Amarnath
7 siblings, 1 reply; 17+ messages in thread
From: Amarnath Valluri @ 2017-06-14 11:30 UTC (permalink / raw)
To: openembedded-core
To match with the target image, the generated nativesdk's target sysroot also
should have the root symlinks(/lib*, /bin/, /sbin). So, extended the
'create_merged_usr_symlinks' to reuse symlink creation part even for nativesdk
using POPULATE_SDK_PRE_TARGET_COMMAND.
Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
---
meta/classes/image.bbclass | 29 ++++++++++++++++++++---------
1 file changed, 20 insertions(+), 9 deletions(-)
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 2a3c1e3..b6c3866 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -620,21 +620,32 @@ addtask bundle_initramfs after do_image_complete
# Prepare the root links to point to the /usr counterparts.
create_merged_usr_symlinks() {
- install -d ${IMAGE_ROOTFS}${base_bindir} ${IMAGE_ROOTFS}${base_sbindir} ${IMAGE_ROOTFS}${base_libdir}
- lnr ${IMAGE_ROOTFS}${base_bindir} ${IMAGE_ROOTFS}/bin
- lnr ${IMAGE_ROOTFS}${base_sbindir} ${IMAGE_ROOTFS}/sbin
- lnr ${IMAGE_ROOTFS}${base_libdir} ${IMAGE_ROOTFS}/${baselib}
+ root="$1"
+ install -d ${root}${base_bindir} ${root}${base_sbindir} ${root}${base_libdir}
+ lnr ${root}${base_bindir} ${root}/bin
+ lnr ${root}${base_sbindir} ${root}/sbin
+ lnr ${root}${base_libdir} ${root}/${baselib}
if [ "${nonarch_base_libdir}" != "${base_libdir}" ]; then
- install -d ${IMAGE_ROOTFS}${nonarch_base_libdir}
- lnr ${IMAGE_ROOTFS}${nonarch_base_libdir} ${IMAGE_ROOTFS}/lib
+ install -m 0755 -d ${root}${nonarch_base_libdir}
+ lnr ${root}${nonarch_base_libdir} ${root}/lib
fi
# create base links for multilibs
multi_libdirs="${@d.getVar('MULTILIB_VARIANTS')}"
for d in $multi_libdirs; do
- install -d ${IMAGE_ROOTFS}${exec_prefix}/$d
- lnr ${IMAGE_ROOTFS}${exec_prefix}/$d ${IMAGE_ROOTFS}/$d
+ install -m 0755 -d ${root}${exec_prefix}/$d
+ lnr ${root}${exec_prefix}/$d ${root}/$d
done
}
-ROOTFS_PREPROCESS_COMMAND += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'create_merged_usr_symlinks; ', '',d)}"
+
+create_merged_usr_symlinks_rootfs() {
+ create_merged_usr_symlinks ${IMAGE_ROOTFS}
+}
+
+create_merged_usr_symlinks_sdk() {
+ create_merged_usr_symlinks ${SDK_OUTPUT}${SDKTARGETSYSROOT}
+}
+
+ROOTFS_PREPROCESS_COMMAND += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'create_merged_usr_symlinks_rootfs; ', '',d)}"
+POPULATE_SDK_PRE_TARGET_COMMAND += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'create_merged_usr_symlinks_sdk; ', '',d)}"
--
2.7.4
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH v4 1/7] bitbake.conf: support for merged usr with DISTRO_FEATURE usrmerge
2017-06-14 11:30 ` [PATCH v4 1/7] bitbake.conf: support for merged usr with DISTRO_FEATURE usrmerge Amarnath Valluri
@ 2017-06-14 11:48 ` Richard Purdie
2017-06-14 13:00 ` Valluri, Amarnath
2017-06-14 13:05 ` [PATCH v5] " Amarnath Valluri
0 siblings, 2 replies; 17+ messages in thread
From: Richard Purdie @ 2017-06-14 11:48 UTC (permalink / raw)
To: Amarnath Valluri, openembedded-core
On Wed, 2017-06-14 at 14:30 +0300, Amarnath Valluri wrote:
> A new configuration variable ${root_prefix} added, which shall be used by all
> base_{lib,bin,sbin}dir variables. When usrmerge DISTRO_FEATURE is enabled
> ${root_prefix} points to ${exec_prefix} otherwise to ${base_prefix}
>
> Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
> ---
> meta/conf/bitbake.conf | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
> index 5d5ddec..8c497fd 100644
> --- a/meta/conf/bitbake.conf
> +++ b/meta/conf/bitbake.conf
> @@ -17,11 +17,13 @@ export base_prefix = ""
> export prefix = "/usr"
> export exec_prefix = "${prefix}"
>
> +export root_prefix = "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', '${exec_prefix}', '${base_prefix}', d)}"
> +
This is a really small nitpick but with changes to the core files we
need to get this right. Could you drop the "export " above please?
The reason is that we want to ultimately reduce the number of variables
we export into the global shell environment. Where we create new ones
like this which aren't needed in the global scope, we might as well not
export them right from the start...
Cheers,
Richard
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v4 1/7] bitbake.conf: support for merged usr with DISTRO_FEATURE usrmerge
2017-06-14 11:48 ` Richard Purdie
@ 2017-06-14 13:00 ` Valluri, Amarnath
2017-06-14 13:05 ` [PATCH v5] " Amarnath Valluri
1 sibling, 0 replies; 17+ messages in thread
From: Valluri, Amarnath @ 2017-06-14 13:00 UTC (permalink / raw)
To: richard.purdie, openembedded-core
On Wed, 2017-06-14 at 12:48 +0100, Richard Purdie wrote:
> On Wed, 2017-06-14 at 14:30 +0300, Amarnath Valluri wrote:
> >
> > A new configuration variable ${root_prefix} added, which shall be
> > used by all
> > base_{lib,bin,sbin}dir variables. When usrmerge DISTRO_FEATURE is
> > enabled
> > ${root_prefix} points to ${exec_prefix} otherwise to ${base_prefix}
> >
> > Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
> > ---
> > meta/conf/bitbake.conf | 10 ++++++----
> > 1 file changed, 6 insertions(+), 4 deletions(-)
> >
> > diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
> > index 5d5ddec..8c497fd 100644
> > --- a/meta/conf/bitbake.conf
> > +++ b/meta/conf/bitbake.conf
> > @@ -17,11 +17,13 @@ export base_prefix = ""
> > export prefix = "/usr"
> > export exec_prefix = "${prefix}"
> >
> > +export root_prefix = "${@bb.utils.contains('DISTRO_FEATURES',
> > 'usrmerge', '${exec_prefix}', '${base_prefix}', d)}"
> > +
> This is a really small nitpick but with changes to the core files we
> need to get this right. Could you drop the "export " above please?
Sure, I will send the revised patch.
- Amarnath
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v5] bitbake.conf: support for merged usr with DISTRO_FEATURE usrmerge
2017-06-14 11:48 ` Richard Purdie
2017-06-14 13:00 ` Valluri, Amarnath
@ 2017-06-14 13:05 ` Amarnath Valluri
1 sibling, 0 replies; 17+ messages in thread
From: Amarnath Valluri @ 2017-06-14 13:05 UTC (permalink / raw)
To: openembedded-core
A new configuration variable ${root_prefix} added, which shall be used by all
base_{lib,bin,sbin}dir variables. When usrmerge DISTRO_FEATURE is enabled
${root_prefix} points to ${exec_prefix} otherwise to ${base_prefix}
Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
---
meta/conf/bitbake.conf | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 5d5ddec..8de2f9d 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -17,11 +17,13 @@ export base_prefix = ""
export prefix = "/usr"
export exec_prefix = "${prefix}"
+root_prefix = "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', '${exec_prefix}', '${base_prefix}', d)}"
+
# Base paths
-export base_bindir = "${base_prefix}/bin"
-export base_sbindir = "${base_prefix}/sbin"
-export base_libdir = "${base_prefix}/${baselib}"
-export nonarch_base_libdir = "${base_prefix}/lib"
+export base_bindir = "${root_prefix}/bin"
+export base_sbindir = "${root_prefix}/sbin"
+export base_libdir = "${root_prefix}/${baselib}"
+export nonarch_base_libdir = "${root_prefix}/lib"
# Architecture independent paths
export sysconfdir = "${base_prefix}/etc"
--
2.7.4
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH v4 7/7] image.bbclass: create root symlinks in nativesdk target sysroot
2017-06-14 11:30 ` [PATCH v4 7/7] image.bbclass: create root symlinks in nativesdk target sysroot Amarnath Valluri
@ 2017-06-14 13:37 ` Peter Kjellerstedt
2017-06-15 8:32 ` [PATCH v5] " Amarnath Valluri
0 siblings, 1 reply; 17+ messages in thread
From: Peter Kjellerstedt @ 2017-06-14 13:37 UTC (permalink / raw)
To: Amarnath Valluri, openembedded-core
> -----Original Message-----
> From: openembedded-core-bounces@lists.openembedded.org
> [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of
> Amarnath Valluri
> Sent: den 14 juni 2017 13:31
> To: openembedded-core@lists.openembedded.org
> Subject: [OE-core] [PATCH v4 7/7] image.bbclass: create root symlinks
> in nativesdk target sysroot
>
> To match with the target image, the generated nativesdk's target sysroot also
> should have the root symlinks(/lib*, /bin/, /sbin). So, extended the
> 'create_merged_usr_symlinks' to reuse symlink creation part even for nativesdk
> using POPULATE_SDK_PRE_TARGET_COMMAND.
>
> Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
> ---
> meta/classes/image.bbclass | 29 ++++++++++++++++++++---------
> 1 file changed, 20 insertions(+), 9 deletions(-)
>
> diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
> index 2a3c1e3..b6c3866 100644
> --- a/meta/classes/image.bbclass
> +++ b/meta/classes/image.bbclass
> @@ -620,21 +620,32 @@ addtask bundle_initramfs after do_image_complete
>
> # Prepare the root links to point to the /usr counterparts.
> create_merged_usr_symlinks() {
> - install -d ${IMAGE_ROOTFS}${base_bindir} ${IMAGE_ROOTFS}${base_sbindir} ${IMAGE_ROOTFS}${base_libdir}
> - lnr ${IMAGE_ROOTFS}${base_bindir} ${IMAGE_ROOTFS}/bin
> - lnr ${IMAGE_ROOTFS}${base_sbindir} ${IMAGE_ROOTFS}/sbin
> - lnr ${IMAGE_ROOTFS}${base_libdir} ${IMAGE_ROOTFS}/${baselib}
> + root="$1"
> + install -d ${root}${base_bindir} ${root}${base_sbindir} ${root}${base_libdir}
> + lnr ${root}${base_bindir} ${root}/bin
> + lnr ${root}${base_sbindir} ${root}/sbin
> + lnr ${root}${base_libdir} ${root}/${baselib}
>
> if [ "${nonarch_base_libdir}" != "${base_libdir}" ]; then
> - install -d ${IMAGE_ROOTFS}${nonarch_base_libdir}
> - lnr ${IMAGE_ROOTFS}${nonarch_base_libdir} ${IMAGE_ROOTFS}/lib
> + install -m 0755 -d ${root}${nonarch_base_libdir}
> + lnr ${root}${nonarch_base_libdir} ${root}/lib
> fi
>
> # create base links for multilibs
> multi_libdirs="${@d.getVar('MULTILIB_VARIANTS')}"
> for d in $multi_libdirs; do
> - install -d ${IMAGE_ROOTFS}${exec_prefix}/$d
> - lnr ${IMAGE_ROOTFS}${exec_prefix}/$d ${IMAGE_ROOTFS}/$d
> + install -m 0755 -d ${root}${exec_prefix}/$d
> + lnr ${root}${exec_prefix}/$d ${root}/$d
> done
> }
Change all references to "${root}" to "$root" in the above code.
It is a shell variable, not a bitbake variable.
> -ROOTFS_PREPROCESS_COMMAND += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'create_merged_usr_symlinks; ', '',d)}"
> +
> +create_merged_usr_symlinks_rootfs() {
> + create_merged_usr_symlinks ${IMAGE_ROOTFS}
> +}
> +
> +create_merged_usr_symlinks_sdk() {
> + create_merged_usr_symlinks ${SDK_OUTPUT}${SDKTARGETSYSROOT}
> +}
> +
> +ROOTFS_PREPROCESS_COMMAND += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'create_merged_usr_symlinks_rootfs; ', '',d)}"
> +POPULATE_SDK_PRE_TARGET_COMMAND += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'create_merged_usr_symlinks_sdk; ', '',d)}"
> --
> 2.7.4
//Peter
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v5] image.bbclass: create root symlinks in nativesdk target sysroot
2017-06-14 13:37 ` Peter Kjellerstedt
@ 2017-06-15 8:32 ` Amarnath Valluri
2017-06-15 9:32 ` Peter Kjellerstedt
0 siblings, 1 reply; 17+ messages in thread
From: Amarnath Valluri @ 2017-06-15 8:32 UTC (permalink / raw)
To: openembedded-core
To match with the target image, the generated nativesdk's target sysroot also
should have the root symlinks(/lib*, /bin/, /sbin). So, extended the
'create_merged_usr_symlinks' to reuse symlink creation part even for nativesdk
using POPULATE_SDK_PRE_TARGET_COMMAND.
Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
---
meta/classes/image.bbclass | 29 ++++++++++++++++++++---------
1 file changed, 20 insertions(+), 9 deletions(-)
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 2a3c1e3..7c5cfc5 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -620,21 +620,32 @@ addtask bundle_initramfs after do_image_complete
# Prepare the root links to point to the /usr counterparts.
create_merged_usr_symlinks() {
- install -d ${IMAGE_ROOTFS}${base_bindir} ${IMAGE_ROOTFS}${base_sbindir} ${IMAGE_ROOTFS}${base_libdir}
- lnr ${IMAGE_ROOTFS}${base_bindir} ${IMAGE_ROOTFS}/bin
- lnr ${IMAGE_ROOTFS}${base_sbindir} ${IMAGE_ROOTFS}/sbin
- lnr ${IMAGE_ROOTFS}${base_libdir} ${IMAGE_ROOTFS}/${baselib}
+ root="$1"
+ install -d $root${base_bindir} $root${base_sbindir} $root${base_libdir}
+ lnr $root${base_bindir} $root/bin
+ lnr $root${base_sbindir} $root/sbin
+ lnr $root${base_libdir} $root/${baselib}
if [ "${nonarch_base_libdir}" != "${base_libdir}" ]; then
- install -d ${IMAGE_ROOTFS}${nonarch_base_libdir}
- lnr ${IMAGE_ROOTFS}${nonarch_base_libdir} ${IMAGE_ROOTFS}/lib
+ install -m 0755 -d $root${nonarch_base_libdir}
+ lnr $root${nonarch_base_libdir} $root/lib
fi
# create base links for multilibs
multi_libdirs="${@d.getVar('MULTILIB_VARIANTS')}"
for d in $multi_libdirs; do
- install -d ${IMAGE_ROOTFS}${exec_prefix}/$d
- lnr ${IMAGE_ROOTFS}${exec_prefix}/$d ${IMAGE_ROOTFS}/$d
+ install -m 0755 -d $root${exec_prefix}/$d
+ lnr $root${exec_prefix}/$d $root/$d
done
}
-ROOTFS_PREPROCESS_COMMAND += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'create_merged_usr_symlinks; ', '',d)}"
+
+create_merged_usr_symlinks_rootfs() {
+ create_merged_usr_symlinks ${IMAGE_ROOTFS}
+}
+
+create_merged_usr_symlinks_sdk() {
+ create_merged_usr_symlinks ${SDK_OUTPUT}${SDKTARGETSYSROOT}
+}
+
+ROOTFS_PREPROCESS_COMMAND += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'create_merged_usr_symlinks_rootfs; ', '',d)}"
+POPULATE_SDK_PRE_TARGET_COMMAND += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'create_merged_usr_symlinks_sdk; ', '',d)}"
--
2.7.4
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH v5] image.bbclass: create root symlinks in nativesdk target sysroot
2017-06-15 8:32 ` [PATCH v5] " Amarnath Valluri
@ 2017-06-15 9:32 ` Peter Kjellerstedt
2017-06-15 10:28 ` Valluri, Amarnath
2017-06-15 10:32 ` [PATCH v6] " Amarnath Valluri
0 siblings, 2 replies; 17+ messages in thread
From: Peter Kjellerstedt @ 2017-06-15 9:32 UTC (permalink / raw)
To: Amarnath Valluri, openembedded-core
> -----Original Message-----
> From: openembedded-core-bounces@lists.openembedded.org
> [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of
> Amarnath Valluri
> Sent: den 15 juni 2017 10:33
> To: openembedded-core@lists.openembedded.org
> Subject: [OE-core] [PATCH v5] image.bbclass: create root symlinks in
> nativesdk target sysroot
>
> To match with the target image, the generated nativesdk's target sysroot also
> should have the root symlinks(/lib*, /bin/, /sbin). So, extended the
> 'create_merged_usr_symlinks' to reuse symlink creation part even for nativesdk
> using POPULATE_SDK_PRE_TARGET_COMMAND.
>
> Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
> ---
> meta/classes/image.bbclass | 29 ++++++++++++++++++++---------
> 1 file changed, 20 insertions(+), 9 deletions(-)
>
> diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
> index 2a3c1e3..7c5cfc5 100644
> --- a/meta/classes/image.bbclass
> +++ b/meta/classes/image.bbclass
> @@ -620,21 +620,32 @@ addtask bundle_initramfs after do_image_complete
>
> # Prepare the root links to point to the /usr counterparts.
> create_merged_usr_symlinks() {
> - install -d ${IMAGE_ROOTFS}${base_bindir} ${IMAGE_ROOTFS}${base_sbindir} ${IMAGE_ROOTFS}${base_libdir}
> - lnr ${IMAGE_ROOTFS}${base_bindir} ${IMAGE_ROOTFS}/bin
> - lnr ${IMAGE_ROOTFS}${base_sbindir} ${IMAGE_ROOTFS}/sbin
> - lnr ${IMAGE_ROOTFS}${base_libdir} ${IMAGE_ROOTFS}/${baselib}
> + root="$1"
> + install -d $root${base_bindir} $root${base_sbindir} $root${base_libdir}
> + lnr $root${base_bindir} $root/bin
> + lnr $root${base_sbindir} $root/sbin
> + lnr $root${base_libdir} $root/${baselib}
>
> if [ "${nonarch_base_libdir}" != "${base_libdir}" ]; then
> - install -d ${IMAGE_ROOTFS}${nonarch_base_libdir}
> - lnr ${IMAGE_ROOTFS}${nonarch_base_libdir} ${IMAGE_ROOTFS}/lib
> + install -m 0755 -d $root${nonarch_base_libdir}
Meh, missed this the first time, but you reintroduce an unnecessary
-m 0755 here.
> + lnr $root${nonarch_base_libdir} $root/lib
> fi
>
> # create base links for multilibs
> multi_libdirs="${@d.getVar('MULTILIB_VARIANTS')}"
> for d in $multi_libdirs; do
> - install -d ${IMAGE_ROOTFS}${exec_prefix}/$d
> - lnr ${IMAGE_ROOTFS}${exec_prefix}/$d ${IMAGE_ROOTFS}/$d
> + install -m 0755 -d $root${exec_prefix}/$d
And the same here.
> + lnr $root${exec_prefix}/$d $root/$d
> done
> }
> -ROOTFS_PREPROCESS_COMMAND += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'create_merged_usr_symlinks; ', '',d)}"
> +
> +create_merged_usr_symlinks_rootfs() {
> + create_merged_usr_symlinks ${IMAGE_ROOTFS}
> +}
> +
> +create_merged_usr_symlinks_sdk() {
> + create_merged_usr_symlinks ${SDK_OUTPUT}${SDKTARGETSYSROOT}
> +}
> +
> +ROOTFS_PREPROCESS_COMMAND += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'create_merged_usr_symlinks_rootfs; ', '',d)}"
> +POPULATE_SDK_PRE_TARGET_COMMAND += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'create_merged_usr_symlinks_sdk; ', '',d)}"
> --
> 2.7.4
//Peter
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v5] image.bbclass: create root symlinks in nativesdk target sysroot
2017-06-15 9:32 ` Peter Kjellerstedt
@ 2017-06-15 10:28 ` Valluri, Amarnath
2017-06-15 10:32 ` [PATCH v6] " Amarnath Valluri
1 sibling, 0 replies; 17+ messages in thread
From: Valluri, Amarnath @ 2017-06-15 10:28 UTC (permalink / raw)
To: peter.kjellerstedt, openembedded-core
On Thu, 2017-06-15 at 09:32 +0000, Peter Kjellerstedt wrote:
> >
> > -----Original Message-----
> > From: openembedded-core-bounces@lists.openembedded.org
> > [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf
> > Of
> > Amarnath Valluri
> > Sent: den 15 juni 2017 10:33
> > To: openembedded-core@lists.openembedded.org
> > Subject: [OE-core] [PATCH v5] image.bbclass: create root symlinks
> > in
> > nativesdk target sysroot
> >
> > To match with the target image, the generated nativesdk's target
> > sysroot also
> > should have the root symlinks(/lib*, /bin/, /sbin). So, extended
> > the
> > 'create_merged_usr_symlinks' to reuse symlink creation part even
> > for nativesdk
> > using POPULATE_SDK_PRE_TARGET_COMMAND.
> >
> > Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
> > ---
> > meta/classes/image.bbclass | 29 ++++++++++++++++++++---------
> > 1 file changed, 20 insertions(+), 9 deletions(-)
> >
> > diff --git a/meta/classes/image.bbclass
> > b/meta/classes/image.bbclass
> > index 2a3c1e3..7c5cfc5 100644
> > --- a/meta/classes/image.bbclass
> > +++ b/meta/classes/image.bbclass
> > @@ -620,21 +620,32 @@ addtask bundle_initramfs after
> > do_image_complete
> >
> > # Prepare the root links to point to the /usr counterparts.
> > create_merged_usr_symlinks() {
> > - install -d ${IMAGE_ROOTFS}${base_bindir}
> > ${IMAGE_ROOTFS}${base_sbindir} ${IMAGE_ROOTFS}${base_libdir}
> > - lnr ${IMAGE_ROOTFS}${base_bindir} ${IMAGE_ROOTFS}/bin
> > - lnr ${IMAGE_ROOTFS}${base_sbindir} ${IMAGE_ROOTFS}/sbin
> > - lnr ${IMAGE_ROOTFS}${base_libdir} ${IMAGE_ROOTFS}/${baselib}
> > + root="$1"
> > + install -d $root${base_bindir} $root${base_sbindir}
> > $root${base_libdir}
> > + lnr $root${base_bindir} $root/bin
> > + lnr $root${base_sbindir} $root/sbin
> > + lnr $root${base_libdir} $root/${baselib}
> >
> > if [ "${nonarch_base_libdir}" != "${base_libdir}" ]; then
> > - install -d ${IMAGE_ROOTFS}${nonarch_base_libdir}
> > - lnr ${IMAGE_ROOTFS}${nonarch_base_libdir}
> > ${IMAGE_ROOTFS}/lib
> > + install -m 0755 -d $root${nonarch_base_libdir}
> Meh, missed this the first time, but you reintroduce an unnecessary
> -m 0755 here.
OOps!!! there went something wrong while rebasing my changes, i will
resend the patch, thansk for pointing.
- Amarnath
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v6] image.bbclass: create root symlinks in nativesdk target sysroot
2017-06-15 9:32 ` Peter Kjellerstedt
2017-06-15 10:28 ` Valluri, Amarnath
@ 2017-06-15 10:32 ` Amarnath Valluri
1 sibling, 0 replies; 17+ messages in thread
From: Amarnath Valluri @ 2017-06-15 10:32 UTC (permalink / raw)
To: openembedded-core
To match with the target image, the generated nativesdk's target sysroot also
should have the root symlinks(/lib*, /bin/, /sbin). So, extended the
'create_merged_usr_symlinks' to reuse symlink creation part even for nativesdk
using POPULATE_SDK_PRE_TARGET_COMMAND.
Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
---
meta/classes/image.bbclass | 29 ++++++++++++++++++++---------
1 file changed, 20 insertions(+), 9 deletions(-)
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 971918b..64af689 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -621,21 +621,32 @@ addtask bundle_initramfs after do_image_complete
# Prepare the root links to point to the /usr counterparts.
create_merged_usr_symlinks() {
- install -d ${IMAGE_ROOTFS}${base_bindir} ${IMAGE_ROOTFS}${base_sbindir} ${IMAGE_ROOTFS}${base_libdir}
- lnr ${IMAGE_ROOTFS}${base_bindir} ${IMAGE_ROOTFS}/bin
- lnr ${IMAGE_ROOTFS}${base_sbindir} ${IMAGE_ROOTFS}/sbin
- lnr ${IMAGE_ROOTFS}${base_libdir} ${IMAGE_ROOTFS}/${baselib}
+ root="$1"
+ install -d $root${base_bindir} $root${base_sbindir} $root${base_libdir}
+ lnr $root${base_bindir} $root/bin
+ lnr $root${base_sbindir} $root/sbin
+ lnr $root${base_libdir} $root/${baselib}
if [ "${nonarch_base_libdir}" != "${base_libdir}" ]; then
- install -d ${IMAGE_ROOTFS}${nonarch_base_libdir}
- lnr ${IMAGE_ROOTFS}${nonarch_base_libdir} ${IMAGE_ROOTFS}/lib
+ install -d $root${nonarch_base_libdir}
+ lnr $root${nonarch_base_libdir} $root/lib
fi
# create base links for multilibs
multi_libdirs="${@d.getVar('MULTILIB_VARIANTS')}"
for d in $multi_libdirs; do
- install -d ${IMAGE_ROOTFS}${exec_prefix}/$d
- lnr ${IMAGE_ROOTFS}${exec_prefix}/$d ${IMAGE_ROOTFS}/$d
+ install -d $root${exec_prefix}/$d
+ lnr $root${exec_prefix}/$d $root/$d
done
}
-ROOTFS_PREPROCESS_COMMAND += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'create_merged_usr_symlinks; ', '',d)}"
+
+create_merged_usr_symlinks_rootfs() {
+ create_merged_usr_symlinks ${IMAGE_ROOTFS}
+}
+
+create_merged_usr_symlinks_sdk() {
+ create_merged_usr_symlinks ${SDK_OUTPUT}${SDKTARGETSYSROOT}
+}
+
+ROOTFS_PREPROCESS_COMMAND += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'create_merged_usr_symlinks_rootfs; ', '',d)}"
+POPULATE_SDK_PRE_TARGET_COMMAND += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'create_merged_usr_symlinks_sdk; ', '',d)}"
--
2.7.4
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH v4 0/7] Fix for #7040 - Support for /usr merge
2017-06-14 11:30 [PATCH v4 0/7] Fix for #7040 - Support for /usr merge Amarnath Valluri
` (6 preceding siblings ...)
2017-06-14 11:30 ` [PATCH v4 7/7] image.bbclass: create root symlinks in nativesdk target sysroot Amarnath Valluri
@ 2017-06-30 7:03 ` Valluri, Amarnath
7 siblings, 0 replies; 17+ messages in thread
From: Valluri, Amarnath @ 2017-06-30 7:03 UTC (permalink / raw)
To: openembedded-core
RP, can you please your give your comments if these patcheset can be
accepted.
- Amarnath
On Wed, 2017-06-14 at 14:30 +0300, Amarnath Valluri wrote:
> Changes in v4:
> - root symlinks creation for nativesdk images.
> - added PACKAGECONFIG option for 'usrmerge' in systemd
>
> Amarnath Valluri (7):
> bitbake.conf: support for merged usr with DISTRO_FEATURE usrmerge
> cross.bbclass: merged /usr support
> systemd: changes to support merged /usr
> image: create symlinks needed for merged /usr
> insane.bbclass: Add package QA check for merged /usr.
> meta/lib/oe/sdk.py: support added for executing pre-target commands
> image.bbclass: create root symlinks in nativesdk target sysroot
>
> meta/classes/cross.bbclass | 2 +-
> meta/classes/image.bbclass | 32
> ++++++++++++++++++++++++++++++++
> meta/classes/insane.bbclass | 16 ++++++++++++++++
> meta/classes/populate_sdk_base.bbclass | 3 +--
> meta/conf/bitbake.conf | 10 ++++++----
> meta/lib/oe/sdk.py | 6 ++++++
> meta/recipes-core/systemd/systemd_232.bb | 8 ++++----
> 7 files changed, 66 insertions(+), 11 deletions(-)
>
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2017-06-30 7:03 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-14 11:30 [PATCH v4 0/7] Fix for #7040 - Support for /usr merge Amarnath Valluri
2017-06-14 11:30 ` [PATCH v4 1/7] bitbake.conf: support for merged usr with DISTRO_FEATURE usrmerge Amarnath Valluri
2017-06-14 11:48 ` Richard Purdie
2017-06-14 13:00 ` Valluri, Amarnath
2017-06-14 13:05 ` [PATCH v5] " Amarnath Valluri
2017-06-14 11:30 ` [PATCH v4 2/7] cross.bbclass: merged /usr support Amarnath Valluri
2017-06-14 11:30 ` [PATCH v4 3/7] systemd: changes to support merged /usr Amarnath Valluri
2017-06-14 11:30 ` [PATCH v4 4/7] image: create symlinks needed for " Amarnath Valluri
2017-06-14 11:30 ` [PATCH v4 5/7] insane.bbclass: Add package QA check " Amarnath Valluri
2017-06-14 11:30 ` [PATCH v4 6/7] meta/lib/oe/sdk.py: support added for executing pre-target commands Amarnath Valluri
2017-06-14 11:30 ` [PATCH v4 7/7] image.bbclass: create root symlinks in nativesdk target sysroot Amarnath Valluri
2017-06-14 13:37 ` Peter Kjellerstedt
2017-06-15 8:32 ` [PATCH v5] " Amarnath Valluri
2017-06-15 9:32 ` Peter Kjellerstedt
2017-06-15 10:28 ` Valluri, Amarnath
2017-06-15 10:32 ` [PATCH v6] " Amarnath Valluri
2017-06-30 7:03 ` [PATCH v4 0/7] Fix for #7040 - Support for /usr merge Valluri, Amarnath
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.