recipes-core: Add a bootstrap Linux image
v2 cover recipes-core: Add a bootstrap Linux image
Board bringups are typically painful. however, over the years, folks know of minimal debug tools that are pretty effective in helping debug basic peripherals. Lets create a reusable packagegroup balancing the tools from wisdom from various folks vs the size of the resultant package.
We would like to base such a system on more simplistic sysvinit (no offence systemd, you are still our fav), as it has a much smaller footprint.
The board startup is best done with a minimal u-boot and kernel device tree configurations.
Dependency (for patch #12, depends on https://lore.kernel.org/all/[email protected]/ )
Changes since V1:
* Additional documentation patches
* Cleanups for review comments
V1: https://lore.kernel.org/all/[email protected]/
Nishanth Menon (12):
Revert "tisdk-tiny-image: remove packagedata task breaking initramfs
packaging"
tisdk-tiny-image: Split common components into include file
tisdk-tiny-image: Add some usability notes
tisdk-base-image: Reformat documentation and clarify usage
tisdk-default-image: Reformat documentation and clarify usage
tisdk-thinlinux-image: Reformat documentation
packagegroups: Add a new bootstrap package group
recipes-core: images: Add a basic bootstrap base image
recipes-bsp: Create a bootstrap-initrd package
recipes-core: images: Introduce tisdk-bootstrap-image
tisdk-core-bundle: Add documentation to clarify usage
images: Build tisdk-bootstrap-image with tisdk-core-bundle
.../bootstrap-initrd/bootstrap-initrd_1.0.bb | 22 ++++++++ .../recipes-core/images/arago-tiny-image.inc | 9 ++++ .../recipes-core/images/tisdk-base-image.bb | 4 +- .../images/tisdk-bootstrap-base-image.bb | 21 ++++++++ .../images/tisdk-bootstrap-image.bb | 20 +++++++ .../recipes-core/images/tisdk-core-bundle.bb | 6 +++ .../recipes-core/images/tisdk-core-bundle.inc | 2 +- .../images/tisdk-default-image.bb | 3 ++ .../images/tisdk-thinlinux-image.bb | 1 + .../recipes-core/images/tisdk-tiny-image.bb | 20 +++---- .../packagegroup-arago-bootstrap.bb | 53 +++++++++++++++++++ 11 files changed, 150 insertions(+), 11 deletions(-) create mode 100644 meta-arago-distro/recipes-bsp/bootstrap-initrd/bootstrap-initrd_1.0.bb create mode 100644 meta-arago-distro/recipes-core/images/arago-tiny-image.inc create mode 100644 meta-arago-distro/recipes-core/images/tisdk-bootstrap-base-image.bb create mode 100644 meta-arago-distro/recipes-core/images/tisdk-bootstrap-image.bb create mode 100644 meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-bootstrap.bb
Signature · 1 line
2.31.1
PATCH v2 1/12 Revert "tisdk-tiny-image: remove packagedata task breaking initramfs packaging"
This reverts commit a75e468a372d4f5c2c32a179d4d2219899b5190c.
Commit a75e468a372d ("tisdk-tiny-image: remove packagedata task breaking initramfs packaging") as discussed in [1] is no longer necessary as the offending patches have been reverted in dunfell.
[1] https://lists.yoctoproject.org/g/meta-arago/message/13624
---
Changes since v1:
* New patch
V1: did'nt exist.
meta-arago-distro/recipes-core/images/tisdk-tiny-image.bb | 2 -- 1 file changed, 2 deletions(-)
meta-arago-distro/recipes-core/images/tisdk-tiny-image.bb +0 -2
@@ -13,6 +13,4 @@ IMAGE_INSTALL = " \ ${ARAGO_TINY_IMAGE_EXTRA_INSTALL} \ " -deltask do_packagedata - export IMAGE_BASENAME = "tisdk-tiny-image"
Signature · 1 line
2.31.1
PATCH v2 2/12 tisdk-tiny-image: Split common components into include file
In reply to Nishanth MenonLets split the common pieces for creating a tiny image into an include file. This can then be used to incrementally build additional images as well.
---
Changes since v1:
* No change (just rebase)
V1: https://lore.kernel.org/all/[email protected]/
.../{tisdk-tiny-image.bb => arago-tiny-image.inc} | 7 -------
.../recipes-core/images/tisdk-tiny-image.bb | 11 +++--------
2 files changed, 3 insertions(+), 15 deletions(-)
copy meta-arago-distro/recipes-core/images/{tisdk-tiny-image.bb => arago-tiny-image.inc} (50%)meta-arago-distro/recipes-core/images/arago-tiny-image.inc renamed from meta-arago-distro/recipes-core/images/tisdk-tiny-image.bb +0 -7
@@ -4,13 +4,6 @@ require arago-image.inc IMAGE_FEATURES_remove = "package-management splash" -IMAGE_FSTYPES += "cpio cpio.xz" - -ARAGO_TINY_IMAGE_EXTRA_INSTALL ?= "" - IMAGE_INSTALL = " \ packagegroup-arago-sysvinit-boot \ - ${ARAGO_TINY_IMAGE_EXTRA_INSTALL} \ " - -export IMAGE_BASENAME = "tisdk-tiny-image"
meta-arago-distro/recipes-core/images/tisdk-tiny-image.bb +3 -8
@@ -1,15 +1,10 @@ -ARAGO_SYSVINIT = "1" - -require arago-image.inc +ARAGO_TINY_IMAGE_EXTRA_INSTALL ?= "" -IMAGE_FEATURES_remove = "package-management splash" +require arago-tiny-image.inc IMAGE_FSTYPES += "cpio cpio.xz" -ARAGO_TINY_IMAGE_EXTRA_INSTALL ?= "" - -IMAGE_INSTALL = " \ - packagegroup-arago-sysvinit-boot \ +IMAGE_INSTALL += " \ ${ARAGO_TINY_IMAGE_EXTRA_INSTALL} \ "
Signature · 1 line
2.31.1
PATCH v2 3/12 tisdk-tiny-image: Add some usability notes
In reply to Nishanth MenonLets clarify the usage of tiny image as something meant as a building block and not something that folks can directly use.
---
Changes since v1:
* Review comments incorporated
V1: https://lore.kernel.org/all/[email protected]/
.../recipes-core/images/tisdk-tiny-image.bb | 9 +++++++++ 1 file changed, 9 insertions(+)
meta-arago-distro/recipes-core/images/tisdk-tiny-image.bb +9 -0
@@ -1,3 +1,12 @@ +# Arago TI SDK super minimal base image for initramfs +# +# Image meant for basic boot of linux kernel. Intended as +# bare system, this image does not package the kernel in the +# standard /boot folder in rootfs. Instead, it provides a base +# rootfs allowing kernel to be deployed elsewhere +# (tftp/separate boot partition/jtag log etc..) and boot +# the image. + ARAGO_TINY_IMAGE_EXTRA_INSTALL ?= "" require arago-tiny-image.inc
Signature · 1 line
2.31.1
PATCH v2 4/12 tisdk-base-image: Reformat documentation and clarify usage
In reply to Nishanth MenonReformat the documentation to indicate the first line as summary for the image and the detailed description follows it with EoL separating the two.
---
Changes since v1:
* New patch
V1: did'nt exist.
meta-arago-distro/recipes-core/images/tisdk-base-image.bb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
meta-arago-distro/recipes-core/images/tisdk-base-image.bb +3 -1
@@ -1,5 +1,7 @@ # Arago TI SDK base image with test tools -# Suitable for initramfs +# +# Arago SDK base image suitable for initramfs containing comprehensive +# test tools. require arago-image.inc
Signature · 1 line
2.31.1
PATCH v2 5/12 tisdk-default-image: Reformat documentation and clarify usage
In reply to Nishanth MenonReformat the documentation to indicate the first line as summary for the image and the detailed description follows it with EoL separating the two.
---
Changes since v1:
* New patch
V1: did'nt exist.
meta-arago-distro/recipes-core/images/tisdk-default-image.bb | 3 +++ 1 file changed, 3 insertions(+)
meta-arago-distro/recipes-core/images/tisdk-default-image.bb +3 -0
@@ -1,4 +1,7 @@ # Arago TI SDK full filesystem image +# +# Complete Arago TI SDK filesystem image containing complete applications +# and packages to entitle the SoC. require arago-image.inc
Signature · 1 line
2.31.1
PATCH v2 6/12 tisdk-thinlinux-image: Reformat documentation
In reply to Nishanth MenonReformat the documentation to indicate the first line as summary for the image and the detailed description follows it with EoL separating the two.
---
Changes since v1:
* New patch
V1: did'nt exist.
meta-arago-distro/recipes-core/images/tisdk-thinlinux-image.bb | 1 + 1 file changed, 1 insertion(+)
meta-arago-distro/recipes-core/images/tisdk-thinlinux-image.bb +1 -0
@@ -1,4 +1,5 @@ # Arago TI Thin Linux image +# # Minimal bootable image with container to start the next complex system up. require arago-image.inc
Signature · 1 line
2.31.1
PATCH v2 7/12 packagegroups: Add a new bootstrap package group
In reply to Nishanth MenonLets try and create a minimal package group for board bringup. Lets call this basic system necessary for board bringup as "bootstrap".
---
Changes since v1:
* review comments incorporated
V1: https://lore.kernel.org/all/[email protected]/
.../packagegroup-arago-bootstrap.bb | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-bootstrap.bb
meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-bootstrap.bb new file +53 -0
@@ -0,0 +1,53 @@ +SUMMARY = "Task to install additional utilities for initial board bringup" +LICENSE = "MIT" +PR = "r0" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +inherit packagegroup + +UTILS = " \ + arm-benchmarks \ + evtest \ + memtester \ + nbench-byte \ + pcitest \ + serialcheck \ + yavta \ + hdparm \ + i2c-tools \ + libdrm-tests \ + rt-tests \ + iozone3 \ + mtd-utils-ubifs-tests \ + net-tools \ + ethtool \ + pciutils \ + rng-tools \ + stress-ng \ + iperf \ + lmbench \ + usbutils \ + devmem2 \ + phytool \ +" + +UTILS_append_ti33x = " \ + omapconf \ +" + +UTILS_append_ti43x = " \ + omapconf \ +" + +UTILS_append_omap-a15 = " \ + omapconf \ +" + +UTILS_append_k3 = " \ + k3conf \ +" + +RDEPENDS_${PN} = "\ + ${UTILS} \ +"
Signature · 1 line
2.31.1
PATCH v2 8/12 recipes-core: images: Add a basic bootstrap base image
In reply to Nishanth MenonSince we do not wish to modify the tiny-image from anything but really tiny, lets use that infrastructure and add the bootstrap package group to create initramfs (not exactly a completely usable system) which can be used for basic board bringup.
This generates cpio around 36-40MB which should be usually fine for even smaller systems (Ofcourse, this is much larger than tiny-image which is around 6MB size). The packages are organized per size to allow easier customization if desired.
---
Changes since v1:
* review comments incorporated.
V1: https://lore.kernel.org/all/[email protected]/
.../images/tisdk-bootstrap-base-image.bb | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 meta-arago-distro/recipes-core/images/tisdk-bootstrap-base-image.bb
meta-arago-distro/recipes-core/images/tisdk-bootstrap-base-image.bb new file +21 -0
@@ -0,0 +1,21 @@ +# Arago TI SDK bootstrap base image for initramfs +# +# Image meant for basic system verification of linux kernel. Intended as +# basic test system, this image does not package the kernel in the +# standard /boot folder in rootfs. Instead, it provides a base +# rootfs with enough basic board bringup utilities allowing kernel to be +# deployed elsewhere (tftp/separate boot partition/jtag log etc..) and +# maybe used for basic platform bringup (bootstrap) activities. + +require arago-tiny-image.inc + +IMAGE_FSTYPES += "cpio cpio.xz" + +ARAGO_BOOTSTRAP_IMAGE_EXTRA_INSTALL ?= "" + +IMAGE_INSTALL += " \ + packagegroup-arago-bootstrap \ + ${ARAGO_BOOTSTRAP_IMAGE_EXTRA_INSTALL} \ +" + +export IMAGE_BASENAME = "tisdk-bootstrap-base-image"
Signature · 1 line
2.31.1
PATCH v2 9/12 recipes-bsp: Create a bootstrap-initrd package
In reply to Nishanth MenonLets create an bootstrap-initrd package that installs the cpio generated in the correct locations.
---
Changes since v1:
* renamed to bootstrap-initrd since this has nothing specific to do with k3.
* review comments ^^
V1: https://lore.kernel.org/all/[email protected]/
.../bootstrap-initrd/bootstrap-initrd_1.0.bb | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 meta-arago-distro/recipes-bsp/bootstrap-initrd/bootstrap-initrd_1.0.bb
meta-arago-distro/recipes-bsp/bootstrap-initrd/bootstrap-initrd_1.0.bb new file +22 -0
@@ -0,0 +1,22 @@ +DESCRIPTION = "Prebuilt initramfs with apps for bootstraping new board" + +LICENSE = "GPLv2" + +CLEANBROKEN = "1" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +S = "${WORKDIR}" + +BOOSTRAP_IMAGE="tisdk-bootstrap-base-image" + +TARGET = "bootstrap-rootfs-${MACHINE}.cpio" + +do_install() { + install -d ${D}/boot + install -m 0644 ${DEPLOY_DIR_IMAGE}/${BOOSTRAP_IMAGE}-${MACHINE}.cpio ${D}/boot/${TARGET} +} + +FILES_${PN} = "/boot" + +do_install[depends] = "${BOOSTRAP_IMAGE}:do_image_complete"
Signature · 1 line
2.31.1
PATCH v2 10/12 recipes-core: images: Introduce tisdk-bootstrap-image
In reply to Nishanth MenonLets introduce tisdk-bootstrap-image which now consists of a completely bootable system with minimal initramfs that can be used to boot up a system. We also will create a rootfs that matches with the initramfs to allow users who use mmc and other boot media to have access to the same debug tools for a new platform bringup
---
Changes since v1:
* review comments (s/kernel/kernel-base)
V1: https://lore.kernel.org/all/[email protected]/
.../images/tisdk-bootstrap-image.bb | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 meta-arago-distro/recipes-core/images/tisdk-bootstrap-image.bb
meta-arago-distro/recipes-core/images/tisdk-bootstrap-image.bb new file +20 -0
@@ -0,0 +1,20 @@ +# Arago TI SDK bootstrap image usable for board bringup +# +# This image is a complete package containing a rootfs and an initrd +# with platform test utilities that can be used for new platform +# bringup activities. Typically one would use the bootstrap initrd +# till the storage media access is debugged, following which one would +# switch over to using the storage media of choice with the same content. + +require arago-tiny-image.inc + +ARAGO_BOOTSTRAP_IMAGE_EXTRA_INSTALL ?= "" + +IMAGE_INSTALL += " \ + packagegroup-arago-bootstrap \ + kernel-base \ + bootstrap-initrd \ + ${ARAGO_BOOTSTRAP_IMAGE_EXTRA_INSTALL} \ +" + +export IMAGE_BASENAME = "tisdk-bootstrap-image"
Signature · 1 line
2.31.1
PATCH v2 11/12 tisdk-core-bundle: Add documentation to clarify usage
In reply to Nishanth MenonAdd documentation to the core-bundle to explain the usage and intent of the build configuration.
---
Changes since v1:
* New patch
V1: did'nt exist.
meta-arago-distro/recipes-core/images/tisdk-core-bundle.bb | 6 ++++++ 1 file changed, 6 insertions(+)
meta-arago-distro/recipes-core/images/tisdk-core-bundle.bb +6 -0
@@ -1,3 +1,9 @@ +# Installer package for TISDK - NOT for direct use on target +# +# This creates an installer including all the default images +# recommended including source, binaries, filesystems, etc. +# for TI SDK. This is meant to be used on the host system. + require tisdk-core-bundle.inc DEPLOY_SPL_NAME_omapl138 = ""
Signature · 1 line
2.31.1
PATCH v2 12/12 images: Build tisdk-bootstrap-image with tisdk-core-bundle
In reply to Nishanth MenonAdd tisdk-bootstrap-image to the list of TARGET_IMAGES for tisdk-core-bundle.
---
Changes since v1:
* New patch (inspired and dependent on
https://lore.kernel.org/all/[email protected]/)
V1: did'nt exist.
meta-arago-distro/recipes-core/images/tisdk-core-bundle.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta-arago-distro/recipes-core/images/tisdk-core-bundle.inc +1 -1
@@ -32,7 +32,7 @@ DTB_FILTER_am65xx = "am65" DTB_FILTER_j7 = "j721e" # List of target side images to build for the SDK -TARGET_IMAGES = "tisdk-base-image tisdk-default-image tisdk-thinlinux-image" +TARGET_IMAGES = "tisdk-base-image tisdk-default-image tisdk-thinlinux-image tisdk-bootstrap-image" # dra71 lcard requires an initramfs with modules for NFS boot TARGET_IMAGES_append_dra7xx-evm = " netboot-initrd"
Signature · 1 line
2.31.1
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [meta-arago] [dunfell/master PATCH V2 03/12] tisdk-tiny-image: Add some usability notes
Quoted 17 lines · Nishanth Menon via lists.yoctoproject.org
Lets clarify the usage of tiny image as something meant as a building block and not something that folks can directly use.
Signed-off-by Nishanth Menon <[email protected]>---
Changes since v1:
* Review comments incorporatedV1: https://lore.kernel.org/all/[email protected]/
.../recipes-core/images/tisdk-tiny-image.bb | 9 +++++++++ 1 file changed, 9 insertions(+)meta-arago-distro/recipes-core/images/tisdk-tiny-image.bb +0
-0
meta-arago-distro/recipes-core/images/tisdk-tiny-image.bb line 8
Quoted 8 lines
meta-arago-distro/recipes-core/images/tisdk-tiny-image.bb +8
-0@@ -1,3 +1,12 @@ +# Arago TI SDK super minimal base image for initramfs +# +# Image meant for basic boot of linux kernel. Intended as +# bare system, this image does not package the kernel in the +# standard /boot folder in rootfs. Instead, it provides a base +# rootfs allowing kernel to be deployed elsewhere +# (tftp/separate boot partition/jtag log etc..) and boot +# the image.
This and elsewhere, should we use instead:
SUMMARY = "Arago TI SDK super minimal base image for initramfs"
DESCRIPTION = "Image meant for basic boot of linux kernel. Intended as \
bare system, this image does not package the kernel in the \
standard /boot folder in rootfs. Instead, it provides a base \
rootfs allowing kernel to be deployed elsewhere \
(tftp/separate boot partition/jtag log etc..) and boot \
the image.\
"
and should we also create a HOMEPAGE = "wiki link?"
Signature · 3 lines
Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D