* [PATCH 01/10] ci_build.sh: delay "set -x" for a clean --help output
2019-10-24 9:02 [PATCH 00/10] add ci40 machine support + new Isar features Cedric Hombourger
@ 2019-10-24 9:02 ` Cedric Hombourger
2019-10-24 9:02 ` [PATCH 02/10] linux-custom: honor KERNEL_FILE setting Cedric Hombourger
` (10 subsequent siblings)
11 siblings, 0 replies; 40+ messages in thread
From: Cedric Hombourger @ 2019-10-24 9:02 UTC (permalink / raw)
To: isar-users; +Cc: Cedric Hombourger
tracing (set -x) was enabled far too early and caused the output
of the --help to be barely readable. enable this after we have
parsed options.
Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
---
scripts/ci_build.sh | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/scripts/ci_build.sh b/scripts/ci_build.sh
index a8556a6..aefb1ee 100755
--- a/scripts/ci_build.sh
+++ b/scripts/ci_build.sh
@@ -4,7 +4,6 @@
# Alexander Smirnov <asmirnov@ilbers.de>
# Copyright (c) 2016-2018 ilbers GmbH
-set -x
set -e
ES_BUG=3
@@ -122,6 +121,9 @@ do
shift
done
+# the real stuff starts here, trace commands from now on
+set -x
+
# Setup build folder for the current build
if [ ! -d "$BUILD_DIR" ]; then
mkdir -p "$BUILD_DIR"
--
2.20.1
^ permalink raw reply [flat|nested] 40+ messages in thread
* [PATCH 02/10] linux-custom: honor KERNEL_FILE setting
2019-10-24 9:02 [PATCH 00/10] add ci40 machine support + new Isar features Cedric Hombourger
2019-10-24 9:02 ` [PATCH 01/10] ci_build.sh: delay "set -x" for a clean --help output Cedric Hombourger
@ 2019-10-24 9:02 ` Cedric Hombourger
2019-10-24 17:57 ` Henning Schild
2019-10-24 9:02 ` [PATCH 03/10] bitbake.conf: set name of the qemu-static binary to use for mipsel Cedric Hombourger
` (9 subsequent siblings)
11 siblings, 1 reply; 40+ messages in thread
From: Cedric Hombourger @ 2019-10-24 9:02 UTC (permalink / raw)
To: isar-users; +Cc: Cedric Hombourger
vmlinuz was hard-coded in the postinst script generated by the
build-kernel.sh script. This really needs to be ${KERNEL_FILE}
to support architectures where a vmlinux file is used instead
(mipsel in particular).
As we now have multiple recipes using KERNEL_FILE (image and
kernel recipes), its default setting (vmlinuz) was moved to
bitbake.conf
Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
---
meta/classes/image.bbclass | 1 -
meta/conf/bitbake.conf | 1 +
meta/recipes-kernel/linux/files/build-kernel.sh | 6 +++---
meta/recipes-kernel/linux/linux-custom.inc | 1 +
4 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 8384b71..7690bc5 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -16,7 +16,6 @@ IMAGE_INSTALL += "${@ ("linux-image-" + d.getVar("KERNEL_NAME", True)) if d.getV
IMAGE_FULLNAME = "${PN}-${DISTRO}-${MACHINE}"
# These variables are used by wic and start_vm
-KERNEL_FILE ?= "vmlinuz"
KERNEL_IMAGE ?= "${IMAGE_FULLNAME}-${KERNEL_FILE}"
INITRD_IMAGE ?= "${IMAGE_FULLNAME}-initrd.img"
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index bca1114..6377a94 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -56,6 +56,7 @@ BUILDCHROOT_HOST_DIR = "${DEPLOY_DIR_BUILDCHROOT}-host/${HOST_DISTRO}-${HOST_ARC
BUILDCHROOT_TARGET_DIR = "${DEPLOY_DIR_BUILDCHROOT}-target/${DISTRO}-${DISTRO_ARCH}"
SDKCHROOT_DIR = "${DEPLOY_DIR_SDKCHROOT}/${DISTRO}-${DISTRO_ARCH}"
CACHE = "${TMPDIR}/cache"
+KERNEL_FILE ?= "vmlinuz"
OVERRIDES = "${DISTRO_ARCH}:${MACHINE}:${DISTRO}:forcevariable"
diff --git a/meta/recipes-kernel/linux/files/build-kernel.sh b/meta/recipes-kernel/linux/files/build-kernel.sh
index 7b651af..dcb46f7 100644
--- a/meta/recipes-kernel/linux/files/build-kernel.sh
+++ b/meta/recipes-kernel/linux/files/build-kernel.sh
@@ -90,7 +90,7 @@ if [ -f /lib/modules/${PV}/.fresh-install ]; then\\
else\\
change=upgrade\\
fi\\
-linux-update-symlinks \$change ${PV} /boot/vmlinuz-${PV}\\
+linux-update-symlinks \$change ${PV} /boot/${KERNEL_FILE}-${PV}\\
rm -f /lib/modules/${PV}/.fresh-install"
# Add Debian-like link removal to postrm
@@ -100,12 +100,12 @@ sed -i "${REPACK_LINUX_IMAGE_DIR}/DEBIAN/postrm" \
rm -f /lib/modules/${PV}/.fresh-install\\
\\
if [ \"\$1\" != upgrade ] && command -v linux-update-symlinks >/dev/null; then\\
- linux-update-symlinks remove ${PV} /boot/vmlinuz-${PV}\\
+ linux-update-symlinks remove ${PV} /boot/${KERNEL_FILE}-${PV}\\
fi"
# Make sure arm64 kernels are decompressed
if [ "$target_arch" = "arm64" ]; then
- vmlinuz="${REPACK_LINUX_IMAGE_DIR}/boot/vmlinuz-${PV}"
+ vmlinuz="${REPACK_LINUX_IMAGE_DIR}/boot/${KERNEL_FILE}-${PV}"
mv "$vmlinuz" "$vmlinuz.gz"
gunzip "$vmlinuz.gz"
fi
diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc
index 5a4f5bf..5a34dd1 100644
--- a/meta/recipes-kernel/linux/linux-custom.inc
+++ b/meta/recipes-kernel/linux/linux-custom.inc
@@ -72,6 +72,7 @@ dpkg_runbuild() {
export KBUILD_DEPENDS="${KBUILD_DEPENDS}"
export KERNEL_DEBIAN_DEPENDS="${KERNEL_DEBIAN_DEPENDS}"
+ export KERNEL_FILE="${KERNEL_FILE}"
export KERNEL_HEADERS_DEBIAN_DEPENDS="${KERNEL_HEADERS_DEBIAN_DEPENDS}"
sudo -E chroot --userspec=$( id -u ):$( id -g ) ${BUILDCHROOT_DIR} ${PP}/build-kernel.sh ${PP}/${PPS} ${DISTRO_ARCH}
--
2.20.1
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH 02/10] linux-custom: honor KERNEL_FILE setting
2019-10-24 9:02 ` [PATCH 02/10] linux-custom: honor KERNEL_FILE setting Cedric Hombourger
@ 2019-10-24 17:57 ` Henning Schild
0 siblings, 0 replies; 40+ messages in thread
From: Henning Schild @ 2019-10-24 17:57 UTC (permalink / raw)
To: Cedric Hombourger; +Cc: isar-users
Am Thu, 24 Oct 2019 11:02:16 +0200
schrieb Cedric Hombourger <Cedric_Hombourger@mentor.com>:
> vmlinuz was hard-coded in the postinst script generated by the
> build-kernel.sh script. This really needs to be ${KERNEL_FILE}
> to support architectures where a vmlinux file is used instead
> (mipsel in particular).
>
> As we now have multiple recipes using KERNEL_FILE (image and
> kernel recipes), its default setting (vmlinuz) was moved to
> bitbake.conf
>
> Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
> ---
> meta/classes/image.bbclass | 1 -
> meta/conf/bitbake.conf | 1 +
> meta/recipes-kernel/linux/files/build-kernel.sh | 6 +++---
> meta/recipes-kernel/linux/linux-custom.inc | 1 +
> 4 files changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
> index 8384b71..7690bc5 100644
> --- a/meta/classes/image.bbclass
> +++ b/meta/classes/image.bbclass
> @@ -16,7 +16,6 @@ IMAGE_INSTALL += "${@ ("linux-image-" +
> d.getVar("KERNEL_NAME", True)) if d.getV IMAGE_FULLNAME =
> "${PN}-${DISTRO}-${MACHINE}"
> # These variables are used by wic and start_vm
> -KERNEL_FILE ?= "vmlinuz"
> KERNEL_IMAGE ?= "${IMAGE_FULLNAME}-${KERNEL_FILE}"
> INITRD_IMAGE ?= "${IMAGE_FULLNAME}-initrd.img"
>
> diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
> index bca1114..6377a94 100644
> --- a/meta/conf/bitbake.conf
> +++ b/meta/conf/bitbake.conf
> @@ -56,6 +56,7 @@ BUILDCHROOT_HOST_DIR =
> "${DEPLOY_DIR_BUILDCHROOT}-host/${HOST_DISTRO}-${HOST_ARC
> BUILDCHROOT_TARGET_DIR =
> "${DEPLOY_DIR_BUILDCHROOT}-target/${DISTRO}-${DISTRO_ARCH}"
> SDKCHROOT_DIR = "${DEPLOY_DIR_SDKCHROOT}/${DISTRO}-${DISTRO_ARCH}"
> CACHE = "${TMPDIR}/cache" +KERNEL_FILE ?= "vmlinuz"
> OVERRIDES = "${DISTRO_ARCH}:${MACHINE}:${DISTRO}:forcevariable"
>
> diff --git a/meta/recipes-kernel/linux/files/build-kernel.sh
> b/meta/recipes-kernel/linux/files/build-kernel.sh index
> 7b651af..dcb46f7 100644 ---
> a/meta/recipes-kernel/linux/files/build-kernel.sh +++
> b/meta/recipes-kernel/linux/files/build-kernel.sh @@ -90,7 +90,7 @@
> if [ -f /lib/modules/${PV}/.fresh-install ]; then\\ else\\
> change=upgrade\\
> fi\\
> -linux-update-symlinks \$change ${PV} /boot/vmlinuz-${PV}\\
> +linux-update-symlinks \$change ${PV} /boot/${KERNEL_FILE}-${PV}\\
> rm -f /lib/modules/${PV}/.fresh-install"
>
> # Add Debian-like link removal to postrm
> @@ -100,12 +100,12 @@ sed -i
> "${REPACK_LINUX_IMAGE_DIR}/DEBIAN/postrm" \ rm
> -f /lib/modules/${PV}/.fresh-install\\ \\
> if [ \"\$1\" != upgrade ] && command -v linux-update-symlinks
> >/dev/null; then\\
> - linux-update-symlinks remove ${PV} /boot/vmlinuz-${PV}\\
> + linux-update-symlinks remove
> ${PV} /boot/${KERNEL_FILE}-${PV}\\ fi"
>
> # Make sure arm64 kernels are decompressed
> if [ "$target_arch" = "arm64" ]; then
> - vmlinuz="${REPACK_LINUX_IMAGE_DIR}/boot/vmlinuz-${PV}"
> + vmlinuz="${REPACK_LINUX_IMAGE_DIR}/boot/${KERNEL_FILE}-${PV}"
Please use another name for that local variable.
Henning
> mv "$vmlinuz" "$vmlinuz.gz"
> gunzip "$vmlinuz.gz"
> fi
> diff --git a/meta/recipes-kernel/linux/linux-custom.inc
> b/meta/recipes-kernel/linux/linux-custom.inc index 5a4f5bf..5a34dd1
> 100644 --- a/meta/recipes-kernel/linux/linux-custom.inc
> +++ b/meta/recipes-kernel/linux/linux-custom.inc
> @@ -72,6 +72,7 @@ dpkg_runbuild() {
>
> export KBUILD_DEPENDS="${KBUILD_DEPENDS}"
> export KERNEL_DEBIAN_DEPENDS="${KERNEL_DEBIAN_DEPENDS}"
> + export KERNEL_FILE="${KERNEL_FILE}"
> export
> KERNEL_HEADERS_DEBIAN_DEPENDS="${KERNEL_HEADERS_DEBIAN_DEPENDS}"
> sudo -E chroot --userspec=$( id -u ):$( id -g )
> ${BUILDCHROOT_DIR} ${PP}/build-kernel.sh ${PP}/${PPS} ${DISTRO_ARCH}
^ permalink raw reply [flat|nested] 40+ messages in thread
* [PATCH 03/10] bitbake.conf: set name of the qemu-static binary to use for mipsel
2019-10-24 9:02 [PATCH 00/10] add ci40 machine support + new Isar features Cedric Hombourger
2019-10-24 9:02 ` [PATCH 01/10] ci_build.sh: delay "set -x" for a clean --help output Cedric Hombourger
2019-10-24 9:02 ` [PATCH 02/10] linux-custom: honor KERNEL_FILE setting Cedric Hombourger
@ 2019-10-24 9:02 ` Cedric Hombourger
2019-10-24 9:02 ` [PATCH 04/10] recipes-kernel/linux: make KERNEL_DEFCONFIG support in-tree defconfigs Cedric Hombourger
` (8 subsequent siblings)
11 siblings, 0 replies; 40+ messages in thread
From: Cedric Hombourger @ 2019-10-24 9:02 UTC (permalink / raw)
To: isar-users; +Cc: Cedric Hombourger
Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
---
meta/conf/bitbake.conf | 1 +
1 file changed, 1 insertion(+)
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 6377a94..624eb91 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -65,6 +65,7 @@ QEMU_ARCH_amd64 = "x86_64"
QEMU_ARCH_i386 = "i386"
QEMU_ARCH_armhf = "arm"
QEMU_ARCH_arm64 = "aarch64"
+QEMU_ARCH_mipsel = "mipsel"
# Codename of the repository created by the caching class
DEBDISTRONAME = "isar"
--
2.20.1
^ permalink raw reply [flat|nested] 40+ messages in thread
* [PATCH 04/10] recipes-kernel/linux: make KERNEL_DEFCONFIG support in-tree defconfigs
2019-10-24 9:02 [PATCH 00/10] add ci40 machine support + new Isar features Cedric Hombourger
` (2 preceding siblings ...)
2019-10-24 9:02 ` [PATCH 03/10] bitbake.conf: set name of the qemu-static binary to use for mipsel Cedric Hombourger
@ 2019-10-24 9:02 ` Cedric Hombourger
2019-10-24 18:02 ` Henning Schild
2019-10-24 9:02 ` [PATCH 05/10] linux-mainline: fix stripping of .0 from the kernel version Cedric Hombourger
` (7 subsequent siblings)
11 siblings, 1 reply; 40+ messages in thread
From: Cedric Hombourger @ 2019-10-24 9:02 UTC (permalink / raw)
To: isar-users; +Cc: Cedric Hombourger
The recipe expected the specified KERNEL_DEFCONFIG to be provided as a
SRC_URI while the kernel already provides many useful defconfigs. The
recipe will now check if the specified configuration can be found in
WORKDIR. If it is found, it will then be used via "make olddefconfig"
as before. It will otherwise assume that it is an in-tree defconfig
and attempt a "make foobar_defconfig" (where foobar_defconfig is the
user-provided KERNEL_DEFCONFIG setting).
Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
---
meta/recipes-kernel/linux/files/build-kernel.sh | 6 +-----
meta/recipes-kernel/linux/linux-custom.inc | 11 +++++++++--
2 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/meta/recipes-kernel/linux/files/build-kernel.sh b/meta/recipes-kernel/linux/files/build-kernel.sh
index dcb46f7..cb310f7 100644
--- a/meta/recipes-kernel/linux/files/build-kernel.sh
+++ b/meta/recipes-kernel/linux/files/build-kernel.sh
@@ -36,11 +36,7 @@ REPACK_DIR="$1/../repack"
REPACK_LINUX_IMAGE_DIR="${REPACK_DIR}/linux-image"
REPACK_LINUX_HEADERS_DIR="${REPACK_DIR}/linux-headers"
-if [ -e .config ]; then
- make olddefconfig
-else
- make defconfig
-fi
+make ${KERNEL_DEFCONFIG}
KV=$( make -s kernelrelease )
if [ "${KV}" != "${PV}" ]; then
diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc
index 5a34dd1..c53cd90 100644
--- a/meta/recipes-kernel/linux/linux-custom.inc
+++ b/meta/recipes-kernel/linux/linux-custom.inc
@@ -61,8 +61,14 @@ addtask devshell after do_install_builddeps
dpkg_runbuild() {
chmod +x ${WORKDIR}/build-kernel.sh
- if [ -n "${KERNEL_DEFCONFIG}" ]; then
- cp ${WORKDIR}/${KERNEL_DEFCONFIG} ${S}/.config
+ defconfig="${KERNEL_DEFCONFIG}"
+ if [ -n "${defconfig}" ]; then
+ if [ -e "${WORKDIR}/${defconfig}" ]; then
+ cp ${WORKDIR}/${defconfig} ${S}/.config
+ defconfig="olddefconfig"
+ fi
+ else
+ defconfig="defconfig"
fi
E="${@ bb.utils.export_proxies(d)}"
@@ -72,6 +78,7 @@ dpkg_runbuild() {
export KBUILD_DEPENDS="${KBUILD_DEPENDS}"
export KERNEL_DEBIAN_DEPENDS="${KERNEL_DEBIAN_DEPENDS}"
+ export KERNEL_DEFCONFIG="${defconfig}"
export KERNEL_FILE="${KERNEL_FILE}"
export KERNEL_HEADERS_DEBIAN_DEPENDS="${KERNEL_HEADERS_DEBIAN_DEPENDS}"
--
2.20.1
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH 04/10] recipes-kernel/linux: make KERNEL_DEFCONFIG support in-tree defconfigs
2019-10-24 9:02 ` [PATCH 04/10] recipes-kernel/linux: make KERNEL_DEFCONFIG support in-tree defconfigs Cedric Hombourger
@ 2019-10-24 18:02 ` Henning Schild
2019-11-06 16:03 ` Jan Kiszka
0 siblings, 1 reply; 40+ messages in thread
From: Henning Schild @ 2019-10-24 18:02 UTC (permalink / raw)
To: Cedric Hombourger; +Cc: isar-users
Not sure i like that. We are mixing "make target" and .config-filename
into one variable. I would rather invent another one.
KERNEL_CONFIG_FILE ?= "foo"
KERNEL_CONFIG_TARGET ?= "olddefconfig"
Henning
Am Thu, 24 Oct 2019 11:02:18 +0200
schrieb Cedric Hombourger <Cedric_Hombourger@mentor.com>:
> The recipe expected the specified KERNEL_DEFCONFIG to be provided as a
> SRC_URI while the kernel already provides many useful defconfigs. The
> recipe will now check if the specified configuration can be found in
> WORKDIR. If it is found, it will then be used via "make olddefconfig"
> as before. It will otherwise assume that it is an in-tree defconfig
> and attempt a "make foobar_defconfig" (where foobar_defconfig is the
> user-provided KERNEL_DEFCONFIG setting).
>
> Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
> ---
> meta/recipes-kernel/linux/files/build-kernel.sh | 6 +-----
> meta/recipes-kernel/linux/linux-custom.inc | 11 +++++++++--
> 2 files changed, 10 insertions(+), 7 deletions(-)
>
> diff --git a/meta/recipes-kernel/linux/files/build-kernel.sh
> b/meta/recipes-kernel/linux/files/build-kernel.sh index
> dcb46f7..cb310f7 100644 ---
> a/meta/recipes-kernel/linux/files/build-kernel.sh +++
> b/meta/recipes-kernel/linux/files/build-kernel.sh @@ -36,11 +36,7 @@
> REPACK_DIR="$1/../repack"
> REPACK_LINUX_IMAGE_DIR="${REPACK_DIR}/linux-image"
> REPACK_LINUX_HEADERS_DIR="${REPACK_DIR}/linux-headers"
> -if [ -e .config ]; then
> - make olddefconfig
> -else
> - make defconfig
> -fi
> +make ${KERNEL_DEFCONFIG}
>
> KV=$( make -s kernelrelease )
> if [ "${KV}" != "${PV}" ]; then
> diff --git a/meta/recipes-kernel/linux/linux-custom.inc
> b/meta/recipes-kernel/linux/linux-custom.inc index 5a34dd1..c53cd90
> 100644 --- a/meta/recipes-kernel/linux/linux-custom.inc
> +++ b/meta/recipes-kernel/linux/linux-custom.inc
> @@ -61,8 +61,14 @@ addtask devshell after do_install_builddeps
>
> dpkg_runbuild() {
> chmod +x ${WORKDIR}/build-kernel.sh
> - if [ -n "${KERNEL_DEFCONFIG}" ]; then
> - cp ${WORKDIR}/${KERNEL_DEFCONFIG} ${S}/.config
> + defconfig="${KERNEL_DEFCONFIG}"
> + if [ -n "${defconfig}" ]; then
> + if [ -e "${WORKDIR}/${defconfig}" ]; then
> + cp ${WORKDIR}/${defconfig} ${S}/.config
> + defconfig="olddefconfig"
> + fi
> + else
> + defconfig="defconfig"
> fi
>
> E="${@ bb.utils.export_proxies(d)}"
> @@ -72,6 +78,7 @@ dpkg_runbuild() {
>
> export KBUILD_DEPENDS="${KBUILD_DEPENDS}"
> export KERNEL_DEBIAN_DEPENDS="${KERNEL_DEBIAN_DEPENDS}"
> + export KERNEL_DEFCONFIG="${defconfig}"
> export KERNEL_FILE="${KERNEL_FILE}"
> export
> KERNEL_HEADERS_DEBIAN_DEPENDS="${KERNEL_HEADERS_DEBIAN_DEPENDS}"
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH 04/10] recipes-kernel/linux: make KERNEL_DEFCONFIG support in-tree defconfigs
2019-10-24 18:02 ` Henning Schild
@ 2019-11-06 16:03 ` Jan Kiszka
2019-11-06 16:17 ` Cedric Hombourger
0 siblings, 1 reply; 40+ messages in thread
From: Jan Kiszka @ 2019-11-06 16:03 UTC (permalink / raw)
To: [ext] Henning Schild, Cedric Hombourger; +Cc: isar-users
On 24.10.19 20:02, [ext] Henning Schild wrote:
> Not sure i like that. We are mixing "make target" and .config-filename
> into one variable. I would rather invent another one.
>
Would be in line with Yocto/OE at least.
> KERNEL_CONFIG_FILE ?= "foo"
> KERNEL_CONFIG_TARGET ?= "olddefconfig"
Downside: you have to fiddle with both variables when switching from
defconfig to provide config + olddefconfig.
I think the unified semantic is not that bad. A user still has control
over file vs. built-in config by not providing that file in the first place.
Jan
>
> Henning
>
>
> Am Thu, 24 Oct 2019 11:02:18 +0200
> schrieb Cedric Hombourger <Cedric_Hombourger@mentor.com>:
>
>> The recipe expected the specified KERNEL_DEFCONFIG to be provided as a
>> SRC_URI while the kernel already provides many useful defconfigs. The
>> recipe will now check if the specified configuration can be found in
>> WORKDIR. If it is found, it will then be used via "make olddefconfig"
>> as before. It will otherwise assume that it is an in-tree defconfig
>> and attempt a "make foobar_defconfig" (where foobar_defconfig is the
>> user-provided KERNEL_DEFCONFIG setting).
>>
>> Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
>> ---
>> meta/recipes-kernel/linux/files/build-kernel.sh | 6 +-----
>> meta/recipes-kernel/linux/linux-custom.inc | 11 +++++++++--
>> 2 files changed, 10 insertions(+), 7 deletions(-)
>>
>> diff --git a/meta/recipes-kernel/linux/files/build-kernel.sh
>> b/meta/recipes-kernel/linux/files/build-kernel.sh index
>> dcb46f7..cb310f7 100644 ---
>> a/meta/recipes-kernel/linux/files/build-kernel.sh +++
>> b/meta/recipes-kernel/linux/files/build-kernel.sh @@ -36,11 +36,7 @@
>> REPACK_DIR="$1/../repack"
>> REPACK_LINUX_IMAGE_DIR="${REPACK_DIR}/linux-image"
>> REPACK_LINUX_HEADERS_DIR="${REPACK_DIR}/linux-headers"
>> -if [ -e .config ]; then
>> - make olddefconfig
>> -else
>> - make defconfig
>> -fi
>> +make ${KERNEL_DEFCONFIG}
>>
>> KV=$( make -s kernelrelease )
>> if [ "${KV}" != "${PV}" ]; then
>> diff --git a/meta/recipes-kernel/linux/linux-custom.inc
>> b/meta/recipes-kernel/linux/linux-custom.inc index 5a34dd1..c53cd90
>> 100644 --- a/meta/recipes-kernel/linux/linux-custom.inc
>> +++ b/meta/recipes-kernel/linux/linux-custom.inc
>> @@ -61,8 +61,14 @@ addtask devshell after do_install_builddeps
>>
>> dpkg_runbuild() {
>> chmod +x ${WORKDIR}/build-kernel.sh
>> - if [ -n "${KERNEL_DEFCONFIG}" ]; then
>> - cp ${WORKDIR}/${KERNEL_DEFCONFIG} ${S}/.config
>> + defconfig="${KERNEL_DEFCONFIG}"
>> + if [ -n "${defconfig}" ]; then
>> + if [ -e "${WORKDIR}/${defconfig}" ]; then
>> + cp ${WORKDIR}/${defconfig} ${S}/.config
>> + defconfig="olddefconfig"
>> + fi
>> + else
>> + defconfig="defconfig"
>> fi
>>
>> E="${@ bb.utils.export_proxies(d)}"
>> @@ -72,6 +78,7 @@ dpkg_runbuild() {
>>
>> export KBUILD_DEPENDS="${KBUILD_DEPENDS}"
>> export KERNEL_DEBIAN_DEPENDS="${KERNEL_DEBIAN_DEPENDS}"
>> + export KERNEL_DEFCONFIG="${defconfig}"
>> export KERNEL_FILE="${KERNEL_FILE}"
>> export
>> KERNEL_HEADERS_DEBIAN_DEPENDS="${KERNEL_HEADERS_DEBIAN_DEPENDS}"
>
--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH 04/10] recipes-kernel/linux: make KERNEL_DEFCONFIG support in-tree defconfigs
2019-11-06 16:03 ` Jan Kiszka
@ 2019-11-06 16:17 ` Cedric Hombourger
0 siblings, 0 replies; 40+ messages in thread
From: Cedric Hombourger @ 2019-11-06 16:17 UTC (permalink / raw)
To: Jan Kiszka, [ext] Henning Schild; +Cc: isar-users
On 11/6/2019 5:03 PM, Jan Kiszka wrote:
> On 24.10.19 20:02, [ext] Henning Schild wrote:
>> Not sure i like that. We are mixing "make target" and .config-filename
>> into one variable. I would rather invent another one.
>>
> Would be in line with Yocto/OE at least.
>
>> KERNEL_CONFIG_FILE ?= "foo"
>> KERNEL_CONFIG_TARGET ?= "olddefconfig"
> Downside: you have to fiddle with both variables when switching from
> defconfig to provide config + olddefconfig.
>
> I think the unified semantic is not that bad. A user still has control
> over file vs. built-in config by not providing that file in the first place.
and I now understand what Henning was suggesting in the first place
the linux-custom patch series I sent yesterday only has KERNEL_DEFCONFIG
as user-visible API. I would agree with Jan that we probably want to
keep it simple for the end-user. I would vote for keeping
KERNEL_DEFCONFIG as the only API but I am happy to discuss what we do
with respect to in-tree / out-of-tree defconfigs. This patch will have
Isar automagically determine where to get the defconfig from. We could
alternatively require the defconfig to be always be part of the tree but
that may make some people unhappy since they may be relying on the
current behavior. Requiring people to copy the in-tree defconfig to
their layer so that Isar can find it does not sound great either. Hence
the current proposal - some sort of middle-ground - well I hope !
Cedric
> Jan
>
>> Henning
>>
>>
>> Am Thu, 24 Oct 2019 11:02:18 +0200
>> schrieb Cedric Hombourger <Cedric_Hombourger@mentor.com>:
>>
>>> The recipe expected the specified KERNEL_DEFCONFIG to be provided as a
>>> SRC_URI while the kernel already provides many useful defconfigs. The
>>> recipe will now check if the specified configuration can be found in
>>> WORKDIR. If it is found, it will then be used via "make olddefconfig"
>>> as before. It will otherwise assume that it is an in-tree defconfig
>>> and attempt a "make foobar_defconfig" (where foobar_defconfig is the
>>> user-provided KERNEL_DEFCONFIG setting).
>>>
>>> Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
>>> ---
>>> meta/recipes-kernel/linux/files/build-kernel.sh | 6 +-----
>>> meta/recipes-kernel/linux/linux-custom.inc | 11 +++++++++--
>>> 2 files changed, 10 insertions(+), 7 deletions(-)
>>>
>>> diff --git a/meta/recipes-kernel/linux/files/build-kernel.sh
>>> b/meta/recipes-kernel/linux/files/build-kernel.sh index
>>> dcb46f7..cb310f7 100644 ---
>>> a/meta/recipes-kernel/linux/files/build-kernel.sh +++
>>> b/meta/recipes-kernel/linux/files/build-kernel.sh @@ -36,11 +36,7 @@
>>> REPACK_DIR="$1/../repack"
>>> REPACK_LINUX_IMAGE_DIR="${REPACK_DIR}/linux-image"
>>> REPACK_LINUX_HEADERS_DIR="${REPACK_DIR}/linux-headers"
>>> -if [ -e .config ]; then
>>> - make olddefconfig
>>> -else
>>> - make defconfig
>>> -fi
>>> +make ${KERNEL_DEFCONFIG}
>>>
>>> KV=$( make -s kernelrelease )
>>> if [ "${KV}" != "${PV}" ]; then
>>> diff --git a/meta/recipes-kernel/linux/linux-custom.inc
>>> b/meta/recipes-kernel/linux/linux-custom.inc index 5a34dd1..c53cd90
>>> 100644 --- a/meta/recipes-kernel/linux/linux-custom.inc
>>> +++ b/meta/recipes-kernel/linux/linux-custom.inc
>>> @@ -61,8 +61,14 @@ addtask devshell after do_install_builddeps
>>>
>>> dpkg_runbuild() {
>>> chmod +x ${WORKDIR}/build-kernel.sh
>>> - if [ -n "${KERNEL_DEFCONFIG}" ]; then
>>> - cp ${WORKDIR}/${KERNEL_DEFCONFIG} ${S}/.config
>>> + defconfig="${KERNEL_DEFCONFIG}"
>>> + if [ -n "${defconfig}" ]; then
>>> + if [ -e "${WORKDIR}/${defconfig}" ]; then
>>> + cp ${WORKDIR}/${defconfig} ${S}/.config
>>> + defconfig="olddefconfig"
>>> + fi
>>> + else
>>> + defconfig="defconfig"
>>> fi
>>>
>>> E="${@ bb.utils.export_proxies(d)}"
>>> @@ -72,6 +78,7 @@ dpkg_runbuild() {
>>>
>>> export KBUILD_DEPENDS="${KBUILD_DEPENDS}"
>>> export KERNEL_DEBIAN_DEPENDS="${KERNEL_DEBIAN_DEPENDS}"
>>> + export KERNEL_DEFCONFIG="${defconfig}"
>>> export KERNEL_FILE="${KERNEL_FILE}"
>>> export
>>> KERNEL_HEADERS_DEBIAN_DEPENDS="${KERNEL_HEADERS_DEBIAN_DEPENDS}"
^ permalink raw reply [flat|nested] 40+ messages in thread
* [PATCH 05/10] linux-mainline: fix stripping of .0 from the kernel version
2019-10-24 9:02 [PATCH 00/10] add ci40 machine support + new Isar features Cedric Hombourger
` (3 preceding siblings ...)
2019-10-24 9:02 ` [PATCH 04/10] recipes-kernel/linux: make KERNEL_DEFCONFIG support in-tree defconfigs Cedric Hombourger
@ 2019-10-24 9:02 ` Cedric Hombourger
2019-11-06 16:04 ` Jan Kiszka
2019-10-24 9:02 ` [PATCH 06/10] linux-mainline: update from 4.19.0 to 4.19.80 Cedric Hombourger
` (6 subsequent siblings)
11 siblings, 1 reply; 40+ messages in thread
From: Cedric Hombourger @ 2019-10-24 9:02 UTC (permalink / raw)
To: isar-users; +Cc: Cedric Hombourger
The strip() function was used to strip the trailing .0 from the kernel
version since it is omitted in the upstream archive file names. That
function is actually taking a character set as argument not a substring.
This was causing ARCHIVE_VERSION to expand to "4.19.8" when the user
provided version was "4.19.80". The inline python code was changed to
check if the version ends with ".0" and only then remove the last two
characters.
Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
---
meta-isar/recipes-kernel/linux/linux-mainline_4.19.0.bb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta-isar/recipes-kernel/linux/linux-mainline_4.19.0.bb b/meta-isar/recipes-kernel/linux/linux-mainline_4.19.0.bb
index e50e149..127f6e2 100644
--- a/meta-isar/recipes-kernel/linux/linux-mainline_4.19.0.bb
+++ b/meta-isar/recipes-kernel/linux/linux-mainline_4.19.0.bb
@@ -7,7 +7,7 @@
require recipes-kernel/linux/linux-custom.inc
-ARCHIVE_VERSION = "${@d.getVar('PV').strip('.0')}"
+ARCHIVE_VERSION = "${@ d.getVar('PV')[:-2] if d.getVar('PV').endswith('.0') else d.getVar('PV') }"
SRC_URI += " \
https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-${ARCHIVE_VERSION}.tar.xz \
--
2.20.1
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH 05/10] linux-mainline: fix stripping of .0 from the kernel version
2019-10-24 9:02 ` [PATCH 05/10] linux-mainline: fix stripping of .0 from the kernel version Cedric Hombourger
@ 2019-11-06 16:04 ` Jan Kiszka
0 siblings, 0 replies; 40+ messages in thread
From: Jan Kiszka @ 2019-11-06 16:04 UTC (permalink / raw)
To: Cedric Hombourger, isar-users
On 24.10.19 11:02, Cedric Hombourger wrote:
> The strip() function was used to strip the trailing .0 from the kernel
> version since it is omitted in the upstream archive file names. That
> function is actually taking a character set as argument not a substring.
> This was causing ARCHIVE_VERSION to expand to "4.19.8" when the user
> provided version was "4.19.80". The inline python code was changed to
> check if the version ends with ".0" and only then remove the last two
> characters.
>
> Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
> ---
> meta-isar/recipes-kernel/linux/linux-mainline_4.19.0.bb | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta-isar/recipes-kernel/linux/linux-mainline_4.19.0.bb b/meta-isar/recipes-kernel/linux/linux-mainline_4.19.0.bb
> index e50e149..127f6e2 100644
> --- a/meta-isar/recipes-kernel/linux/linux-mainline_4.19.0.bb
> +++ b/meta-isar/recipes-kernel/linux/linux-mainline_4.19.0.bb
> @@ -7,7 +7,7 @@
>
> require recipes-kernel/linux/linux-custom.inc
>
> -ARCHIVE_VERSION = "${@d.getVar('PV').strip('.0')}"
> +ARCHIVE_VERSION = "${@ d.getVar('PV')[:-2] if d.getVar('PV').endswith('.0') else d.getVar('PV') }"
>
> SRC_URI += " \
> https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-${ARCHIVE_VERSION}.tar.xz \
>
Oh, yeah... good one.
Jan
--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 40+ messages in thread
* [PATCH 06/10] linux-mainline: update from 4.19.0 to 4.19.80
2019-10-24 9:02 [PATCH 00/10] add ci40 machine support + new Isar features Cedric Hombourger
` (4 preceding siblings ...)
2019-10-24 9:02 ` [PATCH 05/10] linux-mainline: fix stripping of .0 from the kernel version Cedric Hombourger
@ 2019-10-24 9:02 ` Cedric Hombourger
2019-10-24 9:02 ` [PATCH 07/10] image: add CUSTOM_IMAGE_EXTENSIONS for user layers/machines to use Cedric Hombourger
` (5 subsequent siblings)
11 siblings, 0 replies; 40+ messages in thread
From: Cedric Hombourger @ 2019-10-24 9:02 UTC (permalink / raw)
To: isar-users; +Cc: Cedric Hombourger
In preparation for a new machine addition, update the linux-mainline
kernel from 4.19.0 to 4.19.80. This is needed to get some of the mips
fixes that were integrated in this longterm kernel version (and in
particular: MIPS: have "plain" make calls build dtbs for selected
platforms, i.e. 637dfa0fad6d91a9a709dc70549a6d20fa77f615 upstream)
Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
---
.../{linux-mainline_4.19.0.bb => linux-mainline_4.19.80.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta-isar/recipes-kernel/linux/{linux-mainline_4.19.0.bb => linux-mainline_4.19.80.bb} (87%)
diff --git a/meta-isar/recipes-kernel/linux/linux-mainline_4.19.0.bb b/meta-isar/recipes-kernel/linux/linux-mainline_4.19.80.bb
similarity index 87%
rename from meta-isar/recipes-kernel/linux/linux-mainline_4.19.0.bb
rename to meta-isar/recipes-kernel/linux/linux-mainline_4.19.80.bb
index 127f6e2..b41d1a8 100644
--- a/meta-isar/recipes-kernel/linux/linux-mainline_4.19.0.bb
+++ b/meta-isar/recipes-kernel/linux/linux-mainline_4.19.80.bb
@@ -12,7 +12,7 @@ ARCHIVE_VERSION = "${@ d.getVar('PV')[:-2] if d.getVar('PV').endswith('.0') else
SRC_URI += " \
https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-${ARCHIVE_VERSION}.tar.xz \
file://x86_64_defconfig"
-SRC_URI[sha256sum] = "0c68f5655528aed4f99dae71a5b259edc93239fa899e2df79c055275c21749a1"
+SRC_URI[sha256sum] = "80a9ba764e088aa7fddfef5a97c0236905e291468a37832243b6f3828d36e7ec"
SRC_URI_append_de0-nano-soc = " \
file://0001-ARM-dts-socfpga-Rename-socfpga_cyclone5_de0_-sockit-.patch"
--
2.20.1
^ permalink raw reply [flat|nested] 40+ messages in thread
* [PATCH 07/10] image: add CUSTOM_IMAGE_EXTENSIONS for user layers/machines to use
2019-10-24 9:02 [PATCH 00/10] add ci40 machine support + new Isar features Cedric Hombourger
` (5 preceding siblings ...)
2019-10-24 9:02 ` [PATCH 06/10] linux-mainline: update from 4.19.0 to 4.19.80 Cedric Hombourger
@ 2019-10-24 9:02 ` Cedric Hombourger
2019-10-24 18:09 ` Henning Schild
2019-10-24 9:02 ` [PATCH 08/10] linux-custom: add support for kernel config fragments Cedric Hombourger
` (4 subsequent siblings)
11 siblings, 1 reply; 40+ messages in thread
From: Cedric Hombourger @ 2019-10-24 9:02 UTC (permalink / raw)
To: isar-users; +Cc: Cedric Hombourger
Some machines may require additional post-processing on the image before
the actual file-system image is created. The image extension mechanism
was designed for this purpose but does not seem to provide any way for
user layers/machines to use. Add a CUSTOM_IMAGE_EXTENSIONS variable to
fill this gap.
Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
---
meta/classes/image.bbclass | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 7690bc5..633b514 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -30,6 +30,9 @@ BUILDROOT_DEPLOY = "${BUILDCHROOT_DIR}${PP_DEPLOY}"
BUILDROOT_ROOTFS = "${BUILDCHROOT_DIR}${PP_ROOTFS}"
BUILDROOT_WORK = "${BUILDCHROOT_DIR}${PP_WORK}"
+# Default to no custom image extensions
+CUSTOM_IMAGE_EXTENSIONS ?= ""
+
python(){
if (d.getVar('IMAGE_TRANSIENT_PACKAGES')):
bb.warn("IMAGE_TRANSIENT_PACKAGES is set and no longer supported")
@@ -71,6 +74,7 @@ inherit image-tools-extension
inherit image-postproc-extension
inherit image-locales-extension
inherit image-account-extension
+inherit ${CUSTOM_IMAGE_EXTENSIONS}
# Extra space for rootfs in MB
ROOTFS_EXTRA ?= "64"
--
2.20.1
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH 07/10] image: add CUSTOM_IMAGE_EXTENSIONS for user layers/machines to use
2019-10-24 9:02 ` [PATCH 07/10] image: add CUSTOM_IMAGE_EXTENSIONS for user layers/machines to use Cedric Hombourger
@ 2019-10-24 18:09 ` Henning Schild
2019-11-06 16:08 ` Jan Kiszka
0 siblings, 1 reply; 40+ messages in thread
From: Henning Schild @ 2019-10-24 18:09 UTC (permalink / raw)
To: Cedric Hombourger; +Cc: isar-users
Very smelly and hacky ;). There is no such way since there is a strict
policy to try and solve everything with packages ... except for where
this is not possible ...
I am strongly against that, it will be abused. If you need to inherit
image.bbclass in your own funny-image.bbclass and add the hack in a
layer.
Henning
Am Thu, 24 Oct 2019 11:02:21 +0200
schrieb Cedric Hombourger <Cedric_Hombourger@mentor.com>:
> Some machines may require additional post-processing on the image
> before the actual file-system image is created. The image extension
> mechanism was designed for this purpose but does not seem to provide
> any way for user layers/machines to use. Add a
> CUSTOM_IMAGE_EXTENSIONS variable to fill this gap.
>
> Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
> ---
> meta/classes/image.bbclass | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
> index 7690bc5..633b514 100644
> --- a/meta/classes/image.bbclass
> +++ b/meta/classes/image.bbclass
> @@ -30,6 +30,9 @@ BUILDROOT_DEPLOY = "${BUILDCHROOT_DIR}${PP_DEPLOY}"
> BUILDROOT_ROOTFS = "${BUILDCHROOT_DIR}${PP_ROOTFS}"
> BUILDROOT_WORK = "${BUILDCHROOT_DIR}${PP_WORK}"
>
> +# Default to no custom image extensions
> +CUSTOM_IMAGE_EXTENSIONS ?= ""
> +
> python(){
> if (d.getVar('IMAGE_TRANSIENT_PACKAGES')):
> bb.warn("IMAGE_TRANSIENT_PACKAGES is set and no longer
> supported") @@ -71,6 +74,7 @@ inherit image-tools-extension
> inherit image-postproc-extension
> inherit image-locales-extension
> inherit image-account-extension
> +inherit ${CUSTOM_IMAGE_EXTENSIONS}
>
> # Extra space for rootfs in MB
> ROOTFS_EXTRA ?= "64"
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH 07/10] image: add CUSTOM_IMAGE_EXTENSIONS for user layers/machines to use
2019-10-24 18:09 ` Henning Schild
@ 2019-11-06 16:08 ` Jan Kiszka
2019-11-06 16:11 ` Cedric Hombourger
0 siblings, 1 reply; 40+ messages in thread
From: Jan Kiszka @ 2019-11-06 16:08 UTC (permalink / raw)
To: [ext] Henning Schild, Cedric Hombourger; +Cc: isar-users
On 24.10.19 20:09, [ext] Henning Schild wrote:
> Very smelly and hacky ;). There is no such way since there is a strict
> policy to try and solve everything with packages ... except for where
> this is not possible ...
>
> I am strongly against that, it will be abused. If you need to inherit
> image.bbclass in your own funny-image.bbclass and add the hack in a
> layer.
Ack, specifically while we do not know the actual use case. Can you
explain it, Cedric?
And if you want to hack, nothing prevent you from defining a custom
image /recipe/ that inherits "CUSTOM_IMAGE_EXTENSION" directly.
Jan
>
> Henning
>
> Am Thu, 24 Oct 2019 11:02:21 +0200
> schrieb Cedric Hombourger <Cedric_Hombourger@mentor.com>:
>
>> Some machines may require additional post-processing on the image
>> before the actual file-system image is created. The image extension
>> mechanism was designed for this purpose but does not seem to provide
>> any way for user layers/machines to use. Add a
>> CUSTOM_IMAGE_EXTENSIONS variable to fill this gap.
>>
>> Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
>> ---
>> meta/classes/image.bbclass | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>> diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
>> index 7690bc5..633b514 100644
>> --- a/meta/classes/image.bbclass
>> +++ b/meta/classes/image.bbclass
>> @@ -30,6 +30,9 @@ BUILDROOT_DEPLOY = "${BUILDCHROOT_DIR}${PP_DEPLOY}"
>> BUILDROOT_ROOTFS = "${BUILDCHROOT_DIR}${PP_ROOTFS}"
>> BUILDROOT_WORK = "${BUILDCHROOT_DIR}${PP_WORK}"
>>
>> +# Default to no custom image extensions
>> +CUSTOM_IMAGE_EXTENSIONS ?= ""
>> +
>> python(){
>> if (d.getVar('IMAGE_TRANSIENT_PACKAGES')):
>> bb.warn("IMAGE_TRANSIENT_PACKAGES is set and no longer
>> supported") @@ -71,6 +74,7 @@ inherit image-tools-extension
>> inherit image-postproc-extension
>> inherit image-locales-extension
>> inherit image-account-extension
>> +inherit ${CUSTOM_IMAGE_EXTENSIONS}
>>
>> # Extra space for rootfs in MB
>> ROOTFS_EXTRA ?= "64"
>
--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH 07/10] image: add CUSTOM_IMAGE_EXTENSIONS for user layers/machines to use
2019-11-06 16:08 ` Jan Kiszka
@ 2019-11-06 16:11 ` Cedric Hombourger
2019-11-06 16:16 ` Jan Kiszka
0 siblings, 1 reply; 40+ messages in thread
From: Cedric Hombourger @ 2019-11-06 16:11 UTC (permalink / raw)
To: Jan Kiszka, [ext] Henning Schild; +Cc: isar-users
On 11/6/2019 5:08 PM, Jan Kiszka wrote:
> On 24.10.19 20:09, [ext] Henning Schild wrote:
>> Very smelly and hacky ;). There is no such way since there is a strict
>> policy to try and solve everything with packages ... except for where
>> this is not possible ...
>>
>> I am strongly against that, it will be abused. If you need to inherit
>> image.bbclass in your own funny-image.bbclass and add the hack in a
>> layer.
> Ack, specifically while we do not know the actual use case. Can you
> explain it, Cedric?
that kludge was removed in the linux-custom patch series I sent yesterday
> And if you want to hack, nothing prevent you from defining a custom
> image /recipe/ that inherits "CUSTOM_IMAGE_EXTENSION" directly.
that's a good hint - thanks!
> Jan
>
>> Henning
>>
>> Am Thu, 24 Oct 2019 11:02:21 +0200
>> schrieb Cedric Hombourger <Cedric_Hombourger@mentor.com>:
>>
>>> Some machines may require additional post-processing on the image
>>> before the actual file-system image is created. The image extension
>>> mechanism was designed for this purpose but does not seem to provide
>>> any way for user layers/machines to use. Add a
>>> CUSTOM_IMAGE_EXTENSIONS variable to fill this gap.
>>>
>>> Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
>>> ---
>>> meta/classes/image.bbclass | 4 ++++
>>> 1 file changed, 4 insertions(+)
>>>
>>> diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
>>> index 7690bc5..633b514 100644
>>> --- a/meta/classes/image.bbclass
>>> +++ b/meta/classes/image.bbclass
>>> @@ -30,6 +30,9 @@ BUILDROOT_DEPLOY = "${BUILDCHROOT_DIR}${PP_DEPLOY}"
>>> BUILDROOT_ROOTFS = "${BUILDCHROOT_DIR}${PP_ROOTFS}"
>>> BUILDROOT_WORK = "${BUILDCHROOT_DIR}${PP_WORK}"
>>>
>>> +# Default to no custom image extensions
>>> +CUSTOM_IMAGE_EXTENSIONS ?= ""
>>> +
>>> python(){
>>> if (d.getVar('IMAGE_TRANSIENT_PACKAGES')):
>>> bb.warn("IMAGE_TRANSIENT_PACKAGES is set and no longer
>>> supported") @@ -71,6 +74,7 @@ inherit image-tools-extension
>>> inherit image-postproc-extension
>>> inherit image-locales-extension
>>> inherit image-account-extension
>>> +inherit ${CUSTOM_IMAGE_EXTENSIONS}
>>>
>>> # Extra space for rootfs in MB
>>> ROOTFS_EXTRA ?= "64"
>
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH 07/10] image: add CUSTOM_IMAGE_EXTENSIONS for user layers/machines to use
2019-11-06 16:11 ` Cedric Hombourger
@ 2019-11-06 16:16 ` Jan Kiszka
2019-11-06 16:19 ` Cedric Hombourger
0 siblings, 1 reply; 40+ messages in thread
From: Jan Kiszka @ 2019-11-06 16:16 UTC (permalink / raw)
To: Cedric Hombourger, [ext] Henning Schild; +Cc: isar-users
On 06.11.19 17:11, Cedric Hombourger wrote:
>
> On 11/6/2019 5:08 PM, Jan Kiszka wrote:
>> On 24.10.19 20:09, [ext] Henning Schild wrote:
>>> Very smelly and hacky ;). There is no such way since there is a strict
>>> policy to try and solve everything with packages ... except for where
>>> this is not possible ...
>>>
>>> I am strongly against that, it will be abused. If you need to inherit
>>> image.bbclass in your own funny-image.bbclass and add the hack in a
>>> layer.
>> Ack, specifically while we do not know the actual use case. Can you
>> explain it, Cedric?
>
> that kludge was removed in the linux-custom patch series I sent yesterday
>
Sorry, only realized now that I picked the wrong thread (due to the
numbering issue).
Jan
--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH 07/10] image: add CUSTOM_IMAGE_EXTENSIONS for user layers/machines to use
2019-11-06 16:16 ` Jan Kiszka
@ 2019-11-06 16:19 ` Cedric Hombourger
2019-11-06 16:32 ` Jan Kiszka
0 siblings, 1 reply; 40+ messages in thread
From: Cedric Hombourger @ 2019-11-06 16:19 UTC (permalink / raw)
To: Jan Kiszka, [ext] Henning Schild; +Cc: isar-users
On 11/6/2019 5:16 PM, Jan Kiszka wrote:
> On 06.11.19 17:11, Cedric Hombourger wrote:
>> On 11/6/2019 5:08 PM, Jan Kiszka wrote:
>>> On 24.10.19 20:09, [ext] Henning Schild wrote:
>>>> Very smelly and hacky ;). There is no such way since there is a strict
>>>> policy to try and solve everything with packages ... except for where
>>>> this is not possible ...
>>>>
>>>> I am strongly against that, it will be abused. If you need to inherit
>>>> image.bbclass in your own funny-image.bbclass and add the hack in a
>>>> layer.
>>> Ack, specifically while we do not know the actual use case. Can you
>>> explain it, Cedric?
>> that kludge was removed in the linux-custom patch series I sent yesterday
>>
> Sorry, only realized now that I picked the wrong thread (due to the
> numbering issue).
no worries - I am the one to blame. that brings the question of the tool
we would use for patch reviews. I believe it was mentioned some time ago
that we may find alternatives to mailing list such as patchworks or
something like that?
> Jan
>
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH 07/10] image: add CUSTOM_IMAGE_EXTENSIONS for user layers/machines to use
2019-11-06 16:19 ` Cedric Hombourger
@ 2019-11-06 16:32 ` Jan Kiszka
0 siblings, 0 replies; 40+ messages in thread
From: Jan Kiszka @ 2019-11-06 16:32 UTC (permalink / raw)
To: Cedric Hombourger, [ext] Henning Schild; +Cc: isar-users
On 06.11.19 17:19, Cedric Hombourger wrote:
>
> On 11/6/2019 5:16 PM, Jan Kiszka wrote:
>> On 06.11.19 17:11, Cedric Hombourger wrote:
>>> On 11/6/2019 5:08 PM, Jan Kiszka wrote:
>>>> On 24.10.19 20:09, [ext] Henning Schild wrote:
>>>>> Very smelly and hacky ;). There is no such way since there is a strict
>>>>> policy to try and solve everything with packages ... except for where
>>>>> this is not possible ...
>>>>>
>>>>> I am strongly against that, it will be abused. If you need to inherit
>>>>> image.bbclass in your own funny-image.bbclass and add the hack in a
>>>>> layer.
>>>> Ack, specifically while we do not know the actual use case. Can you
>>>> explain it, Cedric?
>>> that kludge was removed in the linux-custom patch series I sent
>>> yesterday
>>>
>> Sorry, only realized now that I picked the wrong thread (due to the
>> numbering issue).
> no worries - I am the one to blame. that brings the question of the tool
> we would use for patch reviews. I believe it was mentioned some time ago
> that we may find alternatives to mailing list such as patchworks or
> something like that?
/me is still waiting for something that combines the best of both words:
the accessibility and clarity of email-based presentation with the added
values ("user pushed update that changed the line you just commented
on") and history tracking of web UIs. Having done some gitlab-based
review earlier today, I'm far from being happy with those blinky UIs.
Too many clicks to get to a per-commit view, e.g.
Jan
--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 40+ messages in thread
* [PATCH 08/10] linux-custom: add support for kernel config fragments
2019-10-24 9:02 [PATCH 00/10] add ci40 machine support + new Isar features Cedric Hombourger
` (6 preceding siblings ...)
2019-10-24 9:02 ` [PATCH 07/10] image: add CUSTOM_IMAGE_EXTENSIONS for user layers/machines to use Cedric Hombourger
@ 2019-10-24 9:02 ` Cedric Hombourger
2019-10-24 18:21 ` Henning Schild
2019-10-24 9:02 ` [PATCH 09/10] linux-mainline: disable support for HFS to demonstrate use of " Cedric Hombourger
` (3 subsequent siblings)
11 siblings, 1 reply; 40+ messages in thread
From: Cedric Hombourger @ 2019-10-24 9:02 UTC (permalink / raw)
To: isar-users; +Cc: Cedric Hombourger
Check for .cfg files listed in SRC_URI and merge them with the
main defconfig using the kernel merge_config script.
Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
---
.../linux/files/build-kernel.sh | 5 ++++-
meta/recipes-kernel/linux/linux-custom.inc | 20 +++++++++++++++++++
2 files changed, 24 insertions(+), 1 deletion(-)
diff --git a/meta/recipes-kernel/linux/files/build-kernel.sh b/meta/recipes-kernel/linux/files/build-kernel.sh
index cb310f7..9faa6bb 100644
--- a/meta/recipes-kernel/linux/files/build-kernel.sh
+++ b/meta/recipes-kernel/linux/files/build-kernel.sh
@@ -36,7 +36,10 @@ REPACK_DIR="$1/../repack"
REPACK_LINUX_IMAGE_DIR="${REPACK_DIR}/linux-image"
REPACK_LINUX_HEADERS_DIR="${REPACK_DIR}/linux-headers"
-make ${KERNEL_DEFCONFIG}
+make ${KERNEL_DEFCONFIG} || exit ${?}
+if [ -n "${KERNEL_FRAGMENTS}" ]; then
+ scripts/kconfig/merge_config.sh -m .config ${KERNEL_FRAGMENTS}
+fi
KV=$( make -s kernelrelease )
if [ "${KV}" != "${PV}" ]; then
diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc
index c53cd90..b06529f 100644
--- a/meta/recipes-kernel/linux/linux-custom.inc
+++ b/meta/recipes-kernel/linux/linux-custom.inc
@@ -18,6 +18,16 @@ python() {
'linux-headers-' + kernel_name)
}
+def config_fragments(d):
+ fragments = []
+ sources = d.getVar("SRC_URI").split()
+ for s in sources:
+ _, _, local, _, _, parm = bb.fetch.decodeurl(s)
+ base, ext = os.path.splitext(os.path.basename(local))
+ if ext and ext in (".cfg"):
+ fragments.append(local)
+ return fragments
+
inherit dpkg-base
SRC_URI += "file://build-kernel.sh"
@@ -71,6 +81,16 @@ dpkg_runbuild() {
defconfig="defconfig"
fi
+ # copy config fragments over to the kernel tree
+ src_frags="${@ " ".join(config_fragments(d)) }"
+ out_frags="${@ " ".join(map(lambda frag: 'debian/fragments/' + frag, config_fragments(d))) }"
+ rm -rf ${S}/debian/fragments
+ if [ -n "${src_frags}" ]; then
+ mkdir -p ${S}/debian/fragments
+ (cd ${WORKDIR} && cp ${src_frags} ${S}/debian/fragments/)
+ fi
+ export KERNEL_FRAGMENTS="${out_frags}"
+
E="${@ bb.utils.export_proxies(d)}"
export PV=${PV}
--
2.20.1
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH 08/10] linux-custom: add support for kernel config fragments
2019-10-24 9:02 ` [PATCH 08/10] linux-custom: add support for kernel config fragments Cedric Hombourger
@ 2019-10-24 18:21 ` Henning Schild
2019-10-24 18:25 ` Cedric Hombourger
2019-10-25 9:45 ` Cedric Hombourger
0 siblings, 2 replies; 40+ messages in thread
From: Henning Schild @ 2019-10-24 18:21 UTC (permalink / raw)
To: Cedric Hombourger; +Cc: isar-users
Is that taken from or inspired by OE? I have seen patterns like that
for isar:
do_prepare_build_prepend() {
cat ${WORKDIR}/preempt-rt.cfg >> ${WORKDIR}/${KERNEL_DEFCONFIG}
}
In a recipe that extends a generic kernel recipe with some config
switches.
I am personally not a big fan of magic, and it seems the extension
".cfg" makes magic happen. We will need an apply=no like for patches.
Henning
Am Thu, 24 Oct 2019 11:02:22 +0200
schrieb Cedric Hombourger <Cedric_Hombourger@mentor.com>:
> Check for .cfg files listed in SRC_URI and merge them with the
> main defconfig using the kernel merge_config script.
>
> Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
> ---
> .../linux/files/build-kernel.sh | 5 ++++-
> meta/recipes-kernel/linux/linux-custom.inc | 20
> +++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-)
>
> diff --git a/meta/recipes-kernel/linux/files/build-kernel.sh
> b/meta/recipes-kernel/linux/files/build-kernel.sh index
> cb310f7..9faa6bb 100644 ---
> a/meta/recipes-kernel/linux/files/build-kernel.sh +++
> b/meta/recipes-kernel/linux/files/build-kernel.sh @@ -36,7 +36,10 @@
> REPACK_DIR="$1/../repack"
> REPACK_LINUX_IMAGE_DIR="${REPACK_DIR}/linux-image"
> REPACK_LINUX_HEADERS_DIR="${REPACK_DIR}/linux-headers"
> -make ${KERNEL_DEFCONFIG}
> +make ${KERNEL_DEFCONFIG} || exit ${?}
> +if [ -n "${KERNEL_FRAGMENTS}" ]; then
> + scripts/kconfig/merge_config.sh -m .config ${KERNEL_FRAGMENTS}
> +fi
>
> KV=$( make -s kernelrelease )
> if [ "${KV}" != "${PV}" ]; then
> diff --git a/meta/recipes-kernel/linux/linux-custom.inc
> b/meta/recipes-kernel/linux/linux-custom.inc index c53cd90..b06529f
> 100644 --- a/meta/recipes-kernel/linux/linux-custom.inc
> +++ b/meta/recipes-kernel/linux/linux-custom.inc
> @@ -18,6 +18,16 @@ python() {
> 'linux-headers-' + kernel_name)
> }
>
> +def config_fragments(d):
> + fragments = []
> + sources = d.getVar("SRC_URI").split()
> + for s in sources:
> + _, _, local, _, _, parm = bb.fetch.decodeurl(s)
> + base, ext = os.path.splitext(os.path.basename(local))
> + if ext and ext in (".cfg"):
> + fragments.append(local)
> + return fragments
> +
> inherit dpkg-base
>
> SRC_URI += "file://build-kernel.sh"
> @@ -71,6 +81,16 @@ dpkg_runbuild() {
> defconfig="defconfig"
> fi
>
> + # copy config fragments over to the kernel tree
> + src_frags="${@ " ".join(config_fragments(d)) }"
> + out_frags="${@ " ".join(map(lambda frag: 'debian/fragments/'
> + frag, config_fragments(d))) }"
> + rm -rf ${S}/debian/fragments
> + if [ -n "${src_frags}" ]; then
> + mkdir -p ${S}/debian/fragments
> + (cd ${WORKDIR} && cp ${src_frags}
> ${S}/debian/fragments/)
> + fi
> + export KERNEL_FRAGMENTS="${out_frags}"
> +
> E="${@ bb.utils.export_proxies(d)}"
>
> export PV=${PV}
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH 08/10] linux-custom: add support for kernel config fragments
2019-10-24 18:21 ` Henning Schild
@ 2019-10-24 18:25 ` Cedric Hombourger
2019-10-24 18:29 ` Henning Schild
2019-10-25 9:45 ` Cedric Hombourger
1 sibling, 1 reply; 40+ messages in thread
From: Cedric Hombourger @ 2019-10-24 18:25 UTC (permalink / raw)
To: Henning Schild; +Cc: isar-users
Hi Henning,
On 10/24/2019 8:21 PM, Henning Schild wrote:
> Is that taken from or inspired by OE? I have seen patterns like that
> for isar:
It is inspired. they use their scc tool but eventually use the kernel
merge_config tool
> do_prepare_build_prepend() {
> cat ${WORKDIR}/preempt-rt.cfg >> ${WORKDIR}/${KERNEL_DEFCONFIG}
> }
I have used this kludge myself :) but the kernel provides a tool to
facilitate merging of config fragments so let's use it so that we do not
come up with different mechanisms
> In a recipe that extends a generic kernel recipe with some config
> switches.
>
> I am personally not a big fan of magic, and it seems the extension
> ".cfg" makes magic happen. We will need an apply=no like for patches.
OE does not but I see no harm in taking inspiration from OE and tweaking
it to our liking
>
> Henning
>
>
> Am Thu, 24 Oct 2019 11:02:22 +0200
> schrieb Cedric Hombourger <Cedric_Hombourger@mentor.com>:
>
>> Check for .cfg files listed in SRC_URI and merge them with the
>> main defconfig using the kernel merge_config script.
>>
>> Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
>> ---
>> .../linux/files/build-kernel.sh | 5 ++++-
>> meta/recipes-kernel/linux/linux-custom.inc | 20
>> +++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-)
>>
>> diff --git a/meta/recipes-kernel/linux/files/build-kernel.sh
>> b/meta/recipes-kernel/linux/files/build-kernel.sh index
>> cb310f7..9faa6bb 100644 ---
>> a/meta/recipes-kernel/linux/files/build-kernel.sh +++
>> b/meta/recipes-kernel/linux/files/build-kernel.sh @@ -36,7 +36,10 @@
>> REPACK_DIR="$1/../repack"
>> REPACK_LINUX_IMAGE_DIR="${REPACK_DIR}/linux-image"
>> REPACK_LINUX_HEADERS_DIR="${REPACK_DIR}/linux-headers"
>> -make ${KERNEL_DEFCONFIG}
>> +make ${KERNEL_DEFCONFIG} || exit ${?}
>> +if [ -n "${KERNEL_FRAGMENTS}" ]; then
>> + scripts/kconfig/merge_config.sh -m .config ${KERNEL_FRAGMENTS}
>> +fi
>>
>> KV=$( make -s kernelrelease )
>> if [ "${KV}" != "${PV}" ]; then
>> diff --git a/meta/recipes-kernel/linux/linux-custom.inc
>> b/meta/recipes-kernel/linux/linux-custom.inc index c53cd90..b06529f
>> 100644 --- a/meta/recipes-kernel/linux/linux-custom.inc
>> +++ b/meta/recipes-kernel/linux/linux-custom.inc
>> @@ -18,6 +18,16 @@ python() {
>> 'linux-headers-' + kernel_name)
>> }
>>
>> +def config_fragments(d):
>> + fragments = []
>> + sources = d.getVar("SRC_URI").split()
>> + for s in sources:
>> + _, _, local, _, _, parm = bb.fetch.decodeurl(s)
>> + base, ext = os.path.splitext(os.path.basename(local))
>> + if ext and ext in (".cfg"):
>> + fragments.append(local)
>> + return fragments
>> +
>> inherit dpkg-base
>>
>> SRC_URI += "file://build-kernel.sh"
>> @@ -71,6 +81,16 @@ dpkg_runbuild() {
>> defconfig="defconfig"
>> fi
>>
>> + # copy config fragments over to the kernel tree
>> + src_frags="${@ " ".join(config_fragments(d)) }"
>> + out_frags="${@ " ".join(map(lambda frag: 'debian/fragments/'
>> + frag, config_fragments(d))) }"
>> + rm -rf ${S}/debian/fragments
>> + if [ -n "${src_frags}" ]; then
>> + mkdir -p ${S}/debian/fragments
>> + (cd ${WORKDIR} && cp ${src_frags}
>> ${S}/debian/fragments/)
>> + fi
>> + export KERNEL_FRAGMENTS="${out_frags}"
>> +
>> E="${@ bb.utils.export_proxies(d)}"
>>
>> export PV=${PV}
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH 08/10] linux-custom: add support for kernel config fragments
2019-10-24 18:25 ` Cedric Hombourger
@ 2019-10-24 18:29 ` Henning Schild
0 siblings, 0 replies; 40+ messages in thread
From: Henning Schild @ 2019-10-24 18:29 UTC (permalink / raw)
To: Cedric Hombourger; +Cc: isar-users
Am Thu, 24 Oct 2019 20:25:15 +0200
schrieb Cedric Hombourger <cedric_hombourger@mentor.com>:
> Hi Henning,
>
> On 10/24/2019 8:21 PM, Henning Schild wrote:
> > Is that taken from or inspired by OE? I have seen patterns like that
> > for isar:
> It is inspired. they use their scc tool but eventually use the kernel
> merge_config tool
> > do_prepare_build_prepend() {
> > cat ${WORKDIR}/preempt-rt.cfg >> ${WORKDIR}/${KERNEL_DEFCONFIG}
> > }
> I have used this kludge myself :) but the kernel provides a tool to
> facilitate merging of config fragments so let's use it so that we do
> not come up with different mechanisms
> > In a recipe that extends a generic kernel recipe with some config
> > switches.
> >
> > I am personally not a big fan of magic, and it seems the extension
> > ".cfg" makes magic happen. We will need an apply=no like for
> > patches.
> OE does not but I see no harm in taking inspiration from OE and
> tweaking it to our liking
I think it would be clean to have a way to disable the magic. Even if
SRC_URI entries ending on .cfg in a kernel recipe are not likely to be
required for something else.
Henning
> >
> > Henning
> >
> >
> > Am Thu, 24 Oct 2019 11:02:22 +0200
> > schrieb Cedric Hombourger <Cedric_Hombourger@mentor.com>:
> >
> >> Check for .cfg files listed in SRC_URI and merge them with the
> >> main defconfig using the kernel merge_config script.
> >>
> >> Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
> >> ---
> >> .../linux/files/build-kernel.sh | 5 ++++-
> >> meta/recipes-kernel/linux/linux-custom.inc | 20
> >> +++++++++++++++++++ 2 files changed, 24 insertions(+), 1
> >> deletion(-)
> >>
> >> diff --git a/meta/recipes-kernel/linux/files/build-kernel.sh
> >> b/meta/recipes-kernel/linux/files/build-kernel.sh index
> >> cb310f7..9faa6bb 100644 ---
> >> a/meta/recipes-kernel/linux/files/build-kernel.sh +++
> >> b/meta/recipes-kernel/linux/files/build-kernel.sh @@ -36,7 +36,10
> >> @@ REPACK_DIR="$1/../repack"
> >> REPACK_LINUX_IMAGE_DIR="${REPACK_DIR}/linux-image"
> >> REPACK_LINUX_HEADERS_DIR="${REPACK_DIR}/linux-headers"
> >> -make ${KERNEL_DEFCONFIG}
> >> +make ${KERNEL_DEFCONFIG} || exit ${?}
> >> +if [ -n "${KERNEL_FRAGMENTS}" ]; then
> >> + scripts/kconfig/merge_config.sh -m .config ${KERNEL_FRAGMENTS}
> >> +fi
> >>
> >> KV=$( make -s kernelrelease )
> >> if [ "${KV}" != "${PV}" ]; then
> >> diff --git a/meta/recipes-kernel/linux/linux-custom.inc
> >> b/meta/recipes-kernel/linux/linux-custom.inc index c53cd90..b06529f
> >> 100644 --- a/meta/recipes-kernel/linux/linux-custom.inc
> >> +++ b/meta/recipes-kernel/linux/linux-custom.inc
> >> @@ -18,6 +18,16 @@ python() {
> >> 'linux-headers-' + kernel_name)
> >> }
> >>
> >> +def config_fragments(d):
> >> + fragments = []
> >> + sources = d.getVar("SRC_URI").split()
> >> + for s in sources:
> >> + _, _, local, _, _, parm = bb.fetch.decodeurl(s)
> >> + base, ext = os.path.splitext(os.path.basename(local))
> >> + if ext and ext in (".cfg"):
> >> + fragments.append(local)
> >> + return fragments
> >> +
> >> inherit dpkg-base
> >>
> >> SRC_URI += "file://build-kernel.sh"
> >> @@ -71,6 +81,16 @@ dpkg_runbuild() {
> >> defconfig="defconfig"
> >> fi
> >>
> >> + # copy config fragments over to the kernel tree
> >> + src_frags="${@ " ".join(config_fragments(d)) }"
> >> + out_frags="${@ " ".join(map(lambda frag:
> >> 'debian/fragments/'
> >> + frag, config_fragments(d))) }"
> >> + rm -rf ${S}/debian/fragments
> >> + if [ -n "${src_frags}" ]; then
> >> + mkdir -p ${S}/debian/fragments
> >> + (cd ${WORKDIR} && cp ${src_frags}
> >> ${S}/debian/fragments/)
> >> + fi
> >> + export KERNEL_FRAGMENTS="${out_frags}"
> >> +
> >> E="${@ bb.utils.export_proxies(d)}"
> >>
> >> export PV=${PV}
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH 08/10] linux-custom: add support for kernel config fragments
2019-10-24 18:21 ` Henning Schild
2019-10-24 18:25 ` Cedric Hombourger
@ 2019-10-25 9:45 ` Cedric Hombourger
1 sibling, 0 replies; 40+ messages in thread
From: Cedric Hombourger @ 2019-10-25 9:45 UTC (permalink / raw)
To: Henning Schild; +Cc: isar-users
On 10/24/2019 8:21 PM, Henning Schild wrote:
> Is that taken from or inspired by OE? I have seen patterns like that
> for isar:
>
> do_prepare_build_prepend() {
> cat ${WORKDIR}/preempt-rt.cfg >> ${WORKDIR}/${KERNEL_DEFCONFIG}
> }
>
> In a recipe that extends a generic kernel recipe with some config
> switches.
>
> I am personally not a big fan of magic, and it seems the extension
> ".cfg" makes magic happen. We will need an apply=no like for patches.
Change implemented and tested locally. Moving on to the other findings
> Henning
>
>
> Am Thu, 24 Oct 2019 11:02:22 +0200
> schrieb Cedric Hombourger <Cedric_Hombourger@mentor.com>:
>
>> Check for .cfg files listed in SRC_URI and merge them with the
>> main defconfig using the kernel merge_config script.
>>
>> Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
>> ---
>> .../linux/files/build-kernel.sh | 5 ++++-
>> meta/recipes-kernel/linux/linux-custom.inc | 20
>> +++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-)
>>
>> diff --git a/meta/recipes-kernel/linux/files/build-kernel.sh
>> b/meta/recipes-kernel/linux/files/build-kernel.sh index
>> cb310f7..9faa6bb 100644 ---
>> a/meta/recipes-kernel/linux/files/build-kernel.sh +++
>> b/meta/recipes-kernel/linux/files/build-kernel.sh @@ -36,7 +36,10 @@
>> REPACK_DIR="$1/../repack"
>> REPACK_LINUX_IMAGE_DIR="${REPACK_DIR}/linux-image"
>> REPACK_LINUX_HEADERS_DIR="${REPACK_DIR}/linux-headers"
>> -make ${KERNEL_DEFCONFIG}
>> +make ${KERNEL_DEFCONFIG} || exit ${?}
>> +if [ -n "${KERNEL_FRAGMENTS}" ]; then
>> + scripts/kconfig/merge_config.sh -m .config ${KERNEL_FRAGMENTS}
>> +fi
>>
>> KV=$( make -s kernelrelease )
>> if [ "${KV}" != "${PV}" ]; then
>> diff --git a/meta/recipes-kernel/linux/linux-custom.inc
>> b/meta/recipes-kernel/linux/linux-custom.inc index c53cd90..b06529f
>> 100644 --- a/meta/recipes-kernel/linux/linux-custom.inc
>> +++ b/meta/recipes-kernel/linux/linux-custom.inc
>> @@ -18,6 +18,16 @@ python() {
>> 'linux-headers-' + kernel_name)
>> }
>>
>> +def config_fragments(d):
>> + fragments = []
>> + sources = d.getVar("SRC_URI").split()
>> + for s in sources:
>> + _, _, local, _, _, parm = bb.fetch.decodeurl(s)
>> + base, ext = os.path.splitext(os.path.basename(local))
>> + if ext and ext in (".cfg"):
>> + fragments.append(local)
>> + return fragments
>> +
>> inherit dpkg-base
>>
>> SRC_URI += "file://build-kernel.sh"
>> @@ -71,6 +81,16 @@ dpkg_runbuild() {
>> defconfig="defconfig"
>> fi
>>
>> + # copy config fragments over to the kernel tree
>> + src_frags="${@ " ".join(config_fragments(d)) }"
>> + out_frags="${@ " ".join(map(lambda frag: 'debian/fragments/'
>> + frag, config_fragments(d))) }"
>> + rm -rf ${S}/debian/fragments
>> + if [ -n "${src_frags}" ]; then
>> + mkdir -p ${S}/debian/fragments
>> + (cd ${WORKDIR} && cp ${src_frags}
>> ${S}/debian/fragments/)
>> + fi
>> + export KERNEL_FRAGMENTS="${out_frags}"
>> +
>> E="${@ bb.utils.export_proxies(d)}"
>>
>> export PV=${PV}
^ permalink raw reply [flat|nested] 40+ messages in thread
* [PATCH 09/10] linux-mainline: disable support for HFS to demonstrate use of config fragments
2019-10-24 9:02 [PATCH 00/10] add ci40 machine support + new Isar features Cedric Hombourger
` (7 preceding siblings ...)
2019-10-24 9:02 ` [PATCH 08/10] linux-custom: add support for kernel config fragments Cedric Hombourger
@ 2019-10-24 9:02 ` Cedric Hombourger
2019-10-24 9:02 ` [PATCH 10/10] meta-isar: add creator-ci40-marduk machine (mipsel + mainline kernel) Cedric Hombourger
` (2 subsequent siblings)
11 siblings, 0 replies; 40+ messages in thread
From: Cedric Hombourger @ 2019-10-24 9:02 UTC (permalink / raw)
To: isar-users; +Cc: Cedric Hombourger
Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
---
meta-isar/recipes-kernel/linux/files/no-fs-hfs.cfg | 2 ++
meta-isar/recipes-kernel/linux/linux-mainline_4.19.80.bb | 4 +++-
2 files changed, 5 insertions(+), 1 deletion(-)
create mode 100644 meta-isar/recipes-kernel/linux/files/no-fs-hfs.cfg
diff --git a/meta-isar/recipes-kernel/linux/files/no-fs-hfs.cfg b/meta-isar/recipes-kernel/linux/files/no-fs-hfs.cfg
new file mode 100644
index 0000000..5dbfadb
--- /dev/null
+++ b/meta-isar/recipes-kernel/linux/files/no-fs-hfs.cfg
@@ -0,0 +1,2 @@
+# CONFIG_FS_HFS is not set
+# CONFIG_HFSPLUS_FS is not set
diff --git a/meta-isar/recipes-kernel/linux/linux-mainline_4.19.80.bb b/meta-isar/recipes-kernel/linux/linux-mainline_4.19.80.bb
index b41d1a8..83038f0 100644
--- a/meta-isar/recipes-kernel/linux/linux-mainline_4.19.80.bb
+++ b/meta-isar/recipes-kernel/linux/linux-mainline_4.19.80.bb
@@ -11,7 +11,9 @@ ARCHIVE_VERSION = "${@ d.getVar('PV')[:-2] if d.getVar('PV').endswith('.0') else
SRC_URI += " \
https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-${ARCHIVE_VERSION}.tar.xz \
- file://x86_64_defconfig"
+ file://x86_64_defconfig \
+ file://no-fs-hfs.cfg"
+
SRC_URI[sha256sum] = "80a9ba764e088aa7fddfef5a97c0236905e291468a37832243b6f3828d36e7ec"
SRC_URI_append_de0-nano-soc = " \
--
2.20.1
^ permalink raw reply [flat|nested] 40+ messages in thread
* [PATCH 10/10] meta-isar: add creator-ci40-marduk machine (mipsel + mainline kernel)
2019-10-24 9:02 [PATCH 00/10] add ci40 machine support + new Isar features Cedric Hombourger
` (8 preceding siblings ...)
2019-10-24 9:02 ` [PATCH 09/10] linux-mainline: disable support for HFS to demonstrate use of " Cedric Hombourger
@ 2019-10-24 9:02 ` Cedric Hombourger
2019-10-24 18:13 ` Henning Schild
2019-10-24 18:15 ` [PATCH 00/10] add ci40 machine support + new Isar features Henning Schild
2019-10-25 17:39 ` [PATCH v2 0/7] custom kernel recipes enhancements (was Ci40 support) Cedric Hombourger
11 siblings, 1 reply; 40+ messages in thread
From: Cedric Hombourger @ 2019-10-24 9:02 UTC (permalink / raw)
To: isar-users; +Cc: Cedric Hombourger
Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
---
.../creator-ci40-image-extension.bbclass | 9 +++++++
meta-isar/conf/local.conf.sample | 1 +
.../conf/machine/creator-ci40-marduk.conf | 14 ++++++++++
.../creator-ci40-marduk-buster.conf | 7 +++++
...tachio-set-KBUILD_IMAGE-to-uImage.gz.patch | 27 +++++++++++++++++++
.../recipes-kernel/linux/files/no-display.cfg | 1 +
.../recipes-kernel/linux/files/no-fs-nfs.cfg | 6 +++++
.../recipes-kernel/linux/files/no-sound.cfg | 1 +
.../linux/linux-mainline_4.19.80.bb | 6 +++++
9 files changed, 72 insertions(+)
create mode 100644 meta-isar/classes/creator-ci40-image-extension.bbclass
create mode 100644 meta-isar/conf/machine/creator-ci40-marduk.conf
create mode 100644 meta-isar/conf/multiconfig/creator-ci40-marduk-buster.conf
create mode 100644 meta-isar/recipes-kernel/linux/files/0001-MIPS-pistachio-set-KBUILD_IMAGE-to-uImage.gz.patch
create mode 100644 meta-isar/recipes-kernel/linux/files/no-display.cfg
create mode 100644 meta-isar/recipes-kernel/linux/files/no-fs-nfs.cfg
create mode 100644 meta-isar/recipes-kernel/linux/files/no-sound.cfg
diff --git a/meta-isar/classes/creator-ci40-image-extension.bbclass b/meta-isar/classes/creator-ci40-image-extension.bbclass
new file mode 100644
index 0000000..9879cd7
--- /dev/null
+++ b/meta-isar/classes/creator-ci40-image-extension.bbclass
@@ -0,0 +1,9 @@
+# This software is a part of ISAR.
+# Copyright (C) Mentor Graphics, a Siemens business, 2019
+
+ROOTFS_POSTPROCESS_COMMAND =+ "image_postprocess_creator_ci40"
+image_postprocess_creator_ci40() {
+ sudo mv ${IMAGE_ROOTFS}/boot/vmlinux-* ${IMAGE_ROOTFS}/uImage
+ sudo mv ${IMAGE_ROOTFS}/usr/lib/linux-*/img/*dtb ${IMAGE_ROOTFS}/
+ sudo rm -f ${IMAGE_ROOTFS}/vmlinux*
+}
diff --git a/meta-isar/conf/local.conf.sample b/meta-isar/conf/local.conf.sample
index d73da1d..62218c2 100644
--- a/meta-isar/conf/local.conf.sample
+++ b/meta-isar/conf/local.conf.sample
@@ -59,6 +59,7 @@ BBMULTICONFIG = " \
hikey-stretch \
nand-ubi-demo-buster \
rpi-stretch \
+ creator-ci40-marduk-buster \
"
#
diff --git a/meta-isar/conf/machine/creator-ci40-marduk.conf b/meta-isar/conf/machine/creator-ci40-marduk.conf
new file mode 100644
index 0000000..41c3b3d
--- /dev/null
+++ b/meta-isar/conf/machine/creator-ci40-marduk.conf
@@ -0,0 +1,14 @@
+#
+# Copyright (c) Mentor Graphics, a Siemens business, 2019
+#
+# SPDX-License-Identifier: MIT
+
+DISTRO_ARCH ?= "mipsel"
+
+KERNEL_NAME ?= "mainline"
+KERNEL_DEFCONFIG ?= "pistachio_defconfig"
+KERNEL_FILE ?= "vmlinux"
+KBUILD_DEPENDS_append = " u-boot-tools "
+
+IMAGE_TYPE ?= "ext4-img"
+CUSTOM_IMAGE_EXTENSIONS_append = " creator-ci40-image-extension "
diff --git a/meta-isar/conf/multiconfig/creator-ci40-marduk-buster.conf b/meta-isar/conf/multiconfig/creator-ci40-marduk-buster.conf
new file mode 100644
index 0000000..b634a56
--- /dev/null
+++ b/meta-isar/conf/multiconfig/creator-ci40-marduk-buster.conf
@@ -0,0 +1,7 @@
+#
+# Copyright (c) Mentor Graphics, a Siemens business, 2019
+#
+# SPDX-License-Identifier: MIT
+
+MACHINE = "creator-ci40-marduk"
+DISTRO = "debian-buster"
diff --git a/meta-isar/recipes-kernel/linux/files/0001-MIPS-pistachio-set-KBUILD_IMAGE-to-uImage.gz.patch b/meta-isar/recipes-kernel/linux/files/0001-MIPS-pistachio-set-KBUILD_IMAGE-to-uImage.gz.patch
new file mode 100644
index 0000000..33ee90f
--- /dev/null
+++ b/meta-isar/recipes-kernel/linux/files/0001-MIPS-pistachio-set-KBUILD_IMAGE-to-uImage.gz.patch
@@ -0,0 +1,27 @@
+From 7b8209dd21049d57e80ece10862d90105a1f6340 Mon Sep 17 00:00:00 2001
+From: Cedric Hombourger <Cedric_Hombourger@mentor.com>
+Date: Thu, 13 Jun 2019 15:56:48 -0400
+Subject: [PATCH] MIPS: pistachio: set KBUILD_IMAGE to uImage.gz
+
+scripts/package/builddep uses the image_name make target to determine
+the kernel image binary to be included in the linux-image package. As
+the u-boot binary expects a kernel in the uImage format, make sure
+"make -s image_name" prints arch/mips/boot/uImage.gz.
+
+Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
+---
+ arch/mips/pistachio/Platform | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/arch/mips/pistachio/Platform b/arch/mips/pistachio/Platform
+index c3592b374ad2..ab3962b8c3b4 100644
+--- a/arch/mips/pistachio/Platform
++++ b/arch/mips/pistachio/Platform
+@@ -7,3 +7,4 @@ cflags-$(CONFIG_MACH_PISTACHIO) += \
+ load-$(CONFIG_MACH_PISTACHIO) += 0xffffffff80400000
+ zload-$(CONFIG_MACH_PISTACHIO) += 0xffffffff81000000
+ all-$(CONFIG_MACH_PISTACHIO) := uImage.gz
++KBUILD_IMAGE := arch/mips/boot/uImage.gz
+--
+2.11.0
+
diff --git a/meta-isar/recipes-kernel/linux/files/no-display.cfg b/meta-isar/recipes-kernel/linux/files/no-display.cfg
new file mode 100644
index 0000000..7310c1a
--- /dev/null
+++ b/meta-isar/recipes-kernel/linux/files/no-display.cfg
@@ -0,0 +1 @@
+# CONFIG_FB is not set
diff --git a/meta-isar/recipes-kernel/linux/files/no-fs-nfs.cfg b/meta-isar/recipes-kernel/linux/files/no-fs-nfs.cfg
new file mode 100644
index 0000000..00a1fd2
--- /dev/null
+++ b/meta-isar/recipes-kernel/linux/files/no-fs-nfs.cfg
@@ -0,0 +1,6 @@
+# CONFIG_NFS is not set
+# CONFIG_NFS_COMMON is not set
+# CONFIG_NFS_V2 is not set
+# CONFIG_NFS_V3 is not set
+# CONFIG_ROOT_NFS is not set
+# CONFIG_LOCKD is not set
diff --git a/meta-isar/recipes-kernel/linux/files/no-sound.cfg b/meta-isar/recipes-kernel/linux/files/no-sound.cfg
new file mode 100644
index 0000000..c4f3666
--- /dev/null
+++ b/meta-isar/recipes-kernel/linux/files/no-sound.cfg
@@ -0,0 +1 @@
+# CONFIG_SOUND is not set
diff --git a/meta-isar/recipes-kernel/linux/linux-mainline_4.19.80.bb b/meta-isar/recipes-kernel/linux/linux-mainline_4.19.80.bb
index 83038f0..13018a4 100644
--- a/meta-isar/recipes-kernel/linux/linux-mainline_4.19.80.bb
+++ b/meta-isar/recipes-kernel/linux/linux-mainline_4.19.80.bb
@@ -19,6 +19,12 @@ SRC_URI[sha256sum] = "80a9ba764e088aa7fddfef5a97c0236905e291468a37832243b6f3828d
SRC_URI_append_de0-nano-soc = " \
file://0001-ARM-dts-socfpga-Rename-socfpga_cyclone5_de0_-sockit-.patch"
+SRC_URI_append_creator-ci40-marduk = " \
+ file://0001-MIPS-pistachio-set-KBUILD_IMAGE-to-uImage.gz.patch \
+ file://no-display.cfg \
+ file://no-fs-nfs.cfg \
+ file://no-sound.cfg"
+
S = "${WORKDIR}/linux-${ARCHIVE_VERSION}"
KERNEL_DEFCONFIG_qemuamd64 = "x86_64_defconfig"
--
2.20.1
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH 10/10] meta-isar: add creator-ci40-marduk machine (mipsel + mainline kernel)
2019-10-24 9:02 ` [PATCH 10/10] meta-isar: add creator-ci40-marduk machine (mipsel + mainline kernel) Cedric Hombourger
@ 2019-10-24 18:13 ` Henning Schild
2019-10-24 18:26 ` Henning Schild
2019-11-06 16:11 ` Jan Kiszka
0 siblings, 2 replies; 40+ messages in thread
From: Henning Schild @ 2019-10-24 18:13 UTC (permalink / raw)
To: Cedric Hombourger; +Cc: isar-users
Am Thu, 24 Oct 2019 11:02:24 +0200
schrieb Cedric Hombourger <Cedric_Hombourger@mentor.com>:
> Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
> ---
> .../creator-ci40-image-extension.bbclass | 9 +++++++
> meta-isar/conf/local.conf.sample | 1 +
> .../conf/machine/creator-ci40-marduk.conf | 14 ++++++++++
> .../creator-ci40-marduk-buster.conf | 7 +++++
> ...tachio-set-KBUILD_IMAGE-to-uImage.gz.patch | 27
> +++++++++++++++++++ .../recipes-kernel/linux/files/no-display.cfg |
> 1 + .../recipes-kernel/linux/files/no-fs-nfs.cfg | 6 +++++
> .../recipes-kernel/linux/files/no-sound.cfg | 1 +
> .../linux/linux-mainline_4.19.80.bb | 6 +++++
> 9 files changed, 72 insertions(+)
> create mode 100644
> meta-isar/classes/creator-ci40-image-extension.bbclass create mode
> 100644 meta-isar/conf/machine/creator-ci40-marduk.conf create mode
> 100644 meta-isar/conf/multiconfig/creator-ci40-marduk-buster.conf
> create mode 100644
> meta-isar/recipes-kernel/linux/files/0001-MIPS-pistachio-set-KBUILD_IMAGE-to-uImage.gz.patch
> create mode 100644
> meta-isar/recipes-kernel/linux/files/no-display.cfg create mode
> 100644 meta-isar/recipes-kernel/linux/files/no-fs-nfs.cfg create mode
> 100644 meta-isar/recipes-kernel/linux/files/no-sound.cfg
>
> diff --git a/meta-isar/classes/creator-ci40-image-extension.bbclass
> b/meta-isar/classes/creator-ci40-image-extension.bbclass new file
> mode 100644 index 0000000..9879cd7
> --- /dev/null
> +++ b/meta-isar/classes/creator-ci40-image-extension.bbclass
> @@ -0,0 +1,9 @@
> +# This software is a part of ISAR.
> +# Copyright (C) Mentor Graphics, a Siemens business, 2019
> +
> +ROOTFS_POSTPROCESS_COMMAND =+ "image_postprocess_creator_ci40"
> +image_postprocess_creator_ci40() {
> + sudo mv ${IMAGE_ROOTFS}/boot/vmlinux-* ${IMAGE_ROOTFS}/uImage
> + sudo mv ${IMAGE_ROOTFS}/usr/lib/linux-*/img/*dtb ${IMAGE_ROOTFS}/
> + sudo rm -f ${IMAGE_ROOTFS}/vmlinux*
> +}
And this is what you needed the hacky feature for. I understand but i
guess is can be done with postinst. I think the symlinks in / are done
by postinst scripts. And the final location is really only interesting
for your bootloader, which should maybe look in /boot.
Moving these files around will cause an inconsistent view of your
package manager on your rootfs. Copies to /usr/local/ would maybe be
fine.
Henning
> diff --git a/meta-isar/conf/local.conf.sample
> b/meta-isar/conf/local.conf.sample index d73da1d..62218c2 100644
> --- a/meta-isar/conf/local.conf.sample
> +++ b/meta-isar/conf/local.conf.sample
> @@ -59,6 +59,7 @@ BBMULTICONFIG = " \
> hikey-stretch \
> nand-ubi-demo-buster \
> rpi-stretch \
> + creator-ci40-marduk-buster \
> "
>
> #
> diff --git a/meta-isar/conf/machine/creator-ci40-marduk.conf
> b/meta-isar/conf/machine/creator-ci40-marduk.conf new file mode 100644
> index 0000000..41c3b3d
> --- /dev/null
> +++ b/meta-isar/conf/machine/creator-ci40-marduk.conf
> @@ -0,0 +1,14 @@
> +#
> +# Copyright (c) Mentor Graphics, a Siemens business, 2019
> +#
> +# SPDX-License-Identifier: MIT
> +
> +DISTRO_ARCH ?= "mipsel"
> +
> +KERNEL_NAME ?= "mainline"
> +KERNEL_DEFCONFIG ?= "pistachio_defconfig"
> +KERNEL_FILE ?= "vmlinux"
> +KBUILD_DEPENDS_append = " u-boot-tools "
> +
> +IMAGE_TYPE ?= "ext4-img"
> +CUSTOM_IMAGE_EXTENSIONS_append = " creator-ci40-image-extension "
> diff --git
> a/meta-isar/conf/multiconfig/creator-ci40-marduk-buster.conf
> b/meta-isar/conf/multiconfig/creator-ci40-marduk-buster.conf new file
> mode 100644 index 0000000..b634a56 --- /dev/null
> +++ b/meta-isar/conf/multiconfig/creator-ci40-marduk-buster.conf
> @@ -0,0 +1,7 @@
> +#
> +# Copyright (c) Mentor Graphics, a Siemens business, 2019
> +#
> +# SPDX-License-Identifier: MIT
> +
> +MACHINE = "creator-ci40-marduk"
> +DISTRO = "debian-buster"
> diff --git
> a/meta-isar/recipes-kernel/linux/files/0001-MIPS-pistachio-set-KBUILD_IMAGE-to-uImage.gz.patch
> b/meta-isar/recipes-kernel/linux/files/0001-MIPS-pistachio-set-KBUILD_IMAGE-to-uImage.gz.patch
> new file mode 100644 index 0000000..33ee90f --- /dev/null
> +++
> b/meta-isar/recipes-kernel/linux/files/0001-MIPS-pistachio-set-KBUILD_IMAGE-to-uImage.gz.patch
> @@ -0,0 +1,27 @@ +From 7b8209dd21049d57e80ece10862d90105a1f6340 Mon
> Sep 17 00:00:00 2001 +From: Cedric Hombourger
> <Cedric_Hombourger@mentor.com> +Date: Thu, 13 Jun 2019 15:56:48 -0400
> +Subject: [PATCH] MIPS: pistachio: set KBUILD_IMAGE to uImage.gz
> +
> +scripts/package/builddep uses the image_name make target to determine
> +the kernel image binary to be included in the linux-image package. As
> +the u-boot binary expects a kernel in the uImage format, make sure
> +"make -s image_name" prints arch/mips/boot/uImage.gz.
> +
> +Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
> +---
> + arch/mips/pistachio/Platform | 1 +
> + 1 file changed, 1 insertion(+)
> +
> +diff --git a/arch/mips/pistachio/Platform
> b/arch/mips/pistachio/Platform +index c3592b374ad2..ab3962b8c3b4
> 100644 +--- a/arch/mips/pistachio/Platform
> ++++ b/arch/mips/pistachio/Platform
> +@@ -7,3 +7,4 @@ cflags-$(CONFIG_MACH_PISTACHIO)
> += \
> + load-$(CONFIG_MACH_PISTACHIO) += 0xffffffff80400000
> + zload-$(CONFIG_MACH_PISTACHIO) += 0xffffffff81000000
> + all-$(CONFIG_MACH_PISTACHIO) := uImage.gz
> ++KBUILD_IMAGE := arch/mips/boot/uImage.gz
> +--
> +2.11.0
> +
> diff --git a/meta-isar/recipes-kernel/linux/files/no-display.cfg
> b/meta-isar/recipes-kernel/linux/files/no-display.cfg new file mode
> 100644 index 0000000..7310c1a
> --- /dev/null
> +++ b/meta-isar/recipes-kernel/linux/files/no-display.cfg
> @@ -0,0 +1 @@
> +# CONFIG_FB is not set
> diff --git a/meta-isar/recipes-kernel/linux/files/no-fs-nfs.cfg
> b/meta-isar/recipes-kernel/linux/files/no-fs-nfs.cfg new file mode
> 100644 index 0000000..00a1fd2
> --- /dev/null
> +++ b/meta-isar/recipes-kernel/linux/files/no-fs-nfs.cfg
> @@ -0,0 +1,6 @@
> +# CONFIG_NFS is not set
> +# CONFIG_NFS_COMMON is not set
> +# CONFIG_NFS_V2 is not set
> +# CONFIG_NFS_V3 is not set
> +# CONFIG_ROOT_NFS is not set
> +# CONFIG_LOCKD is not set
> diff --git a/meta-isar/recipes-kernel/linux/files/no-sound.cfg
> b/meta-isar/recipes-kernel/linux/files/no-sound.cfg new file mode
> 100644 index 0000000..c4f3666
> --- /dev/null
> +++ b/meta-isar/recipes-kernel/linux/files/no-sound.cfg
> @@ -0,0 +1 @@
> +# CONFIG_SOUND is not set
> diff --git a/meta-isar/recipes-kernel/linux/linux-mainline_4.19.80.bb
> b/meta-isar/recipes-kernel/linux/linux-mainline_4.19.80.bb index
> 83038f0..13018a4 100644 ---
> a/meta-isar/recipes-kernel/linux/linux-mainline_4.19.80.bb +++
> b/meta-isar/recipes-kernel/linux/linux-mainline_4.19.80.bb @@ -19,6
> +19,12 @@ SRC_URI[sha256sum] =
> "80a9ba764e088aa7fddfef5a97c0236905e291468a37832243b6f3828d
> SRC_URI_append_de0-nano-soc = " \
> file://0001-ARM-dts-socfpga-Rename-socfpga_cyclone5_de0_-sockit-.patch"
> +SRC_URI_append_creator-ci40-marduk = " \
> + file://0001-MIPS-pistachio-set-KBUILD_IMAGE-to-uImage.gz.patch \
> + file://no-display.cfg \
> + file://no-fs-nfs.cfg \
> + file://no-sound.cfg"
> +
> S = "${WORKDIR}/linux-${ARCHIVE_VERSION}"
>
> KERNEL_DEFCONFIG_qemuamd64 = "x86_64_defconfig"
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH 10/10] meta-isar: add creator-ci40-marduk machine (mipsel + mainline kernel)
2019-10-24 18:13 ` Henning Schild
@ 2019-10-24 18:26 ` Henning Schild
2019-11-06 16:11 ` Jan Kiszka
1 sibling, 0 replies; 40+ messages in thread
From: Henning Schild @ 2019-10-24 18:26 UTC (permalink / raw)
To: Cedric Hombourger; +Cc: isar-users
Am Thu, 24 Oct 2019 20:13:39 +0200
schrieb "[ext] Henning Schild" <henning.schild@siemens.com>:
> Am Thu, 24 Oct 2019 11:02:24 +0200
> schrieb Cedric Hombourger <Cedric_Hombourger@mentor.com>:
>
> > Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
> > ---
> > .../creator-ci40-image-extension.bbclass | 9 +++++++
> > meta-isar/conf/local.conf.sample | 1 +
> > .../conf/machine/creator-ci40-marduk.conf | 14 ++++++++++
> > .../creator-ci40-marduk-buster.conf | 7 +++++
> > ...tachio-set-KBUILD_IMAGE-to-uImage.gz.patch | 27
> > +++++++++++++++++++ .../recipes-kernel/linux/files/no-display.cfg |
> > 1 + .../recipes-kernel/linux/files/no-fs-nfs.cfg | 6 +++++
> > .../recipes-kernel/linux/files/no-sound.cfg | 1 +
> > .../linux/linux-mainline_4.19.80.bb | 6 +++++
> > 9 files changed, 72 insertions(+)
> > create mode 100644
> > meta-isar/classes/creator-ci40-image-extension.bbclass create mode
> > 100644 meta-isar/conf/machine/creator-ci40-marduk.conf create mode
> > 100644 meta-isar/conf/multiconfig/creator-ci40-marduk-buster.conf
> > create mode 100644
> > meta-isar/recipes-kernel/linux/files/0001-MIPS-pistachio-set-KBUILD_IMAGE-to-uImage.gz.patch
> > create mode 100644
> > meta-isar/recipes-kernel/linux/files/no-display.cfg create mode
> > 100644 meta-isar/recipes-kernel/linux/files/no-fs-nfs.cfg create
> > mode 100644 meta-isar/recipes-kernel/linux/files/no-sound.cfg
> >
> > diff --git a/meta-isar/classes/creator-ci40-image-extension.bbclass
> > b/meta-isar/classes/creator-ci40-image-extension.bbclass new file
> > mode 100644 index 0000000..9879cd7
> > --- /dev/null
> > +++ b/meta-isar/classes/creator-ci40-image-extension.bbclass
> > @@ -0,0 +1,9 @@
> > +# This software is a part of ISAR.
> > +# Copyright (C) Mentor Graphics, a Siemens business, 2019
> > +
> > +ROOTFS_POSTPROCESS_COMMAND =+ "image_postprocess_creator_ci40"
> > +image_postprocess_creator_ci40() {
> > + sudo mv ${IMAGE_ROOTFS}/boot/vmlinux-* ${IMAGE_ROOTFS}/uImage
> > + sudo mv ${IMAGE_ROOTFS}/usr/lib/linux-*/img/*dtb
> > ${IMAGE_ROOTFS}/
> > + sudo rm -f ${IMAGE_ROOTFS}/vmlinux*
> > +}
>
> And this is what you needed the hacky feature for. I understand but i
> guess is can be done with postinst. I think the symlinks in / are done
> by postinst scripts. And the final location is really only interesting
> for your bootloader, which should maybe look in /boot.
>
> Moving these files around will cause an inconsistent view of your
> package manager on your rootfs. Copies to /usr/local/ would maybe be
> fine.
To further support my claim that this is evil. You will not be able to
ship kernel updates to that box via a debian package. Or you will have
to solve the postinst at that point in time.
Henning
> Henning
>
> > diff --git a/meta-isar/conf/local.conf.sample
> > b/meta-isar/conf/local.conf.sample index d73da1d..62218c2 100644
> > --- a/meta-isar/conf/local.conf.sample
> > +++ b/meta-isar/conf/local.conf.sample
> > @@ -59,6 +59,7 @@ BBMULTICONFIG = " \
> > hikey-stretch \
> > nand-ubi-demo-buster \
> > rpi-stretch \
> > + creator-ci40-marduk-buster \
> > "
> >
> > #
> > diff --git a/meta-isar/conf/machine/creator-ci40-marduk.conf
> > b/meta-isar/conf/machine/creator-ci40-marduk.conf new file mode
> > 100644 index 0000000..41c3b3d
> > --- /dev/null
> > +++ b/meta-isar/conf/machine/creator-ci40-marduk.conf
> > @@ -0,0 +1,14 @@
> > +#
> > +# Copyright (c) Mentor Graphics, a Siemens business, 2019
> > +#
> > +# SPDX-License-Identifier: MIT
> > +
> > +DISTRO_ARCH ?= "mipsel"
> > +
> > +KERNEL_NAME ?= "mainline"
> > +KERNEL_DEFCONFIG ?= "pistachio_defconfig"
> > +KERNEL_FILE ?= "vmlinux"
> > +KBUILD_DEPENDS_append = " u-boot-tools "
> > +
> > +IMAGE_TYPE ?= "ext4-img"
> > +CUSTOM_IMAGE_EXTENSIONS_append = " creator-ci40-image-extension "
> > diff --git
> > a/meta-isar/conf/multiconfig/creator-ci40-marduk-buster.conf
> > b/meta-isar/conf/multiconfig/creator-ci40-marduk-buster.conf new
> > file mode 100644 index 0000000..b634a56 --- /dev/null
> > +++ b/meta-isar/conf/multiconfig/creator-ci40-marduk-buster.conf
> > @@ -0,0 +1,7 @@
> > +#
> > +# Copyright (c) Mentor Graphics, a Siemens business, 2019
> > +#
> > +# SPDX-License-Identifier: MIT
> > +
> > +MACHINE = "creator-ci40-marduk"
> > +DISTRO = "debian-buster"
> > diff --git
> > a/meta-isar/recipes-kernel/linux/files/0001-MIPS-pistachio-set-KBUILD_IMAGE-to-uImage.gz.patch
> > b/meta-isar/recipes-kernel/linux/files/0001-MIPS-pistachio-set-KBUILD_IMAGE-to-uImage.gz.patch
> > new file mode 100644 index 0000000..33ee90f --- /dev/null
> > +++
> > b/meta-isar/recipes-kernel/linux/files/0001-MIPS-pistachio-set-KBUILD_IMAGE-to-uImage.gz.patch
> > @@ -0,0 +1,27 @@ +From 7b8209dd21049d57e80ece10862d90105a1f6340 Mon
> > Sep 17 00:00:00 2001 +From: Cedric Hombourger
> > <Cedric_Hombourger@mentor.com> +Date: Thu, 13 Jun 2019 15:56:48
> > -0400 +Subject: [PATCH] MIPS: pistachio: set KBUILD_IMAGE to
> > uImage.gz +
> > +scripts/package/builddep uses the image_name make target to
> > determine +the kernel image binary to be included in the
> > linux-image package. As +the u-boot binary expects a kernel in the
> > uImage format, make sure +"make -s image_name" prints
> > arch/mips/boot/uImage.gz. +
> > +Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
> > +---
> > + arch/mips/pistachio/Platform | 1 +
> > + 1 file changed, 1 insertion(+)
> > +
> > +diff --git a/arch/mips/pistachio/Platform
> > b/arch/mips/pistachio/Platform +index c3592b374ad2..ab3962b8c3b4
> > 100644 +--- a/arch/mips/pistachio/Platform
> > ++++ b/arch/mips/pistachio/Platform
> > +@@ -7,3 +7,4 @@ cflags-$(CONFIG_MACH_PISTACHIO)
> > += \
> > + load-$(CONFIG_MACH_PISTACHIO) += 0xffffffff80400000
> > + zload-$(CONFIG_MACH_PISTACHIO) +=
> > 0xffffffff81000000
> > + all-$(CONFIG_MACH_PISTACHIO) := uImage.gz
> > ++KBUILD_IMAGE :=
> > arch/mips/boot/uImage.gz +--
> > +2.11.0
> > +
> > diff --git a/meta-isar/recipes-kernel/linux/files/no-display.cfg
> > b/meta-isar/recipes-kernel/linux/files/no-display.cfg new file mode
> > 100644 index 0000000..7310c1a
> > --- /dev/null
> > +++ b/meta-isar/recipes-kernel/linux/files/no-display.cfg
> > @@ -0,0 +1 @@
> > +# CONFIG_FB is not set
> > diff --git a/meta-isar/recipes-kernel/linux/files/no-fs-nfs.cfg
> > b/meta-isar/recipes-kernel/linux/files/no-fs-nfs.cfg new file mode
> > 100644 index 0000000..00a1fd2
> > --- /dev/null
> > +++ b/meta-isar/recipes-kernel/linux/files/no-fs-nfs.cfg
> > @@ -0,0 +1,6 @@
> > +# CONFIG_NFS is not set
> > +# CONFIG_NFS_COMMON is not set
> > +# CONFIG_NFS_V2 is not set
> > +# CONFIG_NFS_V3 is not set
> > +# CONFIG_ROOT_NFS is not set
> > +# CONFIG_LOCKD is not set
> > diff --git a/meta-isar/recipes-kernel/linux/files/no-sound.cfg
> > b/meta-isar/recipes-kernel/linux/files/no-sound.cfg new file mode
> > 100644 index 0000000..c4f3666
> > --- /dev/null
> > +++ b/meta-isar/recipes-kernel/linux/files/no-sound.cfg
> > @@ -0,0 +1 @@
> > +# CONFIG_SOUND is not set
> > diff --git
> > a/meta-isar/recipes-kernel/linux/linux-mainline_4.19.80.bb
> > b/meta-isar/recipes-kernel/linux/linux-mainline_4.19.80.bb index
> > 83038f0..13018a4 100644 ---
> > a/meta-isar/recipes-kernel/linux/linux-mainline_4.19.80.bb +++
> > b/meta-isar/recipes-kernel/linux/linux-mainline_4.19.80.bb @@ -19,6
> > +19,12 @@ SRC_URI[sha256sum] =
> > "80a9ba764e088aa7fddfef5a97c0236905e291468a37832243b6f3828d
> > SRC_URI_append_de0-nano-soc = " \
> > file://0001-ARM-dts-socfpga-Rename-socfpga_cyclone5_de0_-sockit-.patch"
> > +SRC_URI_append_creator-ci40-marduk = " \
> > + file://0001-MIPS-pistachio-set-KBUILD_IMAGE-to-uImage.gz.patch
> > \
> > + file://no-display.cfg \
> > + file://no-fs-nfs.cfg \
> > + file://no-sound.cfg"
> > +
> > S = "${WORKDIR}/linux-${ARCHIVE_VERSION}"
> >
> > KERNEL_DEFCONFIG_qemuamd64 = "x86_64_defconfig"
>
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH 10/10] meta-isar: add creator-ci40-marduk machine (mipsel + mainline kernel)
2019-10-24 18:13 ` Henning Schild
2019-10-24 18:26 ` Henning Schild
@ 2019-11-06 16:11 ` Jan Kiszka
1 sibling, 0 replies; 40+ messages in thread
From: Jan Kiszka @ 2019-11-06 16:11 UTC (permalink / raw)
To: [ext] Henning Schild, Cedric Hombourger; +Cc: isar-users
On 24.10.19 20:13, [ext] Henning Schild wrote:
> Am Thu, 24 Oct 2019 11:02:24 +0200
> schrieb Cedric Hombourger <Cedric_Hombourger@mentor.com>:
>
>> Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
>> ---
>> .../creator-ci40-image-extension.bbclass | 9 +++++++
>> meta-isar/conf/local.conf.sample | 1 +
>> .../conf/machine/creator-ci40-marduk.conf | 14 ++++++++++
>> .../creator-ci40-marduk-buster.conf | 7 +++++
>> ...tachio-set-KBUILD_IMAGE-to-uImage.gz.patch | 27
>> +++++++++++++++++++ .../recipes-kernel/linux/files/no-display.cfg |
>> 1 + .../recipes-kernel/linux/files/no-fs-nfs.cfg | 6 +++++
>> .../recipes-kernel/linux/files/no-sound.cfg | 1 +
>> .../linux/linux-mainline_4.19.80.bb | 6 +++++
>> 9 files changed, 72 insertions(+)
>> create mode 100644
>> meta-isar/classes/creator-ci40-image-extension.bbclass create mode
>> 100644 meta-isar/conf/machine/creator-ci40-marduk.conf create mode
>> 100644 meta-isar/conf/multiconfig/creator-ci40-marduk-buster.conf
>> create mode 100644
>> meta-isar/recipes-kernel/linux/files/0001-MIPS-pistachio-set-KBUILD_IMAGE-to-uImage.gz.patch
>> create mode 100644
>> meta-isar/recipes-kernel/linux/files/no-display.cfg create mode
>> 100644 meta-isar/recipes-kernel/linux/files/no-fs-nfs.cfg create mode
>> 100644 meta-isar/recipes-kernel/linux/files/no-sound.cfg
>>
>> diff --git a/meta-isar/classes/creator-ci40-image-extension.bbclass
>> b/meta-isar/classes/creator-ci40-image-extension.bbclass new file
>> mode 100644 index 0000000..9879cd7
>> --- /dev/null
>> +++ b/meta-isar/classes/creator-ci40-image-extension.bbclass
>> @@ -0,0 +1,9 @@
>> +# This software is a part of ISAR.
>> +# Copyright (C) Mentor Graphics, a Siemens business, 2019
>> +
>> +ROOTFS_POSTPROCESS_COMMAND =+ "image_postprocess_creator_ci40"
>> +image_postprocess_creator_ci40() {
>> + sudo mv ${IMAGE_ROOTFS}/boot/vmlinux-* ${IMAGE_ROOTFS}/uImage
>> + sudo mv ${IMAGE_ROOTFS}/usr/lib/linux-*/img/*dtb ${IMAGE_ROOTFS}/
>> + sudo rm -f ${IMAGE_ROOTFS}/vmlinux*
>> +}
>
> And this is what you needed the hacky feature for. I understand but i
> guess is can be done with postinst. I think the symlinks in / are done
> by postinst scripts. And the final location is really only interesting
> for your bootloader, which should maybe look in /boot.
>
> Moving these files around will cause an inconsistent view of your
> package manager on your rootfs. Copies to /usr/local/ would maybe be
> fine.
I suspect it relates to limitation of the U-Boot scripting on that
particular board, doesn't it? Better patched there then.
Jan
--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH 00/10] add ci40 machine support + new Isar features
2019-10-24 9:02 [PATCH 00/10] add ci40 machine support + new Isar features Cedric Hombourger
` (9 preceding siblings ...)
2019-10-24 9:02 ` [PATCH 10/10] meta-isar: add creator-ci40-marduk machine (mipsel + mainline kernel) Cedric Hombourger
@ 2019-10-24 18:15 ` Henning Schild
2019-10-24 18:17 ` Cedric Hombourger
2019-10-25 17:39 ` [PATCH v2 0/7] custom kernel recipes enhancements (was Ci40 support) Cedric Hombourger
11 siblings, 1 reply; 40+ messages in thread
From: Henning Schild @ 2019-10-24 18:15 UTC (permalink / raw)
To: Cedric Hombourger; +Cc: isar-users
Cool stuff, thanks!
Henning
Am Thu, 24 Oct 2019 11:02:14 +0200
schrieb Cedric Hombourger <Cedric_Hombourger@mentor.com>:
> Add (basic) support for the Creator Ci40 board (mipsel) as a mean to
> validate our mipsel architecture support on real hardware. Several
> enhancements to our kernel recipes were created along the way:
>
> * update from 4.19.0 to 4.19.80
> * support for config fragments
>
> but also some fixes:
>
> * honor the KERNEL_FILE setting (mips uses vmlinux instead of
> vmlinuz)
> * correct SRC_URI for -stable releases ending with "0" (e.g. 4.19.80)
>
> All of this was ci_build tested with the other two patchsets I
> submitted earlier this week, namely:
>
> * [PATCH 0/1] update bitbake to version 1.44.0
> * [PATCH v2 0/5] miscellaneous (minor) fixes
>
> Cedric Hombourger (10):
> ci_build.sh: delay "set -x" for a clean --help output
> linux-custom: honor KERNEL_FILE setting
> bitbake.conf: set name of the qemu-static binary to use for mipsel
> recipes-kernel/linux: make KERNEL_DEFCONFIG support in-tree
> defconfigs linux-mainline: fix stripping of .0 from the kernel version
> linux-mainline: update from 4.19.0 to 4.19.80
> image: add CUSTOM_IMAGE_EXTENSIONS for user layers/machines to use
> linux-custom: add support for kernel config fragments
> linux-mainline: disable support for HFS to demonstrate use of
> config fragments meta-isar: add creator-ci40-marduk machine (mipsel +
> mainline kernel)
>
> .../creator-ci40-image-extension.bbclass | 9 ++++++
> meta-isar/conf/local.conf.sample | 1 +
> .../conf/machine/creator-ci40-marduk.conf | 14 ++++++++
> .../creator-ci40-marduk-buster.conf | 7 ++++
> ...tachio-set-KBUILD_IMAGE-to-uImage.gz.patch | 27 ++++++++++++++++
> .../recipes-kernel/linux/files/no-display.cfg | 1 +
> .../recipes-kernel/linux/files/no-fs-hfs.cfg | 2 ++
> .../recipes-kernel/linux/files/no-fs-nfs.cfg | 6 ++++
> .../recipes-kernel/linux/files/no-sound.cfg | 1 +
> ...ne_4.19.0.bb => linux-mainline_4.19.80.bb} | 14 ++++++--
> meta/classes/image.bbclass | 5 ++-
> meta/conf/bitbake.conf | 2 ++
> .../linux/files/build-kernel.sh | 13 ++++----
> meta/recipes-kernel/linux/linux-custom.inc | 32
> +++++++++++++++++-- scripts/ci_build.sh |
> 4 ++- 15 files changed, 124 insertions(+), 14 deletions(-)
> create mode 100644
> meta-isar/classes/creator-ci40-image-extension.bbclass create mode
> 100644 meta-isar/conf/machine/creator-ci40-marduk.conf create mode
> 100644 meta-isar/conf/multiconfig/creator-ci40-marduk-buster.conf
> create mode 100644
> meta-isar/recipes-kernel/linux/files/0001-MIPS-pistachio-set-KBUILD_IMAGE-to-uImage.gz.patch
> create mode 100644
> meta-isar/recipes-kernel/linux/files/no-display.cfg create mode
> 100644 meta-isar/recipes-kernel/linux/files/no-fs-hfs.cfg create mode
> 100644 meta-isar/recipes-kernel/linux/files/no-fs-nfs.cfg create mode
> 100644 meta-isar/recipes-kernel/linux/files/no-sound.cfg rename
> meta-isar/recipes-kernel/linux/{linux-mainline_4.19.0.bb =>
> linux-mainline_4.19.80.bb} (53%)
>
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH 00/10] add ci40 machine support + new Isar features
2019-10-24 18:15 ` [PATCH 00/10] add ci40 machine support + new Isar features Henning Schild
@ 2019-10-24 18:17 ` Cedric Hombourger
0 siblings, 0 replies; 40+ messages in thread
From: Cedric Hombourger @ 2019-10-24 18:17 UTC (permalink / raw)
To: Henning Schild; +Cc: isar-users
On 10/24/2019 8:15 PM, Henning Schild wrote:
> Cool stuff, thanks!
Thank you - I will work something out to get the image extension kludge
out :)
> Henning
>
> Am Thu, 24 Oct 2019 11:02:14 +0200
> schrieb Cedric Hombourger <Cedric_Hombourger@mentor.com>:
>
>> Add (basic) support for the Creator Ci40 board (mipsel) as a mean to
>> validate our mipsel architecture support on real hardware. Several
>> enhancements to our kernel recipes were created along the way:
>>
>> * update from 4.19.0 to 4.19.80
>> * support for config fragments
>>
>> but also some fixes:
>>
>> * honor the KERNEL_FILE setting (mips uses vmlinux instead of
>> vmlinuz)
>> * correct SRC_URI for -stable releases ending with "0" (e.g. 4.19.80)
>>
>> All of this was ci_build tested with the other two patchsets I
>> submitted earlier this week, namely:
>>
>> * [PATCH 0/1] update bitbake to version 1.44.0
>> * [PATCH v2 0/5] miscellaneous (minor) fixes
>>
>> Cedric Hombourger (10):
>> ci_build.sh: delay "set -x" for a clean --help output
>> linux-custom: honor KERNEL_FILE setting
>> bitbake.conf: set name of the qemu-static binary to use for mipsel
>> recipes-kernel/linux: make KERNEL_DEFCONFIG support in-tree
>> defconfigs linux-mainline: fix stripping of .0 from the kernel version
>> linux-mainline: update from 4.19.0 to 4.19.80
>> image: add CUSTOM_IMAGE_EXTENSIONS for user layers/machines to use
>> linux-custom: add support for kernel config fragments
>> linux-mainline: disable support for HFS to demonstrate use of
>> config fragments meta-isar: add creator-ci40-marduk machine (mipsel +
>> mainline kernel)
>>
>> .../creator-ci40-image-extension.bbclass | 9 ++++++
>> meta-isar/conf/local.conf.sample | 1 +
>> .../conf/machine/creator-ci40-marduk.conf | 14 ++++++++
>> .../creator-ci40-marduk-buster.conf | 7 ++++
>> ...tachio-set-KBUILD_IMAGE-to-uImage.gz.patch | 27 ++++++++++++++++
>> .../recipes-kernel/linux/files/no-display.cfg | 1 +
>> .../recipes-kernel/linux/files/no-fs-hfs.cfg | 2 ++
>> .../recipes-kernel/linux/files/no-fs-nfs.cfg | 6 ++++
>> .../recipes-kernel/linux/files/no-sound.cfg | 1 +
>> ...ne_4.19.0.bb => linux-mainline_4.19.80.bb} | 14 ++++++--
>> meta/classes/image.bbclass | 5 ++-
>> meta/conf/bitbake.conf | 2 ++
>> .../linux/files/build-kernel.sh | 13 ++++----
>> meta/recipes-kernel/linux/linux-custom.inc | 32
>> +++++++++++++++++-- scripts/ci_build.sh |
>> 4 ++- 15 files changed, 124 insertions(+), 14 deletions(-)
>> create mode 100644
>> meta-isar/classes/creator-ci40-image-extension.bbclass create mode
>> 100644 meta-isar/conf/machine/creator-ci40-marduk.conf create mode
>> 100644 meta-isar/conf/multiconfig/creator-ci40-marduk-buster.conf
>> create mode 100644
>> meta-isar/recipes-kernel/linux/files/0001-MIPS-pistachio-set-KBUILD_IMAGE-to-uImage.gz.patch
>> create mode 100644
>> meta-isar/recipes-kernel/linux/files/no-display.cfg create mode
>> 100644 meta-isar/recipes-kernel/linux/files/no-fs-hfs.cfg create mode
>> 100644 meta-isar/recipes-kernel/linux/files/no-fs-nfs.cfg create mode
>> 100644 meta-isar/recipes-kernel/linux/files/no-sound.cfg rename
>> meta-isar/recipes-kernel/linux/{linux-mainline_4.19.0.bb =>
>> linux-mainline_4.19.80.bb} (53%)
>>
^ permalink raw reply [flat|nested] 40+ messages in thread
* [PATCH v2 0/7] custom kernel recipes enhancements (was Ci40 support)
2019-10-24 9:02 [PATCH 00/10] add ci40 machine support + new Isar features Cedric Hombourger
` (10 preceding siblings ...)
2019-10-24 18:15 ` [PATCH 00/10] add ci40 machine support + new Isar features Henning Schild
@ 2019-10-25 17:39 ` Cedric Hombourger
2019-10-25 17:39 ` [PATCH v2 1/7] linux-custom: honor KERNEL_FILE setting Cedric Hombourger
` (6 more replies)
11 siblings, 7 replies; 40+ messages in thread
From: Cedric Hombourger @ 2019-10-25 17:39 UTC (permalink / raw)
To: isar-users; +Cc: Cedric Hombourger
This patch series was initially targeting initial support for the Creator Ci40 (mipsel)
but my inability to change the boot-loader it came with required uses of work-arounds.
So until I figure something out (and that's not going to be next week because of ELC-E),
I'd like to reduce the patch series to bring some of the Isar improvements/fixes that
were created along the way:
* update from 4.19.0 to 4.19.80
* support for config fragments
* honor the KERNEL_FILE setting (mips uses vmlinux instead of vmlinuz)
* correct SRC_URI for -stable releases ending with "0" (e.g. 4.19.80)
All of this was ci_build tested with the other two patchsets I submitted earlier
this week, namely:
* [PATCH 0/1] update bitbake to version 1.44.0
* [PATCH v2 0/5] miscellaneous (minor) fixes
Changes between v2 and v1:
* Drop "image: add CUSTOM_IMAGE_EXTENSIONS for user layers/machines to use"
* Drop "meta-isar: add creator-ci40-marduk machine (mipsel + mainline kernel)"
* Rename the "vmlinuz" variable in build-kernel.sh
* Introduce KERNEL_CONFIG_TARGET (leave KERNEL_DEFCONFIG untouched)
* Handle apply=no in the SRC_URI of config fragments
Cedric Hombourger (7):
linux-custom: honor KERNEL_FILE setting
bitbake.conf: set name of the qemu-static binary to use for mipsel
recipes-kernel/linux: make KERNEL_DEFCONFIG support in-tree defconfigs
linux-mainline: fix stripping of .0 from the kernel version
linux-mainline: update from 4.19.0 to 4.19.80
linux-custom: add support for kernel config fragments
linux-mainline: disable support for HFS to demonstrate use of config fragments
.../recipes-kernel/linux/files/no-fs-hfs.cfg | 2 ++
...ne_4.19.0.bb => linux-mainline_4.19.80.bb} | 8 +++--
meta/classes/image.bbclass | 1 -
meta/conf/bitbake.conf | 2 ++
.../linux/files/build-kernel.sh | 17 +++++-----
meta/recipes-kernel/linux/linux-custom.inc | 33 ++++++++++++++++++-
6 files changed, 49 insertions(+), 14 deletions(-)
create mode 100644 meta-isar/recipes-kernel/linux/files/no-fs-hfs.cfg
rename meta-isar/recipes-kernel/linux/{linux-mainline_4.19.0.bb => linux-mainline_4.19.80.bb} (67%)
--
2.20.1
^ permalink raw reply [flat|nested] 40+ messages in thread
* [PATCH v2 1/7] linux-custom: honor KERNEL_FILE setting
2019-10-25 17:39 ` [PATCH v2 0/7] custom kernel recipes enhancements (was Ci40 support) Cedric Hombourger
@ 2019-10-25 17:39 ` Cedric Hombourger
2019-10-25 17:39 ` [PATCH v2 2/7] bitbake.conf: set name of the qemu-static binary to use for mipsel Cedric Hombourger
` (5 subsequent siblings)
6 siblings, 0 replies; 40+ messages in thread
From: Cedric Hombourger @ 2019-10-25 17:39 UTC (permalink / raw)
To: isar-users; +Cc: Cedric Hombourger
vmlinuz was hard-coded in the postinst script generated by the
build-kernel.sh script. This really needs to be ${KERNEL_FILE}
to support architectures where a vmlinux file is used instead
(mipsel in particular). Rename the "vmlinuz" local variable to
kernel_file so that it is clear it is derived from KERNEL_FILE.
As we now have multiple recipes using KERNEL_FILE (image and
kernel recipes), its default setting (vmlinuz) was moved to
bitbake.conf
Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
---
meta/classes/image.bbclass | 1 -
meta/conf/bitbake.conf | 1 +
meta/recipes-kernel/linux/files/build-kernel.sh | 10 +++++-----
meta/recipes-kernel/linux/linux-custom.inc | 1 +
4 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 8384b71..7690bc5 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -16,7 +16,6 @@ IMAGE_INSTALL += "${@ ("linux-image-" + d.getVar("KERNEL_NAME", True)) if d.getV
IMAGE_FULLNAME = "${PN}-${DISTRO}-${MACHINE}"
# These variables are used by wic and start_vm
-KERNEL_FILE ?= "vmlinuz"
KERNEL_IMAGE ?= "${IMAGE_FULLNAME}-${KERNEL_FILE}"
INITRD_IMAGE ?= "${IMAGE_FULLNAME}-initrd.img"
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index bca1114..6377a94 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -56,6 +56,7 @@ BUILDCHROOT_HOST_DIR = "${DEPLOY_DIR_BUILDCHROOT}-host/${HOST_DISTRO}-${HOST_ARC
BUILDCHROOT_TARGET_DIR = "${DEPLOY_DIR_BUILDCHROOT}-target/${DISTRO}-${DISTRO_ARCH}"
SDKCHROOT_DIR = "${DEPLOY_DIR_SDKCHROOT}/${DISTRO}-${DISTRO_ARCH}"
CACHE = "${TMPDIR}/cache"
+KERNEL_FILE ?= "vmlinuz"
OVERRIDES = "${DISTRO_ARCH}:${MACHINE}:${DISTRO}:forcevariable"
diff --git a/meta/recipes-kernel/linux/files/build-kernel.sh b/meta/recipes-kernel/linux/files/build-kernel.sh
index 7b651af..b46cefa 100644
--- a/meta/recipes-kernel/linux/files/build-kernel.sh
+++ b/meta/recipes-kernel/linux/files/build-kernel.sh
@@ -90,7 +90,7 @@ if [ -f /lib/modules/${PV}/.fresh-install ]; then\\
else\\
change=upgrade\\
fi\\
-linux-update-symlinks \$change ${PV} /boot/vmlinuz-${PV}\\
+linux-update-symlinks \$change ${PV} /boot/${KERNEL_FILE}-${PV}\\
rm -f /lib/modules/${PV}/.fresh-install"
# Add Debian-like link removal to postrm
@@ -100,14 +100,14 @@ sed -i "${REPACK_LINUX_IMAGE_DIR}/DEBIAN/postrm" \
rm -f /lib/modules/${PV}/.fresh-install\\
\\
if [ \"\$1\" != upgrade ] && command -v linux-update-symlinks >/dev/null; then\\
- linux-update-symlinks remove ${PV} /boot/vmlinuz-${PV}\\
+ linux-update-symlinks remove ${PV} /boot/${KERNEL_FILE}-${PV}\\
fi"
# Make sure arm64 kernels are decompressed
if [ "$target_arch" = "arm64" ]; then
- vmlinuz="${REPACK_LINUX_IMAGE_DIR}/boot/vmlinuz-${PV}"
- mv "$vmlinuz" "$vmlinuz.gz"
- gunzip "$vmlinuz.gz"
+ kernel_file="${REPACK_LINUX_IMAGE_DIR}/boot/${KERNEL_FILE}-${PV}"
+ mv "${kernel_file}" "${kernel_file}.gz"
+ gunzip "${kernel_file}.gz"
fi
dpkg-gencontrol -crepack/debian/control \
diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc
index 5a4f5bf..5a34dd1 100644
--- a/meta/recipes-kernel/linux/linux-custom.inc
+++ b/meta/recipes-kernel/linux/linux-custom.inc
@@ -72,6 +72,7 @@ dpkg_runbuild() {
export KBUILD_DEPENDS="${KBUILD_DEPENDS}"
export KERNEL_DEBIAN_DEPENDS="${KERNEL_DEBIAN_DEPENDS}"
+ export KERNEL_FILE="${KERNEL_FILE}"
export KERNEL_HEADERS_DEBIAN_DEPENDS="${KERNEL_HEADERS_DEBIAN_DEPENDS}"
sudo -E chroot --userspec=$( id -u ):$( id -g ) ${BUILDCHROOT_DIR} ${PP}/build-kernel.sh ${PP}/${PPS} ${DISTRO_ARCH}
--
2.20.1
^ permalink raw reply [flat|nested] 40+ messages in thread
* [PATCH v2 2/7] bitbake.conf: set name of the qemu-static binary to use for mipsel
2019-10-25 17:39 ` [PATCH v2 0/7] custom kernel recipes enhancements (was Ci40 support) Cedric Hombourger
2019-10-25 17:39 ` [PATCH v2 1/7] linux-custom: honor KERNEL_FILE setting Cedric Hombourger
@ 2019-10-25 17:39 ` Cedric Hombourger
2019-10-25 17:39 ` [PATCH v2 3/7] recipes-kernel/linux: make KERNEL_DEFCONFIG support in-tree defconfigs Cedric Hombourger
` (4 subsequent siblings)
6 siblings, 0 replies; 40+ messages in thread
From: Cedric Hombourger @ 2019-10-25 17:39 UTC (permalink / raw)
To: isar-users; +Cc: Cedric Hombourger
Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
---
meta/conf/bitbake.conf | 1 +
1 file changed, 1 insertion(+)
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 6377a94..624eb91 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -65,6 +65,7 @@ QEMU_ARCH_amd64 = "x86_64"
QEMU_ARCH_i386 = "i386"
QEMU_ARCH_armhf = "arm"
QEMU_ARCH_arm64 = "aarch64"
+QEMU_ARCH_mipsel = "mipsel"
# Codename of the repository created by the caching class
DEBDISTRONAME = "isar"
--
2.20.1
^ permalink raw reply [flat|nested] 40+ messages in thread
* [PATCH v2 3/7] recipes-kernel/linux: make KERNEL_DEFCONFIG support in-tree defconfigs
2019-10-25 17:39 ` [PATCH v2 0/7] custom kernel recipes enhancements (was Ci40 support) Cedric Hombourger
2019-10-25 17:39 ` [PATCH v2 1/7] linux-custom: honor KERNEL_FILE setting Cedric Hombourger
2019-10-25 17:39 ` [PATCH v2 2/7] bitbake.conf: set name of the qemu-static binary to use for mipsel Cedric Hombourger
@ 2019-10-25 17:39 ` Cedric Hombourger
2019-10-25 17:39 ` [PATCH v2 4/7] linux-mainline: fix stripping of .0 from the kernel version Cedric Hombourger
` (3 subsequent siblings)
6 siblings, 0 replies; 40+ messages in thread
From: Cedric Hombourger @ 2019-10-25 17:39 UTC (permalink / raw)
To: isar-users; +Cc: Cedric Hombourger
The recipe expected the specified KERNEL_DEFCONFIG to be provided as a
SRC_URI while the kernel already provides many useful defconfigs. The
recipe will now check if the specified configuration can be found in
WORKDIR. If it is found, it will then be used via "make olddefconfig"
as before. It will otherwise assume that it is an in-tree defconfig
and attempt a "make foobar_defconfig" (where foobar_defconfig is the
user-provided KERNEL_DEFCONFIG setting). To support this change, a
KERNEL_CONFIG_TARGET variable is passed to the build-kernel.sh script
via the environment.
Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
---
meta/recipes-kernel/linux/files/build-kernel.sh | 6 +-----
meta/recipes-kernel/linux/linux-custom.inc | 9 ++++++++-
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/meta/recipes-kernel/linux/files/build-kernel.sh b/meta/recipes-kernel/linux/files/build-kernel.sh
index b46cefa..386e58b 100644
--- a/meta/recipes-kernel/linux/files/build-kernel.sh
+++ b/meta/recipes-kernel/linux/files/build-kernel.sh
@@ -36,11 +36,7 @@ REPACK_DIR="$1/../repack"
REPACK_LINUX_IMAGE_DIR="${REPACK_DIR}/linux-image"
REPACK_LINUX_HEADERS_DIR="${REPACK_DIR}/linux-headers"
-if [ -e .config ]; then
- make olddefconfig
-else
- make defconfig
-fi
+make ${KERNEL_CONFIG_TARGET} || exit ${?}
KV=$( make -s kernelrelease )
if [ "${KV}" != "${PV}" ]; then
diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc
index 5a34dd1..0f7633a 100644
--- a/meta/recipes-kernel/linux/linux-custom.inc
+++ b/meta/recipes-kernel/linux/linux-custom.inc
@@ -61,8 +61,14 @@ addtask devshell after do_install_builddeps
dpkg_runbuild() {
chmod +x ${WORKDIR}/build-kernel.sh
+ KERNEL_CONFIG_TARGET="${KERNEL_DEFCONFIG}"
if [ -n "${KERNEL_DEFCONFIG}" ]; then
- cp ${WORKDIR}/${KERNEL_DEFCONFIG} ${S}/.config
+ if [ -e "${WORKDIR}/${KERNEL_DEFCONFIG}" ]; then
+ cp ${WORKDIR}/${KERNEL_DEFCONFIG} ${S}/.config
+ KERNEL_CONFIG_TARGET="olddefconfig"
+ fi
+ else
+ KERNEL_CONFIG_TARGET="defconfig"
fi
E="${@ bb.utils.export_proxies(d)}"
@@ -71,6 +77,7 @@ dpkg_runbuild() {
export KERNEL_NAME=${KERNEL_NAME_PROVIDED}
export KBUILD_DEPENDS="${KBUILD_DEPENDS}"
+ export KERNEL_CONFIG_TARGET
export KERNEL_DEBIAN_DEPENDS="${KERNEL_DEBIAN_DEPENDS}"
export KERNEL_FILE="${KERNEL_FILE}"
export KERNEL_HEADERS_DEBIAN_DEPENDS="${KERNEL_HEADERS_DEBIAN_DEPENDS}"
--
2.20.1
^ permalink raw reply [flat|nested] 40+ messages in thread
* [PATCH v2 4/7] linux-mainline: fix stripping of .0 from the kernel version
2019-10-25 17:39 ` [PATCH v2 0/7] custom kernel recipes enhancements (was Ci40 support) Cedric Hombourger
` (2 preceding siblings ...)
2019-10-25 17:39 ` [PATCH v2 3/7] recipes-kernel/linux: make KERNEL_DEFCONFIG support in-tree defconfigs Cedric Hombourger
@ 2019-10-25 17:39 ` Cedric Hombourger
2019-10-25 17:39 ` [PATCH v2 5/7] linux-mainline: update from 4.19.0 to 4.19.80 Cedric Hombourger
` (2 subsequent siblings)
6 siblings, 0 replies; 40+ messages in thread
From: Cedric Hombourger @ 2019-10-25 17:39 UTC (permalink / raw)
To: isar-users; +Cc: Cedric Hombourger
The strip() function was used to strip the trailing .0 from the kernel
version since it is omitted in the upstream archive file names. That
function is actually taking a character set as argument not a substring.
This was causing ARCHIVE_VERSION to expand to "4.19.8" when the user
provided version was "4.19.80". The inline python code was changed to
check if the version ends with ".0" and only then remove the last two
characters.
Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
---
meta-isar/recipes-kernel/linux/linux-mainline_4.19.0.bb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta-isar/recipes-kernel/linux/linux-mainline_4.19.0.bb b/meta-isar/recipes-kernel/linux/linux-mainline_4.19.0.bb
index e50e149..127f6e2 100644
--- a/meta-isar/recipes-kernel/linux/linux-mainline_4.19.0.bb
+++ b/meta-isar/recipes-kernel/linux/linux-mainline_4.19.0.bb
@@ -7,7 +7,7 @@
require recipes-kernel/linux/linux-custom.inc
-ARCHIVE_VERSION = "${@d.getVar('PV').strip('.0')}"
+ARCHIVE_VERSION = "${@ d.getVar('PV')[:-2] if d.getVar('PV').endswith('.0') else d.getVar('PV') }"
SRC_URI += " \
https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-${ARCHIVE_VERSION}.tar.xz \
--
2.20.1
^ permalink raw reply [flat|nested] 40+ messages in thread
* [PATCH v2 5/7] linux-mainline: update from 4.19.0 to 4.19.80
2019-10-25 17:39 ` [PATCH v2 0/7] custom kernel recipes enhancements (was Ci40 support) Cedric Hombourger
` (3 preceding siblings ...)
2019-10-25 17:39 ` [PATCH v2 4/7] linux-mainline: fix stripping of .0 from the kernel version Cedric Hombourger
@ 2019-10-25 17:39 ` Cedric Hombourger
2019-10-25 17:39 ` [PATCH v2 6/7] linux-custom: add support for kernel config fragments Cedric Hombourger
2019-10-25 17:39 ` [PATCH v2 7/7] linux-mainline: disable support for HFS to demonstrate use of " Cedric Hombourger
6 siblings, 0 replies; 40+ messages in thread
From: Cedric Hombourger @ 2019-10-25 17:39 UTC (permalink / raw)
To: isar-users; +Cc: Cedric Hombourger
In preparation for a new machine addition, update the linux-mainline
kernel from 4.19.0 to 4.19.80. This is needed to get some of the mips
fixes that were integrated in this longterm kernel version (and in
particular: MIPS: have "plain" make calls build dtbs for selected
platforms, i.e. 637dfa0fad6d91a9a709dc70549a6d20fa77f615 upstream)
Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
---
.../{linux-mainline_4.19.0.bb => linux-mainline_4.19.80.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta-isar/recipes-kernel/linux/{linux-mainline_4.19.0.bb => linux-mainline_4.19.80.bb} (87%)
diff --git a/meta-isar/recipes-kernel/linux/linux-mainline_4.19.0.bb b/meta-isar/recipes-kernel/linux/linux-mainline_4.19.80.bb
similarity index 87%
rename from meta-isar/recipes-kernel/linux/linux-mainline_4.19.0.bb
rename to meta-isar/recipes-kernel/linux/linux-mainline_4.19.80.bb
index 127f6e2..b41d1a8 100644
--- a/meta-isar/recipes-kernel/linux/linux-mainline_4.19.0.bb
+++ b/meta-isar/recipes-kernel/linux/linux-mainline_4.19.80.bb
@@ -12,7 +12,7 @@ ARCHIVE_VERSION = "${@ d.getVar('PV')[:-2] if d.getVar('PV').endswith('.0') else
SRC_URI += " \
https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-${ARCHIVE_VERSION}.tar.xz \
file://x86_64_defconfig"
-SRC_URI[sha256sum] = "0c68f5655528aed4f99dae71a5b259edc93239fa899e2df79c055275c21749a1"
+SRC_URI[sha256sum] = "80a9ba764e088aa7fddfef5a97c0236905e291468a37832243b6f3828d36e7ec"
SRC_URI_append_de0-nano-soc = " \
file://0001-ARM-dts-socfpga-Rename-socfpga_cyclone5_de0_-sockit-.patch"
--
2.20.1
^ permalink raw reply [flat|nested] 40+ messages in thread
* [PATCH v2 6/7] linux-custom: add support for kernel config fragments
2019-10-25 17:39 ` [PATCH v2 0/7] custom kernel recipes enhancements (was Ci40 support) Cedric Hombourger
` (4 preceding siblings ...)
2019-10-25 17:39 ` [PATCH v2 5/7] linux-mainline: update from 4.19.0 to 4.19.80 Cedric Hombourger
@ 2019-10-25 17:39 ` Cedric Hombourger
2019-10-25 17:39 ` [PATCH v2 7/7] linux-mainline: disable support for HFS to demonstrate use of " Cedric Hombourger
6 siblings, 0 replies; 40+ messages in thread
From: Cedric Hombourger @ 2019-10-25 17:39 UTC (permalink / raw)
To: isar-users; +Cc: Cedric Hombourger
Check for .cfg files listed in SRC_URI and merge them with the
main defconfig using the kernel merge_config script. The optional
"apply" parameter may be used for the specified fragment to be
ignore (set to "no").
Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
---
.../linux/files/build-kernel.sh | 3 +++
meta/recipes-kernel/linux/linux-custom.inc | 23 +++++++++++++++++++
2 files changed, 26 insertions(+)
diff --git a/meta/recipes-kernel/linux/files/build-kernel.sh b/meta/recipes-kernel/linux/files/build-kernel.sh
index 386e58b..f56e96c 100644
--- a/meta/recipes-kernel/linux/files/build-kernel.sh
+++ b/meta/recipes-kernel/linux/files/build-kernel.sh
@@ -37,6 +37,9 @@ REPACK_LINUX_IMAGE_DIR="${REPACK_DIR}/linux-image"
REPACK_LINUX_HEADERS_DIR="${REPACK_DIR}/linux-headers"
make ${KERNEL_CONFIG_TARGET} || exit ${?}
+if [ -n "${KERNEL_FRAGMENTS}" ]; then
+ scripts/kconfig/merge_config.sh -m .config ${KERNEL_FRAGMENTS}
+fi
KV=$( make -s kernelrelease )
if [ "${KV}" != "${PV}" ]; then
diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc
index 0f7633a..28c50db 100644
--- a/meta/recipes-kernel/linux/linux-custom.inc
+++ b/meta/recipes-kernel/linux/linux-custom.inc
@@ -18,6 +18,19 @@ python() {
'linux-headers-' + kernel_name)
}
+def config_fragments(d):
+ fragments = []
+ sources = d.getVar("SRC_URI").split()
+ for s in sources:
+ _, _, local, _, _, parm = bb.fetch.decodeurl(s)
+ apply = parm.get("apply")
+ if apply == "no":
+ continue
+ base, ext = os.path.splitext(os.path.basename(local))
+ if ext and ext in (".cfg"):
+ fragments.append(local)
+ return fragments
+
inherit dpkg-base
SRC_URI += "file://build-kernel.sh"
@@ -71,6 +84,16 @@ dpkg_runbuild() {
KERNEL_CONFIG_TARGET="defconfig"
fi
+ # copy config fragments over to the kernel tree
+ src_frags="${@ " ".join(config_fragments(d)) }"
+ out_frags="${@ " ".join(map(lambda frag: 'debian/fragments/' + frag, config_fragments(d))) }"
+ rm -rf ${S}/debian/fragments
+ if [ -n "${src_frags}" ]; then
+ mkdir -p ${S}/debian/fragments
+ (cd ${WORKDIR} && cp ${src_frags} ${S}/debian/fragments/)
+ fi
+ export KERNEL_FRAGMENTS="${out_frags}"
+
E="${@ bb.utils.export_proxies(d)}"
export PV=${PV}
--
2.20.1
^ permalink raw reply [flat|nested] 40+ messages in thread
* [PATCH v2 7/7] linux-mainline: disable support for HFS to demonstrate use of config fragments
2019-10-25 17:39 ` [PATCH v2 0/7] custom kernel recipes enhancements (was Ci40 support) Cedric Hombourger
` (5 preceding siblings ...)
2019-10-25 17:39 ` [PATCH v2 6/7] linux-custom: add support for kernel config fragments Cedric Hombourger
@ 2019-10-25 17:39 ` Cedric Hombourger
2019-11-05 20:25 ` chombourger
6 siblings, 1 reply; 40+ messages in thread
From: Cedric Hombourger @ 2019-10-25 17:39 UTC (permalink / raw)
To: isar-users; +Cc: Cedric Hombourger
Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
---
meta-isar/recipes-kernel/linux/files/no-fs-hfs.cfg | 2 ++
meta-isar/recipes-kernel/linux/linux-mainline_4.19.80.bb | 4 +++-
2 files changed, 5 insertions(+), 1 deletion(-)
create mode 100644 meta-isar/recipes-kernel/linux/files/no-fs-hfs.cfg
diff --git a/meta-isar/recipes-kernel/linux/files/no-fs-hfs.cfg b/meta-isar/recipes-kernel/linux/files/no-fs-hfs.cfg
new file mode 100644
index 0000000..5dbfadb
--- /dev/null
+++ b/meta-isar/recipes-kernel/linux/files/no-fs-hfs.cfg
@@ -0,0 +1,2 @@
+# CONFIG_FS_HFS is not set
+# CONFIG_HFSPLUS_FS is not set
diff --git a/meta-isar/recipes-kernel/linux/linux-mainline_4.19.80.bb b/meta-isar/recipes-kernel/linux/linux-mainline_4.19.80.bb
index b41d1a8..83038f0 100644
--- a/meta-isar/recipes-kernel/linux/linux-mainline_4.19.80.bb
+++ b/meta-isar/recipes-kernel/linux/linux-mainline_4.19.80.bb
@@ -11,7 +11,9 @@ ARCHIVE_VERSION = "${@ d.getVar('PV')[:-2] if d.getVar('PV').endswith('.0') else
SRC_URI += " \
https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-${ARCHIVE_VERSION}.tar.xz \
- file://x86_64_defconfig"
+ file://x86_64_defconfig \
+ file://no-fs-hfs.cfg"
+
SRC_URI[sha256sum] = "80a9ba764e088aa7fddfef5a97c0236905e291468a37832243b6f3828d36e7ec"
SRC_URI_append_de0-nano-soc = " \
--
2.20.1
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH v2 7/7] linux-mainline: disable support for HFS to demonstrate use of config fragments
2019-10-25 17:39 ` [PATCH v2 7/7] linux-mainline: disable support for HFS to demonstrate use of " Cedric Hombourger
@ 2019-11-05 20:25 ` chombourger
0 siblings, 0 replies; 40+ messages in thread
From: chombourger @ 2019-11-05 20:25 UTC (permalink / raw)
To: isar-users
[-- Attachment #1.1: Type: text/plain, Size: 1804 bytes --]
to avoid further confusion, this thread should be considered closed. I have
refactored my patches to have all linux-custom changes in one series
I now have a clean patch for the the ci40 but will be submitting it only
after the kernel recipe rework is accepted
On Friday, October 25, 2019 at 7:40:50 PM UTC+2, Cedric Hombourger wrote:
>
> Signed-off-by: Cedric Hombourger <Cedric_H...@mentor.com <javascript:>>
> ---
> meta-isar/recipes-kernel/linux/files/no-fs-hfs.cfg | 2 ++
> meta-isar/recipes-kernel/linux/linux-mainline_4.19.80.bb | 4 +++-
> 2 files changed, 5 insertions(+), 1 deletion(-)
> create mode 100644 meta-isar/recipes-kernel/linux/files/no-fs-hfs.cfg
>
> diff --git a/meta-isar/recipes-kernel/linux/files/no-fs-hfs.cfg
> b/meta-isar/recipes-kernel/linux/files/no-fs-hfs.cfg
> new file mode 100644
> index 0000000..5dbfadb
> --- /dev/null
> +++ b/meta-isar/recipes-kernel/linux/files/no-fs-hfs.cfg
> @@ -0,0 +1,2 @@
> +# CONFIG_FS_HFS is not set
> +# CONFIG_HFSPLUS_FS is not set
> diff --git a/meta-isar/recipes-kernel/linux/linux-mainline_4.19.80.bb
> b/meta-isar/recipes-kernel/linux/linux-mainline_4.19.80.bb
> index b41d1a8..83038f0 100644
> --- a/meta-isar/recipes-kernel/linux/linux-mainline_4.19.80.bb
> +++ b/meta-isar/recipes-kernel/linux/linux-mainline_4.19.80.bb
> @@ -11,7 +11,9 @@ ARCHIVE_VERSION = "${@ d.getVar('PV')[:-2] if
> d.getVar('PV').endswith('.0') else
>
> SRC_URI += " \
>
> https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-${ARCHIVE_VERSION}.tar.xz
> \
> - file://x86_64_defconfig"
> + file://x86_64_defconfig \
> + file://no-fs-hfs.cfg"
> +
> SRC_URI[sha256sum] =
> "80a9ba764e088aa7fddfef5a97c0236905e291468a37832243b6f3828d36e7ec"
>
> SRC_URI_append_de0-nano-soc = " \
> --
> 2.20.1
>
>
[-- Attachment #1.2: Type: text/html, Size: 5251 bytes --]
^ permalink raw reply [flat|nested] 40+ messages in thread