* [PATCH v2 2/5] sbuild: Support overwriting configured schroot dir
2022-12-20 17:09 [PATCH v2 0/5] linux-custom: Split up binaries from kernel headers to kbuild packages Koch, Stefan
@ 2022-12-20 17:09 ` Koch, Stefan
2022-12-20 17:09 ` [PATCH v2 3/5] dpkg: Add support for additional target and host builds Koch, Stefan
` (4 subsequent siblings)
5 siblings, 0 replies; 13+ messages in thread
From: Koch, Stefan @ 2022-12-20 17:09 UTC (permalink / raw)
To: isar-users
Cc: Kiszka, Jan, ubely, Storm, Christian, Adler, Michael, Sudler,
Simon, Koch, Stefan
This brings support to specify an other than the default schroot dir
as argument when creating the schroot configs.
Signed-off-by: Stefan Koch <stefan-koch@siemens.com>
---
meta/classes/sbuild.bbclass | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/meta/classes/sbuild.bbclass b/meta/classes/sbuild.bbclass
index a29b745..ad9f72f 100644
--- a/meta/classes/sbuild.bbclass
+++ b/meta/classes/sbuild.bbclass
@@ -31,14 +31,19 @@ SCHROOT_CONF_FILE ?= "${SCHROOT_CONF}/chroot.d/${SBUILD_CHROOT}"
SBUILD_CONFIG="${WORKDIR}/sbuild.conf"
schroot_create_configs() {
+ schroot_dir="${SCHROOT_DIR}"
+ if [ -n "${1}" ]; then
+ schroot_dir="${1}"
+ fi
+
mkdir -p "${TMPDIR}/schroot-overlay"
- sudo -s <<'EOSUDO'
+ schroot_dir="${schroot_dir}" sudo --preserve-env=schroot_dir -s <<'EOSUDO'
set -e
cat << EOF > "${SCHROOT_CONF_FILE}"
[${SBUILD_CHROOT}]
type=directory
-directory=${SCHROOT_DIR}
+directory=${schroot_dir}
profile=${SBUILD_CHROOT}
users=${SCHROOT_USER}
groups=root,sbuild
--
2.30.2
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v2 3/5] dpkg: Add support for additional target and host builds
2022-12-20 17:09 [PATCH v2 0/5] linux-custom: Split up binaries from kernel headers to kbuild packages Koch, Stefan
2022-12-20 17:09 ` [PATCH v2 2/5] sbuild: Support overwriting configured schroot dir Koch, Stefan
@ 2022-12-20 17:09 ` Koch, Stefan
2022-12-20 17:09 ` [PATCH v2 1/5] linux-custom: Split up binaries from kernel headers to kbuild package Koch, Stefan
` (3 subsequent siblings)
5 siblings, 0 replies; 13+ messages in thread
From: Koch, Stefan @ 2022-12-20 17:09 UTC (permalink / raw)
To: isar-users
Cc: Kiszka, Jan, ubely, Storm, Christian, Adler, Michael, Sudler,
Simon, Koch, Stefan
By appending ISAR_BUILDS with "target" or "host" it's possible
to run additional target or host builds.
There are no "target" and "host" builds enabled by default.
When both build modes are enabled then for a cross build a kbuild package
for the target and a kbuild package for the host will be created.
When "host" build is not enabled instead of the kbuild
a kbuild-cross package for the host is generated.
Supported modes for ISAR_BUILDS:
default: default build (e.g. generic ISAR non-cross or cross build)
target: run target architecture build (non-cross, using QEMU)
host: run host architecture build
Signed-off-by: Stefan Koch <stefan-koch@siemens.com>
---
meta/classes/dpkg-base.bbclass | 51 ++++++++++++++++++++++++++++++----
meta/classes/dpkg.bbclass | 2 +-
2 files changed, 46 insertions(+), 7 deletions(-)
diff --git a/meta/classes/dpkg-base.bbclass b/meta/classes/dpkg-base.bbclass
index 260aa73..3108fee 100644
--- a/meta/classes/dpkg-base.bbclass
+++ b/meta/classes/dpkg-base.bbclass
@@ -228,7 +228,7 @@ dpkg_runbuild() {
def isar_deb_build_profiles(d):
deb_build_profiles = d.getVar('DEB_BUILD_PROFILES', True)
- if d.getVar('ISAR_CROSS_COMPILE', True) == "1":
+ if d.getVar('ISAR_CROSS_COMPILE', True) == "1" and not "targetbuild" in d.getVar('DEB_BUILD_PROFILES', True):
deb_build_profiles += ' cross'
return deb_build_profiles.strip()
@@ -242,12 +242,51 @@ def isar_export_build_settings(d):
os.environ['DEB_BUILD_OPTIONS'] = isar_deb_build_options(d)
os.environ['DEB_BUILD_PROFILES'] = isar_deb_build_profiles(d)
+# By default only one dpkg build is executed
+# With enabled ISAR_CROSS_COMPILE and different HOST_ARCH from DISTRO_ARCH
+# it's possible to run additional target or host builds.
+# These can requested by appending the following strings (seperated by space):
+# target: run target architecture build (non-cross, using QEMU)
+# host: run host architecture build
+# Supported build modes for ISAR_BUILDS: default target host
+ISAR_BUILDS ?= "default"
+
python do_dpkg_build() {
- bb.build.exec_func('schroot_create_configs', d)
- try:
- bb.build.exec_func("dpkg_runbuild", d)
- finally:
- bb.build.exec_func('schroot_delete_configs', d)
+ # store default build values for restoring
+ deb_profiles = d.getVar('DEB_BUILD_PROFILES', True)
+ schroot_dir = d.getVar('SCHROOT_DIR', True)
+
+ for build in d.getVar('ISAR_BUILDS', True).split(" "):
+ runbuild = False
+
+ # set default build values
+ d.setVar('DEB_BUILD_PROFILES', deb_profiles)
+ d.setVar('SCHROOT_DIR', schroot_dir)
+ d.setVar('SBUILD_BUILD', d.getVar('SBUILD_HOST_ARCH', True))
+ d.setVar('SBUILD_HOST', d.getVar('PACKAGE_ARCH', True))
+
+ if build == "default":
+ runbuild = True
+ elif d.getVar('ISAR_CROSS_COMPILE', True) == "1" and d.getVar('HOST_ARCH', True) != d.getVar('DISTRO_ARCH', True):
+ if build == "target":
+ d.appendVar('DEB_BUILD_PROFILES', ' targetbuild')
+ d.setVar('SCHROOT_DIR', d.getVar('SCHROOT_TARGET_DIR', True))
+ d.setVar('SBUILD_BUILD', d.getVar('PACKAGE_ARCH', True))
+ runbuild = True
+ elif build == "host":
+ d.appendVar('DEB_BUILD_PROFILES', ' hostbuild')
+ d.setVar('SCHROOT_DIR', d.getVar('SCHROOT_HOST_DIR', True))
+ d.setVar('SBUILD_BUILD', d.getVar('HOST_ARCH', True))
+ d.setVar('SBUILD_HOST', d.getVar('HOST_ARCH', True))
+ runbuild = True
+
+ # execute build
+ if runbuild:
+ bb.build.exec_func('schroot_create_configs', d)
+ try:
+ bb.build.exec_func("dpkg_runbuild", d)
+ finally:
+ bb.build.exec_func('schroot_delete_configs', d)
}
addtask dpkg_build
diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
index 7822b14..70a1c6a 100644
--- a/meta/classes/dpkg.bbclass
+++ b/meta/classes/dpkg.bbclass
@@ -102,7 +102,7 @@ dpkg_runbuild() {
DSC_FILE=$(find ${WORKDIR} -name "${DEB_SOURCE_NAME}*.dsc" -print)
sbuild -A -n -c ${SBUILD_CHROOT} --extra-repository="${ISAR_APT_REPO}" \
- --host=${PACKAGE_ARCH} --build=${SBUILD_HOST_ARCH} ${profiles} \
+ --host=${SBUILD_HOST} --build=${SBUILD_BUILD} ${profiles} \
--no-run-lintian --no-run-piuparts --no-run-autopkgtest --resolve-alternatives \
--no-apt-update \
--chroot-setup-commands="echo \"Package: *\nPin: release n=${DEBDISTRONAME}\nPin-Priority: 1000\" > /etc/apt/preferences.d/isar-apt" \
--
2.30.2
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v2 1/5] linux-custom: Split up binaries from kernel headers to kbuild package
2022-12-20 17:09 [PATCH v2 0/5] linux-custom: Split up binaries from kernel headers to kbuild packages Koch, Stefan
2022-12-20 17:09 ` [PATCH v2 2/5] sbuild: Support overwriting configured schroot dir Koch, Stefan
2022-12-20 17:09 ` [PATCH v2 3/5] dpkg: Add support for additional target and host builds Koch, Stefan
@ 2022-12-20 17:09 ` Koch, Stefan
2023-03-17 8:18 ` Jan Kiszka
2022-12-20 17:09 ` [PATCH v2 5/5] docs: Update custom_kernel docs for split up of kernel scripts and tools Koch, Stefan
` (2 subsequent siblings)
5 siblings, 1 reply; 13+ messages in thread
From: Koch, Stefan @ 2022-12-20 17:09 UTC (permalink / raw)
To: isar-users
Cc: Kiszka, Jan, ubely, Storm, Christian, Adler, Michael, Sudler,
Simon, Koch, Stefan
This patch does introduce specific kernel kbuild packages that
ship the "scripts" and "tools" binaries.
The kernel headers fulfill this using symlinks to point
to the "scripts" and "tools" of the kernel kbuild package.
This is already known from debian kernel packages structure:
- Generate a kernel headers package without binaries
- Create kernel kbuild packages that
ship the "scripts" and "tools" binaries
- Using symlinks to point to the "scripts"
and "tools" binaries
Signed-off-by: Stefan Koch <stefan-koch@siemens.com>
---
.../linux/files/debian/control.tmpl | 9 +++-
.../linux/files/debian/isar/common.tmpl | 2 +
.../linux/files/debian/isar/install.tmpl | 51 +++++++++++++++----
meta/recipes-kernel/linux/linux-custom.inc | 4 ++
4 files changed, 54 insertions(+), 12 deletions(-)
diff --git a/meta/recipes-kernel/linux/files/debian/control.tmpl b/meta/recipes-kernel/linux/files/debian/control.tmpl
index dd0b624..b19ca2c 100644
--- a/meta/recipes-kernel/linux/files/debian/control.tmpl
+++ b/meta/recipes-kernel/linux/files/debian/control.tmpl
@@ -26,7 +26,7 @@ Section: devel
Provides: linux-kernel-headers
Architecture: any
Description: Linux support headers for userspace development
- This package provides userspaces headers from the Linux kernel. These headers
+ This package provides userspaces headers from the Linux kernel. These headers
are used by the installed headers for GNU glibc and other system libraries.
Package: linux-image-${KERNEL_NAME_PROVIDED}-dbg
@@ -35,3 +35,10 @@ Architecture: any
Description: Linux kernel debugging symbols for @KR@
This package will come in handy if you need to debug the kernel. It provides
all the necessary debug symbols for the kernel and its modules.
+
+Package: linux-kbuild-${KERNEL_NAME_PROVIDED}
+Architecture: any
+Depends: ${perl:Depends}, ${shlib:Depends}
+Description: ${KERNEL_NAME_PROVIDED} Linux kbuild scripts and tools for @KR@
+ This package provides kernel kbuild scripts and tools for @KR@
+ This is useful for people who need to build external modules
diff --git a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl
index 52ebebb..f4c0519 100644
--- a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl
+++ b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl
@@ -9,6 +9,7 @@ ARCH=${KERNEL_ARCH}
KERNEL_PKG_IMAGE=linux-image-${KERNEL_NAME_PROVIDED}
KERNEL_PKG_KERN_HEADERS=linux-headers-${KERNEL_NAME_PROVIDED}
KERNEL_PKG_LIBC_HEADERS=linux-libc-dev
+KERNEL_PKG_KERN_KBUILD=linux-kbuild-${KERNEL_NAME_PROVIDED}
# Constants
KCONF=.config
@@ -19,6 +20,7 @@ deb_img_dir=${deb_top_dir}/${KERNEL_PKG_IMAGE}
deb_dbg_dir=${deb_img_dir}-dbg
deb_kern_hdr_dir=${deb_top_dir}/${KERNEL_PKG_KERN_HEADERS}
deb_libc_hdr_dir=${deb_top_dir}/${KERNEL_PKG_LIBC_HEADERS}
+deb_kern_kbuild_dir=${deb_top_dir}/${KERNEL_PKG_KERN_KBUILD}
# Array of packages to be generated
declare -A kern_pkgs
diff --git a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl
index 8a604e4..236b67c 100644
--- a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl
+++ b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl
@@ -33,6 +33,7 @@ do_install() {
# Trace what we do here
set -x
+ # Run the install steps
install_image
if [ "${ARCH}" != "um" ]; then
install_config
@@ -43,6 +44,10 @@ do_install() {
install_kmods
install_headers
+ # Cleanup and install kernel scripts and tools
+ rm -rf ${deb_kern_kbuild_dir}
+ install_kbuild ${deb_kern_kbuild_dir}
+
# Stop tracing
set +x
}
@@ -168,21 +173,15 @@ kernel_headers() {
mkdir -p ${destdir}
mkdir -p ${deb_kern_hdr_dir}/lib/modules/${krel}
- (cd ${S}; find . -name 'Makefile*' -o -name 'Kconfig*' -o -name '*.pl') >>${src_hdr_files}
- (cd ${S}; find arch/*/include include scripts -type f -o -type l) >>${src_hdr_files}
+ (cd ${S}; find . -not -path './scripts/*' -a -not -path './tools/*' -a \( -name 'Makefile*' -o -name 'Kconfig*' -o -name '*.pl' \)) >>${src_hdr_files}
+ (cd ${S}; find arch/*/include include -type f -o -type l) >>${src_hdr_files}
(cd ${S}; find arch/${ARCH} -name module.lds -o -name Kbuild.platforms -o -name Platform) >>${src_hdr_files}
(cd ${S}; find $(find arch/${ARCH} -name include -o -name scripts -type d) -type f) >>${src_hdr_files}
if [ -n "${CONFIG_MODULES}" ]; then
echo Module.symvers >> ${obj_hdr_files}
fi
- (cd ${O}; find arch/${ARCH}/include include scripts -type f) >>${obj_hdr_files}
- if [ -n "${CONFIG_STACK_VALIDATION}" -o -n "${CONFIG_HAVE_OBJTOOL}" ]; then
- (cd ${O}; find tools/objtool -type f -executable) >>${obj_hdr_files}
- fi
- if [ -n "${CONFIG_GCC_PLUGINS}" ]; then
- (cd ${O}; find scripts/gcc-plugins -name *.so -o -name gcc-common.h) >>${obj_hdr_files}
- fi
+ (cd ${O}; find arch/${ARCH}/include include -type f) >>${obj_hdr_files}
# deploy files that were matched above
tar -C ${S} -cf - -T - <${src_hdr_files} | tar -C ${destdir} -xf -
@@ -191,8 +190,11 @@ kernel_headers() {
# add the kernel config
cp ${O}/${KCONF} ${destdir}/.config
- # handle kernel development tools
- kernel_tools
+ # add symlink to scripts and tools directories
+ ln -sf ../../lib/linux-kbuild-${krel}/scripts ${destdir}/scripts
+ if [ -n "${CONFIG_STACK_VALIDATION}" -o -n "${CONFIG_HAVE_OBJTOOL}" ]; then
+ ln -sf ../../lib/linux-kbuild-${krel}/tools ${destdir}/tools
+ fi
# create symlinks
ln -sf /${kernel_headers_dir} ${deb_kern_hdr_dir}/lib/modules/${krel}/build
@@ -206,4 +208,31 @@ install_headers() {
kernel_headers
}
+install_kbuild() {
+ kernel_kbuild_dir=usr/lib/linux-kbuild-${krel}
+ destdir=${1}/${kernel_kbuild_dir}
+ src_kbuild_files=$(mktemp)
+ obj_kbuild_files=$(mktemp)
+
+ mkdir -p ${destdir}
+
+ (cd ${S}; find . -path './scripts/*' -a -path './tools/*' -a \( -name 'Makefile*' -o -name 'Kconfig*' -o -name '*.pl' \)) >>${src_kbuild_files}
+ (cd ${S}; find scripts -type f -o -type l) >>${src_kbuild_files}
+
+ (cd ${O}; find scripts -type f) >>${obj_kbuild_files}
+ if [ -n "${CONFIG_STACK_VALIDATION}" -o -n "${CONFIG_HAVE_OBJTOOL}" ]; then
+ (cd ${O}; find tools/objtool -type f -executable) >>${obj_kbuild_files}
+ fi
+ if [ -n "${CONFIG_GCC_PLUGINS}" ]; then
+ (cd ${O}; find scripts/gcc-plugins -name *.so -o -name gcc-common.h) >>${obj_kbuild_files}
+ fi
+
+ # deploy files that were matched above
+ tar -C ${S} -cf - -T - <${src_kbuild_files} | tar -C ${destdir} -xf -
+ tar -C ${O} -cf - -T - <${obj_kbuild_files} | tar -C ${destdir} -xf -
+
+ # handle kernel development tools
+ kernel_tools
+}
+
main install ${*}
diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc
index 96f0afc..dbda755 100644
--- a/meta/recipes-kernel/linux/linux-custom.inc
+++ b/meta/recipes-kernel/linux/linux-custom.inc
@@ -96,6 +96,10 @@ python() {
kernel_name = d.getVar("KERNEL_NAME_PROVIDED", True)
d.setVar('PROVIDES', 'linux-image-' + kernel_name + ' ' + \
'linux-headers-' + kernel_name)
+ headers_depends = "linux-kbuild-" + kernel_name
+
+ # Set dependency for kernel headers
+ d.appendVar("KERNEL_HEADERS_DEBIAN_DEPENDS", headers_depends)
}
def get_kernel_arch(d):
--
2.30.2
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 1/5] linux-custom: Split up binaries from kernel headers to kbuild package
2022-12-20 17:09 ` [PATCH v2 1/5] linux-custom: Split up binaries from kernel headers to kbuild package Koch, Stefan
@ 2023-03-17 8:18 ` Jan Kiszka
2023-03-17 8:32 ` cedric.hombourger
2023-03-17 9:20 ` Koch, Stefan
0 siblings, 2 replies; 13+ messages in thread
From: Jan Kiszka @ 2023-03-17 8:18 UTC (permalink / raw)
To: Koch, Stefan (DI PA DCP R&D 3),
isar-users, Hombourger, Cedric (DI SW MG EPT)
Cc: ubely, Storm, Christian (T CED SES-DE),
Adler, Michael (T CED SES-DE), Sudler, Simon (DI PA DCP TI)
On 20.12.22 18:09, Koch, Stefan (DI PA DCP R&D 3) wrote:
> This patch does introduce specific kernel kbuild packages that
> ship the "scripts" and "tools" binaries.
> The kernel headers fulfill this using symlinks to point
> to the "scripts" and "tools" of the kernel kbuild package.
>
> This is already known from debian kernel packages structure:
> - Generate a kernel headers package without binaries
> - Create kernel kbuild packages that
> ship the "scripts" and "tools" binaries
> - Using symlinks to point to the "scripts"
> and "tools" binaries
>
> Signed-off-by: Stefan Koch <stefan-koch@siemens.com>
> ---
> .../linux/files/debian/control.tmpl | 9 +++-
> .../linux/files/debian/isar/common.tmpl | 2 +
> .../linux/files/debian/isar/install.tmpl | 51 +++++++++++++++----
> meta/recipes-kernel/linux/linux-custom.inc | 4 ++
> 4 files changed, 54 insertions(+), 12 deletions(-)
>
> diff --git a/meta/recipes-kernel/linux/files/debian/control.tmpl b/meta/recipes-kernel/linux/files/debian/control.tmpl
> index dd0b624..b19ca2c 100644
> --- a/meta/recipes-kernel/linux/files/debian/control.tmpl
> +++ b/meta/recipes-kernel/linux/files/debian/control.tmpl
> @@ -26,7 +26,7 @@ Section: devel
> Provides: linux-kernel-headers
> Architecture: any
> Description: Linux support headers for userspace development
> - This package provides userspaces headers from the Linux kernel. These headers
> + This package provides userspaces headers from the Linux kernel. These headers
> are used by the installed headers for GNU glibc and other system libraries.
>
> Package: linux-image-${KERNEL_NAME_PROVIDED}-dbg
> @@ -35,3 +35,10 @@ Architecture: any
> Description: Linux kernel debugging symbols for @KR@
> This package will come in handy if you need to debug the kernel. It provides
> all the necessary debug symbols for the kernel and its modules.
> +
> +Package: linux-kbuild-${KERNEL_NAME_PROVIDED}
> +Architecture: any
> +Depends: ${perl:Depends}, ${shlib:Depends}
> +Description: ${KERNEL_NAME_PROVIDED} Linux kbuild scripts and tools for @KR@
> + This package provides kernel kbuild scripts and tools for @KR@
> + This is useful for people who need to build external modules
> diff --git a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl
> index 52ebebb..f4c0519 100644
> --- a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl
> +++ b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl
> @@ -9,6 +9,7 @@ ARCH=${KERNEL_ARCH}
> KERNEL_PKG_IMAGE=linux-image-${KERNEL_NAME_PROVIDED}
> KERNEL_PKG_KERN_HEADERS=linux-headers-${KERNEL_NAME_PROVIDED}
> KERNEL_PKG_LIBC_HEADERS=linux-libc-dev
> +KERNEL_PKG_KERN_KBUILD=linux-kbuild-${KERNEL_NAME_PROVIDED}
>
> # Constants
> KCONF=.config
> @@ -19,6 +20,7 @@ deb_img_dir=${deb_top_dir}/${KERNEL_PKG_IMAGE}
> deb_dbg_dir=${deb_img_dir}-dbg
> deb_kern_hdr_dir=${deb_top_dir}/${KERNEL_PKG_KERN_HEADERS}
> deb_libc_hdr_dir=${deb_top_dir}/${KERNEL_PKG_LIBC_HEADERS}
> +deb_kern_kbuild_dir=${deb_top_dir}/${KERNEL_PKG_KERN_KBUILD}
>
> # Array of packages to be generated
> declare -A kern_pkgs
> diff --git a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl
> index 8a604e4..236b67c 100644
> --- a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl
> +++ b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl
> @@ -33,6 +33,7 @@ do_install() {
> # Trace what we do here
> set -x
>
> + # Run the install steps
> install_image
> if [ "${ARCH}" != "um" ]; then
> install_config
> @@ -43,6 +44,10 @@ do_install() {
> install_kmods
> install_headers
>
> + # Cleanup and install kernel scripts and tools
> + rm -rf ${deb_kern_kbuild_dir}
> + install_kbuild ${deb_kern_kbuild_dir}
> +
> # Stop tracing
> set +x
> }
> @@ -168,21 +173,15 @@ kernel_headers() {
> mkdir -p ${destdir}
> mkdir -p ${deb_kern_hdr_dir}/lib/modules/${krel}
>
> - (cd ${S}; find . -name 'Makefile*' -o -name 'Kconfig*' -o -name '*.pl') >>${src_hdr_files}
> - (cd ${S}; find arch/*/include include scripts -type f -o -type l) >>${src_hdr_files}
> + (cd ${S}; find . -not -path './scripts/*' -a -not -path './tools/*' -a \( -name 'Makefile*' -o -name 'Kconfig*' -o -name '*.pl' \)) >>${src_hdr_files}
> + (cd ${S}; find arch/*/include include -type f -o -type l) >>${src_hdr_files}
> (cd ${S}; find arch/${ARCH} -name module.lds -o -name Kbuild.platforms -o -name Platform) >>${src_hdr_files}
> (cd ${S}; find $(find arch/${ARCH} -name include -o -name scripts -type d) -type f) >>${src_hdr_files}
>
> if [ -n "${CONFIG_MODULES}" ]; then
> echo Module.symvers >> ${obj_hdr_files}
> fi
> - (cd ${O}; find arch/${ARCH}/include include scripts -type f) >>${obj_hdr_files}
> - if [ -n "${CONFIG_STACK_VALIDATION}" -o -n "${CONFIG_HAVE_OBJTOOL}" ]; then
> - (cd ${O}; find tools/objtool -type f -executable) >>${obj_hdr_files}
> - fi
> - if [ -n "${CONFIG_GCC_PLUGINS}" ]; then
> - (cd ${O}; find scripts/gcc-plugins -name *.so -o -name gcc-common.h) >>${obj_hdr_files}
> - fi
> + (cd ${O}; find arch/${ARCH}/include include -type f) >>${obj_hdr_files}
>
> # deploy files that were matched above
> tar -C ${S} -cf - -T - <${src_hdr_files} | tar -C ${destdir} -xf -
> @@ -191,8 +190,11 @@ kernel_headers() {
> # add the kernel config
> cp ${O}/${KCONF} ${destdir}/.config
>
> - # handle kernel development tools
> - kernel_tools
> + # add symlink to scripts and tools directories
> + ln -sf ../../lib/linux-kbuild-${krel}/scripts ${destdir}/scripts
> + if [ -n "${CONFIG_STACK_VALIDATION}" -o -n "${CONFIG_HAVE_OBJTOOL}" ]; then
> + ln -sf ../../lib/linux-kbuild-${krel}/tools ${destdir}/tools
Is Debian using relative links for this as well? Or rather absolute
ones. We use a absolute one below.
> + fi
>
> # create symlinks
> ln -sf /${kernel_headers_dir} ${deb_kern_hdr_dir}/lib/modules/${krel}/build
> @@ -206,4 +208,31 @@ install_headers() {
> kernel_headers
> }
>
> +install_kbuild() {
> + kernel_kbuild_dir=usr/lib/linux-kbuild-${krel}
> + destdir=${1}/${kernel_kbuild_dir}
> + src_kbuild_files=$(mktemp)
> + obj_kbuild_files=$(mktemp)
> +
> + mkdir -p ${destdir}
> +
> + (cd ${S}; find . -path './scripts/*' -a -path './tools/*' -a \( -name 'Makefile*' -o -name 'Kconfig*' -o -name '*.pl' \)) >>${src_kbuild_files}
> + (cd ${S}; find scripts -type f -o -type l) >>${src_kbuild_files}
> +
> + (cd ${O}; find scripts -type f) >>${obj_kbuild_files}
> + if [ -n "${CONFIG_STACK_VALIDATION}" -o -n "${CONFIG_HAVE_OBJTOOL}" ]; then
> + (cd ${O}; find tools/objtool -type f -executable) >>${obj_kbuild_files}
> + fi
> + if [ -n "${CONFIG_GCC_PLUGINS}" ]; then
> + (cd ${O}; find scripts/gcc-plugins -name *.so -o -name gcc-common.h) >>${obj_kbuild_files}
> + fi
> +
> + # deploy files that were matched above
> + tar -C ${S} -cf - -T - <${src_kbuild_files} | tar -C ${destdir} -xf -
> + tar -C ${O} -cf - -T - <${obj_kbuild_files} | tar -C ${destdir} -xf -
> +
> + # handle kernel development tools
> + kernel_tools
> +}
> +
> main install ${*}
> diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc
> index 96f0afc..dbda755 100644
> --- a/meta/recipes-kernel/linux/linux-custom.inc
> +++ b/meta/recipes-kernel/linux/linux-custom.inc
> @@ -96,6 +96,10 @@ python() {
> kernel_name = d.getVar("KERNEL_NAME_PROVIDED", True)
> d.setVar('PROVIDES', 'linux-image-' + kernel_name + ' ' + \
> 'linux-headers-' + kernel_name)
> + headers_depends = "linux-kbuild-" + kernel_name
> +
> + # Set dependency for kernel headers
> + d.appendVar("KERNEL_HEADERS_DEBIAN_DEPENDS", headers_depends)
> }
>
> def get_kernel_arch(d):
Except for the one question above, this commit looks good to me. But
maybe Cedric has some comments as well, given that he once wrote
significant parts of this.
Jan
--
Siemens AG, Technology
Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 13+ messages in thread
* RE: [PATCH v2 1/5] linux-custom: Split up binaries from kernel headers to kbuild package
2023-03-17 8:18 ` Jan Kiszka
@ 2023-03-17 8:32 ` cedric.hombourger
2023-03-17 9:20 ` Koch, Stefan
1 sibling, 0 replies; 13+ messages in thread
From: cedric.hombourger @ 2023-03-17 8:32 UTC (permalink / raw)
To: Kiszka, Jan, Koch, Stefan, isar-users
Cc: ubely, Storm, Christian, Adler, Michael, Sudler, Simon
> -----Original Message-----
> From: Kiszka, Jan (T CED) <jan.kiszka@siemens.com>
> Sent: Friday, March 17, 2023 9:19 AM
> To: Koch, Stefan (DI PA DCP R&D 3) <stefan-koch@siemens.com>; isar-
> users@googlegroups.com; Hombourger, Cedric (DI SW CAS ES LI)
> <cedric.hombourger@siemens.com>
> Cc: ubely@ilbers.de; Storm, Christian (T CED SES-DE)
> <christian.storm@siemens.com>; Adler, Michael (T CED SES-DE)
> <michael.adler@siemens.com>; Sudler, Simon (DI PA DCP TI)
> <simon.sudler@siemens.com>
> Subject: Re: [PATCH v2 1/5] linux-custom: Split up binaries from kernel headers to
> kbuild package
>
> On 20.12.22 18:09, Koch, Stefan (DI PA DCP R&D 3) wrote:
> > This patch does introduce specific kernel kbuild packages that ship
> > the "scripts" and "tools" binaries.
> > The kernel headers fulfill this using symlinks to point to the
> > "scripts" and "tools" of the kernel kbuild package.
> >
> > This is already known from debian kernel packages structure:
> > - Generate a kernel headers package without binaries
> > - Create kernel kbuild packages that
> > ship the "scripts" and "tools" binaries
> > - Using symlinks to point to the "scripts"
> > and "tools" binaries
> >
> > Signed-off-by: Stefan Koch <stefan-koch@siemens.com>
> > ---
> > .../linux/files/debian/control.tmpl | 9 +++-
> > .../linux/files/debian/isar/common.tmpl | 2 +
> > .../linux/files/debian/isar/install.tmpl | 51 +++++++++++++++----
> > meta/recipes-kernel/linux/linux-custom.inc | 4 ++
> > 4 files changed, 54 insertions(+), 12 deletions(-)
> >
> > diff --git a/meta/recipes-kernel/linux/files/debian/control.tmpl
> > b/meta/recipes-kernel/linux/files/debian/control.tmpl
> > index dd0b624..b19ca2c 100644
> > --- a/meta/recipes-kernel/linux/files/debian/control.tmpl
> > +++ b/meta/recipes-kernel/linux/files/debian/control.tmpl
> > @@ -26,7 +26,7 @@ Section: devel
> > Provides: linux-kernel-headers
> > Architecture: any
> > Description: Linux support headers for userspace development
> > - This package provides userspaces headers from the Linux kernel.
> > These headers
> > + This package provides userspaces headers from the Linux kernel.
> > + These headers
> > are used by the installed headers for GNU glibc and other system libraries.
> >
> > Package: linux-image-${KERNEL_NAME_PROVIDED}-dbg
> > @@ -35,3 +35,10 @@ Architecture: any
> > Description: Linux kernel debugging symbols for @KR@
> > This package will come in handy if you need to debug the kernel. It provides
> > all the necessary debug symbols for the kernel and its modules.
> > +
> > +Package: linux-kbuild-${KERNEL_NAME_PROVIDED}
> > +Architecture: any
> > +Depends: ${perl:Depends}, ${shlib:Depends}
> > +Description: ${KERNEL_NAME_PROVIDED} Linux kbuild scripts and tools
> > +for @KR@ This package provides kernel kbuild scripts and tools for
> > +@KR@ This is useful for people who need to build external modules
> > diff --git a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl
> > b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl
> > index 52ebebb..f4c0519 100644
> > --- a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl
> > +++ b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl
> > @@ -9,6 +9,7 @@ ARCH=${KERNEL_ARCH}
> > KERNEL_PKG_IMAGE=linux-image-${KERNEL_NAME_PROVIDED}
> > KERNEL_PKG_KERN_HEADERS=linux-headers-
> ${KERNEL_NAME_PROVIDED}
> > KERNEL_PKG_LIBC_HEADERS=linux-libc-dev
> > +KERNEL_PKG_KERN_KBUILD=linux-kbuild-${KERNEL_NAME_PROVIDED}
> >
> > # Constants
> > KCONF=.config
> > @@ -19,6 +20,7 @@ deb_img_dir=${deb_top_dir}/${KERNEL_PKG_IMAGE}
> > deb_dbg_dir=${deb_img_dir}-dbg
> > deb_kern_hdr_dir=${deb_top_dir}/${KERNEL_PKG_KERN_HEADERS}
> > deb_libc_hdr_dir=${deb_top_dir}/${KERNEL_PKG_LIBC_HEADERS}
> > +deb_kern_kbuild_dir=${deb_top_dir}/${KERNEL_PKG_KERN_KBUILD}
> >
> > # Array of packages to be generated
> > declare -A kern_pkgs
> > diff --git a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl
> > b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl
> > index 8a604e4..236b67c 100644
> > --- a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl
> > +++ b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl
> > @@ -33,6 +33,7 @@ do_install() {
> > # Trace what we do here
> > set -x
> >
> > + # Run the install steps
> > install_image
> > if [ "${ARCH}" != "um" ]; then
> > install_config
> > @@ -43,6 +44,10 @@ do_install() {
> > install_kmods
> > install_headers
> >
> > + # Cleanup and install kernel scripts and tools
> > + rm -rf ${deb_kern_kbuild_dir}
> > + install_kbuild ${deb_kern_kbuild_dir}
> > +
> > # Stop tracing
> > set +x
> > }
> > @@ -168,21 +173,15 @@ kernel_headers() {
> > mkdir -p ${destdir}
> > mkdir -p ${deb_kern_hdr_dir}/lib/modules/${krel}
> >
> > - (cd ${S}; find . -name 'Makefile*' -o -name 'Kconfig*' -o -name '*.pl')
> >>${src_hdr_files}
> > - (cd ${S}; find arch/*/include include scripts -type f -o -type l)
> >>${src_hdr_files}
> > + (cd ${S}; find . -not -path './scripts/*' -a -not -path './tools/*' -a \( -name
> 'Makefile*' -o -name 'Kconfig*' -o -name '*.pl' \)) >>${src_hdr_files}
> > + (cd ${S}; find arch/*/include include -type f -o -type l)
> > + >>${src_hdr_files}
> > (cd ${S}; find arch/${ARCH} -name module.lds -o -name Kbuild.platforms -o -
> name Platform) >>${src_hdr_files}
> > (cd ${S}; find $(find arch/${ARCH} -name include -o -name scripts
> > -type d) -type f) >>${src_hdr_files}
> >
> > if [ -n "${CONFIG_MODULES}" ]; then
> > echo Module.symvers >> ${obj_hdr_files}
> > fi
> > - (cd ${O}; find arch/${ARCH}/include include scripts -type f) >>${obj_hdr_files}
> > - if [ -n "${CONFIG_STACK_VALIDATION}" -o -n
> "${CONFIG_HAVE_OBJTOOL}" ]; then
> > - (cd ${O}; find tools/objtool -type f -executable) >>${obj_hdr_files}
> > - fi
> > - if [ -n "${CONFIG_GCC_PLUGINS}" ]; then
> > - (cd ${O}; find scripts/gcc-plugins -name *.so -o -name gcc-common.h)
> >>${obj_hdr_files}
> > - fi
> > + (cd ${O}; find arch/${ARCH}/include include -type f)
> > + >>${obj_hdr_files}
> >
> > # deploy files that were matched above
> > tar -C ${S} -cf - -T - <${src_hdr_files} | tar -C ${destdir} -xf
> > - @@ -191,8 +190,11 @@ kernel_headers() {
> > # add the kernel config
> > cp ${O}/${KCONF} ${destdir}/.config
> >
> > - # handle kernel development tools
> > - kernel_tools
> > + # add symlink to scripts and tools directories
> > + ln -sf ../../lib/linux-kbuild-${krel}/scripts ${destdir}/scripts
> > + if [ -n "${CONFIG_STACK_VALIDATION}" -o -n
> "${CONFIG_HAVE_OBJTOOL}" ]; then
> > + ln -sf ../../lib/linux-kbuild-${krel}/tools ${destdir}/tools
>
> Is Debian using relative links for this as well? Or rather absolute ones. We use a
> absolute one below.
>
> > + fi
> >
> > # create symlinks
> > ln -sf /${kernel_headers_dir}
> > ${deb_kern_hdr_dir}/lib/modules/${krel}/build
> > @@ -206,4 +208,31 @@ install_headers() {
> > kernel_headers
> > }
> >
> > +install_kbuild() {
> > + kernel_kbuild_dir=usr/lib/linux-kbuild-${krel}
> > + destdir=${1}/${kernel_kbuild_dir}
> > + src_kbuild_files=$(mktemp)
> > + obj_kbuild_files=$(mktemp)
> > +
> > + mkdir -p ${destdir}
> > +
> > + (cd ${S}; find . -path './scripts/*' -a -path './tools/*' -a \( -name 'Makefile*' -o -
> name 'Kconfig*' -o -name '*.pl' \)) >>${src_kbuild_files}
> > + (cd ${S}; find scripts -type f -o -type l) >>${src_kbuild_files}
> > +
> > + (cd ${O}; find scripts -type f) >>${obj_kbuild_files}
> > + if [ -n "${CONFIG_STACK_VALIDATION}" -o -n
> "${CONFIG_HAVE_OBJTOOL}" ]; then
> > + (cd ${O}; find tools/objtool -type f -executable) >>${obj_kbuild_files}
> > + fi
> > + if [ -n "${CONFIG_GCC_PLUGINS}" ]; then
> > + (cd ${O}; find scripts/gcc-plugins -name *.so -o -name gcc-common.h)
> >>${obj_kbuild_files}
> > + fi
> > +
> > + # deploy files that were matched above
> > + tar -C ${S} -cf - -T - <${src_kbuild_files} | tar -C ${destdir} -xf -
> > + tar -C ${O} -cf - -T - <${obj_kbuild_files} | tar -C ${destdir}
> > + -xf -
> > +
> > + # handle kernel development tools
> > + kernel_tools
> > +}
> > +
> > main install ${*}
> > diff --git a/meta/recipes-kernel/linux/linux-custom.inc
> > b/meta/recipes-kernel/linux/linux-custom.inc
> > index 96f0afc..dbda755 100644
> > --- a/meta/recipes-kernel/linux/linux-custom.inc
> > +++ b/meta/recipes-kernel/linux/linux-custom.inc
> > @@ -96,6 +96,10 @@ python() {
> > kernel_name = d.getVar("KERNEL_NAME_PROVIDED", True)
> > d.setVar('PROVIDES', 'linux-image-' + kernel_name + ' ' + \
> > 'linux-headers-' + kernel_name)
> > + headers_depends = "linux-kbuild-" + kernel_name
> > +
> > + # Set dependency for kernel headers
> > + d.appendVar("KERNEL_HEADERS_DEBIAN_DEPENDS", headers_depends)
> > }
> >
> > def get_kernel_arch(d):
>
> Except for the one question above, this commit looks good to me. But maybe
> Cedric has some comments as well, given that he once wrote significant parts of
> this.
This also looks good to me and appears to be a good improvement. Thank you!
Cedric
>
> Jan
>
> --
> Siemens AG, Technology
> Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 1/5] linux-custom: Split up binaries from kernel headers to kbuild package
2023-03-17 8:18 ` Jan Kiszka
2023-03-17 8:32 ` cedric.hombourger
@ 2023-03-17 9:20 ` Koch, Stefan
2023-03-17 9:38 ` Jan Kiszka
1 sibling, 1 reply; 13+ messages in thread
From: Koch, Stefan @ 2023-03-17 9:20 UTC (permalink / raw)
To: isar-users, Kiszka, Jan, cedric.hombourger
Cc: Sudler, Simon, ubely, Storm, Christian, Adler, Michael
On Fri, 2023-03-17 at 09:18 +0100, Jan Kiszka wrote:
> On 20.12.22 18:09, Koch, Stefan (DI PA DCP R&D 3) wrote:
> > This patch does introduce specific kernel kbuild packages that
> > ship the "scripts" and "tools" binaries.
> > The kernel headers fulfill this using symlinks to point
> > to the "scripts" and "tools" of the kernel kbuild package.
> >
> > This is already known from debian kernel packages structure:
> > - Generate a kernel headers package without binaries
> > - Create kernel kbuild packages that
> > ship the "scripts" and "tools" binaries
> > - Using symlinks to point to the "scripts"
> > and "tools" binaries
> >
> > Signed-off-by: Stefan Koch <stefan-koch@siemens.com>
> > ---
> > .../linux/files/debian/control.tmpl | 9 +++-
> > .../linux/files/debian/isar/common.tmpl | 2 +
> > .../linux/files/debian/isar/install.tmpl | 51
> > +++++++++++++++----
> > meta/recipes-kernel/linux/linux-custom.inc | 4 ++
> > 4 files changed, 54 insertions(+), 12 deletions(-)
> >
> > diff --git a/meta/recipes-kernel/linux/files/debian/control.tmpl
> > b/meta/recipes-kernel/linux/files/debian/control.tmpl
> > index dd0b624..b19ca2c 100644
> > --- a/meta/recipes-kernel/linux/files/debian/control.tmpl
> > +++ b/meta/recipes-kernel/linux/files/debian/control.tmpl
> > @@ -26,7 +26,7 @@ Section: devel
> > Provides: linux-kernel-headers
> > Architecture: any
> > Description: Linux support headers for userspace development
> > - This package provides userspaces headers from the Linux kernel.
> > These headers
> > + This package provides userspaces headers from the Linux kernel.
> > These headers
> > are used by the installed headers for GNU glibc and other system
> > libraries.
> >
> > Package: linux-image-${KERNEL_NAME_PROVIDED}-dbg
> > @@ -35,3 +35,10 @@ Architecture: any
> > Description: Linux kernel debugging symbols for @KR@
> > This package will come in handy if you need to debug the kernel.
> > It provides
> > all the necessary debug symbols for the kernel and its modules.
> > +
> > +Package: linux-kbuild-${KERNEL_NAME_PROVIDED}
> > +Architecture: any
> > +Depends: ${perl:Depends}, ${shlib:Depends}
> > +Description: ${KERNEL_NAME_PROVIDED} Linux kbuild scripts and
> > tools for @KR@
> > + This package provides kernel kbuild scripts and tools for @KR@
> > + This is useful for people who need to build external modules
> > diff --git a/meta/recipes-
> > kernel/linux/files/debian/isar/common.tmpl b/meta/recipes-
> > kernel/linux/files/debian/isar/common.tmpl
> > index 52ebebb..f4c0519 100644
> > --- a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl
> > +++ b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl
> > @@ -9,6 +9,7 @@ ARCH=${KERNEL_ARCH}
> > KERNEL_PKG_IMAGE=linux-image-${KERNEL_NAME_PROVIDED}
> > KERNEL_PKG_KERN_HEADERS=linux-headers-${KERNEL_NAME_PROVIDED}
> > KERNEL_PKG_LIBC_HEADERS=linux-libc-dev
> > +KERNEL_PKG_KERN_KBUILD=linux-kbuild-${KERNEL_NAME_PROVIDED}
> >
> > # Constants
> > KCONF=.config
> > @@ -19,6 +20,7 @@ deb_img_dir=${deb_top_dir}/${KERNEL_PKG_IMAGE}
> > deb_dbg_dir=${deb_img_dir}-dbg
> > deb_kern_hdr_dir=${deb_top_dir}/${KERNEL_PKG_KERN_HEADERS}
> > deb_libc_hdr_dir=${deb_top_dir}/${KERNEL_PKG_LIBC_HEADERS}
> > +deb_kern_kbuild_dir=${deb_top_dir}/${KERNEL_PKG_KERN_KBUILD}
> >
> > # Array of packages to be generated
> > declare -A kern_pkgs
> > diff --git a/meta/recipes-
> > kernel/linux/files/debian/isar/install.tmpl b/meta/recipes-
> > kernel/linux/files/debian/isar/install.tmpl
> > index 8a604e4..236b67c 100644
> > --- a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl
> > +++ b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl
> > @@ -33,6 +33,7 @@ do_install() {
> > # Trace what we do here
> > set -x
> >
> > + # Run the install steps
> > install_image
> > if [ "${ARCH}" != "um" ]; then
> > install_config
> > @@ -43,6 +44,10 @@ do_install() {
> > install_kmods
> > install_headers
> >
> > + # Cleanup and install kernel scripts and tools
> > + rm -rf ${deb_kern_kbuild_dir}
> > + install_kbuild ${deb_kern_kbuild_dir}
> > +
> > # Stop tracing
> > set +x
> > }
> > @@ -168,21 +173,15 @@ kernel_headers() {
> > mkdir -p ${destdir}
> > mkdir -p ${deb_kern_hdr_dir}/lib/modules/${krel}
> >
> > - (cd ${S}; find . -name 'Makefile*' -o -name 'Kconfig*' -o -
> > name '*.pl') >>${src_hdr_files}
> > - (cd ${S}; find arch/*/include include scripts -type f -o -type
> > l) >>${src_hdr_files}
> > + (cd ${S}; find . -not -path './scripts/*' -a -not -path
> > './tools/*' -a \( -name 'Makefile*' -o -name 'Kconfig*' -o -name
> > '*.pl' \)) >>${src_hdr_files}
> > + (cd ${S}; find arch/*/include include -type f -o -type l)
> > >>${src_hdr_files}
> > (cd ${S}; find arch/${ARCH} -name module.lds -o -name
> > Kbuild.platforms -o -name Platform) >>${src_hdr_files}
> > (cd ${S}; find $(find arch/${ARCH} -name include -o -name
> > scripts -type d) -type f) >>${src_hdr_files}
> >
> > if [ -n "${CONFIG_MODULES}" ]; then
> > echo Module.symvers >> ${obj_hdr_files}
> > fi
> > - (cd ${O}; find arch/${ARCH}/include include scripts -type f)
> > >>${obj_hdr_files}
> > - if [ -n "${CONFIG_STACK_VALIDATION}" -o -n
> > "${CONFIG_HAVE_OBJTOOL}" ]; then
> > - (cd ${O}; find tools/objtool -type f -executable)
> > >>${obj_hdr_files}
> > - fi
> > - if [ -n "${CONFIG_GCC_PLUGINS}" ]; then
> > - (cd ${O}; find scripts/gcc-plugins -name *.so -o -name
> > gcc-common.h) >>${obj_hdr_files}
> > - fi
> > + (cd ${O}; find arch/${ARCH}/include include -type f)
> > >>${obj_hdr_files}
> >
> > # deploy files that were matched above
> > tar -C ${S} -cf - -T - <${src_hdr_files} | tar -C ${destdir} -
> > xf -
> > @@ -191,8 +190,11 @@ kernel_headers() {
> > # add the kernel config
> > cp ${O}/${KCONF} ${destdir}/.config
> >
> > - # handle kernel development tools
> > - kernel_tools
> > + # add symlink to scripts and tools directories
> > + ln -sf ../../lib/linux-kbuild-${krel}/scripts
> > ${destdir}/scripts
> > + if [ -n "${CONFIG_STACK_VALIDATION}" -o -n
> > "${CONFIG_HAVE_OBJTOOL}" ]; then
> > + ln -sf ../../lib/linux-kbuild-${krel}/tools
> > ${destdir}/tools
>
> Is Debian using relative links for this as well? Or rather absolute
> ones. We use a absolute one below.
Debian itself uses relative ones...
ls -l /usr/src/linux-headers-6.0.0-0.deb11.6-amd64/
total 1660
drwxr-xr-x 3 root root 4096 Mar 2 11:14 arch
drwxr-xr-x 4 root root 4096 Mar 2 11:14 include
-rw-r--r-- 1 root root 63 Dec 19 15:14 Makefile
-rw-r--r-- 1 root root 1684046 Dec 19 15:14 Module.symvers
lrwxrwxrwx 1 root root 34 Dec 19 15:14 scripts -> ../../lib/linux-
kbuild-6.0/scripts
lrwxrwxrwx 1 root root 32 Dec 19 15:14 tools -> ../../lib/linux-
kbuild-6.0/tools
>
> > + fi
> >
> > # create symlinks
> > ln -sf /${kernel_headers_dir}
> > ${deb_kern_hdr_dir}/lib/modules/${krel}/build
> > @@ -206,4 +208,31 @@ install_headers() {
> > kernel_headers
> > }
> >
> > +install_kbuild() {
> > + kernel_kbuild_dir=usr/lib/linux-kbuild-${krel}
> > + destdir=${1}/${kernel_kbuild_dir}
> > + src_kbuild_files=$(mktemp)
> > + obj_kbuild_files=$(mktemp)
> > +
> > + mkdir -p ${destdir}
> > +
> > + (cd ${S}; find . -path './scripts/*' -a -path './tools/*' -a
> > \( -name 'Makefile*' -o -name 'Kconfig*' -o -name '*.pl' \))
> > >>${src_kbuild_files}
> > + (cd ${S}; find scripts -type f -o -type l)
> > >>${src_kbuild_files}
> > +
> > + (cd ${O}; find scripts -type f) >>${obj_kbuild_files}
> > + if [ -n "${CONFIG_STACK_VALIDATION}" -o -n
> > "${CONFIG_HAVE_OBJTOOL}" ]; then
> > + (cd ${O}; find tools/objtool -type f -executable)
> > >>${obj_kbuild_files}
> > + fi
> > + if [ -n "${CONFIG_GCC_PLUGINS}" ]; then
> > + (cd ${O}; find scripts/gcc-plugins -name *.so -o -name
> > gcc-common.h) >>${obj_kbuild_files}
> > + fi
> > +
> > + # deploy files that were matched above
> > + tar -C ${S} -cf - -T - <${src_kbuild_files} | tar -C
> > ${destdir} -xf -
> > + tar -C ${O} -cf - -T - <${obj_kbuild_files} | tar -C
> > ${destdir} -xf -
> > +
> > + # handle kernel development tools
> > + kernel_tools
> > +}
> > +
> > main install ${*}
> > diff --git a/meta/recipes-kernel/linux/linux-custom.inc
> > b/meta/recipes-kernel/linux/linux-custom.inc
> > index 96f0afc..dbda755 100644
> > --- a/meta/recipes-kernel/linux/linux-custom.inc
> > +++ b/meta/recipes-kernel/linux/linux-custom.inc
> > @@ -96,6 +96,10 @@ python() {
> > kernel_name = d.getVar("KERNEL_NAME_PROVIDED", True)
> > d.setVar('PROVIDES', 'linux-image-' + kernel_name + ' ' + \
> > 'linux-headers-' + kernel_name)
> > + headers_depends = "linux-kbuild-" + kernel_name
> > +
> > + # Set dependency for kernel headers
> > + d.appendVar("KERNEL_HEADERS_DEBIAN_DEPENDS", headers_depends)
> > }
> >
> > def get_kernel_arch(d):
>
> Except for the one question above, this commit looks good to me. But
> maybe Cedric has some comments as well, given that he once wrote
> significant parts of this.
>
> Jan
>
--
Stefan Koch
Siemens AG
www.siemens.com
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 1/5] linux-custom: Split up binaries from kernel headers to kbuild package
2023-03-17 9:20 ` Koch, Stefan
@ 2023-03-17 9:38 ` Jan Kiszka
0 siblings, 0 replies; 13+ messages in thread
From: Jan Kiszka @ 2023-03-17 9:38 UTC (permalink / raw)
To: Koch, Stefan (DI PA DCP R&D 3),
isar-users, Hombourger, Cedric (DI SW CAS ES LI)
Cc: Sudler, Simon (DI PA DCP TI),
ubely, Storm, Christian (T CED SES-DE),
Adler, Michael (T CED SES-DE)
On 17.03.23 10:20, Koch, Stefan (DI PA DCP R&D 3) wrote:
> On Fri, 2023-03-17 at 09:18 +0100, Jan Kiszka wrote:
>> On 20.12.22 18:09, Koch, Stefan (DI PA DCP R&D 3) wrote:
>>> This patch does introduce specific kernel kbuild packages that
>>> ship the "scripts" and "tools" binaries.
>>> The kernel headers fulfill this using symlinks to point
>>> to the "scripts" and "tools" of the kernel kbuild package.
>>>
>>> This is already known from debian kernel packages structure:
>>> - Generate a kernel headers package without binaries
>>> - Create kernel kbuild packages that
>>> ship the "scripts" and "tools" binaries
>>> - Using symlinks to point to the "scripts"
>>> and "tools" binaries
>>>
>>> Signed-off-by: Stefan Koch <stefan-koch@siemens.com>
>>> ---
>>> .../linux/files/debian/control.tmpl | 9 +++-
>>> .../linux/files/debian/isar/common.tmpl | 2 +
>>> .../linux/files/debian/isar/install.tmpl | 51
>>> +++++++++++++++----
>>> meta/recipes-kernel/linux/linux-custom.inc | 4 ++
>>> 4 files changed, 54 insertions(+), 12 deletions(-)
>>>
>>> diff --git a/meta/recipes-kernel/linux/files/debian/control.tmpl
>>> b/meta/recipes-kernel/linux/files/debian/control.tmpl
>>> index dd0b624..b19ca2c 100644
>>> --- a/meta/recipes-kernel/linux/files/debian/control.tmpl
>>> +++ b/meta/recipes-kernel/linux/files/debian/control.tmpl
>>> @@ -26,7 +26,7 @@ Section: devel
>>> Provides: linux-kernel-headers
>>> Architecture: any
>>> Description: Linux support headers for userspace development
>>> - This package provides userspaces headers from the Linux kernel.
>>> These headers
>>> + This package provides userspaces headers from the Linux kernel.
>>> These headers
>>> are used by the installed headers for GNU glibc and other system
>>> libraries.
>>>
>>> Package: linux-image-${KERNEL_NAME_PROVIDED}-dbg
>>> @@ -35,3 +35,10 @@ Architecture: any
>>> Description: Linux kernel debugging symbols for @KR@
>>> This package will come in handy if you need to debug the kernel.
>>> It provides
>>> all the necessary debug symbols for the kernel and its modules.
>>> +
>>> +Package: linux-kbuild-${KERNEL_NAME_PROVIDED}
>>> +Architecture: any
>>> +Depends: ${perl:Depends}, ${shlib:Depends}
>>> +Description: ${KERNEL_NAME_PROVIDED} Linux kbuild scripts and
>>> tools for @KR@
>>> + This package provides kernel kbuild scripts and tools for @KR@
>>> + This is useful for people who need to build external modules
>>> diff --git a/meta/recipes-
>>> kernel/linux/files/debian/isar/common.tmpl b/meta/recipes-
>>> kernel/linux/files/debian/isar/common.tmpl
>>> index 52ebebb..f4c0519 100644
>>> --- a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl
>>> +++ b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl
>>> @@ -9,6 +9,7 @@ ARCH=${KERNEL_ARCH}
>>> KERNEL_PKG_IMAGE=linux-image-${KERNEL_NAME_PROVIDED}
>>> KERNEL_PKG_KERN_HEADERS=linux-headers-${KERNEL_NAME_PROVIDED}
>>> KERNEL_PKG_LIBC_HEADERS=linux-libc-dev
>>> +KERNEL_PKG_KERN_KBUILD=linux-kbuild-${KERNEL_NAME_PROVIDED}
>>>
>>> # Constants
>>> KCONF=.config
>>> @@ -19,6 +20,7 @@ deb_img_dir=${deb_top_dir}/${KERNEL_PKG_IMAGE}
>>> deb_dbg_dir=${deb_img_dir}-dbg
>>> deb_kern_hdr_dir=${deb_top_dir}/${KERNEL_PKG_KERN_HEADERS}
>>> deb_libc_hdr_dir=${deb_top_dir}/${KERNEL_PKG_LIBC_HEADERS}
>>> +deb_kern_kbuild_dir=${deb_top_dir}/${KERNEL_PKG_KERN_KBUILD}
>>>
>>> # Array of packages to be generated
>>> declare -A kern_pkgs
>>> diff --git a/meta/recipes-
>>> kernel/linux/files/debian/isar/install.tmpl b/meta/recipes-
>>> kernel/linux/files/debian/isar/install.tmpl
>>> index 8a604e4..236b67c 100644
>>> --- a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl
>>> +++ b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl
>>> @@ -33,6 +33,7 @@ do_install() {
>>> # Trace what we do here
>>> set -x
>>>
>>> + # Run the install steps
>>> install_image
>>> if [ "${ARCH}" != "um" ]; then
>>> install_config
>>> @@ -43,6 +44,10 @@ do_install() {
>>> install_kmods
>>> install_headers
>>>
>>> + # Cleanup and install kernel scripts and tools
>>> + rm -rf ${deb_kern_kbuild_dir}
>>> + install_kbuild ${deb_kern_kbuild_dir}
>>> +
>>> # Stop tracing
>>> set +x
>>> }
>>> @@ -168,21 +173,15 @@ kernel_headers() {
>>> mkdir -p ${destdir}
>>> mkdir -p ${deb_kern_hdr_dir}/lib/modules/${krel}
>>>
>>> - (cd ${S}; find . -name 'Makefile*' -o -name 'Kconfig*' -o -
>>> name '*.pl') >>${src_hdr_files}
>>> - (cd ${S}; find arch/*/include include scripts -type f -o -type
>>> l) >>${src_hdr_files}
>>> + (cd ${S}; find . -not -path './scripts/*' -a -not -path
>>> './tools/*' -a \( -name 'Makefile*' -o -name 'Kconfig*' -o -name
>>> '*.pl' \)) >>${src_hdr_files}
>>> + (cd ${S}; find arch/*/include include -type f -o -type l)
>>>>> ${src_hdr_files}
>>> (cd ${S}; find arch/${ARCH} -name module.lds -o -name
>>> Kbuild.platforms -o -name Platform) >>${src_hdr_files}
>>> (cd ${S}; find $(find arch/${ARCH} -name include -o -name
>>> scripts -type d) -type f) >>${src_hdr_files}
>>>
>>> if [ -n "${CONFIG_MODULES}" ]; then
>>> echo Module.symvers >> ${obj_hdr_files}
>>> fi
>>> - (cd ${O}; find arch/${ARCH}/include include scripts -type f)
>>>>> ${obj_hdr_files}
>>> - if [ -n "${CONFIG_STACK_VALIDATION}" -o -n
>>> "${CONFIG_HAVE_OBJTOOL}" ]; then
>>> - (cd ${O}; find tools/objtool -type f -executable)
>>>>> ${obj_hdr_files}
>>> - fi
>>> - if [ -n "${CONFIG_GCC_PLUGINS}" ]; then
>>> - (cd ${O}; find scripts/gcc-plugins -name *.so -o -name
>>> gcc-common.h) >>${obj_hdr_files}
>>> - fi
>>> + (cd ${O}; find arch/${ARCH}/include include -type f)
>>>>> ${obj_hdr_files}
>>>
>>> # deploy files that were matched above
>>> tar -C ${S} -cf - -T - <${src_hdr_files} | tar -C ${destdir} -
>>> xf -
>>> @@ -191,8 +190,11 @@ kernel_headers() {
>>> # add the kernel config
>>> cp ${O}/${KCONF} ${destdir}/.config
>>>
>>> - # handle kernel development tools
>>> - kernel_tools
>>> + # add symlink to scripts and tools directories
>>> + ln -sf ../../lib/linux-kbuild-${krel}/scripts
>>> ${destdir}/scripts
>>> + if [ -n "${CONFIG_STACK_VALIDATION}" -o -n
>>> "${CONFIG_HAVE_OBJTOOL}" ]; then
>>> + ln -sf ../../lib/linux-kbuild-${krel}/tools
>>> ${destdir}/tools
>>
>> Is Debian using relative links for this as well? Or rather absolute
>> ones. We use a absolute one below.
>
> Debian itself uses relative ones...
>
> ls -l /usr/src/linux-headers-6.0.0-0.deb11.6-amd64/
> total 1660
> drwxr-xr-x 3 root root 4096 Mar 2 11:14 arch
> drwxr-xr-x 4 root root 4096 Mar 2 11:14 include
> -rw-r--r-- 1 root root 63 Dec 19 15:14 Makefile
> -rw-r--r-- 1 root root 1684046 Dec 19 15:14 Module.symvers
> lrwxrwxrwx 1 root root 34 Dec 19 15:14 scripts -> ../../lib/linux-
> kbuild-6.0/scripts
> lrwxrwxrwx 1 root root 32 Dec 19 15:14 tools -> ../../lib/linux-
> kbuild-6.0/tools
>
Perfect, then we are good with the patch as-is.
Jan
>>
>>> + fi
>>>
>>> # create symlinks
>>> ln -sf /${kernel_headers_dir}
>>> ${deb_kern_hdr_dir}/lib/modules/${krel}/build
>>> @@ -206,4 +208,31 @@ install_headers() {
>>> kernel_headers
>>> }
>>>
>>> +install_kbuild() {
>>> + kernel_kbuild_dir=usr/lib/linux-kbuild-${krel}
>>> + destdir=${1}/${kernel_kbuild_dir}
>>> + src_kbuild_files=$(mktemp)
>>> + obj_kbuild_files=$(mktemp)
>>> +
>>> + mkdir -p ${destdir}
>>> +
>>> + (cd ${S}; find . -path './scripts/*' -a -path './tools/*' -a
>>> \( -name 'Makefile*' -o -name 'Kconfig*' -o -name '*.pl' \))
>>>>> ${src_kbuild_files}
>>> + (cd ${S}; find scripts -type f -o -type l)
>>>>> ${src_kbuild_files}
>>> +
>>> + (cd ${O}; find scripts -type f) >>${obj_kbuild_files}
>>> + if [ -n "${CONFIG_STACK_VALIDATION}" -o -n
>>> "${CONFIG_HAVE_OBJTOOL}" ]; then
>>> + (cd ${O}; find tools/objtool -type f -executable)
>>>>> ${obj_kbuild_files}
>>> + fi
>>> + if [ -n "${CONFIG_GCC_PLUGINS}" ]; then
>>> + (cd ${O}; find scripts/gcc-plugins -name *.so -o -name
>>> gcc-common.h) >>${obj_kbuild_files}
>>> + fi
>>> +
>>> + # deploy files that were matched above
>>> + tar -C ${S} -cf - -T - <${src_kbuild_files} | tar -C
>>> ${destdir} -xf -
>>> + tar -C ${O} -cf - -T - <${obj_kbuild_files} | tar -C
>>> ${destdir} -xf -
>>> +
>>> + # handle kernel development tools
>>> + kernel_tools
>>> +}
>>> +
>>> main install ${*}
>>> diff --git a/meta/recipes-kernel/linux/linux-custom.inc
>>> b/meta/recipes-kernel/linux/linux-custom.inc
>>> index 96f0afc..dbda755 100644
>>> --- a/meta/recipes-kernel/linux/linux-custom.inc
>>> +++ b/meta/recipes-kernel/linux/linux-custom.inc
>>> @@ -96,6 +96,10 @@ python() {
>>> kernel_name = d.getVar("KERNEL_NAME_PROVIDED", True)
>>> d.setVar('PROVIDES', 'linux-image-' + kernel_name + ' ' + \
>>> 'linux-headers-' + kernel_name)
>>> + headers_depends = "linux-kbuild-" + kernel_name
>>> +
>>> + # Set dependency for kernel headers
>>> + d.appendVar("KERNEL_HEADERS_DEBIAN_DEPENDS", headers_depends)
>>> }
>>>
>>> def get_kernel_arch(d):
>>
>> Except for the one question above, this commit looks good to me. But
>> maybe Cedric has some comments as well, given that he once wrote
>> significant parts of this.
>>
>> Jan
>>
>
--
Siemens AG, Technology
Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v2 5/5] docs: Update custom_kernel docs for split up of kernel scripts and tools
2022-12-20 17:09 [PATCH v2 0/5] linux-custom: Split up binaries from kernel headers to kbuild packages Koch, Stefan
` (2 preceding siblings ...)
2022-12-20 17:09 ` [PATCH v2 1/5] linux-custom: Split up binaries from kernel headers to kbuild package Koch, Stefan
@ 2022-12-20 17:09 ` Koch, Stefan
2022-12-20 17:09 ` [PATCH v2 4/5] linux-custom: Provide host and target specific kernel kbuild packages Koch, Stefan
2023-03-17 7:41 ` [PATCH v2 0/5] linux-custom: Split up binaries from kernel headers to " Uladzimir Bely
5 siblings, 0 replies; 13+ messages in thread
From: Koch, Stefan @ 2022-12-20 17:09 UTC (permalink / raw)
To: isar-users
Cc: Kiszka, Jan, ubely, Storm, Christian, Adler, Michael, Sudler,
Simon, Koch, Stefan
Signed-off-by: Stefan Koch <stefan-koch@siemens.com>
---
doc/custom_kernel.md | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git a/doc/custom_kernel.md b/doc/custom_kernel.md
index ffeaddc..1328c70 100644
--- a/doc/custom_kernel.md
+++ b/doc/custom_kernel.md
@@ -38,12 +38,18 @@ The linux-custom recipe provides support for:
7. Allow the name of the kernel image to be changed via `KERNEL_FILE` (defaults
to `vmlinuz`)
- 8. Produce a `linux-headers` package which includes kernel headers and kbuild
- scripts/tools
-
- 9. The `linux-headers` package shall support native and cross compiles of
- out-of-tree kernel modules. However, when built in cross-compilation mode,
- it cannot be used on the target so far.
+ 8. Produce a `linux-headers` package which includes kernel headers
+
+ 9. Produce a `linux-kbuild` package for both host and/or target
+ which includes kbuild scripts and tools.
+ Appending `ISAR_BUILDS` with `"target"` will enable the
+ build of a target specific kbuild package at cross builds.
+ Then the `linux-headers` package supports native and cross compiles of
+ out-of-tree kernel modules. Even, when built in cross-compilation mode,
+ it can be used on the target using the `linux-kbuild` package.
+ Appending `ISAR_BUILDS` with `"host"` will enable the
+ build of a host specific kbuild package at cross builds.
+ In this case no kbuild-cross package will be generated.
10. Produce a `linux-libc-dev` package to support user-land builds
@@ -71,8 +77,6 @@ In the future, the recipe may be extended to:
3. Be compatible with Ubuntu
- 4. When cross-building, generate kernel-headers for both host and target
-
## Examples
The linux-custom recipe is currently used by the linux-mainline package and is
--
2.30.2
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v2 4/5] linux-custom: Provide host and target specific kernel kbuild packages
2022-12-20 17:09 [PATCH v2 0/5] linux-custom: Split up binaries from kernel headers to kbuild packages Koch, Stefan
` (3 preceding siblings ...)
2022-12-20 17:09 ` [PATCH v2 5/5] docs: Update custom_kernel docs for split up of kernel scripts and tools Koch, Stefan
@ 2022-12-20 17:09 ` Koch, Stefan
2023-03-17 7:41 ` [PATCH v2 0/5] linux-custom: Split up binaries from kernel headers to " Uladzimir Bely
5 siblings, 0 replies; 13+ messages in thread
From: Koch, Stefan @ 2022-12-20 17:09 UTC (permalink / raw)
To: isar-users
Cc: Kiszka, Jan, ubely, Storm, Christian, Adler, Michael, Sudler,
Simon, Koch, Stefan
When using a cross build this patch does introduce optionally
host and target specific kernel kbuild packages that
ship the "scripts" and "tools" binaries.
Appending ISAR_BUILDS with "target" will enable the
build of a target specific kbuild package at cross builds.
Appending ISAR_BUILDS with "host" will enable the
build of a host specific kbuild package at cross builds.
In this case no kbuild-cross package will be generated.
This solves this from doc/custom_kernel.inc:
- The kernel headers package has not supported both native
and cross compilation of kernel modules when itself was cross built
- Future roadmap: Generate kernel headers package for both host
and target when using a cross build
Signed-off-by: Stefan Koch <stefan-koch@siemens.com>
---
.../linux/files/debian/control.tmpl | 16 ++++++-
.../linux/files/debian/isar/build.tmpl | 13 ++++-
.../linux/files/debian/isar/common.tmpl | 12 ++++-
.../linux/files/debian/isar/configure.tmpl | 13 +++--
.../linux/files/debian/isar/install.tmpl | 26 ++++++----
.../linux/files/debian/rules.tmpl | 2 +-
meta/recipes-kernel/linux/linux-custom.inc | 47 +++++++++++++++----
7 files changed, 102 insertions(+), 27 deletions(-)
diff --git a/meta/recipes-kernel/linux/files/debian/control.tmpl b/meta/recipes-kernel/linux/files/debian/control.tmpl
index b19ca2c..c012048 100644
--- a/meta/recipes-kernel/linux/files/debian/control.tmpl
+++ b/meta/recipes-kernel/linux/files/debian/control.tmpl
@@ -6,6 +6,7 @@ Build-Depends: bc, kmod, cpio, ${KBUILD_DEPENDS}
Homepage: http://www.kernel.org/
Package: linux-image-${KERNEL_NAME_PROVIDED}
+Build-Profiles: <!targetbuild !hostbuild>
Architecture: any
Depends: ${KERNEL_DEBIAN_DEPENDS}
Description: ${KERNEL_NAME_PROVIDED} Linux kernel, version @KR@
@@ -13,6 +14,7 @@ Description: ${KERNEL_NAME_PROVIDED} Linux kernel, version @KR@
files, version: @KR@.
Package: linux-headers-${KERNEL_NAME_PROVIDED}
+Build-Profiles: <!targetbuild !hostbuild>
Architecture: any
Depends: ${KERNEL_HEADERS_DEBIAN_DEPENDS}, ${perl:Depends}, ${shlib:Depends}
Description: ${KERNEL_NAME_PROVIDED} Linux kernel headers for @KR@
@@ -21,7 +23,7 @@ Description: ${KERNEL_NAME_PROVIDED} Linux kernel headers for @KR@
This is useful for people who need to build external modules
Package: linux-libc-dev
-Build-Profiles: <!nolibcdev>
+Build-Profiles: <!nolibcdev !targetbuild !hostbuild>
Section: devel
Provides: linux-kernel-headers
Architecture: any
@@ -30,6 +32,7 @@ Description: Linux support headers for userspace development
are used by the installed headers for GNU glibc and other system libraries.
Package: linux-image-${KERNEL_NAME_PROVIDED}-dbg
+Build-Profiles: <!targetbuild !hostbuild>
Section: debug
Architecture: any
Description: Linux kernel debugging symbols for @KR@
@@ -37,8 +40,19 @@ Description: Linux kernel debugging symbols for @KR@
all the necessary debug symbols for the kernel and its modules.
Package: linux-kbuild-${KERNEL_NAME_PROVIDED}
+Build-Profiles: <targetbuild> <hostbuild> <defaultkbuild>
Architecture: any
Depends: ${perl:Depends}, ${shlib:Depends}
Description: ${KERNEL_NAME_PROVIDED} Linux kbuild scripts and tools for @KR@
This package provides kernel kbuild scripts and tools for @KR@
This is useful for people who need to build external modules
+
+Package: linux-kbuild-${KERNEL_NAME_PROVIDED}-cross
+Build-Profiles: <!targetbuild !hostbuild crosskbuild>
+Architecture: any
+Depends: ${KERNEL_HEADERS_DEBIAN_DEPENDS}, ${perl:Depends}, ${shlib:Depends}
+Description: ${KERNEL_NAME_PROVIDED} Linux kbuild scripts and tools for @KR@
+ This package provides kernel kbuild scripts and tools
+ as ${HOST_ARCH} cross binaries for @KR@
+ This is useful for those who need to cross build
+ external modules using ISAR's sbuild-chroot-host
diff --git a/meta/recipes-kernel/linux/files/debian/isar/build.tmpl b/meta/recipes-kernel/linux/files/debian/isar/build.tmpl
index 94cfbe0..7e095ca 100644
--- a/meta/recipes-kernel/linux/files/debian/isar/build.tmpl
+++ b/meta/recipes-kernel/linux/files/debian/isar/build.tmpl
@@ -22,7 +22,18 @@ do_build() {
sed -i "s/@KR@/${KR}/g" ${S}/debian/control ${S}/debian/linux-image-${KERNEL_NAME_PROVIDED}.*
# Build the Linux kernel
- ${MAKE} O=${KERNEL_BUILD_DIR} ${PARALLEL_MAKE} KCFLAGS="${KCFLAGS}"
+ if echo "${DEB_BUILD_PROFILES}" | grep -q -e "targetbuild" -e "hostbuild"; then # Build kernel scripts and tools
+ cat ${KERNEL_BUILD_DIR}/.config | grep RECORDM
+ ${MAKE} O=${KERNEL_BUILD_DIR} ${PARALLEL_MAKE} KCFLAGS="${KCFLAGS}" scripts
+ if [ -d "tools/objtool" ]; then
+ ${MAKE} O=${KERNEL_BUILD_DIR} ${PARALLEL_MAKE} KCFLAGS="${KCFLAGS}" tools/objtool
+ fi
+ if grep -q "CONFIG_MODULES=y" ${KERNEL_BUILD_DIR}/.config; then
+ ${MAKE} O=${KERNEL_BUILD_DIR} ${PARALLEL_MAKE} KCFLAGS="${KCFLAGS}" modules_prepare
+ fi
+ else # Build the Linux kernel
+ ${MAKE} O=${KERNEL_BUILD_DIR} ${PARALLEL_MAKE} KCFLAGS="${KCFLAGS}"
+ fi
# Stop tracing
set +x
diff --git a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl
index f4c0519..65fa1fa 100644
--- a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl
+++ b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl
@@ -5,12 +5,22 @@
set -e
# Isar settings
-ARCH=${KERNEL_ARCH}
KERNEL_PKG_IMAGE=linux-image-${KERNEL_NAME_PROVIDED}
KERNEL_PKG_KERN_HEADERS=linux-headers-${KERNEL_NAME_PROVIDED}
KERNEL_PKG_LIBC_HEADERS=linux-libc-dev
KERNEL_PKG_KERN_KBUILD=linux-kbuild-${KERNEL_NAME_PROVIDED}
+if echo "${DEB_BUILD_PROFILES}" | grep -q "hostbuild"; then
+ # Force creating kernel kbuild debian package with valid host arch
+ # Use a cross build to comply with arch specific kernel defconfigs
+ # scripts and tools are always created in host arch
+ ARCH=${KERNEL_ARCH}
+ eval $(dpkg-architecture -f -A ${DISTRO_ARCH})
+ CROSS_COMPILE=${DEB_TARGET_GNU_TYPE}-
+else
+ ARCH=${KERNEL_ARCH}
+fi
+
# Constants
KCONF=.config
diff --git a/meta/recipes-kernel/linux/files/debian/isar/configure.tmpl b/meta/recipes-kernel/linux/files/debian/isar/configure.tmpl
index 389c9a8..900d5cd 100644
--- a/meta/recipes-kernel/linux/files/debian/isar/configure.tmpl
+++ b/meta/recipes-kernel/linux/files/debian/isar/configure.tmpl
@@ -11,9 +11,16 @@ do_configure() {
set -x
# Process kernel config target and fragments
- ${MAKE} O=${KERNEL_BUILD_DIR} ${KERNEL_CONFIG_TARGET}
- ./scripts/kconfig/merge_config.sh -O ${KERNEL_BUILD_DIR}/ \
- ${KERNEL_BUILD_DIR}/.config ${KERNEL_CONFIG_FRAGMENTS}
+ if [ -e ${PP}/kernelconfig ]; then
+ mkdir -p ${KERNEL_BUILD_DIR}
+ cp ${PP}/kernelconfig ${KERNEL_BUILD_DIR}/.config
+ ${MAKE} O=${KERNEL_BUILD_DIR} olddefconfig
+ else
+ ${MAKE} O=${KERNEL_BUILD_DIR} ${KERNEL_CONFIG_TARGET}
+ ./scripts/kconfig/merge_config.sh -O ${KERNEL_BUILD_DIR}/ \
+ ${KERNEL_BUILD_DIR}/.config ${KERNEL_CONFIG_FRAGMENTS}
+ cp ${KERNEL_BUILD_DIR}/.config ${PP}/kernelconfig
+ fi
# Stop tracing
set +x
diff --git a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl
index 236b67c..08b8a9a 100644
--- a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl
+++ b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl
@@ -34,18 +34,24 @@ do_install() {
set -x
# Run the install steps
- install_image
- if [ "${ARCH}" != "um" ]; then
- install_config
- install_map
+ if ! echo "${DEB_BUILD_PROFILES}" | grep -q -e "targetbuild" -e "hostbuild"; then
+ install_image
+ if [ "${ARCH}" != "um" ]; then
+ install_config
+ install_map
+ fi
+ install_hooks
+ install_dtbs
+ install_kmods
+ install_headers
fi
- install_hooks
- install_dtbs
- install_kmods
- install_headers
- # Cleanup and install kernel scripts and tools
- rm -rf ${deb_kern_kbuild_dir}
+ if ! echo "${DEB_BUILD_PROFILES}" | grep -q -e "targetbuild" -e "hostbuild" && echo "${DEB_BUILD_PROFILES}" | grep -q "crosskbuild"; then
+ # Install cross kernel scripts and tools
+ install_kbuild ${deb_kern_kbuild_dir}-cross
+ fi
+
+ # Install kernel scripts and tools
install_kbuild ${deb_kern_kbuild_dir}
# Stop tracing
diff --git a/meta/recipes-kernel/linux/files/debian/rules.tmpl b/meta/recipes-kernel/linux/files/debian/rules.tmpl
index 8063c49..d176528 100755
--- a/meta/recipes-kernel/linux/files/debian/rules.tmpl
+++ b/meta/recipes-kernel/linux/files/debian/rules.tmpl
@@ -36,4 +36,4 @@ override_dh_auto_test:
true
override_dh_strip:
- unset DEB_HOST_GNU_TYPE && dh_strip -Xvmlinu --no-automatic-dbgsym
+ dh_strip -Xvmlinu -Xlinux-kbuild-${KERNEL_NAME_PROVIDED}-cross --no-automatic-dbgsym
diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc
index dbda755..db2d7a3 100644
--- a/meta/recipes-kernel/linux/linux-custom.inc
+++ b/meta/recipes-kernel/linux/linux-custom.inc
@@ -80,6 +80,7 @@ TEMPLATE_VARS += " \
KERNEL_NAME_PROVIDED \
KERNEL_CONFIG_FRAGMENTS \
KCFLAGS \
+ PP \
"
inherit dpkg
@@ -91,28 +92,54 @@ KCFLAGS ?= "-fdebug-prefix-map=${CURDIR}=."
# Derive name of the kernel packages from the name of this recipe
KERNEL_NAME_PROVIDED ?= "${@ d.getVar('PN', True).partition('linux-')[2]}"
-# Make bitbake know we will be producing linux-image and linux-headers packages
python() {
kernel_name = d.getVar("KERNEL_NAME_PROVIDED", True)
- d.setVar('PROVIDES', 'linux-image-' + kernel_name + ' ' + \
- 'linux-headers-' + kernel_name)
+ distro_arch = d.getVar("DISTRO_ARCH", True)
+ host_arch = d.getVar("HOST_ARCH", True)
headers_depends = "linux-kbuild-" + kernel_name
+ # By appending ISAR_BUILDS with "target" and/or "host" it's possible
+ # to run additional target or host builds.
+ # There are no "target" and "host" builds enabled by default.
+ # When both build modes are enabled then for a cross build a kbuild package
+ # for the target and a kbuild package for the host will be created.
+ # When "host" build is not enabled instead of the kbuild
+ # a kbuild-cross package for the host is generated.
+ if not "host" in d.getVar("ISAR_BUILDS", True) and d.getVar("ISAR_CROSS_COMPILE", True) == "1" and d.getVar("HOST_ARCH", True) != d.getVar("DISTRO_ARCH", True):
+ d.appendVar('DEB_BUILD_PROFILES', ' crosskbuild')
+
+ # For different distro and host archs
+ # - Add dependency for sbuild-chroot-target
+ # to allow building arch specific kbuild scripts and tools
+ # - Set correct kbuild package dependency
+ if distro_arch != host_arch and d.getVar("ISAR_CROSS_COMPILE", True) == "1":
+ d.appendVar("SCHROOT_DEP", " sbuild-chroot-target:do_build")
+ headers_depends = headers_depends + "-cross | " + headers_depends
+ build_depends = "crossbuild-essential-" + distro_arch + " [" + host_arch + "], "
+ d.prependVar("KBUILD_DEPENDS", build_depends)
+ else:
+ d.appendVar("DEB_BUILD_PROFILES", " defaultkbuild")
+
+ # Make bitbake know we will be producing
+ # linux-image and linux-headers packages
+ d.setVar("PROVIDES", "linux-image-" + kernel_name + " " + \
+ "linux-headers-" + kernel_name)
+
# Set dependency for kernel headers
d.appendVar("KERNEL_HEADERS_DEBIAN_DEPENDS", headers_depends)
}
-def get_kernel_arch(d):
- distro_arch = d.getVar("DISTRO_ARCH")
- if distro_arch in ["amd64", "i386"]:
+def get_kernel_arch(d, arch="DISTRO_ARCH"):
+ arch = d.getVar(arch)
+ if arch in ["amd64", "i386"]:
kernel_arch = "x86"
- elif distro_arch == "arm64":
+ elif arch == "arm64":
kernel_arch = "arm64"
- elif distro_arch == "armhf":
+ elif arch == "armhf":
kernel_arch = "arm"
- elif distro_arch == "mipsel":
+ elif arch == "mipsel":
kernel_arch = "mips"
- elif distro_arch == "riscv64":
+ elif arch == "riscv64":
kernel_arch = "riscv"
else:
kernel_arch = ""
--
2.30.2
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 0/5] linux-custom: Split up binaries from kernel headers to kbuild packages
2022-12-20 17:09 [PATCH v2 0/5] linux-custom: Split up binaries from kernel headers to kbuild packages Koch, Stefan
` (4 preceding siblings ...)
2022-12-20 17:09 ` [PATCH v2 4/5] linux-custom: Provide host and target specific kernel kbuild packages Koch, Stefan
@ 2023-03-17 7:41 ` Uladzimir Bely
2023-03-17 8:06 ` Jan Kiszka
5 siblings, 1 reply; 13+ messages in thread
From: Uladzimir Bely @ 2023-03-17 7:41 UTC (permalink / raw)
To: isar-users, Koch, Stefan
Cc: Kiszka, Jan, Storm, Christian, Adler, Michael, Sudler, Simon,
Koch, Stefan
In mail from Tuesday, 20 December 2022 20:09:27 +03 user Koch, Stefan wrote:
> Hi
>
> This updated v2 patchset implement suggestions from reviewed v1 patchset.
> It's now a set of five patches:
> - linux-custom: Split up binaries from kernel headers to kbuild package
> - sbuild: Support overwriting configured schroot dir
> - dpkg: Add support for additional target and host builds
> - linux-custom: Provide host and target specific kernel kbuild packages
> - docs: Update custom_kernel docs for split up of kernel scripts and tools
>
> The main use-case was to swap out the binaries
> from the kernel headers into kernel kbuild package.
> This is introduced by the first commit
> "Split up binaries from kernel headers to kbuild package"
>
> The fourth commit "Provide host and target specific kernel kbuild packages"
> introduces that the binaries could be swapped out into host and target
> specific kernel kbuild packages.
>
> The main development goals were these:
>
> 1. Solve already known isar custom kernel
> limitations from doc/custom_kernel.inc
> - kernel headers package does not support both native
> and cross compilation of kernel modules when cross built
>
> 2. Honor recommendations for future from doc/custom_kernel.inc
> - Generate kernel headers packages for both host and target
> when using cross build
>
> 3. Add extensions known from debian kernel packages structure
> - Generate a kernel headers package without binaries
> - Create specific kernel kbuild packages that
> will ship the "scripts" and "tools" binaries
> - Use symlinks to point to the "scripts" and "tools" binaries
>
> 4. Be user friendly
> - Avoid usage of separate kbuild bitbake recipe that may enforce
> redundant configuration of kernel source definitions with user
> actions to enable kbuild package generation
> - Use already known way to include linux-custom.inc in just one
> own bitbake recipe that provides the kernel source definitions
> - Keep known user behavior for existing build configurations: just update
> isar, append "target" (and "host") to ISAR_BUILDS and kbuild packages for
> target and host will be created automatically
>
> Best regards
>
> Stefan
>
> Stefan Koch (5):
> linux-custom: Split up binaries from kernel headers to kbuild package
> sbuild: Support overwriting configured schroot dir
> dpkg: Add support for additional target and host builds
> linux-custom: Provide host and target specific kernel kbuild packages
> docs: Update custom_kernel docs for split up of kernel scripts and
> tools
>
> doc/custom_kernel.md | 20 +++--
> meta/classes/dpkg-base.bbclass | 51 +++++++++++--
> meta/classes/dpkg.bbclass | 2 +-
> meta/classes/sbuild.bbclass | 9 ++-
> .../linux/files/debian/control.tmpl | 25 ++++++-
> .../linux/files/debian/isar/build.tmpl | 13 +++-
> .../linux/files/debian/isar/common.tmpl | 14 +++-
> .../linux/files/debian/isar/configure.tmpl | 13 +++-
> .../linux/files/debian/isar/install.tmpl | 73 ++++++++++++++-----
> .../linux/files/debian/rules.tmpl | 2 +-
> meta/recipes-kernel/linux/linux-custom.inc | 51 ++++++++++---
> 11 files changed, 219 insertions(+), 54 deletions(-)
I've recently went on testing the patchset in CI.
- For now, on updated 'next' it at least requires some trivial changes fixups
caused by merged "getVar(var, True) => getVar(var)" reduction. I could prepare
v3 on my own or wait for new version on maillist.
- Also, we now have multiarch support patchset merged to `next` (and that is
the main reason of long non-merging this kbuild patchset). So, even if the
patch in its current state works, it probably could reuse new approach (e.g.
<package>-compat or <package>-native).
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 0/5] linux-custom: Split up binaries from kernel headers to kbuild packages
2023-03-17 7:41 ` [PATCH v2 0/5] linux-custom: Split up binaries from kernel headers to " Uladzimir Bely
@ 2023-03-17 8:06 ` Jan Kiszka
2023-08-16 11:29 ` Koch, Stefan
0 siblings, 1 reply; 13+ messages in thread
From: Jan Kiszka @ 2023-03-17 8:06 UTC (permalink / raw)
To: Uladzimir Bely, isar-users, Koch, Stefan
Cc: Storm, Christian, Adler, Michael, Sudler, Simon
On 17.03.23 08:41, Uladzimir Bely wrote:
> In mail from Tuesday, 20 December 2022 20:09:27 +03 user Koch, Stefan wrote:
>> Hi
>>
>> This updated v2 patchset implement suggestions from reviewed v1 patchset.
>> It's now a set of five patches:
>> - linux-custom: Split up binaries from kernel headers to kbuild package
>> - sbuild: Support overwriting configured schroot dir
>> - dpkg: Add support for additional target and host builds
>> - linux-custom: Provide host and target specific kernel kbuild packages
>> - docs: Update custom_kernel docs for split up of kernel scripts and tools
>>
>> The main use-case was to swap out the binaries
>> from the kernel headers into kernel kbuild package.
>> This is introduced by the first commit
>> "Split up binaries from kernel headers to kbuild package"
>>
>> The fourth commit "Provide host and target specific kernel kbuild packages"
>> introduces that the binaries could be swapped out into host and target
>> specific kernel kbuild packages.
>>
>> The main development goals were these:
>>
>> 1. Solve already known isar custom kernel
>> limitations from doc/custom_kernel.inc
>> - kernel headers package does not support both native
>> and cross compilation of kernel modules when cross built
>>
>> 2. Honor recommendations for future from doc/custom_kernel.inc
>> - Generate kernel headers packages for both host and target
>> when using cross build
>>
>> 3. Add extensions known from debian kernel packages structure
>> - Generate a kernel headers package without binaries
>> - Create specific kernel kbuild packages that
>> will ship the "scripts" and "tools" binaries
>> - Use symlinks to point to the "scripts" and "tools" binaries
>>
>> 4. Be user friendly
>> - Avoid usage of separate kbuild bitbake recipe that may enforce
>> redundant configuration of kernel source definitions with user
>> actions to enable kbuild package generation
>> - Use already known way to include linux-custom.inc in just one
>> own bitbake recipe that provides the kernel source definitions
>> - Keep known user behavior for existing build configurations: just update
>> isar, append "target" (and "host") to ISAR_BUILDS and kbuild packages for
>> target and host will be created automatically
>>
>> Best regards
>>
>> Stefan
>>
>> Stefan Koch (5):
>> linux-custom: Split up binaries from kernel headers to kbuild package
>> sbuild: Support overwriting configured schroot dir
>> dpkg: Add support for additional target and host builds
>> linux-custom: Provide host and target specific kernel kbuild packages
>> docs: Update custom_kernel docs for split up of kernel scripts and
>> tools
>>
>> doc/custom_kernel.md | 20 +++--
>> meta/classes/dpkg-base.bbclass | 51 +++++++++++--
>> meta/classes/dpkg.bbclass | 2 +-
>> meta/classes/sbuild.bbclass | 9 ++-
>> .../linux/files/debian/control.tmpl | 25 ++++++-
>> .../linux/files/debian/isar/build.tmpl | 13 +++-
>> .../linux/files/debian/isar/common.tmpl | 14 +++-
>> .../linux/files/debian/isar/configure.tmpl | 13 +++-
>> .../linux/files/debian/isar/install.tmpl | 73 ++++++++++++++-----
>> .../linux/files/debian/rules.tmpl | 2 +-
>> meta/recipes-kernel/linux/linux-custom.inc | 51 ++++++++++---
>> 11 files changed, 219 insertions(+), 54 deletions(-)
>
> I've recently went on testing the patchset in CI.
>
> - For now, on updated 'next' it at least requires some trivial changes fixups
> caused by merged "getVar(var, True) => getVar(var)" reduction. I could prepare
> v3 on my own or wait for new version on maillist.
>
> - Also, we now have multiarch support patchset merged to `next` (and that is
> the main reason of long non-merging this kbuild patchset). So, even if the
> patch in its current state works, it probably could reuse new approach (e.g.
> <package>-compat or <package>-native).
>
Yes, patch 1 seems likely to stay (looked good when scanned it back
then, but I can have a closer look now), the rest needs to be reworked
according to what I outlined back then. So, don't merge this series.
Jan
--
Siemens AG, Technology
Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 0/5] linux-custom: Split up binaries from kernel headers to kbuild packages
2023-03-17 8:06 ` Jan Kiszka
@ 2023-08-16 11:29 ` Koch, Stefan
0 siblings, 0 replies; 13+ messages in thread
From: Koch, Stefan @ 2023-08-16 11:29 UTC (permalink / raw)
To: ubely, isar-users, Kiszka, Jan, cedric.hombourger, Schmidt, Adriaan
Cc: Sudler, Simon, Storm, Christian, Adler, Michael
On Fri, 2023-03-17 at 09:06 +0100, Jan Kiszka wrote:
> On 17.03.23 08:41, Uladzimir Bely wrote:
> > In mail from Tuesday, 20 December 2022 20:09:27 +03 user Koch,
> > Stefan wrote:
> > > Hi
> > >
> > > This updated v2 patchset implement suggestions from reviewed v1
> > > patchset.
> > > It's now a set of five patches:
> > > - linux-custom: Split up binaries from kernel headers to kbuild
> > > package
> > > - sbuild: Support overwriting configured schroot dir
> > > - dpkg: Add support for additional target and host builds
> > > - linux-custom: Provide host and target specific kernel kbuild
> > > packages
> > > - docs: Update custom_kernel docs for split up of kernel scripts
> > > and tools
> > >
> > > The main use-case was to swap out the binaries
> > > from the kernel headers into kernel kbuild package.
> > > This is introduced by the first commit
> > > "Split up binaries from kernel headers to kbuild package"
> > >
> > > The fourth commit "Provide host and target specific kernel kbuild
> > > packages"
> > > introduces that the binaries could be swapped out into host and
> > > target
> > > specific kernel kbuild packages.
> > >
> > > The main development goals were these:
> > >
> > > 1. Solve already known isar custom kernel
> > > limitations from doc/custom_kernel.inc
> > > - kernel headers package does not support both native
> > > and cross compilation of kernel modules when cross built
> > >
> > > 2. Honor recommendations for future from doc/custom_kernel.inc
> > > - Generate kernel headers packages for both host and target
> > > when using cross build
> > >
> > > 3. Add extensions known from debian kernel packages structure
> > > - Generate a kernel headers package without binaries
> > > - Create specific kernel kbuild packages that
> > > will ship the "scripts" and "tools" binaries
> > > - Use symlinks to point to the "scripts" and "tools" binaries
> > >
> > > 4. Be user friendly
> > > - Avoid usage of separate kbuild bitbake recipe that may enforce
> > > redundant configuration of kernel source definitions with user
> > > actions to enable kbuild package generation
> > > - Use already known way to include linux-custom.inc in just one
> > > own bitbake recipe that provides the kernel source definitions
> > > - Keep known user behavior for existing build configurations:
> > > just update
> > > isar, append "target" (and "host") to ISAR_BUILDS and kbuild
> > > packages for
> > > target and host will be created automatically
> > >
> > > Best regards
> > >
> > > Stefan
> > >
> > > Stefan Koch (5):
> > > linux-custom: Split up binaries from kernel headers to kbuild
> > > package
> > > sbuild: Support overwriting configured schroot dir
> > > dpkg: Add support for additional target and host builds
> > > linux-custom: Provide host and target specific kernel kbuild
> > > packages
> > > docs: Update custom_kernel docs for split up of kernel scripts
> > > and
> > > tools
> > >
> > > doc/custom_kernel.md | 20 +++--
> > > meta/classes/dpkg-base.bbclass | 51 +++++++++++--
> > > meta/classes/dpkg.bbclass | 2 +-
> > > meta/classes/sbuild.bbclass | 9 ++-
> > > .../linux/files/debian/control.tmpl | 25 ++++++-
> > > .../linux/files/debian/isar/build.tmpl | 13 +++-
> > > .../linux/files/debian/isar/common.tmpl | 14 +++-
> > > .../linux/files/debian/isar/configure.tmpl | 13 +++-
> > > .../linux/files/debian/isar/install.tmpl | 73
> > > ++++++++++++++-----
> > > .../linux/files/debian/rules.tmpl | 2 +-
> > > meta/recipes-kernel/linux/linux-custom.inc | 51 ++++++++++---
> > > 11 files changed, 219 insertions(+), 54 deletions(-)
> >
> > I've recently went on testing the patchset in CI.
> >
> > - For now, on updated 'next' it at least requires some trivial
> > changes fixups
> > caused by merged "getVar(var, True) => getVar(var)" reduction. I
> > could prepare
> > v3 on my own or wait for new version on maillist.
> >
> > - Also, we now have multiarch support patchset merged to `next`
> > (and that is
> > the main reason of long non-merging this kbuild patchset). So, even
> > if the
> > patch in its current state works, it probably could reuse new
> > approach (e.g.
> > <package>-compat or <package>-native).
> >
>
> Yes, patch 1 seems likely to stay (looked good when scanned it back
> then, but I can have a closer look now), the rest needs to be
> reworked
> according to what I outlined back then. So, don't merge this series.
I have reworked the patchset to use the new multiarch support using the
-compat and -native bitbake targets.
The patchset will follow...
>
> Jan
>
--
Stefan Koch
Siemens AG
www.siemens.com
^ permalink raw reply [flat|nested] 13+ messages in thread