buildroot.busybox.net archive mirror
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/3] board/raspberry: handle dtb overlays for all variants
@ 2023-07-05 16:46 Peter Korsgaard
  2023-07-05 16:46 ` [Buildroot] [PATCH 2/3] board/raspberrypi/post-image.sh: generate genimage config from template if not present Peter Korsgaard
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Peter Korsgaard @ 2023-07-05 16:46 UTC (permalink / raw)
  To: buildroot; +Cc: Martin Bark, Julien Grossholtz

Most rpi defconfigs use dtb overlays, but not rpi0 / rpi2 - Making it harder
to use overlays on those boards as the genimage files have to be tweaked.

To fix this, create the rpi-firmware/overlays directory in the post-build
script if needed and unconditionally include it in the genimage files so
rpi0/rpi2 works consistently with the other variants.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 board/raspberrypi/genimage-raspberrypi0.cfg | 1 +
 board/raspberrypi/genimage-raspberrypi2.cfg | 1 +
 board/raspberrypi/post-build.sh             | 3 +++
 3 files changed, 5 insertions(+)

diff --git a/board/raspberrypi/genimage-raspberrypi0.cfg b/board/raspberrypi/genimage-raspberrypi0.cfg
index 1fa3f5096f..313f85f651 100644
--- a/board/raspberrypi/genimage-raspberrypi0.cfg
+++ b/board/raspberrypi/genimage-raspberrypi0.cfg
@@ -7,6 +7,7 @@ image boot.vfat {
 			"rpi-firmware/config.txt",
 			"rpi-firmware/fixup.dat",
 			"rpi-firmware/start.elf",
+			"rpi-firmware/overlays",
 			"zImage"
 		}
 	}
diff --git a/board/raspberrypi/genimage-raspberrypi2.cfg b/board/raspberrypi/genimage-raspberrypi2.cfg
index acd23e7ca8..dad9275537 100644
--- a/board/raspberrypi/genimage-raspberrypi2.cfg
+++ b/board/raspberrypi/genimage-raspberrypi2.cfg
@@ -7,6 +7,7 @@ image boot.vfat {
 			"rpi-firmware/config.txt",
 			"rpi-firmware/fixup.dat",
 			"rpi-firmware/start.elf",
+			"rpi-firmware/overlays",
 			"zImage"
 		}
 	}
diff --git a/board/raspberrypi/post-build.sh b/board/raspberrypi/post-build.sh
index 5e5eb71100..b24256fcea 100755
--- a/board/raspberrypi/post-build.sh
+++ b/board/raspberrypi/post-build.sh
@@ -9,3 +9,6 @@ if [ -e ${TARGET_DIR}/etc/inittab ]; then
 	sed -i '/GENERIC_SERIAL/a\
 tty1::respawn:/sbin/getty -L  tty1 0 vt100 # HDMI console' ${TARGET_DIR}/etc/inittab
 fi
+
+# exnsure overlays exists for genimage
+mkdir -p "${BINARIES_DIR}/rpi-firmware/overlays"
-- 
2.30.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 2/3] board/raspberrypi/post-image.sh: generate genimage config from template if not present
  2023-07-05 16:46 [Buildroot] [PATCH 1/3] board/raspberry: handle dtb overlays for all variants Peter Korsgaard
@ 2023-07-05 16:46 ` Peter Korsgaard
  2023-09-29  7:13   ` Peter Korsgaard
  2023-07-05 16:46 ` [Buildroot] [PATCH 3/3] board/raspberrypi: drop variant-specific genimage files Peter Korsgaard
  2023-07-06 11:57 ` [Buildroot] [PATCH 1/3] board/raspberry: handle dtb overlays for all variants Peter Korsgaard
  2 siblings, 1 reply; 8+ messages in thread
From: Peter Korsgaard @ 2023-07-05 16:46 UTC (permalink / raw)
  To: buildroot; +Cc: Martin Bark, Julien Grossholtz

The rpi genimage configurations are all identical, except for the boot
partition files, which include:

- Device tree files (*.dtb)
- rpi-firmware files (rpi-firmware/*)
- Kernel image (Image/zImage)

All of these are quite simple to figure out programatically based on the
content of BINARIES_DIR, so extend post-image.sh to fall back to generating
a genimage configuration based on genimage.cfg.in if a board specific one
does not exist.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 board/raspberrypi/genimage.cfg.in | 25 +++++++++++++++++++++++++
 board/raspberrypi/post-image.sh   | 17 +++++++++++++++++
 2 files changed, 42 insertions(+)
 create mode 100644 board/raspberrypi/genimage.cfg.in

diff --git a/board/raspberrypi/genimage.cfg.in b/board/raspberrypi/genimage.cfg.in
new file mode 100644
index 0000000000..fd38b86a0c
--- /dev/null
+++ b/board/raspberrypi/genimage.cfg.in
@@ -0,0 +1,25 @@
+image boot.vfat {
+	vfat {
+		files = {
+#BOOT_FILES#
+		}
+	}
+
+	size = 32M
+}
+
+image sdcard.img {
+	hdimage {
+	}
+
+	partition boot {
+		partition-type = 0xC
+		bootable = "true"
+		image = "boot.vfat"
+	}
+
+	partition rootfs {
+		partition-type = 0x83
+		image = "rootfs.ext4"
+	}
+}
diff --git a/board/raspberrypi/post-image.sh b/board/raspberrypi/post-image.sh
index 6cad20fb9e..9b9eac972b 100755
--- a/board/raspberrypi/post-image.sh
+++ b/board/raspberrypi/post-image.sh
@@ -7,6 +7,23 @@ BOARD_NAME="$(basename ${BOARD_DIR})"
 GENIMAGE_CFG="${BOARD_DIR}/genimage-${BOARD_NAME}.cfg"
 GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
 
+# generate genimage from template if a board specific variant doesn't exists
+if [ ! -e "${GENIMAGE_CFG}" ]; then
+	GENIMAGE_CFG="${BINARIES_DIR}/genimage.cfg"
+	FILES=()
+
+	for i in "${BINARIES_DIR}"/*.dtb "${BINARIES_DIR}"/rpi-firmware/*; do
+		FILES+=( "${i#${BINARIES_DIR}/}" )
+	done
+
+	KERNEL=$(sed -n 's/^kernel=//p' "${BINARIES_DIR}/rpi-firmware/config.txt")
+	FILES+=( "${KERNEL}" )
+
+	BOOT_FILES=$(printf '\\t\\t\\t"%s",\\n' "${FILES[@]}")
+	sed "s|#BOOT_FILES#|${BOOT_FILES}|" "${BOARD_DIR}/genimage.cfg.in" \
+		> "${GENIMAGE_CFG}"
+fi
+
 # Pass an empty rootpath. genimage makes a full copy of the given rootpath to
 # ${GENIMAGE_TMP}/root so passing TARGET_DIR would be a waste of time and disk
 # space. We don't rely on genimage to build the rootfs image, just to insert a
-- 
2.30.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 3/3] board/raspberrypi: drop variant-specific genimage files
  2023-07-05 16:46 [Buildroot] [PATCH 1/3] board/raspberry: handle dtb overlays for all variants Peter Korsgaard
  2023-07-05 16:46 ` [Buildroot] [PATCH 2/3] board/raspberrypi/post-image.sh: generate genimage config from template if not present Peter Korsgaard
@ 2023-07-05 16:46 ` Peter Korsgaard
  2023-07-05 18:10   ` Peter Korsgaard
  2023-09-29  7:13   ` Peter Korsgaard
  2023-07-06 11:57 ` [Buildroot] [PATCH 1/3] board/raspberry: handle dtb overlays for all variants Peter Korsgaard
  2 siblings, 2 replies; 8+ messages in thread
From: Peter Korsgaard @ 2023-07-05 16:46 UTC (permalink / raw)
  To: buildroot

Now that we have a template generating an equivalent genimage configuration.

The generated genimage is identical to these +/- file ordering and a
trailing comma / newline that is ignored by genimage, E.G. for rpi3-64:

@@ -8,9 +8,10 @@
                        "rpi-firmware/cmdline.txt",
                        "rpi-firmware/config.txt",
                        "rpi-firmware/fixup.dat",
-                       "rpi-firmware/start.elf",
                        "rpi-firmware/overlays",
-                       "Image"
+                       "rpi-firmware/start.elf",
+                       "Image",
+
                }

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 board/raspberrypi/genimage-raspberrypi.cfg    | 33 ------------------
 board/raspberrypi/genimage-raspberrypi0.cfg   | 32 -----------------
 board/raspberrypi/genimage-raspberrypi0w.cfg  | 32 -----------------
 board/raspberrypi/genimage-raspberrypi2.cfg   | 32 -----------------
 .../raspberrypi/genimage-raspberrypi3-64.cfg  | 34 -------------------
 board/raspberrypi/genimage-raspberrypi3.cfg   | 34 -------------------
 .../raspberrypi/genimage-raspberrypi4-64.cfg  | 31 -----------------
 board/raspberrypi/genimage-raspberrypi4.cfg   | 31 -----------------
 .../genimage-raspberrypicm4io-64.cfg          | 31 -----------------
 .../raspberrypi/genimage-raspberrypicm4io.cfg | 31 -----------------
 .../genimage-raspberrypizero2w.cfg            | 32 -----------------
 11 files changed, 353 deletions(-)
 delete mode 100644 board/raspberrypi/genimage-raspberrypi.cfg
 delete mode 100644 board/raspberrypi/genimage-raspberrypi0.cfg
 delete mode 100644 board/raspberrypi/genimage-raspberrypi0w.cfg
 delete mode 100644 board/raspberrypi/genimage-raspberrypi2.cfg
 delete mode 100644 board/raspberrypi/genimage-raspberrypi3-64.cfg
 delete mode 100644 board/raspberrypi/genimage-raspberrypi3.cfg
 delete mode 100644 board/raspberrypi/genimage-raspberrypi4-64.cfg
 delete mode 100644 board/raspberrypi/genimage-raspberrypi4.cfg
 delete mode 100644 board/raspberrypi/genimage-raspberrypicm4io-64.cfg
 delete mode 100644 board/raspberrypi/genimage-raspberrypicm4io.cfg
 delete mode 100644 board/raspberrypi/genimage-raspberrypizero2w.cfg

diff --git a/board/raspberrypi/genimage-raspberrypi.cfg b/board/raspberrypi/genimage-raspberrypi.cfg
deleted file mode 100644
index 04be16cce6..0000000000
--- a/board/raspberrypi/genimage-raspberrypi.cfg
+++ /dev/null
@@ -1,33 +0,0 @@
-image boot.vfat {
-	vfat {
-		files = {
-			"bcm2708-rpi-b.dtb",
-			"bcm2708-rpi-b-plus.dtb",
-			"bcm2708-rpi-cm.dtb",
-			"rpi-firmware/bootcode.bin",
-			"rpi-firmware/cmdline.txt",
-			"rpi-firmware/config.txt",
-			"rpi-firmware/fixup.dat",
-			"rpi-firmware/start.elf",
-			"zImage"
-		}
-	}
-
-	size = 32M
-}
-
-image sdcard.img {
-	hdimage {
-	}
-
-	partition boot {
-		partition-type = 0xC
-		bootable = "true"
-		image = "boot.vfat"
-	}
-
-	partition rootfs {
-		partition-type = 0x83
-		image = "rootfs.ext4"
-	}
-}
diff --git a/board/raspberrypi/genimage-raspberrypi0.cfg b/board/raspberrypi/genimage-raspberrypi0.cfg
deleted file mode 100644
index 313f85f651..0000000000
--- a/board/raspberrypi/genimage-raspberrypi0.cfg
+++ /dev/null
@@ -1,32 +0,0 @@
-image boot.vfat {
-	vfat {
-		files = {
-			"bcm2708-rpi-zero.dtb",
-			"rpi-firmware/bootcode.bin",
-			"rpi-firmware/cmdline.txt",
-			"rpi-firmware/config.txt",
-			"rpi-firmware/fixup.dat",
-			"rpi-firmware/start.elf",
-			"rpi-firmware/overlays",
-			"zImage"
-		}
-	}
-
-	size = 32M
-}
-
-image sdcard.img {
-	hdimage {
-	}
-
-	partition boot {
-		partition-type = 0xC
-		bootable = "true"
-		image = "boot.vfat"
-	}
-
-	partition rootfs {
-		partition-type = 0x83
-		image = "rootfs.ext4"
-	}
-}
diff --git a/board/raspberrypi/genimage-raspberrypi0w.cfg b/board/raspberrypi/genimage-raspberrypi0w.cfg
deleted file mode 100644
index de7652f99e..0000000000
--- a/board/raspberrypi/genimage-raspberrypi0w.cfg
+++ /dev/null
@@ -1,32 +0,0 @@
-image boot.vfat {
-	vfat {
-		files = {
-			"bcm2708-rpi-zero-w.dtb",
-			"rpi-firmware/bootcode.bin",
-			"rpi-firmware/cmdline.txt",
-			"rpi-firmware/config.txt",
-			"rpi-firmware/fixup.dat",
-			"rpi-firmware/start.elf",
-			"rpi-firmware/overlays",
-			"zImage"
-		}
-	}
-
-	size = 32M
-}
-
-image sdcard.img {
-	hdimage {
-	}
-
-	partition boot {
-		partition-type = 0xC
-		bootable = "true"
-		image = "boot.vfat"
-	}
-
-	partition rootfs {
-		partition-type = 0x83
-		image = "rootfs.ext4"
-	}
-}
diff --git a/board/raspberrypi/genimage-raspberrypi2.cfg b/board/raspberrypi/genimage-raspberrypi2.cfg
deleted file mode 100644
index dad9275537..0000000000
--- a/board/raspberrypi/genimage-raspberrypi2.cfg
+++ /dev/null
@@ -1,32 +0,0 @@
-image boot.vfat {
-	vfat {
-		files = {
-			"bcm2709-rpi-2-b.dtb",
-			"rpi-firmware/bootcode.bin",
-			"rpi-firmware/cmdline.txt",
-			"rpi-firmware/config.txt",
-			"rpi-firmware/fixup.dat",
-			"rpi-firmware/start.elf",
-			"rpi-firmware/overlays",
-			"zImage"
-		}
-	}
-
-	size = 32M
-}
-
-image sdcard.img {
-	hdimage {
-	}
-
-	partition boot {
-		partition-type = 0xC
-		bootable = "true"
-		image = "boot.vfat"
-	}
-
-	partition rootfs {
-		partition-type = 0x83
-		image = "rootfs.ext4"
-	}
-}
diff --git a/board/raspberrypi/genimage-raspberrypi3-64.cfg b/board/raspberrypi/genimage-raspberrypi3-64.cfg
deleted file mode 100644
index 8cbcd91638..0000000000
--- a/board/raspberrypi/genimage-raspberrypi3-64.cfg
+++ /dev/null
@@ -1,34 +0,0 @@
-image boot.vfat {
-	vfat {
-		files = {
-			"bcm2710-rpi-3-b.dtb",
-			"bcm2710-rpi-3-b-plus.dtb",
-			"bcm2837-rpi-3-b.dtb",
-			"rpi-firmware/bootcode.bin",
-			"rpi-firmware/cmdline.txt",
-			"rpi-firmware/config.txt",
-			"rpi-firmware/fixup.dat",
-			"rpi-firmware/start.elf",
-			"rpi-firmware/overlays",
-			"Image"
-		}
-	}
-
-	size = 32M
-}
-
-image sdcard.img {
-	hdimage {
-	}
-
-	partition boot {
-		partition-type = 0xC
-		bootable = "true"
-		image = "boot.vfat"
-	}
-
-	partition rootfs {
-		partition-type = 0x83
-		image = "rootfs.ext4"
-	}
-}
diff --git a/board/raspberrypi/genimage-raspberrypi3.cfg b/board/raspberrypi/genimage-raspberrypi3.cfg
deleted file mode 100644
index a617823379..0000000000
--- a/board/raspberrypi/genimage-raspberrypi3.cfg
+++ /dev/null
@@ -1,34 +0,0 @@
-image boot.vfat {
-	vfat {
-		files = {
-			"bcm2710-rpi-3-b.dtb",
-			"bcm2710-rpi-3-b-plus.dtb",
-			"bcm2710-rpi-cm3.dtb",
-			"rpi-firmware/bootcode.bin",
-			"rpi-firmware/cmdline.txt",
-			"rpi-firmware/config.txt",
-			"rpi-firmware/fixup.dat",
-			"rpi-firmware/start.elf",
-			"rpi-firmware/overlays",
-			"zImage"
-		}
-	}
-
-	size = 32M
-}
-
-image sdcard.img {
-	hdimage {
-	}
-
-	partition boot {
-		partition-type = 0xC
-		bootable = "true"
-		image = "boot.vfat"
-	}
-
-	partition rootfs {
-		partition-type = 0x83
-		image = "rootfs.ext4"
-	}
-}
diff --git a/board/raspberrypi/genimage-raspberrypi4-64.cfg b/board/raspberrypi/genimage-raspberrypi4-64.cfg
deleted file mode 100644
index 3ae938db20..0000000000
--- a/board/raspberrypi/genimage-raspberrypi4-64.cfg
+++ /dev/null
@@ -1,31 +0,0 @@
-image boot.vfat {
-	vfat {
-		files = {
-			"bcm2711-rpi-4-b.dtb",
-			"rpi-firmware/cmdline.txt",
-			"rpi-firmware/config.txt",
-			"rpi-firmware/fixup4.dat",
-			"rpi-firmware/start4.elf",
-			"rpi-firmware/overlays",
-			"Image"
-		}
-	}
-
-	size = 32M
-}
-
-image sdcard.img {
-	hdimage {
-	}
-
-	partition boot {
-		partition-type = 0xC
-		bootable = "true"
-		image = "boot.vfat"
-	}
-
-	partition rootfs {
-		partition-type = 0x83
-		image = "rootfs.ext4"
-	}
-}
diff --git a/board/raspberrypi/genimage-raspberrypi4.cfg b/board/raspberrypi/genimage-raspberrypi4.cfg
deleted file mode 100644
index 2e578ad556..0000000000
--- a/board/raspberrypi/genimage-raspberrypi4.cfg
+++ /dev/null
@@ -1,31 +0,0 @@
-image boot.vfat {
-	vfat {
-		files = {
-			"bcm2711-rpi-4-b.dtb",
-			"rpi-firmware/cmdline.txt",
-			"rpi-firmware/config.txt",
-			"rpi-firmware/fixup4.dat",
-			"rpi-firmware/start4.elf",
-			"rpi-firmware/overlays",
-			"zImage"
-		}
-	}
-
-	size = 32M
-}
-
-image sdcard.img {
-	hdimage {
-	}
-
-	partition boot {
-		partition-type = 0xC
-		bootable = "true"
-		image = "boot.vfat"
-	}
-
-	partition rootfs {
-		partition-type = 0x83
-		image = "rootfs.ext4"
-	}
-}
diff --git a/board/raspberrypi/genimage-raspberrypicm4io-64.cfg b/board/raspberrypi/genimage-raspberrypicm4io-64.cfg
deleted file mode 100644
index 73d31a57ba..0000000000
--- a/board/raspberrypi/genimage-raspberrypicm4io-64.cfg
+++ /dev/null
@@ -1,31 +0,0 @@
-image boot.vfat {
-	vfat {
-		files = {
-			"bcm2711-rpi-cm4.dtb",
-			"rpi-firmware/cmdline.txt",
-			"rpi-firmware/config.txt",
-			"rpi-firmware/fixup4.dat",
-			"rpi-firmware/start4.elf",
-			"rpi-firmware/overlays",
-			"Image"
-		}
-	}
-
-	size = 32M
-}
-
-image sdcard.img {
-	hdimage {
-	}
-
-	partition boot {
-		partition-type = 0xC
-		bootable = "true"
-		image = "boot.vfat"
-	}
-
-	partition rootfs {
-		partition-type = 0x83
-		image = "rootfs.ext4"
-	}
-}
diff --git a/board/raspberrypi/genimage-raspberrypicm4io.cfg b/board/raspberrypi/genimage-raspberrypicm4io.cfg
deleted file mode 100644
index 4d09b03556..0000000000
--- a/board/raspberrypi/genimage-raspberrypicm4io.cfg
+++ /dev/null
@@ -1,31 +0,0 @@
-image boot.vfat {
-	vfat {
-		files = {
-			"bcm2711-rpi-cm4.dtb",
-			"rpi-firmware/cmdline.txt",
-			"rpi-firmware/config.txt",
-			"rpi-firmware/fixup4.dat",
-			"rpi-firmware/start4.elf",
-			"rpi-firmware/overlays",
-			"zImage"
-		}
-	}
-
-	size = 32M
-}
-
-image sdcard.img {
-	hdimage {
-	}
-
-	partition boot {
-		partition-type = 0xC
-		bootable = "true"
-		image = "boot.vfat"
-	}
-
-	partition rootfs {
-		partition-type = 0x83
-		image = "rootfs.ext4"
-	}
-}
diff --git a/board/raspberrypi/genimage-raspberrypizero2w.cfg b/board/raspberrypi/genimage-raspberrypizero2w.cfg
deleted file mode 100644
index b510fea563..0000000000
--- a/board/raspberrypi/genimage-raspberrypizero2w.cfg
+++ /dev/null
@@ -1,32 +0,0 @@
-image boot.vfat {
-	vfat {
-		files = {
-			"bcm2710-rpi-zero-2-w.dtb",
-			"rpi-firmware/bootcode.bin",
-			"rpi-firmware/cmdline.txt",
-			"rpi-firmware/config.txt",
-			"rpi-firmware/fixup.dat",
-			"rpi-firmware/start.elf",
-			"rpi-firmware/overlays",
-			"zImage"
-		}
-	}
-
-	size = 32M
-}
-
-image sdcard.img {
-	hdimage {
-	}
-
-	partition boot {
-		partition-type = 0xC
-		bootable = "true"
-		image = "boot.vfat"
-	}
-
-	partition rootfs {
-		partition-type = 0x83
-		image = "rootfs.ext4"
-	}
-}
-- 
2.30.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 3/3] board/raspberrypi: drop variant-specific genimage files
  2023-07-05 16:46 ` [Buildroot] [PATCH 3/3] board/raspberrypi: drop variant-specific genimage files Peter Korsgaard
@ 2023-07-05 18:10   ` Peter Korsgaard
  2023-09-29  7:13   ` Peter Korsgaard
  1 sibling, 0 replies; 8+ messages in thread
From: Peter Korsgaard @ 2023-07-05 18:10 UTC (permalink / raw)
  To: buildroot

>>>>> "Peter" == Peter Korsgaard <peter@korsgaard.com> writes:

 > Now that we have a template generating an equivalent genimage configuration.
 > The generated genimage is identical to these +/- file ordering and a
 > trailing comma / newline that is ignored by genimage, E.G. for rpi3-64:

 > @@ -8,9 +8,10 @@
 >                         "rpi-firmware/cmdline.txt",
 >                         "rpi-firmware/config.txt",
 >                         "rpi-firmware/fixup.dat",
 > -                       "rpi-firmware/start.elf",
 >                         "rpi-firmware/overlays",
 > -                       "Image"
 > +                       "rpi-firmware/start.elf",
 > +                       "Image",
 > +
 >                 }

 > Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
 > ---
 >  board/raspberrypi/genimage-raspberrypi.cfg    | 33 ------------------
 >  board/raspberrypi/genimage-raspberrypi0.cfg   | 32 -----------------
 >  board/raspberrypi/genimage-raspberrypi0w.cfg  | 32 -----------------
 >  board/raspberrypi/genimage-raspberrypi2.cfg   | 32 -----------------
 >  .../raspberrypi/genimage-raspberrypi3-64.cfg  | 34 -------------------
 >  board/raspberrypi/genimage-raspberrypi3.cfg   | 34 -------------------
 >  .../raspberrypi/genimage-raspberrypi4-64.cfg  | 31 -----------------
 >  board/raspberrypi/genimage-raspberrypi4.cfg   | 31 -----------------
 >  .../genimage-raspberrypicm4io-64.cfg          | 31 -----------------
 >  .../raspberrypi/genimage-raspberrypicm4io.cfg | 31 -----------------
 >  .../genimage-raspberrypizero2w.cfg            | 32 -----------------
 >  11 files changed, 353 deletions(-)
 >  delete mode 100644 board/raspberrypi/genimage-raspberrypi.cfg
 >  delete mode 100644 board/raspberrypi/genimage-raspberrypi0.cfg
 >  delete mode 100644 board/raspberrypi/genimage-raspberrypi0w.cfg
 >  delete mode 100644 board/raspberrypi/genimage-raspberrypi2.cfg
 >  delete mode 100644 board/raspberrypi/genimage-raspberrypi3-64.cfg
 >  delete mode 100644 board/raspberrypi/genimage-raspberrypi3.cfg
 >  delete mode 100644 board/raspberrypi/genimage-raspberrypi4-64.cfg
 >  delete mode 100644 board/raspberrypi/genimage-raspberrypi4.cfg
 >  delete mode 100644 board/raspberrypi/genimage-raspberrypicm4io-64.cfg
 >  delete mode 100644 board/raspberrypi/genimage-raspberrypicm4io.cfg
 >  delete mode 100644 board/raspberrypi/genimage-raspberrypizero2w.cfg

Ups, forgot to drop the now unused mkdir in post-build.sh from patch
1. Can be fixed while applying.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/3] board/raspberry: handle dtb overlays for all variants
  2023-07-05 16:46 [Buildroot] [PATCH 1/3] board/raspberry: handle dtb overlays for all variants Peter Korsgaard
  2023-07-05 16:46 ` [Buildroot] [PATCH 2/3] board/raspberrypi/post-image.sh: generate genimage config from template if not present Peter Korsgaard
  2023-07-05 16:46 ` [Buildroot] [PATCH 3/3] board/raspberrypi: drop variant-specific genimage files Peter Korsgaard
@ 2023-07-06 11:57 ` Peter Korsgaard
  2023-07-17 12:13   ` Peter Korsgaard
  2 siblings, 1 reply; 8+ messages in thread
From: Peter Korsgaard @ 2023-07-06 11:57 UTC (permalink / raw)
  To: buildroot; +Cc: Martin Bark, Julien Grossholtz

>>>>> "Peter" == Peter Korsgaard <peter@korsgaard.com> writes:

 > Most rpi defconfigs use dtb overlays, but not rpi0 / rpi2 - Making it harder
 > to use overlays on those boards as the genimage files have to be tweaked.

 > To fix this, create the rpi-firmware/overlays directory in the post-build
 > script if needed and unconditionally include it in the genimage files so
 > rpi0/rpi2 works consistently with the other variants.

 > Signed-off-by: Peter Korsgaard <peter@korsgaard.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/3] board/raspberry: handle dtb overlays for all variants
  2023-07-06 11:57 ` [Buildroot] [PATCH 1/3] board/raspberry: handle dtb overlays for all variants Peter Korsgaard
@ 2023-07-17 12:13   ` Peter Korsgaard
  0 siblings, 0 replies; 8+ messages in thread
From: Peter Korsgaard @ 2023-07-17 12:13 UTC (permalink / raw)
  To: buildroot; +Cc: Martin Bark, Julien Grossholtz

>>>>> "Peter" == Peter Korsgaard <peter@korsgaard.com> writes:

>>>>> "Peter" == Peter Korsgaard <peter@korsgaard.com> writes:
 >> Most rpi defconfigs use dtb overlays, but not rpi0 / rpi2 - Making it harder
 >> to use overlays on those boards as the genimage files have to be tweaked.

 >> To fix this, create the rpi-firmware/overlays directory in the post-build
 >> script if needed and unconditionally include it in the genimage files so
 >> rpi0/rpi2 works consistently with the other variants.

 >> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>

 > Committed, thanks.

Committed to 2023.02.x and 2023.05.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 2/3] board/raspberrypi/post-image.sh: generate genimage config from template if not present
  2023-07-05 16:46 ` [Buildroot] [PATCH 2/3] board/raspberrypi/post-image.sh: generate genimage config from template if not present Peter Korsgaard
@ 2023-09-29  7:13   ` Peter Korsgaard
  0 siblings, 0 replies; 8+ messages in thread
From: Peter Korsgaard @ 2023-09-29  7:13 UTC (permalink / raw)
  To: buildroot; +Cc: Martin Bark, Julien Grossholtz

>>>>> "Peter" == Peter Korsgaard <peter@korsgaard.com> writes:

 > The rpi genimage configurations are all identical, except for the boot
 > partition files, which include:

 > - Device tree files (*.dtb)
 > - rpi-firmware files (rpi-firmware/*)
 > - Kernel image (Image/zImage)

 > All of these are quite simple to figure out programatically based on the
 > content of BINARIES_DIR, so extend post-image.sh to fall back to generating
 > a genimage configuration based on genimage.cfg.in if a board specific one
 > does not exist.

 > Signed-off-by: Peter Korsgaard <peter@korsgaard.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 3/3] board/raspberrypi: drop variant-specific genimage files
  2023-07-05 16:46 ` [Buildroot] [PATCH 3/3] board/raspberrypi: drop variant-specific genimage files Peter Korsgaard
  2023-07-05 18:10   ` Peter Korsgaard
@ 2023-09-29  7:13   ` Peter Korsgaard
  1 sibling, 0 replies; 8+ messages in thread
From: Peter Korsgaard @ 2023-09-29  7:13 UTC (permalink / raw)
  To: buildroot

>>>>> "Peter" == Peter Korsgaard <peter@korsgaard.com> writes:

 > Now that we have a template generating an equivalent genimage configuration.
 > The generated genimage is identical to these +/- file ordering and a
 > trailing comma / newline that is ignored by genimage, E.G. for rpi3-64:

 > @@ -8,9 +8,10 @@
 >                         "rpi-firmware/cmdline.txt",
 >                         "rpi-firmware/config.txt",
 >                         "rpi-firmware/fixup.dat",
 > -                       "rpi-firmware/start.elf",
 >                         "rpi-firmware/overlays",
 > -                       "Image"
 > +                       "rpi-firmware/start.elf",
 > +                       "Image",
 > +
 >                 }

 > Signed-off-by: Peter Korsgaard <peter@korsgaard.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2023-09-29  7:14 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-05 16:46 [Buildroot] [PATCH 1/3] board/raspberry: handle dtb overlays for all variants Peter Korsgaard
2023-07-05 16:46 ` [Buildroot] [PATCH 2/3] board/raspberrypi/post-image.sh: generate genimage config from template if not present Peter Korsgaard
2023-09-29  7:13   ` Peter Korsgaard
2023-07-05 16:46 ` [Buildroot] [PATCH 3/3] board/raspberrypi: drop variant-specific genimage files Peter Korsgaard
2023-07-05 18:10   ` Peter Korsgaard
2023-09-29  7:13   ` Peter Korsgaard
2023-07-06 11:57 ` [Buildroot] [PATCH 1/3] board/raspberry: handle dtb overlays for all variants Peter Korsgaard
2023-07-17 12:13   ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).