From: Jan Kiszka <jan.kiszka@siemens.com>
To: isar-users <isar-users@googlegroups.com>
Cc: Nishanth Menon <nm@ti.com>
Subject: Re: [PATCH 8/9] Add support for the BeaglePlay board
Date: Sun, 7 Jan 2024 17:40:58 +0100 [thread overview]
Message-ID: <28d96bf8-9e31-4cc9-a1a5-e7bf73910b22@siemens.com> (raw)
In-Reply-To: <f158b7531b4384421203602a186e6ff0c349cf49.1704632056.git.jan.kiszka@siemens.com>
On 07.01.24 13:54, 'Jan Kiszka' via isar-users wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> This creates a minimal image for the BeaglePlay board [1], using UEFI as
> boot method.
>
> That is requiring some extra work so that the image can also be used on
> SD cards: The ROM loader only supports legacy DOS partition tables, but
> UEFI needs GPT. We address this by creating a hybrid image with both
> partition tables in place, first allowing wic to generate a GPT table,
> then using fdisk to add a DOS partition entry at least for the UEFI boot
> partition.
>
> [1] https://www.beagleboard.org/boards/beagleplay
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
> kas/machine/Kconfig | 5 ++++
> kas/machine/beagleplay.yaml | 9 +++++++
> .../imagetypes_beagleplay_hybrid.bbclass | 25 +++++++++++++++++++
> meta-isar/conf/machine/beagleplay.conf | 24 ++++++++++++++++++
> meta-isar/conf/mc.conf | 1 +
> .../conf/multiconfig/beagleplay-bookworm.conf | 7 ++++++
> .../lib/wic/canned-wks/beagleplay.wks.in | 11 ++++++++
> 7 files changed, 82 insertions(+)
> create mode 100644 kas/machine/beagleplay.yaml
> create mode 100644 meta-isar/classes/imagetypes_beagleplay_hybrid.bbclass
> create mode 100644 meta-isar/conf/machine/beagleplay.conf
> create mode 100644 meta-isar/conf/multiconfig/beagleplay-bookworm.conf
> create mode 100644 meta-isar/scripts/lib/wic/canned-wks/beagleplay.wks.in
>
> diff --git a/kas/machine/Kconfig b/kas/machine/Kconfig
> index d0e3963a..b06cddf1 100644
> --- a/kas/machine/Kconfig
> +++ b/kas/machine/Kconfig
> @@ -14,6 +14,10 @@ config MACHINE_BANANAPI
> bool "bananapi"
> depends on DEBIAN_BUSTER || DEBIAN_BULLSEYE || DEBIAN_BOOKWORM
>
> +config MACHINE_BEAGLEPLAY
> + bool "beagleplay"
> + depends on DEBIAN_BOOKWORM
> +
> config MACHINE_CONTAINER_AMD64
> bool "container-amd64"
> depends on DEBIAN_BUSTER || DEBIAN_BULLSEYE || DEBIAN_BOOKWORM
> @@ -111,6 +115,7 @@ endchoice
> config KAS_INCLUDE_MACHINE
> string
> default "kas/machine/bananapi.yaml" if MACHINE_BANANAPI
> + default "kas/machine/beagleplay.yaml" if MACHINE_BEAGLEPLAY
> default "kas/machine/container-amd64.yaml" if MACHINE_CONTAINER_AMD64
> default "kas/machine/de0-nano-soc.yaml" if MACHINE_DE0_NANO_SOC
> default "kas/machine/hikey.yaml" if MACHINE_HIKEY
> diff --git a/kas/machine/beagleplay.yaml b/kas/machine/beagleplay.yaml
> new file mode 100644
> index 00000000..81fc4c32
> --- /dev/null
> +++ b/kas/machine/beagleplay.yaml
> @@ -0,0 +1,9 @@
> +# This software is a part of ISAR.
> +# Copyright (c) Siemens AG, 2023
> +#
> +# SPDX-License-Identifier: MIT
> +
> +header:
> + version: 14
> +
> +machine: beagleplay
> diff --git a/meta-isar/classes/imagetypes_beagleplay_hybrid.bbclass b/meta-isar/classes/imagetypes_beagleplay_hybrid.bbclass
> new file mode 100644
> index 00000000..00631082
> --- /dev/null
> +++ b/meta-isar/classes/imagetypes_beagleplay_hybrid.bbclass
> @@ -0,0 +1,25 @@
> +#
> +# Copyright (c) Siemens AG, 2023
> +#
> +# SPDX-License-Identifier: MIT
> +
> +IMAGE_TYPEDEP:beagleplay_hybrid = "wic"
> +
> +IMAGER_INSTALL:beagleplay_hybrid += "gdisk fdisk bmap-tools"
> +
> +IMAGE_CMD:beagleplay_hybrid() {
> + ln -sf "${IMAGE_FULLNAME}.wic" "${IMAGE_FILE_HOST}"
> + ${SUDO_CHROOT} sh -c '
> + sgdisk "${IMAGE_FILE_CHROOT}" --hybrid 1:EE
> + fdisk "${IMAGE_FILE_CHROOT}" << EOF
> +M
> +t
> +1
> +c
> +a
> +1
> +w
> +q
> +EOF
> + bmaptool create ${IMAGE_FILE_CHROOT} -o ${PP_DEPLOY}/${IMAGE_FULLNAME}.wic.bmap'
> +}
> diff --git a/meta-isar/conf/machine/beagleplay.conf b/meta-isar/conf/machine/beagleplay.conf
> new file mode 100644
> index 00000000..8b1a088c
> --- /dev/null
> +++ b/meta-isar/conf/machine/beagleplay.conf
> @@ -0,0 +1,24 @@
> +#
> +# Copyright (c) Siemens AG, 2023
> +#
> +# SPDX-License-Identifier: MIT
> +
> +DISTRO_ARCH ?= "arm64"
> +
> +KERNEL_NAME ?= "mainline"
> +
> +DTB_BEAGLEPLAY = "k3-am625-beagleplay.dtb"
> +DTB_FILES ?= "${DTB_BEAGLEPLAY}"
> +
> +IMAGE_CLASSES += "imagetypes_beagleplay_hybrid"
> +IMAGE_FSTYPES ?= "wic beagleplay_hybrid"
> +WKS_FILE ?= "beagleplay.wks.in"
> +IMAGER_INSTALL += "${SYSTEMD_BOOTLOADER_INSTALL} u-boot-beagleplay"
> +IMAGER_BUILD_DEPS += "u-boot-beagleplay"
> +
> +IMAGE_BOOT_FILES = " \
> + /usr/lib/u-boot/beagleplay/tiboot3-am62x-gp-evm.bin;tiboot3.bin \
> + /usr/lib/u-boot/beagleplay/tispl.bin_unsigned;tispl.bin \
> + /usr/lib/u-boot/beagleplay/u-boot.img_unsigned;u-boot.img"
> +
> +IMAGE_PREINSTALL += "firmware-ti-connectivity"
> diff --git a/meta-isar/conf/mc.conf b/meta-isar/conf/mc.conf
> index d16f54b5..f1fb50c6 100644
> --- a/meta-isar/conf/mc.conf
> +++ b/meta-isar/conf/mc.conf
> @@ -28,6 +28,7 @@ BBMULTICONFIG = " \
> qemuriscv64-sid \
> bananapi-buster \
> bananapi-bullseye \
> + beagleplay-bookworm \
> de0-nano-soc-buster \
> de0-nano-soc-bullseye \
> hikey-bullseye \
> diff --git a/meta-isar/conf/multiconfig/beagleplay-bookworm.conf b/meta-isar/conf/multiconfig/beagleplay-bookworm.conf
> new file mode 100644
> index 00000000..1720cf5d
> --- /dev/null
> +++ b/meta-isar/conf/multiconfig/beagleplay-bookworm.conf
> @@ -0,0 +1,7 @@
> +#
> +# Copyright (c) Siemens AG, 2023
> +#
> +# SPDX-License-Identifier: MIT
> +
> +MACHINE ?= "beagleplay"
> +DISTRO ?= "debian-bookworm"
> diff --git a/meta-isar/scripts/lib/wic/canned-wks/beagleplay.wks.in b/meta-isar/scripts/lib/wic/canned-wks/beagleplay.wks.in
> new file mode 100644
> index 00000000..4a437e89
> --- /dev/null
> +++ b/meta-isar/scripts/lib/wic/canned-wks/beagleplay.wks.in
> @@ -0,0 +1,11 @@
> +#
> +# Copyright (c) Siemens AG, 2023
> +#
> +# SPDX-License-Identifier: MIT
> +
> +part /boot/firmware --source bootimg-partition --fstype=vfat --label firmware --active --align 1024 --size 16M --overhead-factor 1 --extra-space 0 --use-uuid
> +part /boot --source bootimg-efi-isar --sourceparams "loader=systemd-boot,dtb=${DTB_BEAGLEPLAY}" --label efi --part-type EF00 --align 1024 --use-uuid
In fact, we are fine with the firmware provided DTB by now. I'll drop
DTB_BEAGLEPLAY in a v2, just waiting for more feedback first.
Jan
> +
> +part / --source rootfs --fstype ext4 --mkfs-extraopts "-T default" --label platform --align 1024 --use-uuid --exclude-path boot/
> +
> +bootloader --ptable gpt --timeout=0 --append "rootwait rw"
--
Siemens AG, Technology
Linux Expert Center
next prev parent reply other threads:[~2024-01-07 16:41 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-07 12:54 [PATCH 0/9] Add support for BeaglePlay Jan Kiszka
2024-01-07 12:54 ` [PATCH 1/9] meta-isar: linux-mainline: Update to 6.6.10 Jan Kiszka
2024-01-07 12:54 ` [PATCH 2/9] optee-os: Switch default binary to tee-raw.bin Jan Kiszka
2024-01-07 12:54 ` [PATCH 3/9] u-boot-custom: Allow to set BL31 and TEE from recipes Jan Kiszka
2024-01-07 12:54 ` [PATCH 4/9] u-boot-custom: Allow to define different installation binaries Jan Kiszka
2024-01-07 12:54 ` [PATCH 5/9] beagleplay: Add TF-A recipe Jan Kiszka
2024-01-08 12:49 ` Florian Bezdeka
2024-01-07 12:54 ` [PATCH 6/9] beagleplay: Add OP-TEE recipe Jan Kiszka
2024-01-07 12:54 ` [PATCH 7/9] beagleplay: Add U-Boot recipe Jan Kiszka
2024-01-08 13:17 ` Florian Bezdeka
2024-01-08 13:19 ` Jan Kiszka
2024-01-07 12:54 ` [PATCH 8/9] Add support for the BeaglePlay board Jan Kiszka
2024-01-07 16:40 ` Jan Kiszka [this message]
2024-01-07 12:54 ` [PATCH 9/9] expand-on-first-boot: Preserve MBR on expansion of GPT disks Jan Kiszka
2024-01-08 8:51 ` [PATCH 0/9] Add support for BeaglePlay Anton Mikanovich
2024-01-08 12:18 ` Jan Kiszka
2024-01-08 13:53 ` Anton Mikanovich
2024-01-08 15:07 ` Jan Kiszka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=28d96bf8-9e31-4cc9-a1a5-e7bf73910b22@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=isar-users@googlegroups.com \
--cc=nm@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox