public inbox for cip-dev@lists.cip-project.org
 help / color / mirror / Atom feed
* [isar-cip-core][PATCH 1/2] kas/opt: Add option for not install kernel
@ 2025-02-28 12:46 Nobuhiro Iwamatsu
  2025-02-28 12:46 ` [isar-cip-core][PATCH 2/2] Kconfig: Add config NO_KERNEL for kernel selection Nobuhiro Iwamatsu
  2025-02-28 15:40 ` [isar-cip-core][PATCH 1/2] kas/opt: Add option for not install kernel Jan Kiszka
  0 siblings, 2 replies; 8+ messages in thread
From: Nobuhiro Iwamatsu @ 2025-02-28 12:46 UTC (permalink / raw)
  To: cip-dev, jan.kiszka; +Cc: Nobuhiro Iwamatsu

This adds an option to create an image that does not contain the kernel.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
---
 .gitlab-ci.yml             | 28 ++++++++++++++++++++++-
 kas/opt/no_kernel.yml      | 17 ++++++++++++++
 scripts/deploy-cip-core.sh | 47 +++++++++++++++++++++++++++-----------
 3 files changed, 78 insertions(+), 14 deletions(-)
 create mode 100644 kas/opt/no_kernel.yml

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 4df521b..a09eedd 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -27,6 +27,7 @@ variables:
   build_swu_v2: disable
   swupdate_version: default
   test_function: swupdate
+  no_kernel: disable
 
 stages:
   - build
@@ -67,9 +68,10 @@ default:
     - if [ "${watchdog}" = "disable" ]; then base_yaml="${base_yaml}:kas/opt/disable-watchdog.yml"; fi
     - if [ "${security_test}" = "enable" ]; then base_yaml="${base_yaml}:kas/opt/security_test.yml"; fi
     - if [ "${swupdate_version}" = "2022.12" ]; then base_yaml="${base_yaml}:kas/opt/swupdate-2022.12.yaml"; fi
+    - if [ "${no_kernel}" = "enable" ]; then base_yaml="${base_yaml}:kas/opt/no_kernel.yml"; fi
     - echo "Building ${base_yaml}"
     - kas build ${base_yaml}
-    - if [ "${deploy}" = "enable" ]; then scripts/deploy-cip-core.sh ${release} ${target} ${extension} ${dtb} ${CI_COMMIT_REF_SLUG} wic; fi
+    - if [ "${deploy}" = "enable" ]; then scripts/deploy-cip-core.sh ${release} ${target} ${extension} ${no_kernel} ${dtb} ${CI_COMMIT_REF_SLUG} wic; fi
     - if [ "${build_swu_v2}" = "enable" ]; then
           mkdir build/previous-image;
           if [ "${extension}" = "security" ] || [ "${extension}" = "ebg-secure-boot-snakeoil" ]; then
@@ -221,6 +223,30 @@ build:qemu-arm-test:
     target:  qemu-arm
     extension: test
 
+build:qemu-amd64-test-nokernel:
+  extends:
+    - .build_base
+  variables:
+    target:  qemu-amd64
+    extension: test
+    no_kernel: enable
+
+build:qemu-arm64-test-nokernel:
+  extends:
+    - .build_base
+  variables:
+    target:  qemu-arm64
+    extension: test
+    no_kernel: enable
+
+build:qemu-arm-test-nokernel:
+  extends:
+    - .build_base
+  variables:
+    target:  qemu-arm
+    extension: test
+    no_kernel: enable
+
 build:x86-uefi-secure-boot:
   extends:
     - .build_base
diff --git a/kas/opt/no_kernel.yml b/kas/opt/no_kernel.yml
new file mode 100644
index 0000000..2338177
--- /dev/null
+++ b/kas/opt/no_kernel.yml
@@ -0,0 +1,17 @@
+#
+# CIP Core, generic profile
+#
+# Copyright (c) Toshiba Corporation 2025
+#
+# Authors:
+#  Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
+#
+# SPDX-License-Identifier: MIT
+#
+
+header:
+  version: 14
+
+local_conf_header:
+  kernel-version: |
+    IMAGE_INSTALL:remove = "linux-image-cip linux-image-cip-rt"
diff --git a/scripts/deploy-cip-core.sh b/scripts/deploy-cip-core.sh
index 6e4dfd7..6cb4968 100755
--- a/scripts/deploy-cip-core.sh
+++ b/scripts/deploy-cip-core.sh
@@ -13,9 +13,10 @@ fi
 RELEASE=$1
 TARGET=$2
 EXTENSION=$3
-DTB=$4
-REF=$5
-DEPLOY=$6
+NO_KERNEL=$4
+DTB=$5
+REF=$6
+DEPLOY=$7
 
 BASE_FILENAME=cip-core-image-cip-core-$RELEASE-$TARGET
 if [ "${EXTENSION}" != "none" ]; then
@@ -29,6 +30,23 @@ fi
 BASE_PATH=build/tmp/deploy/images/$TARGET/$BASE_FILENAME
 S3_TARGET=s3://download2.cip-project.org/cip-core/$REF/$TARGET/
 
+if [ "${NO_KERNEL}" = "enable" ]; then
+	__BASE_PATH=${BASE_PATH}
+	BASE_PATH="${BASE_PATH}-nokernel"
+
+	echo "Rename from ${BASE_FILENAME}.* to ${BASE_FILENAME}-nokernel.*"
+
+	if [ -f "${__BASE_PATH}.tar.gz" ]; then
+		mv "${__BASE_PATH}.tar.gz" "${BASE_PATH}.tar.gz"
+	fi
+	if [ -f "${__BASE_PATH}.swu" ]; then
+		mv "${__BASE_PATH}.swu" "${BASE_PATH}.swu"
+	fi
+	if [ -f "${__BASE_PATH}.wic" ]; then
+		mv "${__BASE_PATH}.wic" "${BASE_PATH}.wic"
+	fi
+fi
+
 if [ -f "${BASE_PATH}.wic" ]; then
 	echo "Uploading artifacts..."
 	if [ "$DEPLOY" = "swu" ]; then
@@ -48,17 +66,20 @@ else
 		aws s3 cp --no-progress --acl public-read "${BASE_PATH}.tar.gz" "${S3_TARGET}"
 	fi
 
-	KERNEL_IMAGE="$BASE_PATH-vmlinu[xz]"
-	# iwg20m workaround
-	if [ -f "build/tmp/deploy/images/$TARGET/zImage" ]; then
-		KERNEL_IMAGE=build/tmp/deploy/images/$TARGET/zImage
-	fi
-	# shellcheck disable=SC2086
-	aws s3 cp --no-progress --acl public-read $KERNEL_IMAGE "${S3_TARGET}"
-	aws s3 cp --no-progress --acl public-read "${BASE_PATH}-initrd.img" "${S3_TARGET}"
+	if [ "$NO_KERNEL" = "false" ]; then
+		KERNEL_IMAGE="$BASE_PATH-vmlinu[xz]"
+		# iwg20m workaround
+		if [ -f "build/tmp/deploy/images/$TARGET/zImage" ]; then
+			KERNEL_IMAGE=build/tmp/deploy/images/$TARGET/zImage
+		fi
 
-	if [ "$DTB" != "none" ]; then
-		aws s3 cp --no-progress --acl public-read build/tmp/deploy/images/*/"$DTB" "${S3_TARGET}"
+		# shellcheck disable=SC2086
+		aws s3 cp --no-progress --acl public-read $KERNEL_IMAGE "${S3_TARGET}"
+		aws s3 cp --no-progress --acl public-read "${BASE_PATH}-initrd.img" "${S3_TARGET}"
+
+		if [ "$DTB" != "none" ]; then
+			aws s3 cp --no-progress --acl public-read build/tmp/deploy/images/*/"$DTB" "${S3_TARGET}"
+		fi
 	fi
 fi
 
-- 
2.45.2




^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [isar-cip-core][PATCH 2/2] Kconfig: Add config NO_KERNEL for kernel selection
  2025-02-28 12:46 [isar-cip-core][PATCH 1/2] kas/opt: Add option for not install kernel Nobuhiro Iwamatsu
@ 2025-02-28 12:46 ` Nobuhiro Iwamatsu
  2025-02-28 15:41   ` Jan Kiszka
  2025-02-28 15:40 ` [isar-cip-core][PATCH 1/2] kas/opt: Add option for not install kernel Jan Kiszka
  1 sibling, 1 reply; 8+ messages in thread
From: Nobuhiro Iwamatsu @ 2025-02-28 12:46 UTC (permalink / raw)
  To: cip-dev, jan.kiszka; +Cc: Nobuhiro Iwamatsu

This adds config NO_KERNEL not to install the kernel select.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
---
 Kconfig | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Kconfig b/Kconfig
index 3c246fa..cfa4d11 100644
--- a/Kconfig
+++ b/Kconfig
@@ -100,6 +100,9 @@ config KERNEL_5_10
 config KERNEL_6_1
 	bool "Kernel 6.1.x-cip"
 
+config NO_KERNEL
+	bool "Do not install kernel to image"
+
 endchoice
 
 config KAS_INCLUDE_KERNEL
@@ -108,6 +111,7 @@ config KAS_INCLUDE_KERNEL
 	default "kas/opt/4.19.yml" if KERNEL_4_19
 	default "kas/opt/5.10.yml" if KERNEL_5_10
 	default "kas/opt/6.1.yml" if KERNEL_6_1
+	default "kas/opt/no_kernel.yml" if NO_KERNEL
 
 config KERNEL_RT
 	bool "Real-time CIP kernel"
-- 
2.45.2




^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [isar-cip-core][PATCH 1/2] kas/opt: Add option for not install kernel
  2025-02-28 12:46 [isar-cip-core][PATCH 1/2] kas/opt: Add option for not install kernel Nobuhiro Iwamatsu
  2025-02-28 12:46 ` [isar-cip-core][PATCH 2/2] Kconfig: Add config NO_KERNEL for kernel selection Nobuhiro Iwamatsu
@ 2025-02-28 15:40 ` Jan Kiszka
  2025-03-05  4:45   ` nobuhiro1.iwamatsu
  1 sibling, 1 reply; 8+ messages in thread
From: Jan Kiszka @ 2025-02-28 15:40 UTC (permalink / raw)
  To: Nobuhiro Iwamatsu, cip-dev

On 28.02.25 13:46, Nobuhiro Iwamatsu wrote:
> This adds an option to create an image that does not contain the kernel.
> 

What is the use case? How does this relate to kas/opt/kernelci.yml?

> Signed-off-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
> ---
>  .gitlab-ci.yml             | 28 ++++++++++++++++++++++-
>  kas/opt/no_kernel.yml      | 17 ++++++++++++++
>  scripts/deploy-cip-core.sh | 47 +++++++++++++++++++++++++++-----------
>  3 files changed, 78 insertions(+), 14 deletions(-)
>  create mode 100644 kas/opt/no_kernel.yml
> 
> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
> index 4df521b..a09eedd 100644
> --- a/.gitlab-ci.yml
> +++ b/.gitlab-ci.yml
> @@ -27,6 +27,7 @@ variables:
>    build_swu_v2: disable
>    swupdate_version: default
>    test_function: swupdate
> +  no_kernel: disable
>  
>  stages:
>    - build
> @@ -67,9 +68,10 @@ default:
>      - if [ "${watchdog}" = "disable" ]; then base_yaml="${base_yaml}:kas/opt/disable-watchdog.yml"; fi
>      - if [ "${security_test}" = "enable" ]; then base_yaml="${base_yaml}:kas/opt/security_test.yml"; fi
>      - if [ "${swupdate_version}" = "2022.12" ]; then base_yaml="${base_yaml}:kas/opt/swupdate-2022.12.yaml"; fi
> +    - if [ "${no_kernel}" = "enable" ]; then base_yaml="${base_yaml}:kas/opt/no_kernel.yml"; fi
>      - echo "Building ${base_yaml}"
>      - kas build ${base_yaml}
> -    - if [ "${deploy}" = "enable" ]; then scripts/deploy-cip-core.sh ${release} ${target} ${extension} ${dtb} ${CI_COMMIT_REF_SLUG} wic; fi
> +    - if [ "${deploy}" = "enable" ]; then scripts/deploy-cip-core.sh ${release} ${target} ${extension} ${no_kernel} ${dtb} ${CI_COMMIT_REF_SLUG} wic; fi
>      - if [ "${build_swu_v2}" = "enable" ]; then
>            mkdir build/previous-image;
>            if [ "${extension}" = "security" ] || [ "${extension}" = "ebg-secure-boot-snakeoil" ]; then
> @@ -221,6 +223,30 @@ build:qemu-arm-test:
>      target:  qemu-arm
>      extension: test
>  
> +build:qemu-amd64-test-nokernel:
> +  extends:
> +    - .build_base
> +  variables:
> +    target:  qemu-amd64
> +    extension: test
> +    no_kernel: enable
> +
> +build:qemu-arm64-test-nokernel:
> +  extends:
> +    - .build_base
> +  variables:
> +    target:  qemu-arm64
> +    extension: test
> +    no_kernel: enable
> +
> +build:qemu-arm-test-nokernel:
> +  extends:
> +    - .build_base
> +  variables:
> +    target:  qemu-arm
> +    extension: test
> +    no_kernel: enable
> +

Do we always need to build and deploy those extra images?

>  build:x86-uefi-secure-boot:
>    extends:
>      - .build_base
> diff --git a/kas/opt/no_kernel.yml b/kas/opt/no_kernel.yml
> new file mode 100644
> index 0000000..2338177
> --- /dev/null
> +++ b/kas/opt/no_kernel.yml
> @@ -0,0 +1,17 @@
> +#
> +# CIP Core, generic profile
> +#
> +# Copyright (c) Toshiba Corporation 2025
> +#
> +# Authors:
> +#  Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
> +#
> +# SPDX-License-Identifier: MIT
> +#
> +
> +header:
> +  version: 14
> +
> +local_conf_header:
> +  kernel-version: |
> +    IMAGE_INSTALL:remove = "linux-image-cip linux-image-cip-rt"

KERNEL_NAME = "", that will also disable the now pointless build of the
kernel.

> diff --git a/scripts/deploy-cip-core.sh b/scripts/deploy-cip-core.sh
> index 6e4dfd7..6cb4968 100755
> --- a/scripts/deploy-cip-core.sh
> +++ b/scripts/deploy-cip-core.sh
> @@ -13,9 +13,10 @@ fi
>  RELEASE=$1
>  TARGET=$2
>  EXTENSION=$3
> -DTB=$4
> -REF=$5
> -DEPLOY=$6
> +NO_KERNEL=$4
> +DTB=$5
> +REF=$6
> +DEPLOY=$7
>  
>  BASE_FILENAME=cip-core-image-cip-core-$RELEASE-$TARGET
>  if [ "${EXTENSION}" != "none" ]; then
> @@ -29,6 +30,23 @@ fi
>  BASE_PATH=build/tmp/deploy/images/$TARGET/$BASE_FILENAME
>  S3_TARGET=s3://download2.cip-project.org/cip-core/$REF/$TARGET/
>  
> +if [ "${NO_KERNEL}" = "enable" ]; then
> +	__BASE_PATH=${BASE_PATH}
> +	BASE_PATH="${BASE_PATH}-nokernel"
> +
> +	echo "Rename from ${BASE_FILENAME}.* to ${BASE_FILENAME}-nokernel.*"
> +
> +	if [ -f "${__BASE_PATH}.tar.gz" ]; then
> +		mv "${__BASE_PATH}.tar.gz" "${BASE_PATH}.tar.gz"
> +	fi
> +	if [ -f "${__BASE_PATH}.swu" ]; then
> +		mv "${__BASE_PATH}.swu" "${BASE_PATH}.swu"
> +	fi
> +	if [ -f "${__BASE_PATH}.wic" ]; then
> +		mv "${__BASE_PATH}.wic" "${BASE_PATH}.wic"
> +	fi
> +fi
> +
>  if [ -f "${BASE_PATH}.wic" ]; then
>  	echo "Uploading artifacts..."
>  	if [ "$DEPLOY" = "swu" ]; then
> @@ -48,17 +66,20 @@ else
>  		aws s3 cp --no-progress --acl public-read "${BASE_PATH}.tar.gz" "${S3_TARGET}"
>  	fi
>  
> -	KERNEL_IMAGE="$BASE_PATH-vmlinu[xz]"
> -	# iwg20m workaround
> -	if [ -f "build/tmp/deploy/images/$TARGET/zImage" ]; then
> -		KERNEL_IMAGE=build/tmp/deploy/images/$TARGET/zImage
> -	fi
> -	# shellcheck disable=SC2086
> -	aws s3 cp --no-progress --acl public-read $KERNEL_IMAGE "${S3_TARGET}"
> -	aws s3 cp --no-progress --acl public-read "${BASE_PATH}-initrd.img" "${S3_TARGET}"
> +	if [ "$NO_KERNEL" = "false" ]; then
> +		KERNEL_IMAGE="$BASE_PATH-vmlinu[xz]"
> +		# iwg20m workaround
> +		if [ -f "build/tmp/deploy/images/$TARGET/zImage" ]; then
> +			KERNEL_IMAGE=build/tmp/deploy/images/$TARGET/zImage
> +		fi
>  
> -	if [ "$DTB" != "none" ]; then
> -		aws s3 cp --no-progress --acl public-read build/tmp/deploy/images/*/"$DTB" "${S3_TARGET}"
> +		# shellcheck disable=SC2086
> +		aws s3 cp --no-progress --acl public-read $KERNEL_IMAGE "${S3_TARGET}"
> +		aws s3 cp --no-progress --acl public-read "${BASE_PATH}-initrd.img" "${S3_TARGET}"
> +
> +		if [ "$DTB" != "none" ]; then
> +			aws s3 cp --no-progress --acl public-read build/tmp/deploy/images/*/"$DTB" "${S3_TARGET}"
> +		fi
>  	fi
>  fi
>  

Jan

-- 
Siemens AG, Foundational Technologies
Linux Expert Center


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [isar-cip-core][PATCH 2/2] Kconfig: Add config NO_KERNEL for kernel selection
  2025-02-28 12:46 ` [isar-cip-core][PATCH 2/2] Kconfig: Add config NO_KERNEL for kernel selection Nobuhiro Iwamatsu
@ 2025-02-28 15:41   ` Jan Kiszka
  2025-03-05  4:53     ` [cip-dev] " nobuhiro1.iwamatsu
  0 siblings, 1 reply; 8+ messages in thread
From: Jan Kiszka @ 2025-02-28 15:41 UTC (permalink / raw)
  To: Nobuhiro Iwamatsu, cip-dev

On 28.02.25 13:46, Nobuhiro Iwamatsu wrote:
> This adds config NO_KERNEL not to install the kernel select.
> 
> Signed-off-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
> ---
>  Kconfig | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/Kconfig b/Kconfig
> index 3c246fa..cfa4d11 100644
> --- a/Kconfig
> +++ b/Kconfig
> @@ -100,6 +100,9 @@ config KERNEL_5_10
>  config KERNEL_6_1
>  	bool "Kernel 6.1.x-cip"
>  
> +config NO_KERNEL
> +	bool "Do not install kernel to image"

When is this useful? And will a normal user of isar-cip-core have that
use case as well so that we should expose it here?

Jan

> +
>  endchoice
>  
>  config KAS_INCLUDE_KERNEL
> @@ -108,6 +111,7 @@ config KAS_INCLUDE_KERNEL
>  	default "kas/opt/4.19.yml" if KERNEL_4_19
>  	default "kas/opt/5.10.yml" if KERNEL_5_10
>  	default "kas/opt/6.1.yml" if KERNEL_6_1
> +	default "kas/opt/no_kernel.yml" if NO_KERNEL
>  
>  config KERNEL_RT
>  	bool "Real-time CIP kernel"

-- 
Siemens AG, Foundational Technologies
Linux Expert Center


^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [isar-cip-core][PATCH 1/2] kas/opt: Add option for not install kernel
  2025-02-28 15:40 ` [isar-cip-core][PATCH 1/2] kas/opt: Add option for not install kernel Jan Kiszka
@ 2025-03-05  4:45   ` nobuhiro1.iwamatsu
  2025-03-05  5:38     ` Jan Kiszka
  0 siblings, 1 reply; 8+ messages in thread
From: nobuhiro1.iwamatsu @ 2025-03-05  4:45 UTC (permalink / raw)
  To: jan.kiszka, cip-dev

Hi Jan,

> -----Original Message-----
> From: Jan Kiszka <jan.kiszka@siemens.com>
> Sent: Saturday, March 1, 2025 12:40 AM
> To: iwamatsu nobuhiro(岩松 信洋 ○DITC□DIT○OST)
> <nobuhiro1.iwamatsu@toshiba.co.jp>; cip-dev@lists.cip-project.org
> Subject: Re: [isar-cip-core][PATCH 1/2] kas/opt: Add option for not install
> kernel
> 
> On 28.02.25 13:46, Nobuhiro Iwamatsu wrote:
> > This adds an option to create an image that does not contain the kernel.
> >
> 
> What is the use case? How does this relate to kas/opt/kernelci.yml?
> 

This is not related kas/opt/kernelci.yml. This will be used to create rootfs for CIP/LAVA testing. 
The current recipe creates an image containing the kernel binary. Kernel binaries are not needed in
rootfs for kernel testing. Therefore, we have added an option to remove it.
This is also useful because some users may need rootfs without kernel binaries.

> > Signed-off-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
> > ---
> >  .gitlab-ci.yml             | 28 ++++++++++++++++++++++-
> >  kas/opt/no_kernel.yml      | 17 ++++++++++++++
> >  scripts/deploy-cip-core.sh | 47
> > +++++++++++++++++++++++++++-----------
> >  3 files changed, 78 insertions(+), 14 deletions(-)  create mode
> > 100644 kas/opt/no_kernel.yml
> >
> > diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4df521b..a09eedd
> > 100644
> > --- a/.gitlab-ci.yml
> > +++ b/.gitlab-ci.yml
> > @@ -27,6 +27,7 @@ variables:
> >    build_swu_v2: disable
> >    swupdate_version: default
> >    test_function: swupdate
> > +  no_kernel: disable
> >
> >  stages:
> >    - build
> > @@ -67,9 +68,10 @@ default:
> >      - if [ "${watchdog}" = "disable" ]; then
> base_yaml="${base_yaml}:kas/opt/disable-watchdog.yml"; fi
> >      - if [ "${security_test}" = "enable" ]; then
> base_yaml="${base_yaml}:kas/opt/security_test.yml"; fi
> >      - if [ "${swupdate_version}" = "2022.12" ]; then
> > base_yaml="${base_yaml}:kas/opt/swupdate-2022.12.yaml"; fi
> > +    - if [ "${no_kernel}" = "enable" ]; then
> > + base_yaml="${base_yaml}:kas/opt/no_kernel.yml"; fi
> >      - echo "Building ${base_yaml}"
> >      - kas build ${base_yaml}
> > -    - if [ "${deploy}" = "enable" ]; then scripts/deploy-cip-core.sh
> ${release} ${target} ${extension} ${dtb} ${CI_COMMIT_REF_SLUG} wic; fi
> > +    - if [ "${deploy}" = "enable" ]; then scripts/deploy-cip-core.sh
> > + ${release} ${target} ${extension} ${no_kernel} ${dtb}
> > + ${CI_COMMIT_REF_SLUG} wic; fi
> >      - if [ "${build_swu_v2}" = "enable" ]; then
> >            mkdir build/previous-image;
> >            if [ "${extension}" = "security" ] || [ "${extension}" =
> > "ebg-secure-boot-snakeoil" ]; then @@ -221,6 +223,30 @@
> build:qemu-arm-test:
> >      target:  qemu-arm
> >      extension: test
> >
> > +build:qemu-amd64-test-nokernel:
> > +  extends:
> > +    - .build_base
> > +  variables:
> > +    target:  qemu-amd64
> > +    extension: test
> > +    no_kernel: enable
> > +
> > +build:qemu-arm64-test-nokernel:
> > +  extends:
> > +    - .build_base
> > +  variables:
> > +    target:  qemu-arm64
> > +    extension: test
> > +    no_kernel: enable
> > +
> > +build:qemu-arm-test-nokernel:
> > +  extends:
> > +    - .build_base
> > +  variables:
> > +    target:  qemu-arm
> > +    extension: test
> > +    no_kernel: enable
> > +
> 
> Do we always need to build and deploy those extra images?

It will not be necessary every time.
It will need to be built when LTP is updated or when a point release is had in Debian.
The current gitlab pipeline is not that well thought out and I think it needs to be considered.

> 
> >  build:x86-uefi-secure-boot:
> >    extends:
> >      - .build_base
> > diff --git a/kas/opt/no_kernel.yml b/kas/opt/no_kernel.yml new file
> > mode 100644 index 0000000..2338177
> > --- /dev/null
> > +++ b/kas/opt/no_kernel.yml
> > @@ -0,0 +1,17 @@
> > +#
> > +# CIP Core, generic profile
> > +#
> > +# Copyright (c) Toshiba Corporation 2025 # # Authors:
> > +#  Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
> > +#
> > +# SPDX-License-Identifier: MIT
> > +#
> > +
> > +header:
> > +  version: 14
> > +
> > +local_conf_header:
> > +  kernel-version: |
> > +    IMAGE_INSTALL:remove = "linux-image-cip linux-image-cip-rt"
> 
> KERNEL_NAME = "", that will also disable the now pointless build of the
> kernel.

Thank you.
This is simpler and better.

Best regards,
  Nobuhiro

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [cip-dev] [isar-cip-core][PATCH 2/2] Kconfig: Add config NO_KERNEL for kernel selection
  2025-02-28 15:41   ` Jan Kiszka
@ 2025-03-05  4:53     ` nobuhiro1.iwamatsu
  0 siblings, 0 replies; 8+ messages in thread
From: nobuhiro1.iwamatsu @ 2025-03-05  4:53 UTC (permalink / raw)
  To: cip-dev

Hi Jan,

> -----Original Message-----
> From: cip-dev@lists.cip-project.org <cip-dev@lists.cip-project.org> On
> Behalf Of Jan Kiszka via lists.cip-project.org
> Sent: Saturday, March 1, 2025 12:42 AM
> To: iwamatsu nobuhiro(岩松 信洋 ○DITC□DIT○OST)
> <nobuhiro1.iwamatsu@toshiba.co.jp>; cip-dev@lists.cip-project.org
> Subject: Re: [cip-dev] [isar-cip-core][PATCH 2/2] Kconfig: Add config
> NO_KERNEL for kernel selection
> 
> On 28.02.25 13:46, Nobuhiro Iwamatsu wrote:
> > This adds config NO_KERNEL not to install the kernel select.
> >
> > Signed-off-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
> > ---
> >  Kconfig | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/Kconfig b/Kconfig
> > index 3c246fa..cfa4d11 100644
> > --- a/Kconfig
> > +++ b/Kconfig
> > @@ -100,6 +100,9 @@ config KERNEL_5_10  config KERNEL_6_1
> >  	bool "Kernel 6.1.x-cip"
> >
> > +config NO_KERNEL
> > +	bool "Do not install kernel to image"
> 
> When is this useful? And will a normal user of isar-cip-core have that use case
> as well so that we should expose it here?

This is intended to be used to create rootfs images that do not include the kernel.
For example, testing the kernel does not require the rootfs to include the kernel.
Since the kernel is not included, the rootfs size will also be smaller.

> 
> Jan

Best regards,
  Nobuhiro

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [isar-cip-core][PATCH 1/2] kas/opt: Add option for not install kernel
  2025-03-05  4:45   ` nobuhiro1.iwamatsu
@ 2025-03-05  5:38     ` Jan Kiszka
  2025-03-06  5:54       ` [cip-dev] " nobuhiro1.iwamatsu
  0 siblings, 1 reply; 8+ messages in thread
From: Jan Kiszka @ 2025-03-05  5:38 UTC (permalink / raw)
  To: nobuhiro1.iwamatsu, cip-dev

On 05.03.25 05:45, nobuhiro1.iwamatsu@toshiba.co.jp wrote:
> Hi Jan,
> 
>> -----Original Message-----
>> From: Jan Kiszka <jan.kiszka@siemens.com>
>> Sent: Saturday, March 1, 2025 12:40 AM
>> To: iwamatsu nobuhiro(岩松 信洋 ○DITC□DIT○OST)
>> <nobuhiro1.iwamatsu@toshiba.co.jp>; cip-dev@lists.cip-project.org
>> Subject: Re: [isar-cip-core][PATCH 1/2] kas/opt: Add option for not install
>> kernel
>>
>> On 28.02.25 13:46, Nobuhiro Iwamatsu wrote:
>>> This adds an option to create an image that does not contain the kernel.
>>>
>>
>> What is the use case? How does this relate to kas/opt/kernelci.yml?
>>
> 
> This is not related kas/opt/kernelci.yml. This will be used to create rootfs for CIP/LAVA testing. 
> The current recipe creates an image containing the kernel binary. Kernel binaries are not needed in
> rootfs for kernel testing. Therefore, we have added an option to remove it.
> This is also useful because some users may need rootfs without kernel binaries.

For my understanding: When is kernelci.yml used, when the kernel-free
image? For kernelci, we also deploy (not right now as upstream's API is
changing), but that was always with the kernel - why there?

> 
>>> Signed-off-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
>>> ---
>>>  .gitlab-ci.yml             | 28 ++++++++++++++++++++++-
>>>  kas/opt/no_kernel.yml      | 17 ++++++++++++++
>>>  scripts/deploy-cip-core.sh | 47
>>> +++++++++++++++++++++++++++-----------
>>>  3 files changed, 78 insertions(+), 14 deletions(-)  create mode
>>> 100644 kas/opt/no_kernel.yml
>>>
>>> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4df521b..a09eedd
>>> 100644
>>> --- a/.gitlab-ci.yml
>>> +++ b/.gitlab-ci.yml
>>> @@ -27,6 +27,7 @@ variables:
>>>    build_swu_v2: disable
>>>    swupdate_version: default
>>>    test_function: swupdate
>>> +  no_kernel: disable
>>>
>>>  stages:
>>>    - build
>>> @@ -67,9 +68,10 @@ default:
>>>      - if [ "${watchdog}" = "disable" ]; then
>> base_yaml="${base_yaml}:kas/opt/disable-watchdog.yml"; fi
>>>      - if [ "${security_test}" = "enable" ]; then
>> base_yaml="${base_yaml}:kas/opt/security_test.yml"; fi
>>>      - if [ "${swupdate_version}" = "2022.12" ]; then
>>> base_yaml="${base_yaml}:kas/opt/swupdate-2022.12.yaml"; fi
>>> +    - if [ "${no_kernel}" = "enable" ]; then
>>> + base_yaml="${base_yaml}:kas/opt/no_kernel.yml"; fi
>>>      - echo "Building ${base_yaml}"
>>>      - kas build ${base_yaml}
>>> -    - if [ "${deploy}" = "enable" ]; then scripts/deploy-cip-core.sh
>> ${release} ${target} ${extension} ${dtb} ${CI_COMMIT_REF_SLUG} wic; fi
>>> +    - if [ "${deploy}" = "enable" ]; then scripts/deploy-cip-core.sh
>>> + ${release} ${target} ${extension} ${no_kernel} ${dtb}
>>> + ${CI_COMMIT_REF_SLUG} wic; fi
>>>      - if [ "${build_swu_v2}" = "enable" ]; then
>>>            mkdir build/previous-image;
>>>            if [ "${extension}" = "security" ] || [ "${extension}" =
>>> "ebg-secure-boot-snakeoil" ]; then @@ -221,6 +223,30 @@
>> build:qemu-arm-test:
>>>      target:  qemu-arm
>>>      extension: test
>>>
>>> +build:qemu-amd64-test-nokernel:
>>> +  extends:
>>> +    - .build_base
>>> +  variables:
>>> +    target:  qemu-amd64
>>> +    extension: test
>>> +    no_kernel: enable
>>> +
>>> +build:qemu-arm64-test-nokernel:
>>> +  extends:
>>> +    - .build_base
>>> +  variables:
>>> +    target:  qemu-arm64
>>> +    extension: test
>>> +    no_kernel: enable
>>> +
>>> +build:qemu-arm-test-nokernel:
>>> +  extends:
>>> +    - .build_base
>>> +  variables:
>>> +    target:  qemu-arm
>>> +    extension: test
>>> +    no_kernel: enable
>>> +
>>
>> Do we always need to build and deploy those extra images?
> 
> It will not be necessary every time.
> It will need to be built when LTP is updated or when a point release is had in Debian.
> The current gitlab pipeline is not that well thought out and I think it needs to be considered.
> 

If we do not pick up the artifacts automatically from a pipeline build,
we can make these variants also manually triggered. But I still need to
understand the apparent overlap with the kernelci builds (which happen
unconditionally so far).

BTW, where is the riscv64 variant?

>>
>>>  build:x86-uefi-secure-boot:
>>>    extends:
>>>      - .build_base
>>> diff --git a/kas/opt/no_kernel.yml b/kas/opt/no_kernel.yml new file
>>> mode 100644 index 0000000..2338177
>>> --- /dev/null
>>> +++ b/kas/opt/no_kernel.yml
>>> @@ -0,0 +1,17 @@
>>> +#
>>> +# CIP Core, generic profile
>>> +#
>>> +# Copyright (c) Toshiba Corporation 2025 # # Authors:
>>> +#  Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
>>> +#
>>> +# SPDX-License-Identifier: MIT
>>> +#
>>> +
>>> +header:
>>> +  version: 14
>>> +
>>> +local_conf_header:
>>> +  kernel-version: |
>>> +    IMAGE_INSTALL:remove = "linux-image-cip linux-image-cip-rt"
>>
>> KERNEL_NAME = "", that will also disable the now pointless build of the
>> kernel.
> 
> Thank you.
> This is simpler and better.
> 
> Best regards,
>   Nobuhiro


-- 
Siemens AG, Foundational Technologies
Linux Expert Center


^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [cip-dev] [isar-cip-core][PATCH 1/2] kas/opt: Add option for not install kernel
  2025-03-05  5:38     ` Jan Kiszka
@ 2025-03-06  5:54       ` nobuhiro1.iwamatsu
  0 siblings, 0 replies; 8+ messages in thread
From: nobuhiro1.iwamatsu @ 2025-03-06  5:54 UTC (permalink / raw)
  To: jan.kiszka, arisu.tachibana; +Cc: cip-dev

Hi jan,

> -----Original Message-----
> From: cip-dev@lists.cip-project.org <cip-dev@lists.cip-project.org> On
> Behalf Of Jan Kiszka via lists.cip-project.org
> Sent: Wednesday, March 5, 2025 2:38 PM
> To: iwamatsu nobuhiro(岩松 信洋 ○DITC□DIT○OST)
> <nobuhiro1.iwamatsu@toshiba.co.jp>; cip-dev@lists.cip-project.org
> Subject: Re: [cip-dev] [isar-cip-core][PATCH 1/2] kas/opt: Add option for not
> install kernel
> 
> >>
> >> On 28.02.25 13:46, Nobuhiro Iwamatsu wrote:
> >>> This adds an option to create an image that does not contain the kernel.
> >>>
> >>
> >> What is the use case? How does this relate to kas/opt/kernelci.yml?
> >>
> >
> > This is not related kas/opt/kernelci.yml. This will be used to create rootfs for
> CIP/LAVA testing.
> > The current recipe creates an image containing the kernel binary.
> > Kernel binaries are not needed in rootfs for kernel testing. Therefore, we have
> added an option to remove it.
> > This is also useful because some users may need rootfs without kernel
> binaries.
> 
> For my understanding: When is kernelci.yml used, when the kernel-free image?

I am not exactly sure about kernelci.yml, Arisu, could you explain it?
As far as I can confirm, the current gitlab CI adds getty , ssh and dmesg settings to the rootfs with minimal functionality.

For kernel-free image, I am thinking that the kernel-free image is used for kernel testing by gitlab for CIP/LAVA. 
Of course, they can also be used for other kernel tests. It may be possible to make kernelci the same.

> For kernelci, we also deploy (not right now as upstream's API is changing), but
> that was always with the kernel - why there?
> 

I think that this would depend on the user and the designers of the testing tools.
Some people don't mind using rootfs with an unrelated kernel for testing.
Also, the size of the rootfs will be smaller since it does not contain kernel binaries or drivers.

> >
> >>> Signed-off-by: Nobuhiro Iwamatsu
> <nobuhiro1.iwamatsu@toshiba.co.jp>
> >>> ---
> >>>  .gitlab-ci.yml             | 28 ++++++++++++++++++++++-
> >>>  kas/opt/no_kernel.yml      | 17 ++++++++++++++
> >>>  scripts/deploy-cip-core.sh | 47
> >>> +++++++++++++++++++++++++++-----------
> >>>  3 files changed, 78 insertions(+), 14 deletions(-)  create mode
> >>> 100644 kas/opt/no_kernel.yml
> >>>
> >>> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4df521b..a09eedd
> >>> 100644
> >>> --- a/.gitlab-ci.yml
> >>> +++ b/.gitlab-ci.yml
> >>> @@ -27,6 +27,7 @@ variables:
> >>>    build_swu_v2: disable
> >>>    swupdate_version: default
> >>>    test_function: swupdate
> >>> +  no_kernel: disable
> >>>
> >>>  stages:
> >>>    - build
> >>> @@ -67,9 +68,10 @@ default:
> >>>      - if [ "${watchdog}" = "disable" ]; then
> >> base_yaml="${base_yaml}:kas/opt/disable-watchdog.yml"; fi
> >>>      - if [ "${security_test}" = "enable" ]; then
> >> base_yaml="${base_yaml}:kas/opt/security_test.yml"; fi
> >>>      - if [ "${swupdate_version}" = "2022.12" ]; then
> >>> base_yaml="${base_yaml}:kas/opt/swupdate-2022.12.yaml"; fi
> >>> +    - if [ "${no_kernel}" = "enable" ]; then
> >>> + base_yaml="${base_yaml}:kas/opt/no_kernel.yml"; fi
> >>>      - echo "Building ${base_yaml}"
> >>>      - kas build ${base_yaml}
> >>> -    - if [ "${deploy}" = "enable" ]; then scripts/deploy-cip-core.sh
> >> ${release} ${target} ${extension} ${dtb} ${CI_COMMIT_REF_SLUG} wic;
> >> fi
> >>> +    - if [ "${deploy}" = "enable" ]; then
> >>> + scripts/deploy-cip-core.sh ${release} ${target} ${extension}
> >>> + ${no_kernel} ${dtb} ${CI_COMMIT_REF_SLUG} wic; fi
> >>>      - if [ "${build_swu_v2}" = "enable" ]; then
> >>>            mkdir build/previous-image;
> >>>            if [ "${extension}" = "security" ] || [ "${extension}" =
> >>> "ebg-secure-boot-snakeoil" ]; then @@ -221,6 +223,30 @@
> >> build:qemu-arm-test:
> >>>      target:  qemu-arm
> >>>      extension: test
> >>>
> >>> +build:qemu-amd64-test-nokernel:
> >>> +  extends:
> >>> +    - .build_base
> >>> +  variables:
> >>> +    target:  qemu-amd64
> >>> +    extension: test
> >>> +    no_kernel: enable
> >>> +
> >>> +build:qemu-arm64-test-nokernel:
> >>> +  extends:
> >>> +    - .build_base
> >>> +  variables:
> >>> +    target:  qemu-arm64
> >>> +    extension: test
> >>> +    no_kernel: enable
> >>> +
> >>> +build:qemu-arm-test-nokernel:
> >>> +  extends:
> >>> +    - .build_base
> >>> +  variables:
> >>> +    target:  qemu-arm
> >>> +    extension: test
> >>> +    no_kernel: enable
> >>> +
> >>
> >> Do we always need to build and deploy those extra images?
> >
> > It will not be necessary every time.
> > It will need to be built when LTP is updated or when a point release is had in
> Debian.
> > The current gitlab pipeline is not that well thought out and I think it needs to
> be considered.
> >
> 
> If we do not pick up the artifacts automatically from a pipeline build, we can
> make these variants also manually triggered. But I still need to understand the
> apparent overlap with the kernelci builds (which happen unconditionally so
> far).

I have summarized the differences:

- kernelci:
  - not include test (LTP and others)
    kenrelci probably downloads the test binaries when it runs the tests due to LAVA functionality.
  - includes dedicated scripts (ssh, getty and others) and configuration
  - include kernel binaries when built

- no_kenrel (latest patch):
  - nncludes LTP and other testing tools.
  - not included kernel binaries

If kernelci does not use the kernel contained in the rootfs, I believe it is possible to create a common image
that does not contain kernel binaries and test binaries. As for LTP and other test binaries, the same functionality
as kernelci would need to be modified to be available in CIP/LAVA YAML.

> 
> BTW, where is the riscv64 variant?

Ah, I forgot about that. I'll add it with update patch.

Best regards,
  Nobuhiro

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-03-06  5:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-28 12:46 [isar-cip-core][PATCH 1/2] kas/opt: Add option for not install kernel Nobuhiro Iwamatsu
2025-02-28 12:46 ` [isar-cip-core][PATCH 2/2] Kconfig: Add config NO_KERNEL for kernel selection Nobuhiro Iwamatsu
2025-02-28 15:41   ` Jan Kiszka
2025-03-05  4:53     ` [cip-dev] " nobuhiro1.iwamatsu
2025-02-28 15:40 ` [isar-cip-core][PATCH 1/2] kas/opt: Add option for not install kernel Jan Kiszka
2025-03-05  4:45   ` nobuhiro1.iwamatsu
2025-03-05  5:38     ` Jan Kiszka
2025-03-06  5:54       ` [cip-dev] " nobuhiro1.iwamatsu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox