meta-isar: Enable image installer support for RPi targets

Message ID 20241114135529.1467287-1-amikan@ilbers.de
State Accepted, archived
Headers show
Series meta-isar: Enable image installer support for RPi targets | expand

Commit Message

Anton Mikanovich Nov. 14, 2024, 1:55 p.m. UTC
Enable isar-installer usage for Raspberry Pi board.

Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
---
 meta-isar/conf/machine/rpi-common.conf                 | 4 ++++
 meta-isar/scripts/lib/wic/canned-wks/installer-rpi.wks | 7 +++++++
 2 files changed, 11 insertions(+)
 create mode 100644 meta-isar/scripts/lib/wic/canned-wks/installer-rpi.wks

Comments

Anton Mikanovich Nov. 14, 2024, 1:57 p.m. UTC | #1
14/11/2024 15:55, Anton Mikanovich wrote:
> Enable isar-installer usage for Raspberry Pi board.
>
> Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
This one wasn't tested on real hardware yet.
Uladzimir Bely Nov. 21, 2024, 6:49 a.m. UTC | #2
On Thu, 2024-11-14 at 15:55 +0200, Anton Mikanovich wrote:
> Enable isar-installer usage for Raspberry Pi board.
> 
> Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
> ---
>  meta-isar/conf/machine/rpi-common.conf                 | 4 ++++
>  meta-isar/scripts/lib/wic/canned-wks/installer-rpi.wks | 7 +++++++
>  2 files changed, 11 insertions(+)
>  create mode 100644 meta-isar/scripts/lib/wic/canned-wks/installer-
> rpi.wks
> 
> diff --git a/meta-isar/conf/machine/rpi-common.conf b/meta-
> isar/conf/machine/rpi-common.conf
> index 949496ec..4f7a9955 100644
> --- a/meta-isar/conf/machine/rpi-common.conf
> +++ b/meta-isar/conf/machine/rpi-common.conf
> @@ -7,6 +7,10 @@ BAUDRATE_TTY ?= "115200"
>  
>  IMAGE_FSTYPES ?= "wic"
>  WKS_FILE ?= "rpi-sdimg"
> +INSTALLER_WKS_FILE ?= "installer-rpi.wks"
> +
> +# RPi have custom kernel file names
> +KERNEL_FILE = "${KERNEL_NAME}.img"
>  
>  KERNEL_TYPE = "raspios"
>  KERNEL_IMAGE_PKG ?= "raspberrypi-kernel"
> diff --git a/meta-isar/scripts/lib/wic/canned-wks/installer-rpi.wks
> b/meta-isar/scripts/lib/wic/canned-wks/installer-rpi.wks
> new file mode 100644
> index 00000000..248d2bbc
> --- /dev/null
> +++ b/meta-isar/scripts/lib/wic/canned-wks/installer-rpi.wks
> @@ -0,0 +1,7 @@
> +# short-description: Create installer image for RPi machines
> +
> +part /boot --source bootimg-partition --fstype=vfat --label boot --
> active --align 4096 --size 10 --use-uuid
> +part / --source rootfs --fstype ext4 --exclude-path=install --label
> installroot --align 4096 --exclude-path=boot --use-uuid
> +part /install --source rootfs --change-directory=install --label
> INSTALLDATA --size 4G --fstype=vfat --use-uuid --align 4096
> +
> +bootloader
> -- 
> 2.34.1
> 

Applied to next.

Patch

diff --git a/meta-isar/conf/machine/rpi-common.conf b/meta-isar/conf/machine/rpi-common.conf
index 949496ec..4f7a9955 100644
--- a/meta-isar/conf/machine/rpi-common.conf
+++ b/meta-isar/conf/machine/rpi-common.conf
@@ -7,6 +7,10 @@  BAUDRATE_TTY ?= "115200"
 
 IMAGE_FSTYPES ?= "wic"
 WKS_FILE ?= "rpi-sdimg"
+INSTALLER_WKS_FILE ?= "installer-rpi.wks"
+
+# RPi have custom kernel file names
+KERNEL_FILE = "${KERNEL_NAME}.img"
 
 KERNEL_TYPE = "raspios"
 KERNEL_IMAGE_PKG ?= "raspberrypi-kernel"
diff --git a/meta-isar/scripts/lib/wic/canned-wks/installer-rpi.wks b/meta-isar/scripts/lib/wic/canned-wks/installer-rpi.wks
new file mode 100644
index 00000000..248d2bbc
--- /dev/null
+++ b/meta-isar/scripts/lib/wic/canned-wks/installer-rpi.wks
@@ -0,0 +1,7 @@ 
+# short-description: Create installer image for RPi machines
+
+part /boot --source bootimg-partition --fstype=vfat --label boot --active --align 4096 --size 10 --use-uuid
+part / --source rootfs --fstype ext4 --exclude-path=install --label installroot --align 4096 --exclude-path=boot --use-uuid
+part /install --source rootfs --change-directory=install --label INSTALLDATA --size 4G --fstype=vfat --use-uuid --align 4096
+
+bootloader