* [PATCH 0/7] Rebuild phyBOARD-Mira UBI image generation
@ 2022-02-09 13:54 Anton Mikanovich
2022-02-09 13:54 ` [PATCH 1/7] ubi: Move default output paths to image class Anton Mikanovich
` (7 more replies)
0 siblings, 8 replies; 18+ messages in thread
From: Anton Mikanovich @ 2022-02-09 13:54 UTC (permalink / raw)
To: isar-users; +Cc: Anton Mikanovich
Rebuild UBI image generation implementation to support any count of
targets with different settings. This also will allow to build the same
isar-image-base image for both UBI and non-UBI targets.
Add correct UBI and UBIFS layouts for phyBOARD-Mira after that.
To be able to flash phyBOARD-Mira with only Isar outputs add also kernel
and Barebox bootloader recipes.
Anton Mikanovich (7):
ubi: Move default output paths to image class
ubi: Remove isar-image-ubi
ubi: Move tasks reorder into parent task
ubi: Split UBI configs for phyboard-mira and imx6-sabrelite
conf: Remove machine-specific defines from multiconfig
meta-isar: Add linux-phy kernel
meta: Add barebox bootloader support
meta-isar/classes/ubi-ubifs-img.bbclass | 4 +-
meta-isar/conf/machine/phyboard-mira.conf | 19 ++++--
.../multiconfig/phyboard-mira-bullseye.conf | 6 --
.../fitimage.its.tmpl | 0
.../ubinize.cfg.tmpl | 0
.../recipes-core/images/isar-image-base.bb | 11 ++++
.../recipes-core/images/isar-image-ubi.bb | 27 --------
.../images/phyboard-mira/ubinize.cfg.tmpl | 26 ++++++++
...bsinstall-fix-installing-DT-overlays.patch | 30 +++++++++
.../linux/linux-phy_5.10.76-phy4.bb | 14 +++++
meta/classes/fit-img.bbclass | 5 +-
meta/classes/image.bbclass | 14 +++++
meta/classes/ubi-img.bbclass | 6 ++
meta/classes/ubifs-img.bbclass | 5 +-
meta/recipes-bsp/barebox/barebox.inc | 51 ++++++++++++++++
.../barebox/barebox_2021.04.0-phy5.bb | 13 ++++
...1-of_dump-Add-a-simple-node-check-up.patch | 61 +++++++++++++++++++
.../barebox/files/defaultenv.cfg.tmpl | 5 ++
.../barebox/files/phytec-mira-env/bin/far | 14 +++++
.../bin/rauc_flash_nand_from_mmc | 10 +++
.../bin/rauc_flash_nand_from_tftp | 10 +++
.../files/phytec-mira-env/bin/rauc_init_nand | 17 ++++++
.../barebox/files/phytec-mira-env/boot/initrd | 9 +++
.../barebox/files/phytec-mira-env/boot/mmc | 14 +++++
.../barebox/files/phytec-mira-env/boot/nand | 16 +++++
.../barebox/files/phytec-mira-env/boot/net | 21 +++++++
.../barebox/files/phytec-mira-env/boot/spi | 7 +++
.../files/phytec-mira-env/boot/system0 | 16 +++++
.../files/phytec-mira-env/boot/system1 | 16 +++++
.../files/phytec-mira-env/config-expansions | 28 +++++++++
.../phytec-mira-env/expansions/dt-overlays | 14 +++++
.../expansions/imx6-phytec-check-bus-nodepath | 7 +++
.../expansions/imx6qdl-mira-enable-lvds | 2 +
.../expansions/imx6qdl-mira-peb-eval-01 | 3 +
.../expansions/imx6qdl-nunki-enable-lvds | 2 +
.../expansions/imx6qdl-phytec-lcd | 4 ++
.../imx6qdl-phytec-lcd-018-peb-av-02 | 3 +
.../imx6qdl-phytec-lcd-018-peb-av-02-res | 3 +
.../expansions/imx6qdl-phytec-lcd-res | 4 ++
.../expansions/imx6qdl-phytec-peb-wlbt-05 | 7 +++
.../files/phytec-mira-env/nv/allow_color | 1 +
.../files/phytec-mira-env/nv/boot.default | 1 +
.../nv/bootchooser.state_prefix | 1 +
.../nv/bootchooser.system0.boot | 1 +
.../nv/bootchooser.system1.boot | 1 +
.../phytec-mira-env/nv/bootchooser.targets | 1 +
.../files/phytec-mira-env/nv/dev.eth0.ipaddr | 1 +
.../phytec-mira-env/nv/dev.eth0.linux.devname | 1 +
.../files/phytec-mira-env/nv/dev.eth0.mode | 1 +
.../files/phytec-mira-env/nv/dev.eth0.netmask | 1 +
.../phytec-mira-env/nv/dev.eth0.serverip | 1 +
.../files/phytec-mira-env/nv/dhcp.vendor_id | 1 +
.../phytec-mira-env/nv/linux.bootargs.base | 1 +
.../phytec-mira-env/nv/linux.bootargs.fb | 1 +
.../phytec-mira-env/nv/linux.bootargs.rootfs | 1 +
.../files/phytec-mira-env/nv/net.gateway | 1 +
.../files/phytec-mira-env/nv/overlays.select | 0
meta/recipes-bsp/barebox/files/rules.tmpl | 44 +++++++++++++
.../barebox/files/version.cfg.tmpl | 2 +
59 files changed, 545 insertions(+), 41 deletions(-)
rename meta-isar/recipes-core/images/{files => imx6-sabrelite}/fitimage.its.tmpl (100%)
rename meta-isar/recipes-core/images/{files => imx6-sabrelite}/ubinize.cfg.tmpl (100%)
delete mode 100644 meta-isar/recipes-core/images/isar-image-ubi.bb
create mode 100644 meta-isar/recipes-core/images/phyboard-mira/ubinize.cfg.tmpl
create mode 100644 meta-isar/recipes-kernel/linux/files/0001-dtbsinstall-fix-installing-DT-overlays.patch
create mode 100644 meta-isar/recipes-kernel/linux/linux-phy_5.10.76-phy4.bb
create mode 100644 meta/recipes-bsp/barebox/barebox.inc
create mode 100644 meta/recipes-bsp/barebox/barebox_2021.04.0-phy5.bb
create mode 100644 meta/recipes-bsp/barebox/files/0001-of_dump-Add-a-simple-node-check-up.patch
create mode 100644 meta/recipes-bsp/barebox/files/defaultenv.cfg.tmpl
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/bin/far
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/bin/rauc_flash_nand_from_mmc
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/bin/rauc_flash_nand_from_tftp
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/bin/rauc_init_nand
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/boot/initrd
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/boot/mmc
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/boot/nand
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/boot/net
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/boot/spi
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/boot/system0
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/boot/system1
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/config-expansions
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/dt-overlays
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6-phytec-check-bus-nodepath
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-mira-enable-lvds
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-mira-peb-eval-01
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-nunki-enable-lvds
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-lcd
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-lcd-018-peb-av-02
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-lcd-018-peb-av-02-res
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-lcd-res
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-peb-wlbt-05
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/allow_color
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/boot.default
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/bootchooser.state_prefix
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/bootchooser.system0.boot
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/bootchooser.system1.boot
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/bootchooser.targets
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.ipaddr
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.linux.devname
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.mode
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.netmask
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.serverip
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dhcp.vendor_id
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/linux.bootargs.base
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/linux.bootargs.fb
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/linux.bootargs.rootfs
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/net.gateway
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/overlays.select
create mode 100755 meta/recipes-bsp/barebox/files/rules.tmpl
create mode 100644 meta/recipes-bsp/barebox/files/version.cfg.tmpl
--
2.25.1
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 1/7] ubi: Move default output paths to image class
2022-02-09 13:54 [PATCH 0/7] Rebuild phyBOARD-Mira UBI image generation Anton Mikanovich
@ 2022-02-09 13:54 ` Anton Mikanovich
2022-02-09 13:54 ` [PATCH 2/7] ubi: Remove isar-image-ubi Anton Mikanovich
` (6 subsequent siblings)
7 siblings, 0 replies; 18+ messages in thread
From: Anton Mikanovich @ 2022-02-09 13:54 UTC (permalink / raw)
To: isar-users; +Cc: Anton Mikanovich
To be able to use some default deploy paths of kernel, initrd and dtb
in any image move these declarations into image bbclass.
The same done with ubifs and fit image deploy paths moving default
ones to image type classes.
Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
---
meta-isar/recipes-core/images/isar-image-ubi.bb | 8 --------
meta/classes/fit-img.bbclass | 5 ++++-
meta/classes/image.bbclass | 6 ++++++
meta/classes/ubifs-img.bbclass | 5 ++++-
4 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/meta-isar/recipes-core/images/isar-image-ubi.bb b/meta-isar/recipes-core/images/isar-image-ubi.bb
index ef2cf1c..9323822 100644
--- a/meta-isar/recipes-core/images/isar-image-ubi.bb
+++ b/meta-isar/recipes-core/images/isar-image-ubi.bb
@@ -17,11 +17,3 @@ SRC_URI += "file://ubinize.cfg.tmpl \
TEMPLATE_VARS = "KERNEL_IMG INITRD_IMG DTB_IMG UBIFS_IMG FIT_IMG"
TEMPLATE_FILES = "ubinize.cfg.tmpl fitimage.its.tmpl"
-
-KERNEL_IMG = "${PP_DEPLOY}/${KERNEL_IMAGE}"
-INITRD_IMG = "${PP_DEPLOY}/${INITRD_IMAGE}"
-# only one dtb file supported, pick the first
-DTB_IMG = "${PP_DEPLOY}/${@(d.getVar('DTB_FILES').split() or [''])[0]}"
-
-UBIFS_IMG = "${PP_DEPLOY}/${UBIFS_IMAGE_FILE}"
-FIT_IMG = "${PP_DEPLOY}/${FIT_IMAGE_FILE}"
diff --git a/meta/classes/fit-img.bbclass b/meta/classes/fit-img.bbclass
index 1ad0c5b..37736f0 100644
--- a/meta/classes/fit-img.bbclass
+++ b/meta/classes/fit-img.bbclass
@@ -10,6 +10,9 @@ FIT_IMAGE_FILE ?= "${IMAGE_FULLNAME}.fit.img"
IMAGER_INSTALL += "u-boot-tools device-tree-compiler"
+# Default fit image deploy path (inside imager)
+FIT_IMG ?= "${PP_DEPLOY}/${FIT_IMAGE_FILE}"
+
# Generate fit image
do_fit_image() {
if [ ! -e "${WORKDIR}/${FIT_IMAGE_SOURCE}" ]; then
@@ -22,7 +25,7 @@ do_fit_image() {
# Create fit image using buildchroot tools
sudo chroot ${BUILDCHROOT_DIR} /usr/bin/mkimage ${MKIMAGE_ARGS} \
- -f '${PP_WORK}/${FIT_IMAGE_SOURCE}' '${PP_DEPLOY}/${FIT_IMAGE_FILE}'
+ -f '${PP_WORK}/${FIT_IMAGE_SOURCE}' '${FIT_IMG}'
sudo chown $(id -u):$(id -g) '${DEPLOY_DIR_IMAGE}/${FIT_IMAGE_FILE}'
}
addtask fit_image before do_image after do_image_tools do_transform_template
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 6d77243..4b56e91 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -140,6 +140,12 @@ devtmpfs /dev devtmpfs mode=0755,nosuid 0 0
EOF
}
+# Default kernel, initrd and dtb image deploy paths (inside imager)
+KERNEL_IMG ?= "${PP_DEPLOY}/${KERNEL_IMAGE}"
+INITRD_IMG ?= "${PP_DEPLOY}/${INITRD_IMAGE}"
+# only one dtb file supported, pick the first
+DTB_IMG ?= "${PP_DEPLOY}/${@(d.getVar('DTB_FILES').split() or [''])[0]}"
+
do_copy_boot_files[dirs] = "${DEPLOY_DIR_IMAGE}"
do_copy_boot_files[lockfiles] += "${DEPLOY_DIR_IMAGE}/isar.lock"
do_copy_boot_files() {
diff --git a/meta/classes/ubifs-img.bbclass b/meta/classes/ubifs-img.bbclass
index 229eb3e..41814b0 100644
--- a/meta/classes/ubifs-img.bbclass
+++ b/meta/classes/ubifs-img.bbclass
@@ -10,6 +10,9 @@ python() {
UBIFS_IMAGE_FILE ?= "${IMAGE_FULLNAME}.ubifs.img"
+# Default UBIFS image deploy path (inside imager)
+UBIFS_IMG ?= "${PP_DEPLOY}/${UBIFS_IMAGE_FILE}"
+
IMAGER_INSTALL += "mtd-utils"
# glibc bug 23960 https://sourceware.org/bugzilla/show_bug.cgi?id=23960
@@ -24,7 +27,7 @@ do_ubifs_image() {
# Create ubifs image using buildchroot tools
sudo chroot ${BUILDCHROOT_DIR} /usr/sbin/mkfs.ubifs ${MKUBIFS_ARGS} \
- -r '${PP_ROOTFS}' '${PP_DEPLOY}/${UBIFS_IMAGE_FILE}'
+ -r '${PP_ROOTFS}' '${UBIFS_IMG}'
sudo chown $(id -u):$(id -g) '${DEPLOY_DIR_IMAGE}/${UBIFS_IMAGE_FILE}'
}
--
2.25.1
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 2/7] ubi: Remove isar-image-ubi
2022-02-09 13:54 [PATCH 0/7] Rebuild phyBOARD-Mira UBI image generation Anton Mikanovich
2022-02-09 13:54 ` [PATCH 1/7] ubi: Move default output paths to image class Anton Mikanovich
@ 2022-02-09 13:54 ` Anton Mikanovich
2022-02-09 13:54 ` [PATCH 3/7] ubi: Move tasks reorder into parent task Anton Mikanovich
` (5 subsequent siblings)
7 siblings, 0 replies; 18+ messages in thread
From: Anton Mikanovich @ 2022-02-09 13:54 UTC (permalink / raw)
To: isar-users; +Cc: Anton Mikanovich
Make Isar UBI image more generic to be able to build default
isar-image-base with UBI-related image types.
Use image types as override postfix to declare UBI-related parametes.
Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
---
.../recipes-core/images/isar-image-base.bb | 11 +++++++++++
.../recipes-core/images/isar-image-ubi.bb | 19 -------------------
meta/classes/image.bbclass | 8 ++++++++
3 files changed, 19 insertions(+), 19 deletions(-)
delete mode 100644 meta-isar/recipes-core/images/isar-image-ubi.bb
diff --git a/meta-isar/recipes-core/images/isar-image-base.bb b/meta-isar/recipes-core/images/isar-image-base.bb
index b381d85..b1f22fa 100644
--- a/meta-isar/recipes-core/images/isar-image-base.bb
+++ b/meta-isar/recipes-core/images/isar-image-base.bb
@@ -11,3 +11,14 @@ LIC_FILES_CHKSUM = "file://${LAYERDIR_core}/licenses/COPYING.GPLv2;md5=751419260
PV = "1.0"
inherit image
+
+SRC_URI_append_ubi-img = " file://ubinize.cfg.tmpl"
+SRC_URI_append_fit-img = " file://fitimage.its.tmpl"
+SRC_URI_append_ubi-ubifs-img = " file://ubinize.cfg.tmpl file://fitimage.its.tmpl"
+
+TEMPLATE_VARS_append_fit-img = " KERNEL_IMG INITRD_IMG DTB_IMG"
+TEMPLATE_VARS_append_ubi-img = " KERNEL_IMG INITRD_IMG DTB_IMG UBIFS_IMG FIT_IMG"
+TEMPLATE_VARS_append_ubi-ubifs-img = " KERNEL_IMG INITRD_IMG DTB_IMG UBIFS_IMG FIT_IMG"
+TEMPLATE_FILES_append_fit-img = " fitimage.its.tmpl"
+TEMPLATE_FILES_append_ubi-img = " ubinize.cfg.tmpl"
+TEMPLATE_FILES_append_ubi-ubifs-img = " ubinize.cfg.tmpl fitimage.its.tmpl"
diff --git a/meta-isar/recipes-core/images/isar-image-ubi.bb b/meta-isar/recipes-core/images/isar-image-ubi.bb
deleted file mode 100644
index 9323822..0000000
--- a/meta-isar/recipes-core/images/isar-image-ubi.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-# UBI image recipe
-#
-# This software is a part of ISAR.
-# Copyright (C) Siemens AG, 2019
-#
-# SPDX-License-Identifier: MIT
-
-DESCRIPTION = "UBI Isar image"
-
-LICENSE = "gpl-2.0"
-LIC_FILES_CHKSUM = "file://${LAYERDIR_core}/licenses/COPYING.GPLv2;md5=751419260aa954499f7abaabaa882bbe"
-
-inherit image
-
-SRC_URI += "file://ubinize.cfg.tmpl \
- file://fitimage.its.tmpl"
-
-TEMPLATE_VARS = "KERNEL_IMG INITRD_IMG DTB_IMG UBIFS_IMG FIT_IMG"
-TEMPLATE_FILES = "ubinize.cfg.tmpl fitimage.its.tmpl"
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 4b56e91..9ad04e8 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -238,3 +238,11 @@ addtask rootfs_finalize before do_rootfs after do_rootfs_postprocess
# Last so that the image type can overwrite tasks if needed
inherit ${IMAGE_FSTYPES}
+
+def get_fstypes_overrides(d):
+ res = ''
+ for type in (d.getVar('IMAGE_FSTYPES', True) or '').split():
+ res += ':%s' % type
+ return res
+
+OVERRIDES_append = ":${@get_fstypes_overrides(d)}"
--
2.25.1
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 3/7] ubi: Move tasks reorder into parent task
2022-02-09 13:54 [PATCH 0/7] Rebuild phyBOARD-Mira UBI image generation Anton Mikanovich
2022-02-09 13:54 ` [PATCH 1/7] ubi: Move default output paths to image class Anton Mikanovich
2022-02-09 13:54 ` [PATCH 2/7] ubi: Remove isar-image-ubi Anton Mikanovich
@ 2022-02-09 13:54 ` Anton Mikanovich
2022-02-09 13:54 ` [PATCH 4/7] ubi: Split UBI configs for phyboard-mira and imx6-sabrelite Anton Mikanovich
` (4 subsequent siblings)
7 siblings, 0 replies; 18+ messages in thread
From: Anton Mikanovich @ 2022-02-09 13:54 UTC (permalink / raw)
To: isar-users; +Cc: Anton Mikanovich
Image type ubi-ubifs-img was created to implement UBI image generation
with FIT and UBIFS subimages included. Now we can implement the same
with multiple image types. This will also allow to use UBIFS+UBI setup
without creating another image type. The only issue should be resolved
then is calling task in correct order.
Move dependencies logic into parent UBI image type bbclass to set task
dependencies correctly.
Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
---
meta-isar/classes/ubi-ubifs-img.bbclass | 4 ++--
meta/classes/ubi-img.bbclass | 6 ++++++
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/meta-isar/classes/ubi-ubifs-img.bbclass b/meta-isar/classes/ubi-ubifs-img.bbclass
index 095719a..cee29ef 100644
--- a/meta-isar/classes/ubi-ubifs-img.bbclass
+++ b/meta-isar/classes/ubi-ubifs-img.bbclass
@@ -5,6 +5,6 @@
#
# SPDX-License-Identifier: MIT
+# Deprecated: use IMAGE_FSTYPES = "ubi-img ubifs-img fit-img" instead
+
inherit ubi-img ubifs-img fit-img
-addtask do_ubi_image after do_ubifs_image
-addtask do_ubi_image after do_fit_image
diff --git a/meta/classes/ubi-img.bbclass b/meta/classes/ubi-img.bbclass
index efaf058..b6c2ff2 100644
--- a/meta/classes/ubi-img.bbclass
+++ b/meta/classes/ubi-img.bbclass
@@ -6,6 +6,12 @@
python() {
if not d.getVar("UBINIZE_ARGS"):
raise bb.parse.SkipRecipe("UBINIZE_ARGS must be set")
+
+ fstypes = d.getVar('IMAGE_FSTYPES', True) or ''
+ if 'fit-img' in fstypes.split() or 'ubi-ubifs-img' in fstypes.split():
+ bb.build.addtask('do_ubi_image', '', 'do_fit_image', d)
+ if 'ubifs-img' in fstypes.split() or 'ubi-ubifs-img' in fstypes.split():
+ bb.build.addtask('do_ubi_image', '', 'do_ubifs_image', d)
}
UBINIZE_CFG ??= "ubinize.cfg"
--
2.25.1
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 4/7] ubi: Split UBI configs for phyboard-mira and imx6-sabrelite
2022-02-09 13:54 [PATCH 0/7] Rebuild phyBOARD-Mira UBI image generation Anton Mikanovich
` (2 preceding siblings ...)
2022-02-09 13:54 ` [PATCH 3/7] ubi: Move tasks reorder into parent task Anton Mikanovich
@ 2022-02-09 13:54 ` Anton Mikanovich
2022-02-09 13:54 ` [PATCH 5/7] conf: Remove machine-specific defines from multiconfig Anton Mikanovich
` (3 subsequent siblings)
7 siblings, 0 replies; 18+ messages in thread
From: Anton Mikanovich @ 2022-02-09 13:54 UTC (permalink / raw)
To: isar-users; +Cc: Anton Mikanovich
Split UBI image configurations for old SABRE Lite i.MX6 target and new
phyBOARD-Mira target to be able to generate images with different
layouts.
Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
---
meta-isar/conf/machine/phyboard-mira.conf | 6 ++---
.../fitimage.its.tmpl | 0
.../ubinize.cfg.tmpl | 0
.../images/phyboard-mira/ubinize.cfg.tmpl | 26 +++++++++++++++++++
4 files changed, 29 insertions(+), 3 deletions(-)
rename meta-isar/recipes-core/images/{files => imx6-sabrelite}/fitimage.its.tmpl (100%)
rename meta-isar/recipes-core/images/{files => imx6-sabrelite}/ubinize.cfg.tmpl (100%)
create mode 100644 meta-isar/recipes-core/images/phyboard-mira/ubinize.cfg.tmpl
diff --git a/meta-isar/conf/machine/phyboard-mira.conf b/meta-isar/conf/machine/phyboard-mira.conf
index 2d052d0..13c525a 100644
--- a/meta-isar/conf/machine/phyboard-mira.conf
+++ b/meta-isar/conf/machine/phyboard-mira.conf
@@ -6,8 +6,8 @@
MACHINE_SERIAL ?= "ttymxc0"
BAUDRATE_TTY ?= "115200"
-MKUBIFS_ARGS := "-m 0x1000 -e 0x7e000 -c 8083"
-UBINIZE_ARGS = "-vv -m 0x1000 -p 0x80000"
-IMAGE_FSTYPES ?= "ubi-ubifs-img"
+MKUBIFS_ARGS := "-m 0x800 -e 0x1f000 -c 8012"
+UBINIZE_ARGS = "-vv -m 0x800 -p 0x20000"
+IMAGE_FSTYPES ?= "ubifs-img ubi-img"
DTB_FILES = "imx6q-phytec-mira-rdk-nand.dtb"
diff --git a/meta-isar/recipes-core/images/files/fitimage.its.tmpl b/meta-isar/recipes-core/images/imx6-sabrelite/fitimage.its.tmpl
similarity index 100%
rename from meta-isar/recipes-core/images/files/fitimage.its.tmpl
rename to meta-isar/recipes-core/images/imx6-sabrelite/fitimage.its.tmpl
diff --git a/meta-isar/recipes-core/images/files/ubinize.cfg.tmpl b/meta-isar/recipes-core/images/imx6-sabrelite/ubinize.cfg.tmpl
similarity index 100%
rename from meta-isar/recipes-core/images/files/ubinize.cfg.tmpl
rename to meta-isar/recipes-core/images/imx6-sabrelite/ubinize.cfg.tmpl
diff --git a/meta-isar/recipes-core/images/phyboard-mira/ubinize.cfg.tmpl b/meta-isar/recipes-core/images/phyboard-mira/ubinize.cfg.tmpl
new file mode 100644
index 0000000..aed4cd6
--- /dev/null
+++ b/meta-isar/recipes-core/images/phyboard-mira/ubinize.cfg.tmpl
@@ -0,0 +1,26 @@
+[kernel]
+mode=ubi
+image=${KERNEL_IMG}
+vol_id=1
+vol_type=static
+vol_name=kernel
+vol_size=16MiB
+vol_alignment=1
+
+[oftree]
+mode=ubi
+image=${DTB_IMG}
+vol_id=2
+vol_type=static
+vol_name=oftree
+vol_size=1MiB
+vol_alignment=1
+
+[rootfs]
+mode=ubi
+image=${UBIFS_IMG}
+vol_id=3
+vol_type=dynamic
+vol_name=root
+vol_alignment=1
+vol_flags=autoresize
--
2.25.1
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 5/7] conf: Remove machine-specific defines from multiconfig
2022-02-09 13:54 [PATCH 0/7] Rebuild phyBOARD-Mira UBI image generation Anton Mikanovich
` (3 preceding siblings ...)
2022-02-09 13:54 ` [PATCH 4/7] ubi: Split UBI configs for phyboard-mira and imx6-sabrelite Anton Mikanovich
@ 2022-02-09 13:54 ` Anton Mikanovich
2022-02-09 13:54 ` [PATCH 6/7] meta-isar: Add linux-phy kernel Anton Mikanovich
` (2 subsequent siblings)
7 siblings, 0 replies; 18+ messages in thread
From: Anton Mikanovich @ 2022-02-09 13:54 UTC (permalink / raw)
To: isar-users; +Cc: Anton Mikanovich
Move that defines from multiconfig to machine config.
Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
---
meta-isar/conf/machine/phyboard-mira.conf | 6 ++++++
meta-isar/conf/multiconfig/phyboard-mira-bullseye.conf | 6 ------
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/meta-isar/conf/machine/phyboard-mira.conf b/meta-isar/conf/machine/phyboard-mira.conf
index 13c525a..f6c867f 100644
--- a/meta-isar/conf/machine/phyboard-mira.conf
+++ b/meta-isar/conf/machine/phyboard-mira.conf
@@ -3,6 +3,10 @@
#
# SPDX-License-Identifier: MIT
+DISTRO_ARCH ?= "armhf"
+
+KERNEL_NAME ?= "armmp"
+
MACHINE_SERIAL ?= "ttymxc0"
BAUDRATE_TTY ?= "115200"
@@ -11,3 +15,5 @@ UBINIZE_ARGS = "-vv -m 0x800 -p 0x20000"
IMAGE_FSTYPES ?= "ubifs-img ubi-img"
DTB_FILES = "imx6q-phytec-mira-rdk-nand.dtb"
+
+IMAGE_INSTALL += "sshd-regen-keys"
diff --git a/meta-isar/conf/multiconfig/phyboard-mira-bullseye.conf b/meta-isar/conf/multiconfig/phyboard-mira-bullseye.conf
index a0253eb..be62451 100644
--- a/meta-isar/conf/multiconfig/phyboard-mira-bullseye.conf
+++ b/meta-isar/conf/multiconfig/phyboard-mira-bullseye.conf
@@ -4,10 +4,4 @@
# SPDX-License-Identifier: MIT
MACHINE ?= "phyboard-mira"
-
DISTRO ?= "debian-bullseye"
-DISTRO_ARCH ?= "armhf"
-
-KERNEL_NAME ?= "armmp"
-
-IMAGE_INSTALL += "sshd-regen-keys"
--
2.25.1
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 6/7] meta-isar: Add linux-phy kernel
2022-02-09 13:54 [PATCH 0/7] Rebuild phyBOARD-Mira UBI image generation Anton Mikanovich
` (4 preceding siblings ...)
2022-02-09 13:54 ` [PATCH 5/7] conf: Remove machine-specific defines from multiconfig Anton Mikanovich
@ 2022-02-09 13:54 ` Anton Mikanovich
2022-02-09 13:54 ` [PATCH 7/7] meta: Add barebox bootloader support Anton Mikanovich
2022-02-10 6:52 ` [PATCH 0/7] Rebuild phyBOARD-Mira UBI image generation Schmidt, Adriaan
7 siblings, 0 replies; 18+ messages in thread
From: Anton Mikanovich @ 2022-02-09 13:54 UTC (permalink / raw)
To: isar-users; +Cc: Anton Mikanovich
Add v5.10.76 linux kernel recipe for Phytec boards.
Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
---
meta-isar/conf/machine/phyboard-mira.conf | 4 +--
...bsinstall-fix-installing-DT-overlays.patch | 30 +++++++++++++++++++
.../linux/linux-phy_5.10.76-phy4.bb | 14 +++++++++
3 files changed, 46 insertions(+), 2 deletions(-)
create mode 100644 meta-isar/recipes-kernel/linux/files/0001-dtbsinstall-fix-installing-DT-overlays.patch
create mode 100644 meta-isar/recipes-kernel/linux/linux-phy_5.10.76-phy4.bb
diff --git a/meta-isar/conf/machine/phyboard-mira.conf b/meta-isar/conf/machine/phyboard-mira.conf
index f6c867f..ee1b75f 100644
--- a/meta-isar/conf/machine/phyboard-mira.conf
+++ b/meta-isar/conf/machine/phyboard-mira.conf
@@ -5,7 +5,7 @@
DISTRO_ARCH ?= "armhf"
-KERNEL_NAME ?= "armmp"
+KERNEL_NAME ?= "phy"
MACHINE_SERIAL ?= "ttymxc0"
BAUDRATE_TTY ?= "115200"
@@ -14,6 +14,6 @@ MKUBIFS_ARGS := "-m 0x800 -e 0x1f000 -c 8012"
UBINIZE_ARGS = "-vv -m 0x800 -p 0x20000"
IMAGE_FSTYPES ?= "ubifs-img ubi-img"
-DTB_FILES = "imx6q-phytec-mira-rdk-nand.dtb"
+DTB_FILES = "imx6q-phytec-mira-ff-rdk-nand.dtb"
IMAGE_INSTALL += "sshd-regen-keys"
diff --git a/meta-isar/recipes-kernel/linux/files/0001-dtbsinstall-fix-installing-DT-overlays.patch b/meta-isar/recipes-kernel/linux/files/0001-dtbsinstall-fix-installing-DT-overlays.patch
new file mode 100644
index 0000000..0865870
--- /dev/null
+++ b/meta-isar/recipes-kernel/linux/files/0001-dtbsinstall-fix-installing-DT-overlays.patch
@@ -0,0 +1,30 @@
+From 74c2d5edf5d9d601b1caac0cae8be785e45e9af0 Mon Sep 17 00:00:00 2001
+From: Anton Mikanovich <amikan@ilbers.de>
+Date: Tue, 8 Feb 2022 19:47:35 +0300
+Subject: [PATCH] dtbsinstall: fix installing DT overlays
+
+Add dtbo target needed for __dtbs_install to fix 'make dtbs_install'
+call. 'No rule to make target' error will occur otherwise.
+
+Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
+---
+ scripts/Makefile.dtbinst | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/scripts/Makefile.dtbinst b/scripts/Makefile.dtbinst
+index 50d580d77ae9..829609ce29cf 100644
+--- a/scripts/Makefile.dtbinst
++++ b/scripts/Makefile.dtbinst
+@@ -29,6 +29,9 @@ quiet_cmd_dtb_install = INSTALL $@
+ $(dst)/%.dtb: $(obj)/%.dtb
+ $(call cmd,dtb_install)
+
++$(dst)/%.dtbo: $(obj)/%.dtbo
++ $(call cmd,dtb_install)
++
+ PHONY += $(subdirs)
+ $(subdirs):
+ $(Q)$(MAKE) $(dtbinst)=$@ dst=$(patsubst $(obj)/%,$(dst)/%,$@)
+--
+2.25.1
+
diff --git a/meta-isar/recipes-kernel/linux/linux-phy_5.10.76-phy4.bb b/meta-isar/recipes-kernel/linux/linux-phy_5.10.76-phy4.bb
new file mode 100644
index 0000000..84609a0
--- /dev/null
+++ b/meta-isar/recipes-kernel/linux/linux-phy_5.10.76-phy4.bb
@@ -0,0 +1,14 @@
+require recipes-kernel/linux/linux-custom.inc
+
+SRC_URI += "https://git.phytec.de/linux-mainline/snapshot/linux-mainline-${PV}.tar.bz2 \
+ file://0001-dtbsinstall-fix-installing-DT-overlays.patch"
+
+SRC_URI[sha256sum] = "ce0cff708da9f3dca1f6f8d6c433589fd5a5ea8db9e33114f44497ecf873f875"
+
+S = "${WORKDIR}/linux-mainline-${PV}"
+
+KBUILD_DEPENDS_append = "lzop"
+
+KERNEL_DEFCONFIG = "imx_v6_v7_defconfig"
+
+LINUX_VERSION_EXTENSION = "-isar"
--
2.25.1
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 7/7] meta: Add barebox bootloader support
2022-02-09 13:54 [PATCH 0/7] Rebuild phyBOARD-Mira UBI image generation Anton Mikanovich
` (5 preceding siblings ...)
2022-02-09 13:54 ` [PATCH 6/7] meta-isar: Add linux-phy kernel Anton Mikanovich
@ 2022-02-09 13:54 ` Anton Mikanovich
2022-02-09 18:08 ` Jan Kiszka
2022-02-10 6:52 ` [PATCH 0/7] Rebuild phyBOARD-Mira UBI image generation Schmidt, Adriaan
7 siblings, 1 reply; 18+ messages in thread
From: Anton Mikanovich @ 2022-02-09 13:54 UTC (permalink / raw)
To: isar-users; +Cc: Anton Mikanovich
Add Barebox v2021.04.0 recipe for Phytec boards.
Most of the files here are actually just an environment to be apply.
Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
---
meta-isar/conf/machine/phyboard-mira.conf | 5 ++
meta/recipes-bsp/barebox/barebox.inc | 51 ++++++++++++++++
.../barebox/barebox_2021.04.0-phy5.bb | 13 ++++
...1-of_dump-Add-a-simple-node-check-up.patch | 61 +++++++++++++++++++
.../barebox/files/defaultenv.cfg.tmpl | 5 ++
.../barebox/files/phytec-mira-env/bin/far | 14 +++++
.../bin/rauc_flash_nand_from_mmc | 10 +++
.../bin/rauc_flash_nand_from_tftp | 10 +++
.../files/phytec-mira-env/bin/rauc_init_nand | 17 ++++++
.../barebox/files/phytec-mira-env/boot/initrd | 9 +++
.../barebox/files/phytec-mira-env/boot/mmc | 14 +++++
.../barebox/files/phytec-mira-env/boot/nand | 16 +++++
.../barebox/files/phytec-mira-env/boot/net | 21 +++++++
.../barebox/files/phytec-mira-env/boot/spi | 7 +++
.../files/phytec-mira-env/boot/system0 | 16 +++++
.../files/phytec-mira-env/boot/system1 | 16 +++++
.../files/phytec-mira-env/config-expansions | 28 +++++++++
.../phytec-mira-env/expansions/dt-overlays | 14 +++++
.../expansions/imx6-phytec-check-bus-nodepath | 7 +++
.../expansions/imx6qdl-mira-enable-lvds | 2 +
.../expansions/imx6qdl-mira-peb-eval-01 | 3 +
.../expansions/imx6qdl-nunki-enable-lvds | 2 +
.../expansions/imx6qdl-phytec-lcd | 4 ++
.../imx6qdl-phytec-lcd-018-peb-av-02 | 3 +
.../imx6qdl-phytec-lcd-018-peb-av-02-res | 3 +
.../expansions/imx6qdl-phytec-lcd-res | 4 ++
.../expansions/imx6qdl-phytec-peb-wlbt-05 | 7 +++
.../files/phytec-mira-env/nv/allow_color | 1 +
.../files/phytec-mira-env/nv/boot.default | 1 +
.../nv/bootchooser.state_prefix | 1 +
.../nv/bootchooser.system0.boot | 1 +
.../nv/bootchooser.system1.boot | 1 +
.../phytec-mira-env/nv/bootchooser.targets | 1 +
.../files/phytec-mira-env/nv/dev.eth0.ipaddr | 1 +
.../phytec-mira-env/nv/dev.eth0.linux.devname | 1 +
.../files/phytec-mira-env/nv/dev.eth0.mode | 1 +
.../files/phytec-mira-env/nv/dev.eth0.netmask | 1 +
.../phytec-mira-env/nv/dev.eth0.serverip | 1 +
.../files/phytec-mira-env/nv/dhcp.vendor_id | 1 +
.../phytec-mira-env/nv/linux.bootargs.base | 1 +
.../phytec-mira-env/nv/linux.bootargs.fb | 1 +
.../phytec-mira-env/nv/linux.bootargs.rootfs | 1 +
.../files/phytec-mira-env/nv/net.gateway | 1 +
.../files/phytec-mira-env/nv/overlays.select | 0
meta/recipes-bsp/barebox/files/rules.tmpl | 44 +++++++++++++
.../barebox/files/version.cfg.tmpl | 2 +
46 files changed, 424 insertions(+)
create mode 100644 meta/recipes-bsp/barebox/barebox.inc
create mode 100644 meta/recipes-bsp/barebox/barebox_2021.04.0-phy5.bb
create mode 100644 meta/recipes-bsp/barebox/files/0001-of_dump-Add-a-simple-node-check-up.patch
create mode 100644 meta/recipes-bsp/barebox/files/defaultenv.cfg.tmpl
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/bin/far
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/bin/rauc_flash_nand_from_mmc
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/bin/rauc_flash_nand_from_tftp
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/bin/rauc_init_nand
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/boot/initrd
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/boot/mmc
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/boot/nand
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/boot/net
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/boot/spi
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/boot/system0
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/boot/system1
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/config-expansions
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/dt-overlays
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6-phytec-check-bus-nodepath
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-mira-enable-lvds
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-mira-peb-eval-01
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-nunki-enable-lvds
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-lcd
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-lcd-018-peb-av-02
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-lcd-018-peb-av-02-res
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-lcd-res
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-peb-wlbt-05
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/allow_color
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/boot.default
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/bootchooser.state_prefix
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/bootchooser.system0.boot
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/bootchooser.system1.boot
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/bootchooser.targets
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.ipaddr
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.linux.devname
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.mode
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.netmask
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.serverip
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dhcp.vendor_id
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/linux.bootargs.base
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/linux.bootargs.fb
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/linux.bootargs.rootfs
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/net.gateway
create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/overlays.select
create mode 100755 meta/recipes-bsp/barebox/files/rules.tmpl
create mode 100644 meta/recipes-bsp/barebox/files/version.cfg.tmpl
diff --git a/meta-isar/conf/machine/phyboard-mira.conf b/meta-isar/conf/machine/phyboard-mira.conf
index ee1b75f..a29d919 100644
--- a/meta-isar/conf/machine/phyboard-mira.conf
+++ b/meta-isar/conf/machine/phyboard-mira.conf
@@ -17,3 +17,8 @@ IMAGE_FSTYPES ?= "ubifs-img ubi-img"
DTB_FILES = "imx6q-phytec-mira-ff-rdk-nand.dtb"
IMAGE_INSTALL += "sshd-regen-keys"
+IMAGE_INSTALL += "barebox"
+
+BAREBOX_CONFIG = "imx_v7_defconfig"
+BAREBOX_ENV = "phytec-mira-env"
+BAREBOX_BASE_BIN = "barebox-phytec-phycore-imx6q-som-nand-1gib"
diff --git a/meta/recipes-bsp/barebox/barebox.inc b/meta/recipes-bsp/barebox/barebox.inc
new file mode 100644
index 0000000..6a7b017
--- /dev/null
+++ b/meta/recipes-bsp/barebox/barebox.inc
@@ -0,0 +1,51 @@
+# This software is a part of ISAR.
+# Copyright (C) 2022 ilbers GmbH
+
+DESCRIPTION ?= "The barebox is a bootloader designed for embedded systems. It \
+ runs on a variety of architectures including x86, ARM, MIPS, \
+ PowerPC and others."
+CHANGELOG_V = "${PV}+${PR}"
+MAINTAINER ?= "isar-users <isar-users@googlegroups.com>"
+
+DEBIAN_BUILD_DEPENDS ?= "lzop, coreutils, bison, flex"
+PROVIDES = "virtual/bootloader"
+
+BAREBOX_CONFIG ?= ""
+BAREBOX_BUILD_DIR = "build"
+BAREBOX_VERSION_EXTENSION ?= ""
+BAREBOX_ENV ?= ""
+
+SRC_URI += "file://rules.tmpl \
+ file://version.cfg.tmpl \
+ file://defaultenv.cfg.tmpl"
+
+BAREBOX_CONFIG_FRAGMENTS = "version.cfg defaultenv.cfg"
+
+SRC_URI += "${@'file://%s' % d.getVar('BAREBOX_ENV') if d.getVar('BAREBOX_ENV') else ''}"
+
+TEMPLATE_FILES += "rules.tmpl version.cfg.tmpl defaultenv.cfg.tmpl"
+TEMPLATE_VARS += "BAREBOX_CONFIG BAREBOX_BUILD_DIR BAREBOX_VERSION_EXTENSION BAREBOX_ENV BAREBOX_CONFIG_FRAGMENTS"
+
+do_prepare_build[cleandirs] += "${S}/debian"
+do_prepare_build() {
+ deb_debianize
+
+ if [ -n "${BAREBOX_CONFIG_FRAGMENTS}" ]; then
+ (cd ${WORKDIR} && cp ${BAREBOX_CONFIG_FRAGMENTS} ${S}/)
+ fi
+ if [ -n "${BAREBOX_ENV}" ]; then
+ (cd ${WORKDIR} && cp -r ${BAREBOX_ENV} ${S}/)
+ fi
+}
+
+BAREBOX_BASE_BIN ?= "barebox"
+
+do_deploy_bin[dirs] = "${DEPLOY_DIR_IMAGE}"
+do_deploy_bin() {
+ install -m 644 ${S}/${BAREBOX_BUILD_DIR}/images/${BAREBOX_BASE_BIN}.img ${DEPLOY_DIR_IMAGE}/
+ ln -sf ${BAREBOX_BASE_BIN}.img ${DEPLOY_DIR_IMAGE}/barebox.bin
+
+ install -m 644 ${S}/${BAREBOX_BUILD_DIR}/.config ${DEPLOY_DIR_IMAGE}/${BAREBOX_BASE_BIN}.config
+ ln -sf ${BAREBOX_BASE_BIN}.config ${DEPLOY_DIR_IMAGE}/barebox.config
+}
+addtask deploy_bin before do_deploy_deb after do_dpkg_build
diff --git a/meta/recipes-bsp/barebox/barebox_2021.04.0-phy5.bb b/meta/recipes-bsp/barebox/barebox_2021.04.0-phy5.bb
new file mode 100644
index 0000000..ed8842c
--- /dev/null
+++ b/meta/recipes-bsp/barebox/barebox_2021.04.0-phy5.bb
@@ -0,0 +1,13 @@
+# This software is a part of ISAR.
+# Copyright (C) 2022 ilbers GmbH
+
+inherit dpkg
+
+require barebox.inc
+
+SRC_URI += "https://git.phytec.de/barebox/snapshot/barebox-2021.04.0-phy5.tar.bz2 \
+ file://0001-of_dump-Add-a-simple-node-check-up.patch"
+
+SRC_URI[sha256sum] = "256cca854bf790f8936deec9e5e5060478eb14ba337b04a2a06e73ec5085d1e1"
+
+BAREBOX_VERSION_EXTENSION = "-isar"
diff --git a/meta/recipes-bsp/barebox/files/0001-of_dump-Add-a-simple-node-check-up.patch b/meta/recipes-bsp/barebox/files/0001-of_dump-Add-a-simple-node-check-up.patch
new file mode 100644
index 0000000..999b20a
--- /dev/null
+++ b/meta/recipes-bsp/barebox/files/0001-of_dump-Add-a-simple-node-check-up.patch
@@ -0,0 +1,61 @@
+From 4abae0d9cc23ef055c0054e41c515e92fa5267ce Mon Sep 17 00:00:00 2001
+From: Yunus Bas <y.bas@phytec.de>
+Date: Fri, 4 Jun 2021 19:03:04 +0200
+Subject: [PATCH] of_dump: Add a simple node check-up
+
+In case a node is found, the whole node and it's subnodes will be
+printed. This patch extends the of_dump command with a simple check-up.
+This is needed e.g. when other scripts need to determine if a
+devicetree node exists or not.
+
+Zero is returned in case the node is found, an error code if not.
+
+Signed-off-by: Yunus Bas <y.bas@phytec.de>
+---
+ commands/of_dump.c | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/commands/of_dump.c b/commands/of_dump.c
+index 6792af3af..d4d9c46a5 100644
+--- a/commands/of_dump.c
++++ b/commands/of_dump.c
+@@ -32,14 +32,17 @@ static int do_of_dump(int argc, char *argv[])
+ int opt;
+ int ret = 0;
+ int fix = 0;
++ int exists = 0;
+ struct device_node *root = NULL, *node, *of_free = NULL;
+ char *dtbfile = NULL;
+ size_t size;
+ const char *nodename;
+ int names_only = 0;
+
+- while ((opt = getopt(argc, argv, "Ff:n")) > 0) {
++ while ((opt = getopt(argc, argv, "eFf:n")) > 0) {
+ switch (opt) {
++ case 'e':
++ exists = 1;
+ case 'f':
+ dtbfile = optarg;
+ break;
+@@ -109,6 +112,9 @@ static int do_of_dump(int argc, char *argv[])
+ printf("Cannot find nodepath %s\n", nodename);
+ ret = -ENOENT;
+ goto out;
++ } else if (exists) {
++ printf("Found node %s\n", nodename);
++ goto out;
+ }
+
+ if (names_only)
+@@ -125,6 +131,7 @@ out:
+
+ BAREBOX_CMD_HELP_START(of_dump)
+ BAREBOX_CMD_HELP_TEXT("Options:")
++BAREBOX_CMD_HELP_OPT ("-e", "only check if path or alias exists")
+ BAREBOX_CMD_HELP_OPT ("-f dtb", "work on dtb instead of internal devicetree")
+ BAREBOX_CMD_HELP_OPT ("-F", "return fixed devicetree")
+ BAREBOX_CMD_HELP_OPT ("-n", "Print node names only, no properties")
+--
+2.30.0
+
diff --git a/meta/recipes-bsp/barebox/files/defaultenv.cfg.tmpl b/meta/recipes-bsp/barebox/files/defaultenv.cfg.tmpl
new file mode 100644
index 0000000..5d88f8c
--- /dev/null
+++ b/meta/recipes-bsp/barebox/files/defaultenv.cfg.tmpl
@@ -0,0 +1,5 @@
+# CONFIG_BAREBOXENV_TARGET is not set
+# CONFIG_BAREBOXCRC32_TARGET is not set
+# CONFIG_KERNEL_INSTALL_TARGET is not set
+# CONFIG_IMD_TARGET is not set
+CONFIG_DEFAULT_ENVIRONMENT_PATH="${BAREBOX_ENV}"
diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/bin/far b/meta/recipes-bsp/barebox/files/phytec-mira-env/bin/far
new file mode 100644
index 0000000..3013462
--- /dev/null
+++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/bin/far
@@ -0,0 +1,14 @@
+#!/bin/sh
+# barebox script far (="Fetch And Reset"):
+#
+# The script is useful for a rapid compile and execute development cycle. If
+# the deployment directory of yocto is the root directory of the tftp server
+# (e.g. use a bind mount), you can fetch and execute a newly compiled barebox
+# with this script.
+
+cp /mnt/tftp/barebox.bin /dev/ram0
+if [ $? != 0 ]; then
+ echo "Error: Cannot fetch file "barebox.bin" from host!"
+else
+ go /dev/ram0
+fi
diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/bin/rauc_flash_nand_from_mmc b/meta/recipes-bsp/barebox/files/phytec-mira-env/bin/rauc_flash_nand_from_mmc
new file mode 100644
index 0000000..207ad7f
--- /dev/null
+++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/bin/rauc_flash_nand_from_mmc
@@ -0,0 +1,10 @@
+#!/bin/sh
+echo "WARNING! This script is deprecated. Please use "rauc-flash-nand" in a Linux environment!"
+echo "Initializing NAND flash from MMC"
+[ ! -e /dev/nand0.root.ubi ] && ubiattach /dev/nand0.root
+ubiupdatevol /dev/nand0.root.ubi.kernel0 /mnt/mmc0.0/zImage
+ubiupdatevol /dev/nand0.root.ubi.kernel1 /mnt/mmc0.0/zImage
+ubiupdatevol /dev/nand0.root.ubi.oftree0 /mnt/mmc0.0/oftree
+ubiupdatevol /dev/nand0.root.ubi.oftree1 /mnt/mmc0.0/oftree
+cp /mnt/mmc0.0/root.ubifs /dev/nand0.root.ubi.root0
+cp /mnt/mmc0.0/root.ubifs /dev/nand0.root.ubi.root1
diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/bin/rauc_flash_nand_from_tftp b/meta/recipes-bsp/barebox/files/phytec-mira-env/bin/rauc_flash_nand_from_tftp
new file mode 100644
index 0000000..5fcb366
--- /dev/null
+++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/bin/rauc_flash_nand_from_tftp
@@ -0,0 +1,10 @@
+#!/bin/sh
+echo "WARNING! This script is deprecated. Please use "rauc-flash-nand" in a Linux environment!"
+echo "Initializing NAND flash from TFTP"
+[ ! -e /dev/nand0.root.ubi ] && ubiattach /dev/nand0.root
+ubiupdatevol /dev/nand0.root.ubi.kernel0 /mnt/tftp/zImage
+ubiupdatevol /dev/nand0.root.ubi.kernel1 /mnt/tftp/zImage
+ubiupdatevol /dev/nand0.root.ubi.oftree0 /mnt/tftp/oftree
+ubiupdatevol /dev/nand0.root.ubi.oftree1 /mnt/tftp/oftree
+cp /mnt/tftp/root.ubifs /dev/nand0.root.ubi.root0
+cp /mnt/tftp/root.ubifs /dev/nand0.root.ubi.root1
diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/bin/rauc_init_nand b/meta/recipes-bsp/barebox/files/phytec-mira-env/bin/rauc_init_nand
new file mode 100644
index 0000000..18c6a13
--- /dev/null
+++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/bin/rauc_init_nand
@@ -0,0 +1,17 @@
+#!/bin/sh
+ROOTFSSIZE=479M
+KERNELSIZE=16M
+DTBSIZE=1M
+echo "WARNING! This script is deprecated. Please use "rauc-flash-nand" in a Linux environment!"
+echo "Formatting /dev/nand0.root"
+
+ubiformat -q /dev/nand0.root
+ubiattach /dev/nand0.root
+ubimkvol -t static /dev/nand0.root.ubi kernel0 ${KERNELSIZE}
+ubimkvol -t static /dev/nand0.root.ubi oftree0 ${DTBSIZE}
+ubimkvol /dev/nand0.root.ubi root0 ${ROOTFSSIZE}
+ubimkvol -t static /dev/nand0.root.ubi kernel1 ${KERNELSIZE}
+ubimkvol -t static /dev/nand0.root.ubi oftree1 ${DTBSIZE}
+ubimkvol /dev/nand0.root.ubi root1 ${ROOTFSSIZE}
+
+ubidetach 0
diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/initrd b/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/initrd
new file mode 100644
index 0000000..f68bfcb
--- /dev/null
+++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/initrd
@@ -0,0 +1,9 @@
+#!/bin/sh
+path="/mnt/tftp"
+
+global.bootm.image="${path}/${global.user}-linux-${global.hostname}"
+
+global.bootm.oftree="${path}/${global.user}-oftree-${global.hostname}"
+global.bootm.initrd="${path}/${global.user}-phytec-initramfs-image-${global.hostname}.cpio.gz"
+
+global.linux.bootargs.dyn.root="root=/dev/ram0 ip=$eth0.ipaddr:$eth0.serverip:$eth0.gateway:$eth0.netmask:: quiet"
diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/mmc b/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/mmc
new file mode 100644
index 0000000..46761ed
--- /dev/null
+++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/mmc
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+detect mmc0
+
+global.bootm.image="/mnt/mmc0.0/zImage"
+global.bootm.oftree="/mnt/mmc0.0/oftree"
+global.linux.bootargs.dyn.root="root=/dev/mmcblk0p2 rootflags='data=journal'"
+
+[ -e /env/config-expansions ] && /env/config-expansions
+
+if [ -e /env/expansions/dt-overlays ] ; then
+ global overlays.path="/mnt/mmc0.1/overlays"
+ /env/expansions/dt-overlays
+fi
diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/nand b/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/nand
new file mode 100644
index 0000000..f6d71aa
--- /dev/null
+++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/nand
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+[ ! -e /dev/nand0.root.ubi ] && ubiattach /dev/nand0.root
+
+global.bootm.image="/dev/nand0.root.ubi.kernel"
+global.bootm.oftree="/dev/nand0.root.ubi.oftree"
+global.linux.bootargs.dyn.root="root=ubi0:root ubi.mtd=root rootfstype=ubifs"
+
+[ -e /env/config-expansions ] && /env/config-expansions
+
+if [ -e /env/expansions/dt-overlays ] ; then
+ mkdir /mnt/rootfs
+ mount -t ubifs /dev/nand0.root.ubi.root /mnt/rootfs
+ global overlays.path="/mnt/rootfs/overlays"
+ /env/expansions/dt-overlays
+fi
diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/net b/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/net
new file mode 100644
index 0000000..0ad9412
--- /dev/null
+++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/net
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+path="/mnt/tftp"
+
+global.bootm.image="${path}/${global.user}-linux-${global.hostname}"
+
+oftree="${path}/${global.user}-oftree-${global.hostname}"
+if [ -f "${oftree}" ]; then
+ global.bootm.oftree="$oftree"
+fi
+
+nfsroot="/home/${global.user}/nfsroot/${global.hostname}"
+ip_route_get -b ${global.net.server} global.linux.bootargs.dyn.ip
+global.linux.bootargs.dyn.root="root=/dev/nfs nfsroot=$nfsroot,vers=3,tcp"
+
+[ -e /env/config-expansions ] && /env/config-expansions
+
+if [ -e /env/expansions/dt-overlays ] ; then
+ global overlays.path="/mnt/nfs/overlays"
+ /env/expansions/dt-overlays
+fi
diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/spi b/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/spi
new file mode 100644
index 0000000..c4dc3d5
--- /dev/null
+++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/spi
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+global.bootm.image="/dev/m25p0.kernel"
+global.bootm.oftree="/dev/m25p0.oftree"
+global.linux.bootargs.dyn.root="root=ubi0:root ubi.mtd=root rootfstype=ubifs"
+
+[ -e /env/config-expansions ] && /env/config-expansions
diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/system0 b/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/system0
new file mode 100644
index 0000000..459ae96
--- /dev/null
+++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/system0
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+[ ! -e /dev/nand0.root.ubi ] && ubiattach /dev/nand0.root
+
+global.bootm.image="/dev/nand0.root.ubi.kernel0"
+global.bootm.oftree="/dev/nand0.root.ubi.oftree0"
+global.linux.bootargs.dyn.root="root=ubi0:root0 ubi.mtd=root rootfstype=ubifs"
+
+[ -e /env/config-expansions ] && /env/config-expansions
+
+if [ -e /env/expansions/dt-overlays ] ; then
+ mkdir /mnt/rootfs
+ mount -t ubifs /dev/nand0.root.ubi.root0 /mnt/rootfs
+ global overlays.path="/mnt/rootfs/overlays"
+ /env/expansions/dt-overlays
+fi
diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/system1 b/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/system1
new file mode 100644
index 0000000..c22a180
--- /dev/null
+++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/system1
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+[ ! -e /dev/nand0.root.ubi ] && ubiattach /dev/nand0.root
+
+global.bootm.image="/dev/nand0.root.ubi.kernel1"
+global.bootm.oftree="/dev/nand0.root.ubi.oftree1"
+global.linux.bootargs.dyn.root="root=ubi0:root1 ubi.mtd=root rootfstype=ubifs"
+
+[ -e /env/config-expansions ] && /env/config-expansions
+
+if [ -e /env/expansions/dt-overlays ] ; then
+ mkdir /mnt/rootfs
+ mount -t ubifs /dev/nand0.root.ubi.root1 /mnt/rootfs
+ global overlays.path="/mnt/rootfs/overlays"
+ /env/expansions/dt-overlays
+fi
diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/config-expansions b/meta/recipes-bsp/barebox/files/phytec-mira-env/config-expansions
new file mode 100644
index 0000000..4958f67
--- /dev/null
+++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/config-expansions
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+. /env/expansions/imx6-phytec-check-bus-nodepath
+
+. /env/expansions/imx6qdl-mira-peb-eval-01
+#. /env/expansions/imx6qdl-mira-enable-lvds
+#. /env/expansions/imx6qdl-phytec-peb-wlbt-05
+
+#use this expansion when a capacitive touchscreen is connected
+#. /env/expansions/imx6qdl-phytec-lcd-018-peb-av-02
+
+#use this expansion when a resisitive touchscreen is connected
+#. /env/expansions/imx6qdl-phytec-lcd-018-peb-av-02-res
+
+# imx6qdl-phytec-lcd: 7" display (AC158 / AC138)
+#of_property -s -f "/panel-lcd" compatible "edt,etm0700g0edh6"
+
+# imx6qdl-phytec-lcd: 7" display (AC104)
+#of_property -s -f "/panel-lcd" compatible "edt,etm0700g0dh6"
+
+# imx6qdl-phytec-lcd: 5.7" display (AC103)
+#of_property -s -f "/panel-lcd" compatible "edt,etmv570g2dhu"
+
+# imx6qdl-phytec-lcd: 4.3" display (AC102)
+#of_property -s -f "/panel-lcd" compatible "edt,etm0430g0dh6"
+
+# imx6qdl-phytec-lcd: 3.5" display (AC167 / AC101)
+#of_property -s -f "/panel-lcd" compatible "edt,etm0350g0dh6"
diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/dt-overlays b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/dt-overlays
new file mode 100644
index 0000000..c3bcc34
--- /dev/null
+++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/dt-overlays
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+path="$global.overlays.path"
+
+if [ -e ${path}/select ] ; then
+ readf ${path}/select global.overlays.select
+fi
+
+for o in $global.overlays.select ; do
+ if [ -e ${path}/${o} ] ; then
+ echo "Add ${path}/${o} overlay"
+ of_overlay ${path}/${o}
+ fi
+done
diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6-phytec-check-bus-nodepath b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6-phytec-check-bus-nodepath
new file mode 100644
index 0000000..ba94f40
--- /dev/null
+++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6-phytec-check-bus-nodepath
@@ -0,0 +1,7 @@
+bus="bus"
+of_dump -e /soc/$bus@2000000
+
+if [ $? != 0 ]; then
+ echo "Changing node-name bus to aips-bus"
+ bus="aips-bus"
+fi
diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-mira-enable-lvds b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-mira-enable-lvds
new file mode 100644
index 0000000..73ab490
--- /dev/null
+++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-mira-enable-lvds
@@ -0,0 +1,2 @@
+of_fixup_status /ldb/lvds-channel@0
+of_fixup_status /soc/$bus@2100000/i2c@21a0000/touchctrl@44
diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-mira-peb-eval-01 b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-mira-peb-eval-01
new file mode 100644
index 0000000..f4a486f
--- /dev/null
+++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-mira-peb-eval-01
@@ -0,0 +1,3 @@
+of_fixup_status /gpio-keys
+of_fixup_status /user-leds
+of_property -s -f -e $global.bootm.oftree /soc/$bus@2100000/serial@21ec000 pinctrl-0 </soc/$bus@2000000/pinctrl@20e0000/uart3grp>
diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-nunki-enable-lvds b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-nunki-enable-lvds
new file mode 100644
index 0000000..73ab490
--- /dev/null
+++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-nunki-enable-lvds
@@ -0,0 +1,2 @@
+of_fixup_status /ldb/lvds-channel@0
+of_fixup_status /soc/$bus@2100000/i2c@21a0000/touchctrl@44
diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-lcd b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-lcd
new file mode 100644
index 0000000..497c3ae
--- /dev/null
+++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-lcd
@@ -0,0 +1,4 @@
+#!/bin/sh
+of_fixup_status /panel-lcd
+of_fixup_status /ldb/lvds-channel@0
+of_fixup_status /soc/$bus@2100000/i2c@21a4000/polytouch@38
diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-lcd-018-peb-av-02 b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-lcd-018-peb-av-02
new file mode 100644
index 0000000..ce76ca0
--- /dev/null
+++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-lcd-018-peb-av-02
@@ -0,0 +1,3 @@
+of_fixup_status /panel-lcd
+of_fixup_status /display@di0
+of_fixup_status /soc/$bus@2100000/i2c@21a0000/polytouch@38
diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-lcd-018-peb-av-02-res b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-lcd-018-peb-av-02-res
new file mode 100644
index 0000000..381c723
--- /dev/null
+++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-lcd-018-peb-av-02-res
@@ -0,0 +1,3 @@
+of_fixup_status /panel-lcd
+of_fixup_status /display@di0
+of_fixup_status /soc/$bus@2100000/i2c@21a0000/touchctrl@44
diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-lcd-res b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-lcd-res
new file mode 100644
index 0000000..7bf30e5
--- /dev/null
+++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-lcd-res
@@ -0,0 +1,4 @@
+#!/bin/sh
+of_fixup_status /panel-lcd
+of_fixup_status /ldb/lvds-channel@0
+of_fixup_status /soc/$bus@2100000/i2c@21a4000/touchctrl@41
diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-peb-wlbt-05 b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-peb-wlbt-05
new file mode 100644
index 0000000..5ae4218
--- /dev/null
+++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-peb-wlbt-05
@@ -0,0 +1,7 @@
+#!/bin/sh
+of_fixup_status /soc/$bus@2100000/mmc@2198000
+of_fixup_status /regulator-wl-en
+of_fixup_status -d /gpio-keys
+of_fixup_status /soc/$bus@2100000/serial@21ec000/bluetooth
+of_fixup_status -d /user-leds
+of_property -s -f -e $global.bootm.oftree /soc/$bus@2100000/serial@21ec000 pinctrl-0 </soc/$bus@2000000/pinctrl@20e0000/uart3grp_bt>
diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/allow_color b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/allow_color
new file mode 100644
index 0000000..c508d53
--- /dev/null
+++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/allow_color
@@ -0,0 +1 @@
+false
diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/boot.default b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/boot.default
new file mode 100644
index 0000000..d31014d
--- /dev/null
+++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/boot.default
@@ -0,0 +1 @@
+bootchooser
\ No newline at end of file
diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/bootchooser.state_prefix b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/bootchooser.state_prefix
new file mode 100644
index 0000000..38c56c1
--- /dev/null
+++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/bootchooser.state_prefix
@@ -0,0 +1 @@
+state.bootstate
\ No newline at end of file
diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/bootchooser.system0.boot b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/bootchooser.system0.boot
new file mode 100644
index 0000000..dcc64ac
--- /dev/null
+++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/bootchooser.system0.boot
@@ -0,0 +1 @@
+system0
\ No newline at end of file
diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/bootchooser.system1.boot b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/bootchooser.system1.boot
new file mode 100644
index 0000000..2858d07
--- /dev/null
+++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/bootchooser.system1.boot
@@ -0,0 +1 @@
+system1
\ No newline at end of file
diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/bootchooser.targets b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/bootchooser.targets
new file mode 100644
index 0000000..cf2ba7c
--- /dev/null
+++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/bootchooser.targets
@@ -0,0 +1 @@
+system0 system1
\ No newline at end of file
diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.ipaddr b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.ipaddr
new file mode 100644
index 0000000..4194dcb
--- /dev/null
+++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.ipaddr
@@ -0,0 +1 @@
+192.168.3.11
\ No newline at end of file
diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.linux.devname b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.linux.devname
new file mode 100644
index 0000000..563d95d
--- /dev/null
+++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.linux.devname
@@ -0,0 +1 @@
+eth0
\ No newline at end of file
diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.mode b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.mode
new file mode 100644
index 0000000..ecdef5b
--- /dev/null
+++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.mode
@@ -0,0 +1 @@
+static
\ No newline at end of file
diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.netmask b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.netmask
new file mode 100644
index 0000000..5a279b4
--- /dev/null
+++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.netmask
@@ -0,0 +1 @@
+255.255.255.0
\ No newline at end of file
diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.serverip b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.serverip
new file mode 100644
index 0000000..66764ab
--- /dev/null
+++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.serverip
@@ -0,0 +1 @@
+192.168.3.10
\ No newline at end of file
diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dhcp.vendor_id b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dhcp.vendor_id
new file mode 100644
index 0000000..b69d5fa
--- /dev/null
+++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dhcp.vendor_id
@@ -0,0 +1 @@
+barebox-phyCORE-i.MX6
\ No newline at end of file
diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/linux.bootargs.base b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/linux.bootargs.base
new file mode 100644
index 0000000..efc4ee6
--- /dev/null
+++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/linux.bootargs.base
@@ -0,0 +1 @@
+consoleblank=0
diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/linux.bootargs.fb b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/linux.bootargs.fb
new file mode 100644
index 0000000..0848ba8
--- /dev/null
+++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/linux.bootargs.fb
@@ -0,0 +1 @@
+imxdrm.legacyfb_depth=32
diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/linux.bootargs.rootfs b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/linux.bootargs.rootfs
new file mode 100644
index 0000000..199c7b5
--- /dev/null
+++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/linux.bootargs.rootfs
@@ -0,0 +1 @@
+rootwait ro fsck.repair=yes
diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/net.gateway b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/net.gateway
new file mode 100644
index 0000000..66764ab
--- /dev/null
+++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/net.gateway
@@ -0,0 +1 @@
+192.168.3.10
\ No newline at end of file
diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/overlays.select b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/overlays.select
new file mode 100644
index 0000000..e69de29
diff --git a/meta/recipes-bsp/barebox/files/rules.tmpl b/meta/recipes-bsp/barebox/files/rules.tmpl
new file mode 100755
index 0000000..acef5d8
--- /dev/null
+++ b/meta/recipes-bsp/barebox/files/rules.tmpl
@@ -0,0 +1,44 @@
+#!/usr/bin/make -f
+
+# Debian rules for custom Barebox build
+#
+# This software is a part of ISAR.
+# Copyright (C) 2022 ilbers GmbH
+
+ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
+export CROSS_COMPILE=$(DEB_HOST_GNU_TYPE)-
+endif
+
+ifeq ($(DEB_HOST_GNU_CPU), arm)
+export ARCH=arm
+endif
+ifeq ($(DEB_HOST_GNU_CPU), aarch64)
+export ARCH=arm64
+endif
+ifeq ($(DEB_HOST_GNU_CPU), riscv64)
+export ARCH=riscv
+endif
+ifneq (,$(findstring 86,$(DEB_HOST_GNU_CPU)))
+export ARCH=x86
+endif
+
+export KBUILD_OUTPUT=${BAREBOX_BUILD_DIR}
+
+export LDFLAGS="--no-dynamic-linker"
+
+override_dh_auto_configure:
+ $(MAKE) $(PARALLEL_MAKE) ${BAREBOX_CONFIG}
+ifneq (,${BAREBOX_CONFIG_FRAGMENTS})
+ ./scripts/kconfig/merge_config.sh -m -O ${BAREBOX_BUILD_DIR} ${BAREBOX_BUILD_DIR}/.config ${BAREBOX_CONFIG_FRAGMENTS}
+endif
+ $(MAKE) $(PARALLEL_MAKE) olddefconfig
+
+override_dh_auto_build:
+ $(MAKE) $(PARALLEL_MAKE) all
+
+override_dh_auto_install:
+ install -d $(CURDIR)/debian/barebox/usr/lib/barebox
+ install -m 644 ${BAREBOX_BUILD_DIR}/barebox.bin $(CURDIR)/debian/barebox/usr/lib/barebox
+
+%:
+ dh $@ --parallel
diff --git a/meta/recipes-bsp/barebox/files/version.cfg.tmpl b/meta/recipes-bsp/barebox/files/version.cfg.tmpl
new file mode 100644
index 0000000..26292aa
--- /dev/null
+++ b/meta/recipes-bsp/barebox/files/version.cfg.tmpl
@@ -0,0 +1,2 @@
+CONFIG_LOCALVERSION="${BAREBOX_VERSION_EXTENSION}"
+# CONFIG_LOCALVERSION_AUTO is not set
--
2.25.1
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 7/7] meta: Add barebox bootloader support
2022-02-09 13:54 ` [PATCH 7/7] meta: Add barebox bootloader support Anton Mikanovich
@ 2022-02-09 18:08 ` Jan Kiszka
2022-02-10 7:58 ` Anton Mikanovich
0 siblings, 1 reply; 18+ messages in thread
From: Jan Kiszka @ 2022-02-09 18:08 UTC (permalink / raw)
To: Anton Mikanovich, isar-users
On 09.02.22 14:54, Anton Mikanovich wrote:
> Add Barebox v2021.04.0 recipe for Phytec boards.
> Most of the files here are actually just an environment to be apply.
>
This also introduces a re-usable for building barebox, analogously to
U-Boot as it looks to me. The commit should be restructed to reflect
that. If that abstration will actually help in modelling more boards is
probably to be seen. But it is a valuable start.
Was the reason to add barebox a board-related one, or was it the chance
to add a recipe pattern also for that bootloader to Isar?
> Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
> ---
> meta-isar/conf/machine/phyboard-mira.conf | 5 ++
> meta/recipes-bsp/barebox/barebox.inc | 51 ++++++++++++++++
> .../barebox/barebox_2021.04.0-phy5.bb | 13 ++++
> ...1-of_dump-Add-a-simple-node-check-up.patch | 61 +++++++++++++++++++
> .../barebox/files/defaultenv.cfg.tmpl | 5 ++
> .../barebox/files/phytec-mira-env/bin/far | 14 +++++
> .../bin/rauc_flash_nand_from_mmc | 10 +++
> .../bin/rauc_flash_nand_from_tftp | 10 +++
> .../files/phytec-mira-env/bin/rauc_init_nand | 17 ++++++
> .../barebox/files/phytec-mira-env/boot/initrd | 9 +++
> .../barebox/files/phytec-mira-env/boot/mmc | 14 +++++
> .../barebox/files/phytec-mira-env/boot/nand | 16 +++++
> .../barebox/files/phytec-mira-env/boot/net | 21 +++++++
> .../barebox/files/phytec-mira-env/boot/spi | 7 +++
> .../files/phytec-mira-env/boot/system0 | 16 +++++
> .../files/phytec-mira-env/boot/system1 | 16 +++++
> .../files/phytec-mira-env/config-expansions | 28 +++++++++
> .../phytec-mira-env/expansions/dt-overlays | 14 +++++
> .../expansions/imx6-phytec-check-bus-nodepath | 7 +++
> .../expansions/imx6qdl-mira-enable-lvds | 2 +
> .../expansions/imx6qdl-mira-peb-eval-01 | 3 +
> .../expansions/imx6qdl-nunki-enable-lvds | 2 +
> .../expansions/imx6qdl-phytec-lcd | 4 ++
> .../imx6qdl-phytec-lcd-018-peb-av-02 | 3 +
> .../imx6qdl-phytec-lcd-018-peb-av-02-res | 3 +
> .../expansions/imx6qdl-phytec-lcd-res | 4 ++
> .../expansions/imx6qdl-phytec-peb-wlbt-05 | 7 +++
> .../files/phytec-mira-env/nv/allow_color | 1 +
> .../files/phytec-mira-env/nv/boot.default | 1 +
> .../nv/bootchooser.state_prefix | 1 +
> .../nv/bootchooser.system0.boot | 1 +
> .../nv/bootchooser.system1.boot | 1 +
> .../phytec-mira-env/nv/bootchooser.targets | 1 +
> .../files/phytec-mira-env/nv/dev.eth0.ipaddr | 1 +
> .../phytec-mira-env/nv/dev.eth0.linux.devname | 1 +
> .../files/phytec-mira-env/nv/dev.eth0.mode | 1 +
> .../files/phytec-mira-env/nv/dev.eth0.netmask | 1 +
> .../phytec-mira-env/nv/dev.eth0.serverip | 1 +
> .../files/phytec-mira-env/nv/dhcp.vendor_id | 1 +
> .../phytec-mira-env/nv/linux.bootargs.base | 1 +
> .../phytec-mira-env/nv/linux.bootargs.fb | 1 +
> .../phytec-mira-env/nv/linux.bootargs.rootfs | 1 +
> .../files/phytec-mira-env/nv/net.gateway | 1 +
> .../files/phytec-mira-env/nv/overlays.select | 0
> meta/recipes-bsp/barebox/files/rules.tmpl | 44 +++++++++++++
> .../barebox/files/version.cfg.tmpl | 2 +
> 46 files changed, 424 insertions(+)
> create mode 100644 meta/recipes-bsp/barebox/barebox.inc
> create mode 100644 meta/recipes-bsp/barebox/barebox_2021.04.0-phy5.bb
> create mode 100644 meta/recipes-bsp/barebox/files/0001-of_dump-Add-a-simple-node-check-up.patch
> create mode 100644 meta/recipes-bsp/barebox/files/defaultenv.cfg.tmpl
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/bin/far
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/bin/rauc_flash_nand_from_mmc
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/bin/rauc_flash_nand_from_tftp
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/bin/rauc_init_nand
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/boot/initrd
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/boot/mmc
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/boot/nand
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/boot/net
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/boot/spi
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/boot/system0
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/boot/system1
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/config-expansions
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/dt-overlays
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6-phytec-check-bus-nodepath
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-mira-enable-lvds
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-mira-peb-eval-01
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-nunki-enable-lvds
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-lcd
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-lcd-018-peb-av-02
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-lcd-018-peb-av-02-res
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-lcd-res
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-peb-wlbt-05
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/allow_color
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/boot.default
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/bootchooser.state_prefix
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/bootchooser.system0.boot
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/bootchooser.system1.boot
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/bootchooser.targets
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.ipaddr
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.linux.devname
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.mode
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.netmask
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.serverip
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dhcp.vendor_id
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/linux.bootargs.base
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/linux.bootargs.fb
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/linux.bootargs.rootfs
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/net.gateway
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/overlays.select
> create mode 100755 meta/recipes-bsp/barebox/files/rules.tmpl
> create mode 100644 meta/recipes-bsp/barebox/files/version.cfg.tmpl
>
> diff --git a/meta-isar/conf/machine/phyboard-mira.conf b/meta-isar/conf/machine/phyboard-mira.conf
> index ee1b75f..a29d919 100644
> --- a/meta-isar/conf/machine/phyboard-mira.conf
> +++ b/meta-isar/conf/machine/phyboard-mira.conf
> @@ -17,3 +17,8 @@ IMAGE_FSTYPES ?= "ubifs-img ubi-img"
> DTB_FILES = "imx6q-phytec-mira-ff-rdk-nand.dtb"
>
> IMAGE_INSTALL += "sshd-regen-keys"
> +IMAGE_INSTALL += "barebox"
> +
> +BAREBOX_CONFIG = "imx_v7_defconfig"
> +BAREBOX_ENV = "phytec-mira-env"
> +BAREBOX_BASE_BIN = "barebox-phytec-phycore-imx6q-som-nand-1gib"
> diff --git a/meta/recipes-bsp/barebox/barebox.inc b/meta/recipes-bsp/barebox/barebox.inc
> new file mode 100644
> index 0000000..6a7b017
> --- /dev/null
> +++ b/meta/recipes-bsp/barebox/barebox.inc
> @@ -0,0 +1,51 @@
> +# This software is a part of ISAR.
> +# Copyright (C) 2022 ilbers GmbH
> +
> +DESCRIPTION ?= "The barebox is a bootloader designed for embedded systems. It \
> + runs on a variety of architectures including x86, ARM, MIPS, \
> + PowerPC and others."
> +CHANGELOG_V = "${PV}+${PR}"
> +MAINTAINER ?= "isar-users <isar-users@googlegroups.com>"
> +
> +DEBIAN_BUILD_DEPENDS ?= "lzop, coreutils, bison, flex"
> +PROVIDES = "virtual/bootloader"
I assume that was blindly copied from Yocto: We have no
"virtual/bootloader" concept (or other virtual/ targets) in Isar.
> +
> +BAREBOX_CONFIG ?= ""
> +BAREBOX_BUILD_DIR = "build"
Worth to make this a variable to inject into templates when you do not
permit overrids (for which there might be no need anyway)? Right, the
kernel recipe does the same thing, unfortunately.
> +BAREBOX_VERSION_EXTENSION ?= ""
> +BAREBOX_ENV ?= ""
> +
> +SRC_URI += "file://rules.tmpl \
> + file://version.cfg.tmpl \
> + file://defaultenv.cfg.tmpl"
> +
> +BAREBOX_CONFIG_FRAGMENTS = "version.cfg defaultenv.cfg"
> +
> +SRC_URI += "${@'file://%s' % d.getVar('BAREBOX_ENV') if d.getVar('BAREBOX_ENV') else ''}"
> +
> +TEMPLATE_FILES += "rules.tmpl version.cfg.tmpl defaultenv.cfg.tmpl"
> +TEMPLATE_VARS += "BAREBOX_CONFIG BAREBOX_BUILD_DIR BAREBOX_VERSION_EXTENSION BAREBOX_ENV BAREBOX_CONFIG_FRAGMENTS"
> +
> +do_prepare_build[cleandirs] += "${S}/debian"
> +do_prepare_build() {
> + deb_debianize
> +
> + if [ -n "${BAREBOX_CONFIG_FRAGMENTS}" ]; then
> + (cd ${WORKDIR} && cp ${BAREBOX_CONFIG_FRAGMENTS} ${S}/)
> + fi
> + if [ -n "${BAREBOX_ENV}" ]; then
> + (cd ${WORKDIR} && cp -r ${BAREBOX_ENV} ${S}/)
> + fi
> +}
> +
> +BAREBOX_BASE_BIN ?= "barebox"
> +
> +do_deploy_bin[dirs] = "${DEPLOY_DIR_IMAGE}"
> +do_deploy_bin() {
> + install -m 644 ${S}/${BAREBOX_BUILD_DIR}/images/${BAREBOX_BASE_BIN}.img ${DEPLOY_DIR_IMAGE}/
> + ln -sf ${BAREBOX_BASE_BIN}.img ${DEPLOY_DIR_IMAGE}/barebox.bin
> +
> + install -m 644 ${S}/${BAREBOX_BUILD_DIR}/.config ${DEPLOY_DIR_IMAGE}/${BAREBOX_BASE_BIN}.config
> + ln -sf ${BAREBOX_BASE_BIN}.config ${DEPLOY_DIR_IMAGE}/barebox.config
> +}
> +addtask deploy_bin before do_deploy_deb after do_dpkg_build
Breaks over sstate - I ran into the same issue elsewhere already.
Uladzimir resolved it there by pulling the artifacts from the built deb
file.
> diff --git a/meta/recipes-bsp/barebox/barebox_2021.04.0-phy5.bb b/meta/recipes-bsp/barebox/barebox_2021.04.0-phy5.bb
> new file mode 100644
> index 0000000..ed8842c
> --- /dev/null
> +++ b/meta/recipes-bsp/barebox/barebox_2021.04.0-phy5.bb
> @@ -0,0 +1,13 @@
> +# This software is a part of ISAR.
> +# Copyright (C) 2022 ilbers GmbH
> +
> +inherit dpkg
> +
> +require barebox.inc
> +
> +SRC_URI += "https://git.phytec.de/barebox/snapshot/barebox-2021.04.0-phy5.tar.bz2 \
Do we really want to or have to promote downstream BSP anti-patterns
here? Upstream barebox does not work?
I'm mentioning this as I worked hard to avoid that bad practice for the
TF-A, OP-TEE, and U-Boot examples we provide.
> + file://0001-of_dump-Add-a-simple-node-check-up.patch"
> +
> +SRC_URI[sha256sum] = "256cca854bf790f8936deec9e5e5060478eb14ba337b04a2a06e73ec5085d1e1"
> +
> +BAREBOX_VERSION_EXTENSION = "-isar"
> diff --git a/meta/recipes-bsp/barebox/files/0001-of_dump-Add-a-simple-node-check-up.patch b/meta/recipes-bsp/barebox/files/0001-of_dump-Add-a-simple-node-check-up.patch
> new file mode 100644
> index 0000000..999b20a
> --- /dev/null
> +++ b/meta/recipes-bsp/barebox/files/0001-of_dump-Add-a-simple-node-check-up.patch
> @@ -0,0 +1,61 @@
> +From 4abae0d9cc23ef055c0054e41c515e92fa5267ce Mon Sep 17 00:00:00 2001
> +From: Yunus Bas <y.bas@phytec.de>
> +Date: Fri, 4 Jun 2021 19:03:04 +0200
> +Subject: [PATCH] of_dump: Add a simple node check-up
> +
> +In case a node is found, the whole node and it's subnodes will be
> +printed. This patch extends the of_dump command with a simple check-up.
> +This is needed e.g. when other scripts need to determine if a
> +devicetree node exists or not.
> +
> +Zero is returned in case the node is found, an error code if not.
> +
> +Signed-off-by: Yunus Bas <y.bas@phytec.de>
> +---
> + commands/of_dump.c | 9 ++++++++-
> + 1 file changed, 8 insertions(+), 1 deletion(-)
> +
> +diff --git a/commands/of_dump.c b/commands/of_dump.c
> +index 6792af3af..d4d9c46a5 100644
> +--- a/commands/of_dump.c
> ++++ b/commands/of_dump.c
> +@@ -32,14 +32,17 @@ static int do_of_dump(int argc, char *argv[])
> + int opt;
> + int ret = 0;
> + int fix = 0;
> ++ int exists = 0;
> + struct device_node *root = NULL, *node, *of_free = NULL;
> + char *dtbfile = NULL;
> + size_t size;
> + const char *nodename;
> + int names_only = 0;
> +
> +- while ((opt = getopt(argc, argv, "Ff:n")) > 0) {
> ++ while ((opt = getopt(argc, argv, "eFf:n")) > 0) {
> + switch (opt) {
> ++ case 'e':
> ++ exists = 1;
> + case 'f':
> + dtbfile = optarg;
> + break;
> +@@ -109,6 +112,9 @@ static int do_of_dump(int argc, char *argv[])
> + printf("Cannot find nodepath %s\n", nodename);
> + ret = -ENOENT;
> + goto out;
> ++ } else if (exists) {
> ++ printf("Found node %s\n", nodename);
> ++ goto out;
> + }
> +
> + if (names_only)
> +@@ -125,6 +131,7 @@ out:
> +
> + BAREBOX_CMD_HELP_START(of_dump)
> + BAREBOX_CMD_HELP_TEXT("Options:")
> ++BAREBOX_CMD_HELP_OPT ("-e", "only check if path or alias exists")
> + BAREBOX_CMD_HELP_OPT ("-f dtb", "work on dtb instead of internal devicetree")
> + BAREBOX_CMD_HELP_OPT ("-F", "return fixed devicetree")
> + BAREBOX_CMD_HELP_OPT ("-n", "Print node names only, no properties")
> +--
> +2.30.0
> +
> diff --git a/meta/recipes-bsp/barebox/files/defaultenv.cfg.tmpl b/meta/recipes-bsp/barebox/files/defaultenv.cfg.tmpl
> new file mode 100644
> index 0000000..5d88f8c
> --- /dev/null
> +++ b/meta/recipes-bsp/barebox/files/defaultenv.cfg.tmpl
> @@ -0,0 +1,5 @@
> +# CONFIG_BAREBOXENV_TARGET is not set
> +# CONFIG_BAREBOXCRC32_TARGET is not set
> +# CONFIG_KERNEL_INSTALL_TARGET is not set
> +# CONFIG_IMD_TARGET is not set
> +CONFIG_DEFAULT_ENVIRONMENT_PATH="${BAREBOX_ENV}"
> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/bin/far b/meta/recipes-bsp/barebox/files/phytec-mira-env/bin/far
> new file mode 100644
> index 0000000..3013462
> --- /dev/null
> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/bin/far
> @@ -0,0 +1,14 @@
> +#!/bin/sh
> +# barebox script far (="Fetch And Reset"):
> +#
> +# The script is useful for a rapid compile and execute development cycle. If
> +# the deployment directory of yocto is the root directory of the tftp server
> +# (e.g. use a bind mount), you can fetch and execute a newly compiled barebox
> +# with this script.
> +
> +cp /mnt/tftp/barebox.bin /dev/ram0
> +if [ $? != 0 ]; then
> + echo "Error: Cannot fetch file "barebox.bin" from host!"
> +else
> + go /dev/ram0
> +fi
> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/bin/rauc_flash_nand_from_mmc b/meta/recipes-bsp/barebox/files/phytec-mira-env/bin/rauc_flash_nand_from_mmc
> new file mode 100644
> index 0000000..207ad7f
> --- /dev/null
> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/bin/rauc_flash_nand_from_mmc
> @@ -0,0 +1,10 @@
> +#!/bin/sh
> +echo "WARNING! This script is deprecated. Please use "rauc-flash-nand" in a Linux environment!"
> +echo "Initializing NAND flash from MMC"
> +[ ! -e /dev/nand0.root.ubi ] && ubiattach /dev/nand0.root
> +ubiupdatevol /dev/nand0.root.ubi.kernel0 /mnt/mmc0.0/zImage
> +ubiupdatevol /dev/nand0.root.ubi.kernel1 /mnt/mmc0.0/zImage
> +ubiupdatevol /dev/nand0.root.ubi.oftree0 /mnt/mmc0.0/oftree
> +ubiupdatevol /dev/nand0.root.ubi.oftree1 /mnt/mmc0.0/oftree
> +cp /mnt/mmc0.0/root.ubifs /dev/nand0.root.ubi.root0
> +cp /mnt/mmc0.0/root.ubifs /dev/nand0.root.ubi.root1
> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/bin/rauc_flash_nand_from_tftp b/meta/recipes-bsp/barebox/files/phytec-mira-env/bin/rauc_flash_nand_from_tftp
> new file mode 100644
> index 0000000..5fcb366
> --- /dev/null
> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/bin/rauc_flash_nand_from_tftp
> @@ -0,0 +1,10 @@
> +#!/bin/sh
> +echo "WARNING! This script is deprecated. Please use "rauc-flash-nand" in a Linux environment!"
> +echo "Initializing NAND flash from TFTP"
> +[ ! -e /dev/nand0.root.ubi ] && ubiattach /dev/nand0.root
> +ubiupdatevol /dev/nand0.root.ubi.kernel0 /mnt/tftp/zImage
> +ubiupdatevol /dev/nand0.root.ubi.kernel1 /mnt/tftp/zImage
> +ubiupdatevol /dev/nand0.root.ubi.oftree0 /mnt/tftp/oftree
> +ubiupdatevol /dev/nand0.root.ubi.oftree1 /mnt/tftp/oftree
> +cp /mnt/tftp/root.ubifs /dev/nand0.root.ubi.root0
> +cp /mnt/tftp/root.ubifs /dev/nand0.root.ubi.root1
> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/bin/rauc_init_nand b/meta/recipes-bsp/barebox/files/phytec-mira-env/bin/rauc_init_nand
> new file mode 100644
> index 0000000..18c6a13
> --- /dev/null
> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/bin/rauc_init_nand
> @@ -0,0 +1,17 @@
> +#!/bin/sh
> +ROOTFSSIZE=479M
> +KERNELSIZE=16M
> +DTBSIZE=1M
> +echo "WARNING! This script is deprecated. Please use "rauc-flash-nand" in a Linux environment!"
> +echo "Formatting /dev/nand0.root"
> +
> +ubiformat -q /dev/nand0.root
> +ubiattach /dev/nand0.root
> +ubimkvol -t static /dev/nand0.root.ubi kernel0 ${KERNELSIZE}
> +ubimkvol -t static /dev/nand0.root.ubi oftree0 ${DTBSIZE}
> +ubimkvol /dev/nand0.root.ubi root0 ${ROOTFSSIZE}
> +ubimkvol -t static /dev/nand0.root.ubi kernel1 ${KERNELSIZE}
> +ubimkvol -t static /dev/nand0.root.ubi oftree1 ${DTBSIZE}
> +ubimkvol /dev/nand0.root.ubi root1 ${ROOTFSSIZE}
> +
> +ubidetach 0
> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/initrd b/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/initrd
> new file mode 100644
> index 0000000..f68bfcb
> --- /dev/null
> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/initrd
> @@ -0,0 +1,9 @@
> +#!/bin/sh
> +path="/mnt/tftp"
> +
> +global.bootm.image="${path}/${global.user}-linux-${global.hostname}"
> +
> +global.bootm.oftree="${path}/${global.user}-oftree-${global.hostname}"
> +global.bootm.initrd="${path}/${global.user}-phytec-initramfs-image-${global.hostname}.cpio.gz"
> +
> +global.linux.bootargs.dyn.root="root=/dev/ram0 ip=$eth0.ipaddr:$eth0.serverip:$eth0.gateway:$eth0.netmask:: quiet"
> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/mmc b/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/mmc
> new file mode 100644
> index 0000000..46761ed
> --- /dev/null
> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/mmc
> @@ -0,0 +1,14 @@
> +#!/bin/sh
> +
> +detect mmc0
> +
> +global.bootm.image="/mnt/mmc0.0/zImage"
> +global.bootm.oftree="/mnt/mmc0.0/oftree"
> +global.linux.bootargs.dyn.root="root=/dev/mmcblk0p2 rootflags='data=journal'"
> +
> +[ -e /env/config-expansions ] && /env/config-expansions
> +
> +if [ -e /env/expansions/dt-overlays ] ; then
> + global overlays.path="/mnt/mmc0.1/overlays"
> + /env/expansions/dt-overlays
> +fi
> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/nand b/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/nand
> new file mode 100644
> index 0000000..f6d71aa
> --- /dev/null
> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/nand
> @@ -0,0 +1,16 @@
> +#!/bin/sh
> +
> +[ ! -e /dev/nand0.root.ubi ] && ubiattach /dev/nand0.root
> +
> +global.bootm.image="/dev/nand0.root.ubi.kernel"
> +global.bootm.oftree="/dev/nand0.root.ubi.oftree"
> +global.linux.bootargs.dyn.root="root=ubi0:root ubi.mtd=root rootfstype=ubifs"
> +
> +[ -e /env/config-expansions ] && /env/config-expansions
> +
> +if [ -e /env/expansions/dt-overlays ] ; then
> + mkdir /mnt/rootfs
> + mount -t ubifs /dev/nand0.root.ubi.root /mnt/rootfs
> + global overlays.path="/mnt/rootfs/overlays"
> + /env/expansions/dt-overlays
> +fi
> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/net b/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/net
> new file mode 100644
> index 0000000..0ad9412
> --- /dev/null
> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/net
> @@ -0,0 +1,21 @@
> +#!/bin/sh
> +
> +path="/mnt/tftp"
> +
> +global.bootm.image="${path}/${global.user}-linux-${global.hostname}"
> +
> +oftree="${path}/${global.user}-oftree-${global.hostname}"
> +if [ -f "${oftree}" ]; then
> + global.bootm.oftree="$oftree"
> +fi
> +
> +nfsroot="/home/${global.user}/nfsroot/${global.hostname}"
> +ip_route_get -b ${global.net.server} global.linux.bootargs.dyn.ip
> +global.linux.bootargs.dyn.root="root=/dev/nfs nfsroot=$nfsroot,vers=3,tcp"
> +
> +[ -e /env/config-expansions ] && /env/config-expansions
> +
> +if [ -e /env/expansions/dt-overlays ] ; then
> + global overlays.path="/mnt/nfs/overlays"
> + /env/expansions/dt-overlays
> +fi
> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/spi b/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/spi
> new file mode 100644
> index 0000000..c4dc3d5
> --- /dev/null
> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/spi
> @@ -0,0 +1,7 @@
> +#!/bin/sh
> +
> +global.bootm.image="/dev/m25p0.kernel"
> +global.bootm.oftree="/dev/m25p0.oftree"
> +global.linux.bootargs.dyn.root="root=ubi0:root ubi.mtd=root rootfstype=ubifs"
> +
> +[ -e /env/config-expansions ] && /env/config-expansions
> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/system0 b/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/system0
> new file mode 100644
> index 0000000..459ae96
> --- /dev/null
> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/system0
> @@ -0,0 +1,16 @@
> +#!/bin/sh
> +
> +[ ! -e /dev/nand0.root.ubi ] && ubiattach /dev/nand0.root
> +
> +global.bootm.image="/dev/nand0.root.ubi.kernel0"
> +global.bootm.oftree="/dev/nand0.root.ubi.oftree0"
> +global.linux.bootargs.dyn.root="root=ubi0:root0 ubi.mtd=root rootfstype=ubifs"
> +
> +[ -e /env/config-expansions ] && /env/config-expansions
> +
> +if [ -e /env/expansions/dt-overlays ] ; then
> + mkdir /mnt/rootfs
> + mount -t ubifs /dev/nand0.root.ubi.root0 /mnt/rootfs
> + global overlays.path="/mnt/rootfs/overlays"
> + /env/expansions/dt-overlays
> +fi
> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/system1 b/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/system1
> new file mode 100644
> index 0000000..c22a180
> --- /dev/null
> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/system1
> @@ -0,0 +1,16 @@
> +#!/bin/sh
> +
> +[ ! -e /dev/nand0.root.ubi ] && ubiattach /dev/nand0.root
> +
> +global.bootm.image="/dev/nand0.root.ubi.kernel1"
> +global.bootm.oftree="/dev/nand0.root.ubi.oftree1"
> +global.linux.bootargs.dyn.root="root=ubi0:root1 ubi.mtd=root rootfstype=ubifs"
> +
> +[ -e /env/config-expansions ] && /env/config-expansions
> +
> +if [ -e /env/expansions/dt-overlays ] ; then
> + mkdir /mnt/rootfs
> + mount -t ubifs /dev/nand0.root.ubi.root1 /mnt/rootfs
> + global overlays.path="/mnt/rootfs/overlays"
> + /env/expansions/dt-overlays
> +fi
> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/config-expansions b/meta/recipes-bsp/barebox/files/phytec-mira-env/config-expansions
> new file mode 100644
> index 0000000..4958f67
> --- /dev/null
> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/config-expansions
> @@ -0,0 +1,28 @@
> +#!/bin/sh
> +
> +. /env/expansions/imx6-phytec-check-bus-nodepath
> +
> +. /env/expansions/imx6qdl-mira-peb-eval-01
> +#. /env/expansions/imx6qdl-mira-enable-lvds
> +#. /env/expansions/imx6qdl-phytec-peb-wlbt-05
> +
> +#use this expansion when a capacitive touchscreen is connected
> +#. /env/expansions/imx6qdl-phytec-lcd-018-peb-av-02
> +
> +#use this expansion when a resisitive touchscreen is connected
> +#. /env/expansions/imx6qdl-phytec-lcd-018-peb-av-02-res
> +
> +# imx6qdl-phytec-lcd: 7" display (AC158 / AC138)
> +#of_property -s -f "/panel-lcd" compatible "edt,etm0700g0edh6"
> +
> +# imx6qdl-phytec-lcd: 7" display (AC104)
> +#of_property -s -f "/panel-lcd" compatible "edt,etm0700g0dh6"
> +
> +# imx6qdl-phytec-lcd: 5.7" display (AC103)
> +#of_property -s -f "/panel-lcd" compatible "edt,etmv570g2dhu"
> +
> +# imx6qdl-phytec-lcd: 4.3" display (AC102)
> +#of_property -s -f "/panel-lcd" compatible "edt,etm0430g0dh6"
> +
> +# imx6qdl-phytec-lcd: 3.5" display (AC167 / AC101)
> +#of_property -s -f "/panel-lcd" compatible "edt,etm0350g0dh6"
> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/dt-overlays b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/dt-overlays
> new file mode 100644
> index 0000000..c3bcc34
> --- /dev/null
> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/dt-overlays
> @@ -0,0 +1,14 @@
> +#!/bin/sh
> +
> +path="$global.overlays.path"
> +
> +if [ -e ${path}/select ] ; then
> + readf ${path}/select global.overlays.select
> +fi
> +
> +for o in $global.overlays.select ; do
> + if [ -e ${path}/${o} ] ; then
> + echo "Add ${path}/${o} overlay"
> + of_overlay ${path}/${o}
> + fi
> +done
> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6-phytec-check-bus-nodepath b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6-phytec-check-bus-nodepath
> new file mode 100644
> index 0000000..ba94f40
> --- /dev/null
> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6-phytec-check-bus-nodepath
> @@ -0,0 +1,7 @@
> +bus="bus"
> +of_dump -e /soc/$bus@2000000
> +
> +if [ $? != 0 ]; then
> + echo "Changing node-name bus to aips-bus"
> + bus="aips-bus"
> +fi
> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-mira-enable-lvds b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-mira-enable-lvds
> new file mode 100644
> index 0000000..73ab490
> --- /dev/null
> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-mira-enable-lvds
> @@ -0,0 +1,2 @@
> +of_fixup_status /ldb/lvds-channel@0
> +of_fixup_status /soc/$bus@2100000/i2c@21a0000/touchctrl@44
> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-mira-peb-eval-01 b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-mira-peb-eval-01
> new file mode 100644
> index 0000000..f4a486f
> --- /dev/null
> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-mira-peb-eval-01
> @@ -0,0 +1,3 @@
> +of_fixup_status /gpio-keys
> +of_fixup_status /user-leds
> +of_property -s -f -e $global.bootm.oftree /soc/$bus@2100000/serial@21ec000 pinctrl-0 </soc/$bus@2000000/pinctrl@20e0000/uart3grp>
> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-nunki-enable-lvds b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-nunki-enable-lvds
> new file mode 100644
> index 0000000..73ab490
> --- /dev/null
> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-nunki-enable-lvds
> @@ -0,0 +1,2 @@
> +of_fixup_status /ldb/lvds-channel@0
> +of_fixup_status /soc/$bus@2100000/i2c@21a0000/touchctrl@44
> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-lcd b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-lcd
> new file mode 100644
> index 0000000..497c3ae
> --- /dev/null
> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-lcd
> @@ -0,0 +1,4 @@
> +#!/bin/sh
> +of_fixup_status /panel-lcd
> +of_fixup_status /ldb/lvds-channel@0
> +of_fixup_status /soc/$bus@2100000/i2c@21a4000/polytouch@38
> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-lcd-018-peb-av-02 b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-lcd-018-peb-av-02
> new file mode 100644
> index 0000000..ce76ca0
> --- /dev/null
> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-lcd-018-peb-av-02
> @@ -0,0 +1,3 @@
> +of_fixup_status /panel-lcd
> +of_fixup_status /display@di0
> +of_fixup_status /soc/$bus@2100000/i2c@21a0000/polytouch@38
> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-lcd-018-peb-av-02-res b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-lcd-018-peb-av-02-res
> new file mode 100644
> index 0000000..381c723
> --- /dev/null
> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-lcd-018-peb-av-02-res
> @@ -0,0 +1,3 @@
> +of_fixup_status /panel-lcd
> +of_fixup_status /display@di0
> +of_fixup_status /soc/$bus@2100000/i2c@21a0000/touchctrl@44
> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-lcd-res b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-lcd-res
> new file mode 100644
> index 0000000..7bf30e5
> --- /dev/null
> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-lcd-res
> @@ -0,0 +1,4 @@
> +#!/bin/sh
> +of_fixup_status /panel-lcd
> +of_fixup_status /ldb/lvds-channel@0
> +of_fixup_status /soc/$bus@2100000/i2c@21a4000/touchctrl@41
> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-peb-wlbt-05 b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-peb-wlbt-05
> new file mode 100644
> index 0000000..5ae4218
> --- /dev/null
> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-peb-wlbt-05
> @@ -0,0 +1,7 @@
> +#!/bin/sh
> +of_fixup_status /soc/$bus@2100000/mmc@2198000
> +of_fixup_status /regulator-wl-en
> +of_fixup_status -d /gpio-keys
> +of_fixup_status /soc/$bus@2100000/serial@21ec000/bluetooth
> +of_fixup_status -d /user-leds
> +of_property -s -f -e $global.bootm.oftree /soc/$bus@2100000/serial@21ec000 pinctrl-0 </soc/$bus@2000000/pinctrl@20e0000/uart3grp_bt>
> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/allow_color b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/allow_color
> new file mode 100644
> index 0000000..c508d53
> --- /dev/null
> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/allow_color
> @@ -0,0 +1 @@
> +false
> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/boot.default b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/boot.default
> new file mode 100644
> index 0000000..d31014d
> --- /dev/null
> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/boot.default
> @@ -0,0 +1 @@
> +bootchooser
> \ No newline at end of file
> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/bootchooser.state_prefix b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/bootchooser.state_prefix
> new file mode 100644
> index 0000000..38c56c1
> --- /dev/null
> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/bootchooser.state_prefix
> @@ -0,0 +1 @@
> +state.bootstate
> \ No newline at end of file
> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/bootchooser.system0.boot b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/bootchooser.system0.boot
> new file mode 100644
> index 0000000..dcc64ac
> --- /dev/null
> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/bootchooser.system0.boot
> @@ -0,0 +1 @@
> +system0
> \ No newline at end of file
> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/bootchooser.system1.boot b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/bootchooser.system1.boot
> new file mode 100644
> index 0000000..2858d07
> --- /dev/null
> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/bootchooser.system1.boot
> @@ -0,0 +1 @@
> +system1
> \ No newline at end of file
> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/bootchooser.targets b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/bootchooser.targets
> new file mode 100644
> index 0000000..cf2ba7c
> --- /dev/null
> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/bootchooser.targets
> @@ -0,0 +1 @@
> +system0 system1
> \ No newline at end of file
> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.ipaddr b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.ipaddr
> new file mode 100644
> index 0000000..4194dcb
> --- /dev/null
> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.ipaddr
> @@ -0,0 +1 @@
> +192.168.3.11
> \ No newline at end of file
> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.linux.devname b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.linux.devname
> new file mode 100644
> index 0000000..563d95d
> --- /dev/null
> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.linux.devname
> @@ -0,0 +1 @@
> +eth0
> \ No newline at end of file
> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.mode b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.mode
> new file mode 100644
> index 0000000..ecdef5b
> --- /dev/null
> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.mode
> @@ -0,0 +1 @@
> +static
> \ No newline at end of file
> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.netmask b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.netmask
> new file mode 100644
> index 0000000..5a279b4
> --- /dev/null
> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.netmask
> @@ -0,0 +1 @@
> +255.255.255.0
> \ No newline at end of file
> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.serverip b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.serverip
> new file mode 100644
> index 0000000..66764ab
> --- /dev/null
> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.serverip
> @@ -0,0 +1 @@
> +192.168.3.10
> \ No newline at end of file
> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dhcp.vendor_id b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dhcp.vendor_id
> new file mode 100644
> index 0000000..b69d5fa
> --- /dev/null
> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dhcp.vendor_id
> @@ -0,0 +1 @@
> +barebox-phyCORE-i.MX6
> \ No newline at end of file
> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/linux.bootargs.base b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/linux.bootargs.base
> new file mode 100644
> index 0000000..efc4ee6
> --- /dev/null
> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/linux.bootargs.base
> @@ -0,0 +1 @@
> +consoleblank=0
> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/linux.bootargs.fb b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/linux.bootargs.fb
> new file mode 100644
> index 0000000..0848ba8
> --- /dev/null
> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/linux.bootargs.fb
> @@ -0,0 +1 @@
> +imxdrm.legacyfb_depth=32
> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/linux.bootargs.rootfs b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/linux.bootargs.rootfs
> new file mode 100644
> index 0000000..199c7b5
> --- /dev/null
> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/linux.bootargs.rootfs
> @@ -0,0 +1 @@
> +rootwait ro fsck.repair=yes
> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/net.gateway b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/net.gateway
> new file mode 100644
> index 0000000..66764ab
> --- /dev/null
> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/net.gateway
> @@ -0,0 +1 @@
> +192.168.3.10
> \ No newline at end of file
> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/overlays.select b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/overlays.select
> new file mode 100644
> index 0000000..e69de29
> diff --git a/meta/recipes-bsp/barebox/files/rules.tmpl b/meta/recipes-bsp/barebox/files/rules.tmpl
> new file mode 100755
> index 0000000..acef5d8
> --- /dev/null
> +++ b/meta/recipes-bsp/barebox/files/rules.tmpl
> @@ -0,0 +1,44 @@
> +#!/usr/bin/make -f
> +
> +# Debian rules for custom Barebox build
> +#
> +# This software is a part of ISAR.
> +# Copyright (C) 2022 ilbers GmbH
> +
> +ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
> +export CROSS_COMPILE=$(DEB_HOST_GNU_TYPE)-
> +endif
> +
> +ifeq ($(DEB_HOST_GNU_CPU), arm)
> +export ARCH=arm
> +endif
> +ifeq ($(DEB_HOST_GNU_CPU), aarch64)
> +export ARCH=arm64
> +endif
> +ifeq ($(DEB_HOST_GNU_CPU), riscv64)
> +export ARCH=riscv
> +endif
> +ifneq (,$(findstring 86,$(DEB_HOST_GNU_CPU)))
> +export ARCH=x86
> +endif
> +
> +export KBUILD_OUTPUT=${BAREBOX_BUILD_DIR}
> +
> +export LDFLAGS="--no-dynamic-linker"
> +
> +override_dh_auto_configure:
> + $(MAKE) $(PARALLEL_MAKE) ${BAREBOX_CONFIG}
> +ifneq (,${BAREBOX_CONFIG_FRAGMENTS})
> + ./scripts/kconfig/merge_config.sh -m -O ${BAREBOX_BUILD_DIR} ${BAREBOX_BUILD_DIR}/.config ${BAREBOX_CONFIG_FRAGMENTS}
> +endif
> + $(MAKE) $(PARALLEL_MAKE) olddefconfig
> +
> +override_dh_auto_build:
> + $(MAKE) $(PARALLEL_MAKE) all
> +
> +override_dh_auto_install:
> + install -d $(CURDIR)/debian/barebox/usr/lib/barebox
> + install -m 644 ${BAREBOX_BUILD_DIR}/barebox.bin $(CURDIR)/debian/barebox/usr/lib/barebox
> +
> +%:
> + dh $@ --parallel
> diff --git a/meta/recipes-bsp/barebox/files/version.cfg.tmpl b/meta/recipes-bsp/barebox/files/version.cfg.tmpl
> new file mode 100644
> index 0000000..26292aa
> --- /dev/null
> +++ b/meta/recipes-bsp/barebox/files/version.cfg.tmpl
> @@ -0,0 +1,2 @@
> +CONFIG_LOCALVERSION="${BAREBOX_VERSION_EXTENSION}"
> +# CONFIG_LOCALVERSION_AUTO is not set
Looks good to me otherwise.
Jan
--
Siemens AG, Technology
Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 18+ messages in thread
* RE: [PATCH 0/7] Rebuild phyBOARD-Mira UBI image generation
2022-02-09 13:54 [PATCH 0/7] Rebuild phyBOARD-Mira UBI image generation Anton Mikanovich
` (6 preceding siblings ...)
2022-02-09 13:54 ` [PATCH 7/7] meta: Add barebox bootloader support Anton Mikanovich
@ 2022-02-10 6:52 ` Schmidt, Adriaan
2022-02-10 8:12 ` Anton Mikanovich
2022-02-18 16:38 ` Anton Mikanovich
7 siblings, 2 replies; 18+ messages in thread
From: Schmidt, Adriaan @ 2022-02-10 6:52 UTC (permalink / raw)
To: Anton Mikanovich, isar-users
Anton Mikanovich, 9. Februar 2022 14:54:
>
> Rebuild UBI image generation implementation to support any count of
> targets with different settings. This also will allow to build the same
> isar-image-base image for both UBI and non-UBI targets.
> Add correct UBI and UBIFS layouts for phyBOARD-Mira after that.
I've just posted a proposal to generally rework image generation
([PATCH 0/6] imagetypes), which overlaps with your patches 1..3.
I admit that I don't fully understand the ubi(-ubifs) process, so my series
might actually break something here. But I can imagine that your image
changes could also get simpler if you put them on top of my imagetypes
patches.
Adriaan
> To be able to flash phyBOARD-Mira with only Isar outputs add also kernel
> and Barebox bootloader recipes.
>
> Anton Mikanovich (7):
> ubi: Move default output paths to image class
> ubi: Remove isar-image-ubi
> ubi: Move tasks reorder into parent task
> ubi: Split UBI configs for phyboard-mira and imx6-sabrelite
> conf: Remove machine-specific defines from multiconfig
> meta-isar: Add linux-phy kernel
> meta: Add barebox bootloader support
>
> meta-isar/classes/ubi-ubifs-img.bbclass | 4 +-
> meta-isar/conf/machine/phyboard-mira.conf | 19 ++++--
> .../multiconfig/phyboard-mira-bullseye.conf | 6 --
> .../fitimage.its.tmpl | 0
> .../ubinize.cfg.tmpl | 0
> .../recipes-core/images/isar-image-base.bb | 11 ++++
> .../recipes-core/images/isar-image-ubi.bb | 27 --------
> .../images/phyboard-mira/ubinize.cfg.tmpl | 26 ++++++++
> ...bsinstall-fix-installing-DT-overlays.patch | 30 +++++++++
> .../linux/linux-phy_5.10.76-phy4.bb | 14 +++++
> meta/classes/fit-img.bbclass | 5 +-
> meta/classes/image.bbclass | 14 +++++
> meta/classes/ubi-img.bbclass | 6 ++
> meta/classes/ubifs-img.bbclass | 5 +-
> meta/recipes-bsp/barebox/barebox.inc | 51 ++++++++++++++++
> .../barebox/barebox_2021.04.0-phy5.bb | 13 ++++
> ...1-of_dump-Add-a-simple-node-check-up.patch | 61 +++++++++++++++++++
> .../barebox/files/defaultenv.cfg.tmpl | 5 ++
> .../barebox/files/phytec-mira-env/bin/far | 14 +++++
> .../bin/rauc_flash_nand_from_mmc | 10 +++
> .../bin/rauc_flash_nand_from_tftp | 10 +++
> .../files/phytec-mira-env/bin/rauc_init_nand | 17 ++++++
> .../barebox/files/phytec-mira-env/boot/initrd | 9 +++
> .../barebox/files/phytec-mira-env/boot/mmc | 14 +++++
> .../barebox/files/phytec-mira-env/boot/nand | 16 +++++
> .../barebox/files/phytec-mira-env/boot/net | 21 +++++++
> .../barebox/files/phytec-mira-env/boot/spi | 7 +++
> .../files/phytec-mira-env/boot/system0 | 16 +++++
> .../files/phytec-mira-env/boot/system1 | 16 +++++
> .../files/phytec-mira-env/config-expansions | 28 +++++++++
> .../phytec-mira-env/expansions/dt-overlays | 14 +++++
> .../expansions/imx6-phytec-check-bus-nodepath | 7 +++
> .../expansions/imx6qdl-mira-enable-lvds | 2 +
> .../expansions/imx6qdl-mira-peb-eval-01 | 3 +
> .../expansions/imx6qdl-nunki-enable-lvds | 2 +
> .../expansions/imx6qdl-phytec-lcd | 4 ++
> .../imx6qdl-phytec-lcd-018-peb-av-02 | 3 +
> .../imx6qdl-phytec-lcd-018-peb-av-02-res | 3 +
> .../expansions/imx6qdl-phytec-lcd-res | 4 ++
> .../expansions/imx6qdl-phytec-peb-wlbt-05 | 7 +++
> .../files/phytec-mira-env/nv/allow_color | 1 +
> .../files/phytec-mira-env/nv/boot.default | 1 +
> .../nv/bootchooser.state_prefix | 1 +
> .../nv/bootchooser.system0.boot | 1 +
> .../nv/bootchooser.system1.boot | 1 +
> .../phytec-mira-env/nv/bootchooser.targets | 1 +
> .../files/phytec-mira-env/nv/dev.eth0.ipaddr | 1 +
> .../phytec-mira-env/nv/dev.eth0.linux.devname | 1 +
> .../files/phytec-mira-env/nv/dev.eth0.mode | 1 +
> .../files/phytec-mira-env/nv/dev.eth0.netmask | 1 +
> .../phytec-mira-env/nv/dev.eth0.serverip | 1 +
> .../files/phytec-mira-env/nv/dhcp.vendor_id | 1 +
> .../phytec-mira-env/nv/linux.bootargs.base | 1 +
> .../phytec-mira-env/nv/linux.bootargs.fb | 1 +
> .../phytec-mira-env/nv/linux.bootargs.rootfs | 1 +
> .../files/phytec-mira-env/nv/net.gateway | 1 +
> .../files/phytec-mira-env/nv/overlays.select | 0
> meta/recipes-bsp/barebox/files/rules.tmpl | 44 +++++++++++++
> .../barebox/files/version.cfg.tmpl | 2 +
> 59 files changed, 545 insertions(+), 41 deletions(-)
> rename meta-isar/recipes-core/images/{files => imx6-
> sabrelite}/fitimage.its.tmpl (100%)
> rename meta-isar/recipes-core/images/{files => imx6-
> sabrelite}/ubinize.cfg.tmpl (100%)
> delete mode 100644 meta-isar/recipes-core/images/isar-image-ubi.bb
> create mode 100644 meta-isar/recipes-core/images/phyboard-
> mira/ubinize.cfg.tmpl
> create mode 100644 meta-isar/recipes-kernel/linux/files/0001-dtbsinstall-
> fix-installing-DT-overlays.patch
> create mode 100644 meta-isar/recipes-kernel/linux/linux-phy_5.10.76-phy4.bb
> create mode 100644 meta/recipes-bsp/barebox/barebox.inc
> create mode 100644 meta/recipes-bsp/barebox/barebox_2021.04.0-phy5.bb
> create mode 100644 meta/recipes-bsp/barebox/files/0001-of_dump-Add-a-simple-
> node-check-up.patch
> create mode 100644 meta/recipes-bsp/barebox/files/defaultenv.cfg.tmpl
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/bin/far
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-
> env/bin/rauc_flash_nand_from_mmc
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-
> env/bin/rauc_flash_nand_from_tftp
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-
> env/bin/rauc_init_nand
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-
> env/boot/initrd
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/boot/mmc
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/boot/nand
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/boot/net
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/boot/spi
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-
> env/boot/system0
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-
> env/boot/system1
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/config-
> expansions
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-
> env/expansions/dt-overlays
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-
> env/expansions/imx6-phytec-check-bus-nodepath
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-
> env/expansions/imx6qdl-mira-enable-lvds
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-
> env/expansions/imx6qdl-mira-peb-eval-01
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-
> env/expansions/imx6qdl-nunki-enable-lvds
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-
> env/expansions/imx6qdl-phytec-lcd
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-
> env/expansions/imx6qdl-phytec-lcd-018-peb-av-02
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-
> env/expansions/imx6qdl-phytec-lcd-018-peb-av-02-res
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-
> env/expansions/imx6qdl-phytec-lcd-res
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-
> env/expansions/imx6qdl-phytec-peb-wlbt-05
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-
> env/nv/allow_color
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-
> env/nv/boot.default
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-
> env/nv/bootchooser.state_prefix
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-
> env/nv/bootchooser.system0.boot
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-
> env/nv/bootchooser.system1.boot
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-
> env/nv/bootchooser.targets
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-
> env/nv/dev.eth0.ipaddr
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-
> env/nv/dev.eth0.linux.devname
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-
> env/nv/dev.eth0.mode
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-
> env/nv/dev.eth0.netmask
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-
> env/nv/dev.eth0.serverip
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-
> env/nv/dhcp.vendor_id
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-
> env/nv/linux.bootargs.base
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-
> env/nv/linux.bootargs.fb
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-
> env/nv/linux.bootargs.rootfs
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-
> env/nv/net.gateway
> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-
> env/nv/overlays.select
> create mode 100755 meta/recipes-bsp/barebox/files/rules.tmpl
> create mode 100644 meta/recipes-bsp/barebox/files/version.cfg.tmpl
>
> --
> 2.25.1
>
> --
> You received this message because you are subscribed to the Google Groups
> "isar-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to isar-users+unsubscribe@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/isar-users/20220209135411.1313521-1-
> amikan%40ilbers.de.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 7/7] meta: Add barebox bootloader support
2022-02-09 18:08 ` Jan Kiszka
@ 2022-02-10 7:58 ` Anton Mikanovich
2022-02-10 8:05 ` Jan Kiszka
0 siblings, 1 reply; 18+ messages in thread
From: Anton Mikanovich @ 2022-02-10 7:58 UTC (permalink / raw)
To: Jan Kiszka, isar-users
09.02.2022 21:08, Jan Kiszka wrote:
> On 09.02.22 14:54, Anton Mikanovich wrote:
>> Add Barebox v2021.04.0 recipe for Phytec boards.
>> Most of the files here are actually just an environment to be apply.
>>
> This also introduces a re-usable for building barebox, analogously to
> U-Boot as it looks to me. The commit should be restructed to reflect
> that. If that abstration will actually help in modelling more boards is
> probably to be seen. But it is a valuable start.
>
> Was the reason to add barebox a board-related one, or was it the chance
> to add a recipe pattern also for that bootloader to Isar?
>
The main reason was adding full support for that board, but yes we can
make it reusable just like u-boot.
Will refactor that in next version.
>> Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
>> ---
>> meta-isar/conf/machine/phyboard-mira.conf | 5 ++
>> meta/recipes-bsp/barebox/barebox.inc | 51 ++++++++++++++++
>> .../barebox/barebox_2021.04.0-phy5.bb | 13 ++++
>> ...1-of_dump-Add-a-simple-node-check-up.patch | 61 +++++++++++++++++++
>> .../barebox/files/defaultenv.cfg.tmpl | 5 ++
>> .../barebox/files/phytec-mira-env/bin/far | 14 +++++
>> .../bin/rauc_flash_nand_from_mmc | 10 +++
>> .../bin/rauc_flash_nand_from_tftp | 10 +++
>> .../files/phytec-mira-env/bin/rauc_init_nand | 17 ++++++
>> .../barebox/files/phytec-mira-env/boot/initrd | 9 +++
>> .../barebox/files/phytec-mira-env/boot/mmc | 14 +++++
>> .../barebox/files/phytec-mira-env/boot/nand | 16 +++++
>> .../barebox/files/phytec-mira-env/boot/net | 21 +++++++
>> .../barebox/files/phytec-mira-env/boot/spi | 7 +++
>> .../files/phytec-mira-env/boot/system0 | 16 +++++
>> .../files/phytec-mira-env/boot/system1 | 16 +++++
>> .../files/phytec-mira-env/config-expansions | 28 +++++++++
>> .../phytec-mira-env/expansions/dt-overlays | 14 +++++
>> .../expansions/imx6-phytec-check-bus-nodepath | 7 +++
>> .../expansions/imx6qdl-mira-enable-lvds | 2 +
>> .../expansions/imx6qdl-mira-peb-eval-01 | 3 +
>> .../expansions/imx6qdl-nunki-enable-lvds | 2 +
>> .../expansions/imx6qdl-phytec-lcd | 4 ++
>> .../imx6qdl-phytec-lcd-018-peb-av-02 | 3 +
>> .../imx6qdl-phytec-lcd-018-peb-av-02-res | 3 +
>> .../expansions/imx6qdl-phytec-lcd-res | 4 ++
>> .../expansions/imx6qdl-phytec-peb-wlbt-05 | 7 +++
>> .../files/phytec-mira-env/nv/allow_color | 1 +
>> .../files/phytec-mira-env/nv/boot.default | 1 +
>> .../nv/bootchooser.state_prefix | 1 +
>> .../nv/bootchooser.system0.boot | 1 +
>> .../nv/bootchooser.system1.boot | 1 +
>> .../phytec-mira-env/nv/bootchooser.targets | 1 +
>> .../files/phytec-mira-env/nv/dev.eth0.ipaddr | 1 +
>> .../phytec-mira-env/nv/dev.eth0.linux.devname | 1 +
>> .../files/phytec-mira-env/nv/dev.eth0.mode | 1 +
>> .../files/phytec-mira-env/nv/dev.eth0.netmask | 1 +
>> .../phytec-mira-env/nv/dev.eth0.serverip | 1 +
>> .../files/phytec-mira-env/nv/dhcp.vendor_id | 1 +
>> .../phytec-mira-env/nv/linux.bootargs.base | 1 +
>> .../phytec-mira-env/nv/linux.bootargs.fb | 1 +
>> .../phytec-mira-env/nv/linux.bootargs.rootfs | 1 +
>> .../files/phytec-mira-env/nv/net.gateway | 1 +
>> .../files/phytec-mira-env/nv/overlays.select | 0
>> meta/recipes-bsp/barebox/files/rules.tmpl | 44 +++++++++++++
>> .../barebox/files/version.cfg.tmpl | 2 +
>> 46 files changed, 424 insertions(+)
>> create mode 100644 meta/recipes-bsp/barebox/barebox.inc
>> create mode 100644 meta/recipes-bsp/barebox/barebox_2021.04.0-phy5.bb
>> create mode 100644 meta/recipes-bsp/barebox/files/0001-of_dump-Add-a-simple-node-check-up.patch
>> create mode 100644 meta/recipes-bsp/barebox/files/defaultenv.cfg.tmpl
>> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/bin/far
>> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/bin/rauc_flash_nand_from_mmc
>> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/bin/rauc_flash_nand_from_tftp
>> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/bin/rauc_init_nand
>> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/boot/initrd
>> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/boot/mmc
>> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/boot/nand
>> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/boot/net
>> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/boot/spi
>> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/boot/system0
>> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/boot/system1
>> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/config-expansions
>> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/dt-overlays
>> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6-phytec-check-bus-nodepath
>> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-mira-enable-lvds
>> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-mira-peb-eval-01
>> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-nunki-enable-lvds
>> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-lcd
>> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-lcd-018-peb-av-02
>> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-lcd-018-peb-av-02-res
>> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-lcd-res
>> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-peb-wlbt-05
>> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/allow_color
>> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/boot.default
>> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/bootchooser.state_prefix
>> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/bootchooser.system0.boot
>> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/bootchooser.system1.boot
>> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/bootchooser.targets
>> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.ipaddr
>> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.linux.devname
>> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.mode
>> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.netmask
>> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.serverip
>> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dhcp.vendor_id
>> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/linux.bootargs.base
>> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/linux.bootargs.fb
>> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/linux.bootargs.rootfs
>> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/net.gateway
>> create mode 100644 meta/recipes-bsp/barebox/files/phytec-mira-env/nv/overlays.select
>> create mode 100755 meta/recipes-bsp/barebox/files/rules.tmpl
>> create mode 100644 meta/recipes-bsp/barebox/files/version.cfg.tmpl
>>
>> diff --git a/meta-isar/conf/machine/phyboard-mira.conf b/meta-isar/conf/machine/phyboard-mira.conf
>> index ee1b75f..a29d919 100644
>> --- a/meta-isar/conf/machine/phyboard-mira.conf
>> +++ b/meta-isar/conf/machine/phyboard-mira.conf
>> @@ -17,3 +17,8 @@ IMAGE_FSTYPES ?= "ubifs-img ubi-img"
>> DTB_FILES = "imx6q-phytec-mira-ff-rdk-nand.dtb"
>>
>> IMAGE_INSTALL += "sshd-regen-keys"
>> +IMAGE_INSTALL += "barebox"
>> +
>> +BAREBOX_CONFIG = "imx_v7_defconfig"
>> +BAREBOX_ENV = "phytec-mira-env"
>> +BAREBOX_BASE_BIN = "barebox-phytec-phycore-imx6q-som-nand-1gib"
>> diff --git a/meta/recipes-bsp/barebox/barebox.inc b/meta/recipes-bsp/barebox/barebox.inc
>> new file mode 100644
>> index 0000000..6a7b017
>> --- /dev/null
>> +++ b/meta/recipes-bsp/barebox/barebox.inc
>> @@ -0,0 +1,51 @@
>> +# This software is a part of ISAR.
>> +# Copyright (C) 2022 ilbers GmbH
>> +
>> +DESCRIPTION ?= "The barebox is a bootloader designed for embedded systems. It \
>> + runs on a variety of architectures including x86, ARM, MIPS, \
>> + PowerPC and others."
>> +CHANGELOG_V = "${PV}+${PR}"
>> +MAINTAINER ?= "isar-users <isar-users@googlegroups.com>"
>> +
>> +DEBIAN_BUILD_DEPENDS ?= "lzop, coreutils, bison, flex"
>> +PROVIDES = "virtual/bootloader"
> I assume that was blindly copied from Yocto: We have no
> "virtual/bootloader" concept (or other virtual/ targets) in Isar.
Yes, that was left from Yocto. Will remove.
>> +
>> +BAREBOX_CONFIG ?= ""
>> +BAREBOX_BUILD_DIR = "build"
> Worth to make this a variable to inject into templates when you do not
> permit overrids (for which there might be no need anyway)? Right, the
> kernel recipe does the same thing, unfortunately.
As you've already noticed kernel recipe use the same way.
Does any downstream project change build location for it?
If not, probably the same will be here.
>> +BAREBOX_VERSION_EXTENSION ?= ""
>> +BAREBOX_ENV ?= ""
>> +
>> +SRC_URI += "file://rules.tmpl \
>> + file://version.cfg.tmpl \
>> + file://defaultenv.cfg.tmpl"
>> +
>> +BAREBOX_CONFIG_FRAGMENTS = "version.cfg defaultenv.cfg"
>> +
>> +SRC_URI += "${@'file://%s' % d.getVar('BAREBOX_ENV') if d.getVar('BAREBOX_ENV') else ''}"
>> +
>> +TEMPLATE_FILES += "rules.tmpl version.cfg.tmpl defaultenv.cfg.tmpl"
>> +TEMPLATE_VARS += "BAREBOX_CONFIG BAREBOX_BUILD_DIR BAREBOX_VERSION_EXTENSION BAREBOX_ENV BAREBOX_CONFIG_FRAGMENTS"
>> +
>> +do_prepare_build[cleandirs] += "${S}/debian"
>> +do_prepare_build() {
>> + deb_debianize
>> +
>> + if [ -n "${BAREBOX_CONFIG_FRAGMENTS}" ]; then
>> + (cd ${WORKDIR} && cp ${BAREBOX_CONFIG_FRAGMENTS} ${S}/)
>> + fi
>> + if [ -n "${BAREBOX_ENV}" ]; then
>> + (cd ${WORKDIR} && cp -r ${BAREBOX_ENV} ${S}/)
>> + fi
>> +}
>> +
>> +BAREBOX_BASE_BIN ?= "barebox"
>> +
>> +do_deploy_bin[dirs] = "${DEPLOY_DIR_IMAGE}"
>> +do_deploy_bin() {
>> + install -m 644 ${S}/${BAREBOX_BUILD_DIR}/images/${BAREBOX_BASE_BIN}.img ${DEPLOY_DIR_IMAGE}/
>> + ln -sf ${BAREBOX_BASE_BIN}.img ${DEPLOY_DIR_IMAGE}/barebox.bin
>> +
>> + install -m 644 ${S}/${BAREBOX_BUILD_DIR}/.config ${DEPLOY_DIR_IMAGE}/${BAREBOX_BASE_BIN}.config
>> + ln -sf ${BAREBOX_BASE_BIN}.config ${DEPLOY_DIR_IMAGE}/barebox.config
>> +}
>> +addtask deploy_bin before do_deploy_deb after do_dpkg_build
> Breaks over sstate - I ran into the same issue elsewhere already.
> Uladzimir resolved it there by pulling the artifacts from the built deb
> file.
Thanks for notice.
>> diff --git a/meta/recipes-bsp/barebox/barebox_2021.04.0-phy5.bb b/meta/recipes-bsp/barebox/barebox_2021.04.0-phy5.bb
>> new file mode 100644
>> index 0000000..ed8842c
>> --- /dev/null
>> +++ b/meta/recipes-bsp/barebox/barebox_2021.04.0-phy5.bb
>> @@ -0,0 +1,13 @@
>> +# This software is a part of ISAR.
>> +# Copyright (C) 2022 ilbers GmbH
>> +
>> +inherit dpkg
>> +
>> +require barebox.inc
>> +
>> +SRC_URI += "https://git.phytec.de/barebox/snapshot/barebox-2021.04.0-phy5.tar.bz2 \
> Do we really want to or have to promote downstream BSP anti-patterns
> here? Upstream barebox does not work?
>
> I'm mentioning this as I worked hard to avoid that bad practice for the
> TF-A, OP-TEE, and U-Boot examples we provide.
Upstream barebox will probably need some patching.
But it should be not so hard to adapt, so I can try.
>> + file://0001-of_dump-Add-a-simple-node-check-up.patch"
>> +
>> +SRC_URI[sha256sum] = "256cca854bf790f8936deec9e5e5060478eb14ba337b04a2a06e73ec5085d1e1"
>> +
>> +BAREBOX_VERSION_EXTENSION = "-isar"
>> diff --git a/meta/recipes-bsp/barebox/files/0001-of_dump-Add-a-simple-node-check-up.patch b/meta/recipes-bsp/barebox/files/0001-of_dump-Add-a-simple-node-check-up.patch
>> new file mode 100644
>> index 0000000..999b20a
>> --- /dev/null
>> +++ b/meta/recipes-bsp/barebox/files/0001-of_dump-Add-a-simple-node-check-up.patch
>> @@ -0,0 +1,61 @@
>> +From 4abae0d9cc23ef055c0054e41c515e92fa5267ce Mon Sep 17 00:00:00 2001
>> +From: Yunus Bas <y.bas@phytec.de>
>> +Date: Fri, 4 Jun 2021 19:03:04 +0200
>> +Subject: [PATCH] of_dump: Add a simple node check-up
>> +
>> +In case a node is found, the whole node and it's subnodes will be
>> +printed. This patch extends the of_dump command with a simple check-up.
>> +This is needed e.g. when other scripts need to determine if a
>> +devicetree node exists or not.
>> +
>> +Zero is returned in case the node is found, an error code if not.
>> +
>> +Signed-off-by: Yunus Bas <y.bas@phytec.de>
>> +---
>> + commands/of_dump.c | 9 ++++++++-
>> + 1 file changed, 8 insertions(+), 1 deletion(-)
>> +
>> +diff --git a/commands/of_dump.c b/commands/of_dump.c
>> +index 6792af3af..d4d9c46a5 100644
>> +--- a/commands/of_dump.c
>> ++++ b/commands/of_dump.c
>> +@@ -32,14 +32,17 @@ static int do_of_dump(int argc, char *argv[])
>> + int opt;
>> + int ret = 0;
>> + int fix = 0;
>> ++ int exists = 0;
>> + struct device_node *root = NULL, *node, *of_free = NULL;
>> + char *dtbfile = NULL;
>> + size_t size;
>> + const char *nodename;
>> + int names_only = 0;
>> +
>> +- while ((opt = getopt(argc, argv, "Ff:n")) > 0) {
>> ++ while ((opt = getopt(argc, argv, "eFf:n")) > 0) {
>> + switch (opt) {
>> ++ case 'e':
>> ++ exists = 1;
>> + case 'f':
>> + dtbfile = optarg;
>> + break;
>> +@@ -109,6 +112,9 @@ static int do_of_dump(int argc, char *argv[])
>> + printf("Cannot find nodepath %s\n", nodename);
>> + ret = -ENOENT;
>> + goto out;
>> ++ } else if (exists) {
>> ++ printf("Found node %s\n", nodename);
>> ++ goto out;
>> + }
>> +
>> + if (names_only)
>> +@@ -125,6 +131,7 @@ out:
>> +
>> + BAREBOX_CMD_HELP_START(of_dump)
>> + BAREBOX_CMD_HELP_TEXT("Options:")
>> ++BAREBOX_CMD_HELP_OPT ("-e", "only check if path or alias exists")
>> + BAREBOX_CMD_HELP_OPT ("-f dtb", "work on dtb instead of internal devicetree")
>> + BAREBOX_CMD_HELP_OPT ("-F", "return fixed devicetree")
>> + BAREBOX_CMD_HELP_OPT ("-n", "Print node names only, no properties")
>> +--
>> +2.30.0
>> +
>> diff --git a/meta/recipes-bsp/barebox/files/defaultenv.cfg.tmpl b/meta/recipes-bsp/barebox/files/defaultenv.cfg.tmpl
>> new file mode 100644
>> index 0000000..5d88f8c
>> --- /dev/null
>> +++ b/meta/recipes-bsp/barebox/files/defaultenv.cfg.tmpl
>> @@ -0,0 +1,5 @@
>> +# CONFIG_BAREBOXENV_TARGET is not set
>> +# CONFIG_BAREBOXCRC32_TARGET is not set
>> +# CONFIG_KERNEL_INSTALL_TARGET is not set
>> +# CONFIG_IMD_TARGET is not set
>> +CONFIG_DEFAULT_ENVIRONMENT_PATH="${BAREBOX_ENV}"
>> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/bin/far b/meta/recipes-bsp/barebox/files/phytec-mira-env/bin/far
>> new file mode 100644
>> index 0000000..3013462
>> --- /dev/null
>> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/bin/far
>> @@ -0,0 +1,14 @@
>> +#!/bin/sh
>> +# barebox script far (="Fetch And Reset"):
>> +#
>> +# The script is useful for a rapid compile and execute development cycle. If
>> +# the deployment directory of yocto is the root directory of the tftp server
>> +# (e.g. use a bind mount), you can fetch and execute a newly compiled barebox
>> +# with this script.
>> +
>> +cp /mnt/tftp/barebox.bin /dev/ram0
>> +if [ $? != 0 ]; then
>> + echo "Error: Cannot fetch file "barebox.bin" from host!"
>> +else
>> + go /dev/ram0
>> +fi
>> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/bin/rauc_flash_nand_from_mmc b/meta/recipes-bsp/barebox/files/phytec-mira-env/bin/rauc_flash_nand_from_mmc
>> new file mode 100644
>> index 0000000..207ad7f
>> --- /dev/null
>> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/bin/rauc_flash_nand_from_mmc
>> @@ -0,0 +1,10 @@
>> +#!/bin/sh
>> +echo "WARNING! This script is deprecated. Please use "rauc-flash-nand" in a Linux environment!"
>> +echo "Initializing NAND flash from MMC"
>> +[ ! -e /dev/nand0.root.ubi ] && ubiattach /dev/nand0.root
>> +ubiupdatevol /dev/nand0.root.ubi.kernel0 /mnt/mmc0.0/zImage
>> +ubiupdatevol /dev/nand0.root.ubi.kernel1 /mnt/mmc0.0/zImage
>> +ubiupdatevol /dev/nand0.root.ubi.oftree0 /mnt/mmc0.0/oftree
>> +ubiupdatevol /dev/nand0.root.ubi.oftree1 /mnt/mmc0.0/oftree
>> +cp /mnt/mmc0.0/root.ubifs /dev/nand0.root.ubi.root0
>> +cp /mnt/mmc0.0/root.ubifs /dev/nand0.root.ubi.root1
>> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/bin/rauc_flash_nand_from_tftp b/meta/recipes-bsp/barebox/files/phytec-mira-env/bin/rauc_flash_nand_from_tftp
>> new file mode 100644
>> index 0000000..5fcb366
>> --- /dev/null
>> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/bin/rauc_flash_nand_from_tftp
>> @@ -0,0 +1,10 @@
>> +#!/bin/sh
>> +echo "WARNING! This script is deprecated. Please use "rauc-flash-nand" in a Linux environment!"
>> +echo "Initializing NAND flash from TFTP"
>> +[ ! -e /dev/nand0.root.ubi ] && ubiattach /dev/nand0.root
>> +ubiupdatevol /dev/nand0.root.ubi.kernel0 /mnt/tftp/zImage
>> +ubiupdatevol /dev/nand0.root.ubi.kernel1 /mnt/tftp/zImage
>> +ubiupdatevol /dev/nand0.root.ubi.oftree0 /mnt/tftp/oftree
>> +ubiupdatevol /dev/nand0.root.ubi.oftree1 /mnt/tftp/oftree
>> +cp /mnt/tftp/root.ubifs /dev/nand0.root.ubi.root0
>> +cp /mnt/tftp/root.ubifs /dev/nand0.root.ubi.root1
>> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/bin/rauc_init_nand b/meta/recipes-bsp/barebox/files/phytec-mira-env/bin/rauc_init_nand
>> new file mode 100644
>> index 0000000..18c6a13
>> --- /dev/null
>> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/bin/rauc_init_nand
>> @@ -0,0 +1,17 @@
>> +#!/bin/sh
>> +ROOTFSSIZE=479M
>> +KERNELSIZE=16M
>> +DTBSIZE=1M
>> +echo "WARNING! This script is deprecated. Please use "rauc-flash-nand" in a Linux environment!"
>> +echo "Formatting /dev/nand0.root"
>> +
>> +ubiformat -q /dev/nand0.root
>> +ubiattach /dev/nand0.root
>> +ubimkvol -t static /dev/nand0.root.ubi kernel0 ${KERNELSIZE}
>> +ubimkvol -t static /dev/nand0.root.ubi oftree0 ${DTBSIZE}
>> +ubimkvol /dev/nand0.root.ubi root0 ${ROOTFSSIZE}
>> +ubimkvol -t static /dev/nand0.root.ubi kernel1 ${KERNELSIZE}
>> +ubimkvol -t static /dev/nand0.root.ubi oftree1 ${DTBSIZE}
>> +ubimkvol /dev/nand0.root.ubi root1 ${ROOTFSSIZE}
>> +
>> +ubidetach 0
>> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/initrd b/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/initrd
>> new file mode 100644
>> index 0000000..f68bfcb
>> --- /dev/null
>> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/initrd
>> @@ -0,0 +1,9 @@
>> +#!/bin/sh
>> +path="/mnt/tftp"
>> +
>> +global.bootm.image="${path}/${global.user}-linux-${global.hostname}"
>> +
>> +global.bootm.oftree="${path}/${global.user}-oftree-${global.hostname}"
>> +global.bootm.initrd="${path}/${global.user}-phytec-initramfs-image-${global.hostname}.cpio.gz"
>> +
>> +global.linux.bootargs.dyn.root="root=/dev/ram0 ip=$eth0.ipaddr:$eth0.serverip:$eth0.gateway:$eth0.netmask:: quiet"
>> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/mmc b/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/mmc
>> new file mode 100644
>> index 0000000..46761ed
>> --- /dev/null
>> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/mmc
>> @@ -0,0 +1,14 @@
>> +#!/bin/sh
>> +
>> +detect mmc0
>> +
>> +global.bootm.image="/mnt/mmc0.0/zImage"
>> +global.bootm.oftree="/mnt/mmc0.0/oftree"
>> +global.linux.bootargs.dyn.root="root=/dev/mmcblk0p2 rootflags='data=journal'"
>> +
>> +[ -e /env/config-expansions ] && /env/config-expansions
>> +
>> +if [ -e /env/expansions/dt-overlays ] ; then
>> + global overlays.path="/mnt/mmc0.1/overlays"
>> + /env/expansions/dt-overlays
>> +fi
>> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/nand b/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/nand
>> new file mode 100644
>> index 0000000..f6d71aa
>> --- /dev/null
>> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/nand
>> @@ -0,0 +1,16 @@
>> +#!/bin/sh
>> +
>> +[ ! -e /dev/nand0.root.ubi ] && ubiattach /dev/nand0.root
>> +
>> +global.bootm.image="/dev/nand0.root.ubi.kernel"
>> +global.bootm.oftree="/dev/nand0.root.ubi.oftree"
>> +global.linux.bootargs.dyn.root="root=ubi0:root ubi.mtd=root rootfstype=ubifs"
>> +
>> +[ -e /env/config-expansions ] && /env/config-expansions
>> +
>> +if [ -e /env/expansions/dt-overlays ] ; then
>> + mkdir /mnt/rootfs
>> + mount -t ubifs /dev/nand0.root.ubi.root /mnt/rootfs
>> + global overlays.path="/mnt/rootfs/overlays"
>> + /env/expansions/dt-overlays
>> +fi
>> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/net b/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/net
>> new file mode 100644
>> index 0000000..0ad9412
>> --- /dev/null
>> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/net
>> @@ -0,0 +1,21 @@
>> +#!/bin/sh
>> +
>> +path="/mnt/tftp"
>> +
>> +global.bootm.image="${path}/${global.user}-linux-${global.hostname}"
>> +
>> +oftree="${path}/${global.user}-oftree-${global.hostname}"
>> +if [ -f "${oftree}" ]; then
>> + global.bootm.oftree="$oftree"
>> +fi
>> +
>> +nfsroot="/home/${global.user}/nfsroot/${global.hostname}"
>> +ip_route_get -b ${global.net.server} global.linux.bootargs.dyn.ip
>> +global.linux.bootargs.dyn.root="root=/dev/nfs nfsroot=$nfsroot,vers=3,tcp"
>> +
>> +[ -e /env/config-expansions ] && /env/config-expansions
>> +
>> +if [ -e /env/expansions/dt-overlays ] ; then
>> + global overlays.path="/mnt/nfs/overlays"
>> + /env/expansions/dt-overlays
>> +fi
>> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/spi b/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/spi
>> new file mode 100644
>> index 0000000..c4dc3d5
>> --- /dev/null
>> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/spi
>> @@ -0,0 +1,7 @@
>> +#!/bin/sh
>> +
>> +global.bootm.image="/dev/m25p0.kernel"
>> +global.bootm.oftree="/dev/m25p0.oftree"
>> +global.linux.bootargs.dyn.root="root=ubi0:root ubi.mtd=root rootfstype=ubifs"
>> +
>> +[ -e /env/config-expansions ] && /env/config-expansions
>> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/system0 b/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/system0
>> new file mode 100644
>> index 0000000..459ae96
>> --- /dev/null
>> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/system0
>> @@ -0,0 +1,16 @@
>> +#!/bin/sh
>> +
>> +[ ! -e /dev/nand0.root.ubi ] && ubiattach /dev/nand0.root
>> +
>> +global.bootm.image="/dev/nand0.root.ubi.kernel0"
>> +global.bootm.oftree="/dev/nand0.root.ubi.oftree0"
>> +global.linux.bootargs.dyn.root="root=ubi0:root0 ubi.mtd=root rootfstype=ubifs"
>> +
>> +[ -e /env/config-expansions ] && /env/config-expansions
>> +
>> +if [ -e /env/expansions/dt-overlays ] ; then
>> + mkdir /mnt/rootfs
>> + mount -t ubifs /dev/nand0.root.ubi.root0 /mnt/rootfs
>> + global overlays.path="/mnt/rootfs/overlays"
>> + /env/expansions/dt-overlays
>> +fi
>> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/system1 b/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/system1
>> new file mode 100644
>> index 0000000..c22a180
>> --- /dev/null
>> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/boot/system1
>> @@ -0,0 +1,16 @@
>> +#!/bin/sh
>> +
>> +[ ! -e /dev/nand0.root.ubi ] && ubiattach /dev/nand0.root
>> +
>> +global.bootm.image="/dev/nand0.root.ubi.kernel1"
>> +global.bootm.oftree="/dev/nand0.root.ubi.oftree1"
>> +global.linux.bootargs.dyn.root="root=ubi0:root1 ubi.mtd=root rootfstype=ubifs"
>> +
>> +[ -e /env/config-expansions ] && /env/config-expansions
>> +
>> +if [ -e /env/expansions/dt-overlays ] ; then
>> + mkdir /mnt/rootfs
>> + mount -t ubifs /dev/nand0.root.ubi.root1 /mnt/rootfs
>> + global overlays.path="/mnt/rootfs/overlays"
>> + /env/expansions/dt-overlays
>> +fi
>> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/config-expansions b/meta/recipes-bsp/barebox/files/phytec-mira-env/config-expansions
>> new file mode 100644
>> index 0000000..4958f67
>> --- /dev/null
>> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/config-expansions
>> @@ -0,0 +1,28 @@
>> +#!/bin/sh
>> +
>> +. /env/expansions/imx6-phytec-check-bus-nodepath
>> +
>> +. /env/expansions/imx6qdl-mira-peb-eval-01
>> +#. /env/expansions/imx6qdl-mira-enable-lvds
>> +#. /env/expansions/imx6qdl-phytec-peb-wlbt-05
>> +
>> +#use this expansion when a capacitive touchscreen is connected
>> +#. /env/expansions/imx6qdl-phytec-lcd-018-peb-av-02
>> +
>> +#use this expansion when a resisitive touchscreen is connected
>> +#. /env/expansions/imx6qdl-phytec-lcd-018-peb-av-02-res
>> +
>> +# imx6qdl-phytec-lcd: 7" display (AC158 / AC138)
>> +#of_property -s -f "/panel-lcd" compatible "edt,etm0700g0edh6"
>> +
>> +# imx6qdl-phytec-lcd: 7" display (AC104)
>> +#of_property -s -f "/panel-lcd" compatible "edt,etm0700g0dh6"
>> +
>> +# imx6qdl-phytec-lcd: 5.7" display (AC103)
>> +#of_property -s -f "/panel-lcd" compatible "edt,etmv570g2dhu"
>> +
>> +# imx6qdl-phytec-lcd: 4.3" display (AC102)
>> +#of_property -s -f "/panel-lcd" compatible "edt,etm0430g0dh6"
>> +
>> +# imx6qdl-phytec-lcd: 3.5" display (AC167 / AC101)
>> +#of_property -s -f "/panel-lcd" compatible "edt,etm0350g0dh6"
>> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/dt-overlays b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/dt-overlays
>> new file mode 100644
>> index 0000000..c3bcc34
>> --- /dev/null
>> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/dt-overlays
>> @@ -0,0 +1,14 @@
>> +#!/bin/sh
>> +
>> +path="$global.overlays.path"
>> +
>> +if [ -e ${path}/select ] ; then
>> + readf ${path}/select global.overlays.select
>> +fi
>> +
>> +for o in $global.overlays.select ; do
>> + if [ -e ${path}/${o} ] ; then
>> + echo "Add ${path}/${o} overlay"
>> + of_overlay ${path}/${o}
>> + fi
>> +done
>> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6-phytec-check-bus-nodepath b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6-phytec-check-bus-nodepath
>> new file mode 100644
>> index 0000000..ba94f40
>> --- /dev/null
>> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6-phytec-check-bus-nodepath
>> @@ -0,0 +1,7 @@
>> +bus="bus"
>> +of_dump -e /soc/$bus@2000000
>> +
>> +if [ $? != 0 ]; then
>> + echo "Changing node-name bus to aips-bus"
>> + bus="aips-bus"
>> +fi
>> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-mira-enable-lvds b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-mira-enable-lvds
>> new file mode 100644
>> index 0000000..73ab490
>> --- /dev/null
>> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-mira-enable-lvds
>> @@ -0,0 +1,2 @@
>> +of_fixup_status /ldb/lvds-channel@0
>> +of_fixup_status /soc/$bus@2100000/i2c@21a0000/touchctrl@44
>> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-mira-peb-eval-01 b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-mira-peb-eval-01
>> new file mode 100644
>> index 0000000..f4a486f
>> --- /dev/null
>> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-mira-peb-eval-01
>> @@ -0,0 +1,3 @@
>> +of_fixup_status /gpio-keys
>> +of_fixup_status /user-leds
>> +of_property -s -f -e $global.bootm.oftree /soc/$bus@2100000/serial@21ec000 pinctrl-0 </soc/$bus@2000000/pinctrl@20e0000/uart3grp>
>> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-nunki-enable-lvds b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-nunki-enable-lvds
>> new file mode 100644
>> index 0000000..73ab490
>> --- /dev/null
>> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-nunki-enable-lvds
>> @@ -0,0 +1,2 @@
>> +of_fixup_status /ldb/lvds-channel@0
>> +of_fixup_status /soc/$bus@2100000/i2c@21a0000/touchctrl@44
>> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-lcd b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-lcd
>> new file mode 100644
>> index 0000000..497c3ae
>> --- /dev/null
>> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-lcd
>> @@ -0,0 +1,4 @@
>> +#!/bin/sh
>> +of_fixup_status /panel-lcd
>> +of_fixup_status /ldb/lvds-channel@0
>> +of_fixup_status /soc/$bus@2100000/i2c@21a4000/polytouch@38
>> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-lcd-018-peb-av-02 b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-lcd-018-peb-av-02
>> new file mode 100644
>> index 0000000..ce76ca0
>> --- /dev/null
>> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-lcd-018-peb-av-02
>> @@ -0,0 +1,3 @@
>> +of_fixup_status /panel-lcd
>> +of_fixup_status /display@di0
>> +of_fixup_status /soc/$bus@2100000/i2c@21a0000/polytouch@38
>> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-lcd-018-peb-av-02-res b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-lcd-018-peb-av-02-res
>> new file mode 100644
>> index 0000000..381c723
>> --- /dev/null
>> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-lcd-018-peb-av-02-res
>> @@ -0,0 +1,3 @@
>> +of_fixup_status /panel-lcd
>> +of_fixup_status /display@di0
>> +of_fixup_status /soc/$bus@2100000/i2c@21a0000/touchctrl@44
>> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-lcd-res b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-lcd-res
>> new file mode 100644
>> index 0000000..7bf30e5
>> --- /dev/null
>> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-lcd-res
>> @@ -0,0 +1,4 @@
>> +#!/bin/sh
>> +of_fixup_status /panel-lcd
>> +of_fixup_status /ldb/lvds-channel@0
>> +of_fixup_status /soc/$bus@2100000/i2c@21a4000/touchctrl@41
>> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-peb-wlbt-05 b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-peb-wlbt-05
>> new file mode 100644
>> index 0000000..5ae4218
>> --- /dev/null
>> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/expansions/imx6qdl-phytec-peb-wlbt-05
>> @@ -0,0 +1,7 @@
>> +#!/bin/sh
>> +of_fixup_status /soc/$bus@2100000/mmc@2198000
>> +of_fixup_status /regulator-wl-en
>> +of_fixup_status -d /gpio-keys
>> +of_fixup_status /soc/$bus@2100000/serial@21ec000/bluetooth
>> +of_fixup_status -d /user-leds
>> +of_property -s -f -e $global.bootm.oftree /soc/$bus@2100000/serial@21ec000 pinctrl-0 </soc/$bus@2000000/pinctrl@20e0000/uart3grp_bt>
>> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/allow_color b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/allow_color
>> new file mode 100644
>> index 0000000..c508d53
>> --- /dev/null
>> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/allow_color
>> @@ -0,0 +1 @@
>> +false
>> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/boot.default b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/boot.default
>> new file mode 100644
>> index 0000000..d31014d
>> --- /dev/null
>> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/boot.default
>> @@ -0,0 +1 @@
>> +bootchooser
>> \ No newline at end of file
>> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/bootchooser.state_prefix b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/bootchooser.state_prefix
>> new file mode 100644
>> index 0000000..38c56c1
>> --- /dev/null
>> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/bootchooser.state_prefix
>> @@ -0,0 +1 @@
>> +state.bootstate
>> \ No newline at end of file
>> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/bootchooser.system0.boot b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/bootchooser.system0.boot
>> new file mode 100644
>> index 0000000..dcc64ac
>> --- /dev/null
>> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/bootchooser.system0.boot
>> @@ -0,0 +1 @@
>> +system0
>> \ No newline at end of file
>> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/bootchooser.system1.boot b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/bootchooser.system1.boot
>> new file mode 100644
>> index 0000000..2858d07
>> --- /dev/null
>> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/bootchooser.system1.boot
>> @@ -0,0 +1 @@
>> +system1
>> \ No newline at end of file
>> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/bootchooser.targets b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/bootchooser.targets
>> new file mode 100644
>> index 0000000..cf2ba7c
>> --- /dev/null
>> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/bootchooser.targets
>> @@ -0,0 +1 @@
>> +system0 system1
>> \ No newline at end of file
>> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.ipaddr b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.ipaddr
>> new file mode 100644
>> index 0000000..4194dcb
>> --- /dev/null
>> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.ipaddr
>> @@ -0,0 +1 @@
>> +192.168.3.11
>> \ No newline at end of file
>> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.linux.devname b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.linux.devname
>> new file mode 100644
>> index 0000000..563d95d
>> --- /dev/null
>> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.linux.devname
>> @@ -0,0 +1 @@
>> +eth0
>> \ No newline at end of file
>> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.mode b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.mode
>> new file mode 100644
>> index 0000000..ecdef5b
>> --- /dev/null
>> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.mode
>> @@ -0,0 +1 @@
>> +static
>> \ No newline at end of file
>> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.netmask b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.netmask
>> new file mode 100644
>> index 0000000..5a279b4
>> --- /dev/null
>> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.netmask
>> @@ -0,0 +1 @@
>> +255.255.255.0
>> \ No newline at end of file
>> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.serverip b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.serverip
>> new file mode 100644
>> index 0000000..66764ab
>> --- /dev/null
>> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dev.eth0.serverip
>> @@ -0,0 +1 @@
>> +192.168.3.10
>> \ No newline at end of file
>> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dhcp.vendor_id b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dhcp.vendor_id
>> new file mode 100644
>> index 0000000..b69d5fa
>> --- /dev/null
>> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/dhcp.vendor_id
>> @@ -0,0 +1 @@
>> +barebox-phyCORE-i.MX6
>> \ No newline at end of file
>> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/linux.bootargs.base b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/linux.bootargs.base
>> new file mode 100644
>> index 0000000..efc4ee6
>> --- /dev/null
>> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/linux.bootargs.base
>> @@ -0,0 +1 @@
>> +consoleblank=0
>> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/linux.bootargs.fb b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/linux.bootargs.fb
>> new file mode 100644
>> index 0000000..0848ba8
>> --- /dev/null
>> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/linux.bootargs.fb
>> @@ -0,0 +1 @@
>> +imxdrm.legacyfb_depth=32
>> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/linux.bootargs.rootfs b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/linux.bootargs.rootfs
>> new file mode 100644
>> index 0000000..199c7b5
>> --- /dev/null
>> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/linux.bootargs.rootfs
>> @@ -0,0 +1 @@
>> +rootwait ro fsck.repair=yes
>> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/net.gateway b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/net.gateway
>> new file mode 100644
>> index 0000000..66764ab
>> --- /dev/null
>> +++ b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/net.gateway
>> @@ -0,0 +1 @@
>> +192.168.3.10
>> \ No newline at end of file
>> diff --git a/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/overlays.select b/meta/recipes-bsp/barebox/files/phytec-mira-env/nv/overlays.select
>> new file mode 100644
>> index 0000000..e69de29
>> diff --git a/meta/recipes-bsp/barebox/files/rules.tmpl b/meta/recipes-bsp/barebox/files/rules.tmpl
>> new file mode 100755
>> index 0000000..acef5d8
>> --- /dev/null
>> +++ b/meta/recipes-bsp/barebox/files/rules.tmpl
>> @@ -0,0 +1,44 @@
>> +#!/usr/bin/make -f
>> +
>> +# Debian rules for custom Barebox build
>> +#
>> +# This software is a part of ISAR.
>> +# Copyright (C) 2022 ilbers GmbH
>> +
>> +ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
>> +export CROSS_COMPILE=$(DEB_HOST_GNU_TYPE)-
>> +endif
>> +
>> +ifeq ($(DEB_HOST_GNU_CPU), arm)
>> +export ARCH=arm
>> +endif
>> +ifeq ($(DEB_HOST_GNU_CPU), aarch64)
>> +export ARCH=arm64
>> +endif
>> +ifeq ($(DEB_HOST_GNU_CPU), riscv64)
>> +export ARCH=riscv
>> +endif
>> +ifneq (,$(findstring 86,$(DEB_HOST_GNU_CPU)))
>> +export ARCH=x86
>> +endif
>> +
>> +export KBUILD_OUTPUT=${BAREBOX_BUILD_DIR}
>> +
>> +export LDFLAGS="--no-dynamic-linker"
>> +
>> +override_dh_auto_configure:
>> + $(MAKE) $(PARALLEL_MAKE) ${BAREBOX_CONFIG}
>> +ifneq (,${BAREBOX_CONFIG_FRAGMENTS})
>> + ./scripts/kconfig/merge_config.sh -m -O ${BAREBOX_BUILD_DIR} ${BAREBOX_BUILD_DIR}/.config ${BAREBOX_CONFIG_FRAGMENTS}
>> +endif
>> + $(MAKE) $(PARALLEL_MAKE) olddefconfig
>> +
>> +override_dh_auto_build:
>> + $(MAKE) $(PARALLEL_MAKE) all
>> +
>> +override_dh_auto_install:
>> + install -d $(CURDIR)/debian/barebox/usr/lib/barebox
>> + install -m 644 ${BAREBOX_BUILD_DIR}/barebox.bin $(CURDIR)/debian/barebox/usr/lib/barebox
>> +
>> +%:
>> + dh $@ --parallel
>> diff --git a/meta/recipes-bsp/barebox/files/version.cfg.tmpl b/meta/recipes-bsp/barebox/files/version.cfg.tmpl
>> new file mode 100644
>> index 0000000..26292aa
>> --- /dev/null
>> +++ b/meta/recipes-bsp/barebox/files/version.cfg.tmpl
>> @@ -0,0 +1,2 @@
>> +CONFIG_LOCALVERSION="${BAREBOX_VERSION_EXTENSION}"
>> +# CONFIG_LOCALVERSION_AUTO is not set
> Looks good to me otherwise.
>
> Jan
>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 7/7] meta: Add barebox bootloader support
2022-02-10 7:58 ` Anton Mikanovich
@ 2022-02-10 8:05 ` Jan Kiszka
2022-02-10 8:45 ` Anton Mikanovich
0 siblings, 1 reply; 18+ messages in thread
From: Jan Kiszka @ 2022-02-10 8:05 UTC (permalink / raw)
To: Anton Mikanovich, isar-users
On 10.02.22 08:58, Anton Mikanovich wrote:
>>> diff --git a/meta/recipes-bsp/barebox/barebox_2021.04.0-phy5.bb
>>> b/meta/recipes-bsp/barebox/barebox_2021.04.0-phy5.bb
>>> new file mode 100644
>>> index 0000000..ed8842c
>>> --- /dev/null
>>> +++ b/meta/recipes-bsp/barebox/barebox_2021.04.0-phy5.bb
>>> @@ -0,0 +1,13 @@
>>> +# This software is a part of ISAR.
>>> +# Copyright (C) 2022 ilbers GmbH
>>> +
>>> +inherit dpkg
>>> +
>>> +require barebox.inc
>>> +
>>> +SRC_URI +=
>>> "https://git.phytec.de/barebox/snapshot/barebox-2021.04.0-phy5.tar.bz2 \
>> Do we really want to or have to promote downstream BSP anti-patterns
>> here? Upstream barebox does not work?
>>
>> I'm mentioning this as I worked hard to avoid that bad practice for the
>> TF-A, OP-TEE, and U-Boot examples we provide.
> Upstream barebox will probably need some patching.
> But it should be not so hard to adapt, so I can try.
If upstream barebox is incomplete then why use it? Upstream U-Boot works
on that board (that's why we used it so far).
Jan
--
Siemens AG, Technology
Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 0/7] Rebuild phyBOARD-Mira UBI image generation
2022-02-10 6:52 ` [PATCH 0/7] Rebuild phyBOARD-Mira UBI image generation Schmidt, Adriaan
@ 2022-02-10 8:12 ` Anton Mikanovich
2022-02-18 16:38 ` Anton Mikanovich
1 sibling, 0 replies; 18+ messages in thread
From: Anton Mikanovich @ 2022-02-10 8:12 UTC (permalink / raw)
To: Schmidt, Adriaan, isar-users
10.02.2022 09:52, Schmidt, Adriaan wrote:
> Anton Mikanovich, 9. Februar 2022 14:54:
>> Rebuild UBI image generation implementation to support any count of
>> targets with different settings. This also will allow to build the same
>> isar-image-base image for both UBI and non-UBI targets.
>> Add correct UBI and UBIFS layouts for phyBOARD-Mira after that.
> I've just posted a proposal to generally rework image generation
> ([PATCH 0/6] imagetypes), which overlaps with your patches 1..3.
> I admit that I don't fully understand the ubi(-ubifs) process, so my series
> might actually break something here. But I can imagine that your image
> changes could also get simpler if you put them on top of my imagetypes
> patches.
>
> Adriaan
The main idea here was to get rid of the old way of using complex image
types (like existing fit image + ubifs image packed inside ubi image)
when new custom image type need to be created for any custom config
(like fit+ubifs->ubi, ubifs->ubi, etc). The new way allows us just to
mention all images included.
It looks like your approach will not brake things too much to implement
the same changes after rebase on it.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 7/7] meta: Add barebox bootloader support
2022-02-10 8:05 ` Jan Kiszka
@ 2022-02-10 8:45 ` Anton Mikanovich
2022-02-10 11:24 ` Jan Kiszka
0 siblings, 1 reply; 18+ messages in thread
From: Anton Mikanovich @ 2022-02-10 8:45 UTC (permalink / raw)
To: Jan Kiszka, isar-users
10.02.2022 11:05, Jan Kiszka wrote:
> On 10.02.22 08:58, Anton Mikanovich wrote:
>>>> diff --git a/meta/recipes-bsp/barebox/barebox_2021.04.0-phy5.bb
>>>> b/meta/recipes-bsp/barebox/barebox_2021.04.0-phy5.bb
>>>> new file mode 100644
>>>> index 0000000..ed8842c
>>>> --- /dev/null
>>>> +++ b/meta/recipes-bsp/barebox/barebox_2021.04.0-phy5.bb
>>>> @@ -0,0 +1,13 @@
>>>> +# This software is a part of ISAR.
>>>> +# Copyright (C) 2022 ilbers GmbH
>>>> +
>>>> +inherit dpkg
>>>> +
>>>> +require barebox.inc
>>>> +
>>>> +SRC_URI +=
>>>> "https://git.phytec.de/barebox/snapshot/barebox-2021.04.0-phy5.tar.bz2 \
>>> Do we really want to or have to promote downstream BSP anti-patterns
>>> here? Upstream barebox does not work?
>>>
>>> I'm mentioning this as I worked hard to avoid that bad practice for the
>>> TF-A, OP-TEE, and U-Boot examples we provide.
>> Upstream barebox will probably need some patching.
>> But it should be not so hard to adapt, so I can try.
> If upstream barebox is incomplete then why use it? Upstream U-Boot works
> on that board (that's why we used it so far).
>
> Jan
>
Upstream barebox actually boots ok, but when using env generated by
phytec yocto it tries to call some extended commands. So there can be
two ways: to patch barebox or to change environment.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 7/7] meta: Add barebox bootloader support
2022-02-10 8:45 ` Anton Mikanovich
@ 2022-02-10 11:24 ` Jan Kiszka
2022-02-10 14:03 ` Anton Mikanovich
0 siblings, 1 reply; 18+ messages in thread
From: Jan Kiszka @ 2022-02-10 11:24 UTC (permalink / raw)
To: Anton Mikanovich, isar-users
On 10.02.22 09:45, Anton Mikanovich wrote:
> 10.02.2022 11:05, Jan Kiszka wrote:
>> On 10.02.22 08:58, Anton Mikanovich wrote:
>>>>> diff --git a/meta/recipes-bsp/barebox/barebox_2021.04.0-phy5.bb
>>>>> b/meta/recipes-bsp/barebox/barebox_2021.04.0-phy5.bb
>>>>> new file mode 100644
>>>>> index 0000000..ed8842c
>>>>> --- /dev/null
>>>>> +++ b/meta/recipes-bsp/barebox/barebox_2021.04.0-phy5.bb
>>>>> @@ -0,0 +1,13 @@
>>>>> +# This software is a part of ISAR.
>>>>> +# Copyright (C) 2022 ilbers GmbH
>>>>> +
>>>>> +inherit dpkg
>>>>> +
>>>>> +require barebox.inc
>>>>> +
>>>>> +SRC_URI +=
>>>>> "https://git.phytec.de/barebox/snapshot/barebox-2021.04.0-phy5.tar.bz2
>>>>> \
>>>> Do we really want to or have to promote downstream BSP anti-patterns
>>>> here? Upstream barebox does not work?
>>>>
>>>> I'm mentioning this as I worked hard to avoid that bad practice for the
>>>> TF-A, OP-TEE, and U-Boot examples we provide.
>>> Upstream barebox will probably need some patching.
>>> But it should be not so hard to adapt, so I can try.
>> If upstream barebox is incomplete then why use it? Upstream U-Boot works
>> on that board (that's why we used it so far).
>>
>> Jan
>>
> Upstream barebox actually boots ok, but when using env generated by
> phytec yocto it tries to call some extended commands. So there can be
> two ways: to patch barebox or to change environment.
>
OK, so what was missing in the integration so far? What is that
yocto-generated env?
Jan
--
Siemens AG, Technology
Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 7/7] meta: Add barebox bootloader support
2022-02-10 11:24 ` Jan Kiszka
@ 2022-02-10 14:03 ` Anton Mikanovich
0 siblings, 0 replies; 18+ messages in thread
From: Anton Mikanovich @ 2022-02-10 14:03 UTC (permalink / raw)
To: Jan Kiszka, isar-users
10.02.2022 14:24, Jan Kiszka wrote:
> OK, so what was missing in the integration so far? What is that
> yocto-generated env?
>
> Jan
Barebox environment is actually internal filesystem with boot scripts,
device tree overlays and persistent variables. You can find it at
meta/recipes-bsp/barebox/files/phytec-mira-env path. Phytec Yocto has
API for its generation, but we can just reuse it as-is.
If speaking about upstream Barebox, the only thing missed is commands
extension patches. Will add it in next version with moving to upstream.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 0/7] Rebuild phyBOARD-Mira UBI image generation
2022-02-10 6:52 ` [PATCH 0/7] Rebuild phyBOARD-Mira UBI image generation Schmidt, Adriaan
2022-02-10 8:12 ` Anton Mikanovich
@ 2022-02-18 16:38 ` Anton Mikanovich
2022-03-31 6:10 ` Schmidt, Adriaan
1 sibling, 1 reply; 18+ messages in thread
From: Anton Mikanovich @ 2022-02-18 16:38 UTC (permalink / raw)
To: Schmidt, Adriaan, isar-users
10.02.2022 09:52, Schmidt, Adriaan wrote:
> Anton Mikanovich, 9. Februar 2022 14:54:
>> Rebuild UBI image generation implementation to support any count of
>> targets with different settings. This also will allow to build the same
>> isar-image-base image for both UBI and non-UBI targets.
>> Add correct UBI and UBIFS layouts for phyBOARD-Mira after that.
> I've just posted a proposal to generally rework image generation
> ([PATCH 0/6] imagetypes), which overlaps with your patches 1..3.
> I admit that I don't fully understand the ubi(-ubifs) process, so my series
> might actually break something here. But I can imagine that your image
> changes could also get simpler if you put them on top of my imagetypes
> patches.
>
> Adriaan
The main "blocking" issue I've found is override implementation. We need to
have a way to use image type related overrides outside recipes included by
INHERIT variable.
Moreover, current implementation of overrides for multiple image types looks
incorrect, because only one type is actually used for override at one
inherit.
^ permalink raw reply [flat|nested] 18+ messages in thread
* RE: [PATCH 0/7] Rebuild phyBOARD-Mira UBI image generation
2022-02-18 16:38 ` Anton Mikanovich
@ 2022-03-31 6:10 ` Schmidt, Adriaan
0 siblings, 0 replies; 18+ messages in thread
From: Schmidt, Adriaan @ 2022-03-31 6:10 UTC (permalink / raw)
To: Anton Mikanovich, isar-users
Anton Mikanovich, Freitag, 18. Februar 2022 17:38:
> 10.02.2022 09:52, Schmidt, Adriaan wrote:
> > Anton Mikanovich, 9. Februar 2022 14:54:
> >> Rebuild UBI image generation implementation to support any count of
> >> targets with different settings. This also will allow to build the same
> >> isar-image-base image for both UBI and non-UBI targets.
> >> Add correct UBI and UBIFS layouts for phyBOARD-Mira after that.
> > I've just posted a proposal to generally rework image generation
> > ([PATCH 0/6] imagetypes), which overlaps with your patches 1..3.
> > I admit that I don't fully understand the ubi(-ubifs) process, so my series
> > might actually break something here. But I can imagine that your image
> > changes could also get simpler if you put them on top of my imagetypes
> > patches.
> >
> > Adriaan
>
> The main "blocking" issue I've found is override implementation. We need to
> have a way to use image type related overrides outside recipes included by
> INHERIT variable.
> Moreover, current implementation of overrides for multiple image types looks
> incorrect, because only one type is actually used for override at one
> inherit.
Turns out that this is really hard to implement.
The actual list of image types is computed from IMAGE_FSTYPES:
- remove any conversions (e.g., "wic.xz" should set "wic" override)
- resolve dependencies (e.g., "ova" should set both "ova" and dependent "wic" overrides)
And it seems that the OVERRIDES variable is something so low-level, that
when I try to append a computed list like this, bitbake breaks in very strange ways.
The current implementation (inspired by OE) only sets the override inside
a local environment created for the single IMAGE_CMD. But that means it is
not available at "general recipe level", so in your concrete case (ubi/fit) you
can't use it to change SRC_URI.
I'm wondering if there is a better way to implement that ubi/fit case.
I notice that the wic class makes quite some effort to process the wks file
from a template, while never touching SRC_URI. Maybe appending to SRC_URI
based on image type is just something that should be avoided? I haven't
thought it through yet...
Adriaan
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2022-03-31 6:10 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-09 13:54 [PATCH 0/7] Rebuild phyBOARD-Mira UBI image generation Anton Mikanovich
2022-02-09 13:54 ` [PATCH 1/7] ubi: Move default output paths to image class Anton Mikanovich
2022-02-09 13:54 ` [PATCH 2/7] ubi: Remove isar-image-ubi Anton Mikanovich
2022-02-09 13:54 ` [PATCH 3/7] ubi: Move tasks reorder into parent task Anton Mikanovich
2022-02-09 13:54 ` [PATCH 4/7] ubi: Split UBI configs for phyboard-mira and imx6-sabrelite Anton Mikanovich
2022-02-09 13:54 ` [PATCH 5/7] conf: Remove machine-specific defines from multiconfig Anton Mikanovich
2022-02-09 13:54 ` [PATCH 6/7] meta-isar: Add linux-phy kernel Anton Mikanovich
2022-02-09 13:54 ` [PATCH 7/7] meta: Add barebox bootloader support Anton Mikanovich
2022-02-09 18:08 ` Jan Kiszka
2022-02-10 7:58 ` Anton Mikanovich
2022-02-10 8:05 ` Jan Kiszka
2022-02-10 8:45 ` Anton Mikanovich
2022-02-10 11:24 ` Jan Kiszka
2022-02-10 14:03 ` Anton Mikanovich
2022-02-10 6:52 ` [PATCH 0/7] Rebuild phyBOARD-Mira UBI image generation Schmidt, Adriaan
2022-02-10 8:12 ` Anton Mikanovich
2022-02-18 16:38 ` Anton Mikanovich
2022-03-31 6:10 ` Schmidt, Adriaan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox