DistroKit Mailinglist
 help / color / mirror / Atom feed
* [DistroKit] [PATCH 01/10] treewide: images: unify partition labels
@ 2023-11-03 18:24 Roland Hieber
  2023-11-03 18:24 ` [DistroKit] [PATCH 02/10] v7a: image-stm32mp: set GPT Partition Type UUID Roland Hieber
                   ` (9 more replies)
  0 siblings, 10 replies; 16+ messages in thread
From: Roland Hieber @ 2023-11-03 18:24 UTC (permalink / raw)
  To: distrokit; +Cc: Roland Hieber

The partition label is written to the GPT, and systemd-repart can match
on the partition label, which we'll use in a later commit. Set the name
of the first root partitions to the same name ("root-A") to give the
matching algorithm something to work with.

Signed-off-by: Roland Hieber <rhi@pengutronix.de>
---
 configs/platform-rpi1/config/images/hd.config                   | 2 +-
 .../barebox-stm32mp-defaultenv/nv/bootchooser.system0.boot      | 2 +-
 .../barebox-stm32mp-defaultenv/nv/bootchooser.system1.boot      | 2 +-
 configs/platform-v7a/config/images/hd.config                    | 2 +-
 configs/platform-v7a/config/images/stm32mp.config               | 2 +-
 configs/platform-v8a/config/images/imx8m.config                 | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/configs/platform-rpi1/config/images/hd.config b/configs/platform-rpi1/config/images/hd.config
index 7b659a3130ad..949bfa2f182f 100644
--- a/configs/platform-rpi1/config/images/hd.config
+++ b/configs/platform-rpi1/config/images/hd.config
@@ -9,7 +9,7 @@ image @IMAGE@ {
 		partition-type = 0xc
 		bootable = true
 	}
-	partition root {
+	partition root-A {
 		image = root.ext2
 		partition-type-uuid = 69dad710-2ce4-4e3c-b16c-21a1d49abed3 # root-arm
 	}
diff --git a/configs/platform-v7a/barebox-stm32mp-defaultenv/nv/bootchooser.system0.boot b/configs/platform-v7a/barebox-stm32mp-defaultenv/nv/bootchooser.system0.boot
index f3c4d03bcb3e..c0c541c8b2a3 100644
--- a/configs/platform-v7a/barebox-stm32mp-defaultenv/nv/bootchooser.system0.boot
+++ b/configs/platform-v7a/barebox-stm32mp-defaultenv/nv/bootchooser.system0.boot
@@ -1 +1 @@
-mmc0.root-a
+mmc0.root-A
diff --git a/configs/platform-v7a/barebox-stm32mp-defaultenv/nv/bootchooser.system1.boot b/configs/platform-v7a/barebox-stm32mp-defaultenv/nv/bootchooser.system1.boot
index 6fab4940a0ba..1d40e339c2fe 100644
--- a/configs/platform-v7a/barebox-stm32mp-defaultenv/nv/bootchooser.system1.boot
+++ b/configs/platform-v7a/barebox-stm32mp-defaultenv/nv/bootchooser.system1.boot
@@ -1 +1 @@
-mmc0.root-b
+mmc0.root-B
diff --git a/configs/platform-v7a/config/images/hd.config b/configs/platform-v7a/config/images/hd.config
index dba48ca106ae..1d041a0ed0a2 100644
--- a/configs/platform-v7a/config/images/hd.config
+++ b/configs/platform-v7a/config/images/hd.config
@@ -7,7 +7,7 @@ image @IMAGE@ {
 		partition-table-type = "@PARTITION_TABLE_TYPE@"
 	}
 	@BOOTLOADER_PARTITIONS@
-	partition root {
+	partition root-A {
 		image = root.ext2
 		partition-type-uuid = 69dad710-2ce4-4e3c-b16c-21a1d49abed3 # root-arm
 	}
diff --git a/configs/platform-v7a/config/images/stm32mp.config b/configs/platform-v7a/config/images/stm32mp.config
index 38bac2483c9c..9dd1a8c850da 100644
--- a/configs/platform-v7a/config/images/stm32mp.config
+++ b/configs/platform-v7a/config/images/stm32mp.config
@@ -23,7 +23,7 @@ image @IMAGE@ {
 		partition-type-uuid = "4778ed65-bf42-45fa-9c5b-287a1dc4aab1"
 		size = 1M
 	}
-	partition root-a {
+	partition root-A {
 		image = root.ext2
 	}
 	partition root-b {
diff --git a/configs/platform-v8a/config/images/imx8m.config b/configs/platform-v8a/config/images/imx8m.config
index dfe106612426..59cdac1519db 100644
--- a/configs/platform-v8a/config/images/imx8m.config
+++ b/configs/platform-v8a/config/images/imx8m.config
@@ -9,7 +9,7 @@ image @IMAGE@ {
                in-partition-table = false
                holes = {"(440; 32K)"}
        }
-       partition root {
+       partition root-A {
                offset = 2M
                image = "root.ext2"
                partition-type-uuid = b921b045-1df0-41c3-af44-4c6f280d3fae
-- 
2.39.2




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

* [DistroKit] [PATCH 02/10] v7a: image-stm32mp: set GPT Partition Type UUID
  2023-11-03 18:24 [DistroKit] [PATCH 01/10] treewide: images: unify partition labels Roland Hieber
@ 2023-11-03 18:24 ` Roland Hieber
  2023-11-06  8:21   ` Ahmad Fatoum
  2023-11-03 18:24 ` [DistroKit] [PATCH 03/10] treewide: images: remove size specifications for root partitions Roland Hieber
                   ` (8 subsequent siblings)
  9 siblings, 1 reply; 16+ messages in thread
From: Roland Hieber @ 2023-11-03 18:24 UTC (permalink / raw)
  To: distrokit; +Cc: Roland Hieber

This was forgotten in commit 1022b05b735f6081cf1b.

Fixes: 1022b05b735f6081cf1b (2023-10-20, "images: convert to GPT format")
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
---
 configs/platform-v7a/config/images/stm32mp.config | 1 +
 1 file changed, 1 insertion(+)

diff --git a/configs/platform-v7a/config/images/stm32mp.config b/configs/platform-v7a/config/images/stm32mp.config
index 9dd1a8c850da..c25f399b2b2a 100644
--- a/configs/platform-v7a/config/images/stm32mp.config
+++ b/configs/platform-v7a/config/images/stm32mp.config
@@ -24,6 +24,7 @@ image @IMAGE@ {
 		size = 1M
 	}
 	partition root-A {
+		partition-type-uuid = 69dad710-2ce4-4e3c-b16c-21a1d49abed3 # root-arm
 		image = root.ext2
 	}
 	partition root-b {
-- 
2.39.2




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

* [DistroKit] [PATCH 03/10] treewide: images: remove size specifications for root partitions
  2023-11-03 18:24 [DistroKit] [PATCH 01/10] treewide: images: unify partition labels Roland Hieber
  2023-11-03 18:24 ` [DistroKit] [PATCH 02/10] v7a: image-stm32mp: set GPT Partition Type UUID Roland Hieber
@ 2023-11-03 18:24 ` Roland Hieber
  2023-11-06  8:21   ` Ahmad Fatoum
  2023-11-03 18:24 ` [DistroKit] [PATCH 04/10] treewide: images: increase size of all qemu images to 1 GiB Roland Hieber
                   ` (7 subsequent siblings)
  9 siblings, 1 reply; 16+ messages in thread
From: Roland Hieber @ 2023-11-03 18:24 UTC (permalink / raw)
  To: distrokit; +Cc: Roland Hieber

With current rootfs sizes of below 200 MiB there is no need to have a
512 MiB root partition, which will be a lot larger than the file system
it contains, and which will also all have to be written to the SD card.
Let genimage determine the partition size based on the file system image
it contains, thereby reducing the size of the generated disk images.

Signed-off-by: Roland Hieber <rhi@pengutronix.de>
---
 configs/platform-mips/config/images/ar9331.config         | 1 -
 configs/platform-mips/config/images/malta.config          | 1 -
 configs/platform-mipsel/config/images/malta.config        | 1 -
 configs/platform-v7a/config/images/vexpress.config        | 1 -
 configs/platform-v7a_noneon/config/images/vexpress.config | 1 -
 configs/platform-v8a/config/images/espressobin.config     | 1 -
 6 files changed, 6 deletions(-)

diff --git a/configs/platform-mips/config/images/ar9331.config b/configs/platform-mips/config/images/ar9331.config
index f26627f84cc0..7685781d231a 100644
--- a/configs/platform-mips/config/images/ar9331.config
+++ b/configs/platform-mips/config/images/ar9331.config
@@ -9,7 +9,6 @@ image @IMAGE@ {
 	partition root-A {
 		image = root.ext2
 		partition-type-uuid = e9434544-6e2c-47cc-bae2-12d6deafb44c # root-mips
-		size = 512M
 	}
 	partition data {
 		autoresize = true
diff --git a/configs/platform-mips/config/images/malta.config b/configs/platform-mips/config/images/malta.config
index f26627f84cc0..7685781d231a 100644
--- a/configs/platform-mips/config/images/malta.config
+++ b/configs/platform-mips/config/images/malta.config
@@ -9,7 +9,6 @@ image @IMAGE@ {
 	partition root-A {
 		image = root.ext2
 		partition-type-uuid = e9434544-6e2c-47cc-bae2-12d6deafb44c # root-mips
-		size = 512M
 	}
 	partition data {
 		autoresize = true
diff --git a/configs/platform-mipsel/config/images/malta.config b/configs/platform-mipsel/config/images/malta.config
index c873c7e8b724..71e367276072 100644
--- a/configs/platform-mipsel/config/images/malta.config
+++ b/configs/platform-mipsel/config/images/malta.config
@@ -9,7 +9,6 @@ image @IMAGE@ {
 	partition root-A {
 		image = root.ext2
 		partition-type-uuid = 37c58c8a-d913-4156-a25f-48b1b64e07f0 # root-mips-le
-		size = 512M
 	}
 	partition data {
 		autoresize = true
diff --git a/configs/platform-v7a/config/images/vexpress.config b/configs/platform-v7a/config/images/vexpress.config
index 87eaedfe8b82..67c7638a59b8 100644
--- a/configs/platform-v7a/config/images/vexpress.config
+++ b/configs/platform-v7a/config/images/vexpress.config
@@ -9,7 +9,6 @@ image @IMAGE@ {
 	partition root-A {
 		image = root.ext2
 		partition-type-uuid = 69dad710-2ce4-4e3c-b16c-21a1d49abed3 # root-arm
-		size = 96M
 	}
 	partition root-B {
 		image = root.ext2
diff --git a/configs/platform-v7a_noneon/config/images/vexpress.config b/configs/platform-v7a_noneon/config/images/vexpress.config
index 0712ad82ce96..4200f95b7725 100644
--- a/configs/platform-v7a_noneon/config/images/vexpress.config
+++ b/configs/platform-v7a_noneon/config/images/vexpress.config
@@ -9,7 +9,6 @@ image @IMAGE@ {
 	partition root-A {
 		image = root.ext2
 		partition-type-uuid = 69dad710-2ce4-4e3c-b16c-21a1d49abed3 # root-arm
-		size = 192M
 	}
 	partition data {
 		autoresize = true
diff --git a/configs/platform-v8a/config/images/espressobin.config b/configs/platform-v8a/config/images/espressobin.config
index 188bb9ae4d9e..e9f4460c9a9a 100644
--- a/configs/platform-v8a/config/images/espressobin.config
+++ b/configs/platform-v8a/config/images/espressobin.config
@@ -6,7 +6,6 @@ image @IMAGE@ {
 	partition root-A {
 		image = root.ext2
 		partition-type-uuid = 69dad710-2ce4-4e3c-b16c-21a1d49abed3 # root-arm
-		size = 512M
 	}
 	partition data {
 		size = 512M
-- 
2.39.2




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

* [DistroKit] [PATCH 04/10] treewide: images: increase size of all qemu images to 1 GiB
  2023-11-03 18:24 [DistroKit] [PATCH 01/10] treewide: images: unify partition labels Roland Hieber
  2023-11-03 18:24 ` [DistroKit] [PATCH 02/10] v7a: image-stm32mp: set GPT Partition Type UUID Roland Hieber
  2023-11-03 18:24 ` [DistroKit] [PATCH 03/10] treewide: images: remove size specifications for root partitions Roland Hieber
@ 2023-11-03 18:24 ` Roland Hieber
  2023-11-03 18:24 ` [DistroKit] [PATCH 05/10] datapartition: generate partitions via systemd-repart Roland Hieber
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 16+ messages in thread
From: Roland Hieber @ 2023-11-03 18:24 UTC (permalink / raw)
  To: distrokit; +Cc: Roland Hieber

qemu sets the size of the emulated disk as the size of the underlying
image file. We want to fit two rootfs partitions and one data partition
of 200 MiB each in there, which will need at least 600 MiB of disk
space. Round up to the next power of two, so qemu can work with it,
which results in 1 GiB, which the other qemu images already have too.

Signed-off-by: Roland Hieber <rhi@pengutronix.de>
---
 configs/platform-v7a/config/images/vexpress.config        | 2 +-
 configs/platform-v7a_noneon/config/images/vexpress.config | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/configs/platform-v7a/config/images/vexpress.config b/configs/platform-v7a/config/images/vexpress.config
index 67c7638a59b8..0254ef670227 100644
--- a/configs/platform-v7a/config/images/vexpress.config
+++ b/configs/platform-v7a/config/images/vexpress.config
@@ -1,6 +1,6 @@
 image @IMAGE@ {
 	/* Note: qemu will complain if the SD card size is not a power of two */
-	size = 256M
+	size = 1G
 	hdimage {
 		align = 1M
 		fill = true
diff --git a/configs/platform-v7a_noneon/config/images/vexpress.config b/configs/platform-v7a_noneon/config/images/vexpress.config
index 4200f95b7725..7a5e92ee4033 100644
--- a/configs/platform-v7a_noneon/config/images/vexpress.config
+++ b/configs/platform-v7a_noneon/config/images/vexpress.config
@@ -1,6 +1,6 @@
 image @IMAGE@ {
 	/* Note: qemu will complain if the SD card size is not a power of two */
-	size = 256M
+	size = 1G
 	hdimage {
 		align = 1M
 		fill = true
-- 
2.39.2




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

* [DistroKit] [PATCH 05/10] datapartition: generate partitions via systemd-repart
  2023-11-03 18:24 [DistroKit] [PATCH 01/10] treewide: images: unify partition labels Roland Hieber
                   ` (2 preceding siblings ...)
  2023-11-03 18:24 ` [DistroKit] [PATCH 04/10] treewide: images: increase size of all qemu images to 1 GiB Roland Hieber
@ 2023-11-03 18:24 ` Roland Hieber
  2023-11-03 18:24 ` [DistroKit] [PATCH 06/10] datapartition: add missing mount unit Roland Hieber
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 16+ messages in thread
From: Roland Hieber @ 2023-11-03 18:24 UTC (permalink / raw)
  To: distrokit; +Cc: Roland Hieber

Generating the second rootfs and the data partition on the first boot
has the advantage that the generated images can get even smaller, and we
can resize the data partition on-the-fly to fill the available space on
the boot medium.

Specify a minimum of 200 MiB for the first and second root partitions
just so that both are of equal size. (This will fit any root.ext2 in any
of our platforms with about 25% of space left.) If the first root
partition in the image is smaller, it will get resized too, including
the filesystem it contains.

Remove the old systemd-autoformat service and the mkfs-ext4 udev rule,
which also only handled the case where the data partition was the third
partition on the disk (which is not always the case anymore since we
have partitions for barebox-state or device-specific firmware).

Signed-off-by: Roland Hieber <rhi@pengutronix.de>
---
 projectroot/etc/rc.once.d/repart                  |  3 +++
 projectroot/etc/repart.rc-once.d/10-root.conf     |  5 +++++
 projectroot/etc/repart.rc-once.d/20-root.conf     |  6 ++++++
 projectroot/etc/repart.rc-once.d/30-data.conf     |  6 ++++++
 .../systemd/system/systemd-autoformat@.service    | 15 ---------------
 .../usr/lib/udev/rules.d/91-mkfs-ext4.rules       |  5 -----
 rules/datapartition.in                            |  3 +++
 rules/datapartition.make                          | 11 +++++++----
 8 files changed, 30 insertions(+), 24 deletions(-)
 create mode 100755 projectroot/etc/rc.once.d/repart
 create mode 100644 projectroot/etc/repart.rc-once.d/10-root.conf
 create mode 100644 projectroot/etc/repart.rc-once.d/20-root.conf
 create mode 100644 projectroot/etc/repart.rc-once.d/30-data.conf
 delete mode 100644 projectroot/usr/lib/systemd/system/systemd-autoformat@.service
 delete mode 100644 projectroot/usr/lib/udev/rules.d/91-mkfs-ext4.rules

diff --git a/projectroot/etc/rc.once.d/repart b/projectroot/etc/rc.once.d/repart
new file mode 100755
index 000000000000..675c4e3e57f4
--- /dev/null
+++ b/projectroot/etc/rc.once.d/repart
@@ -0,0 +1,3 @@
+#!/bin/sh
+echo "Repartitioning the root disk..."
+systemd-repart --dry-run=no --definitions=/etc/repart.rc-once.d/
diff --git a/projectroot/etc/repart.rc-once.d/10-root.conf b/projectroot/etc/repart.rc-once.d/10-root.conf
new file mode 100644
index 000000000000..ae6f2c21e286
--- /dev/null
+++ b/projectroot/etc/repart.rc-once.d/10-root.conf
@@ -0,0 +1,5 @@
+[Partition]
+Label=root-A
+Type=root
+SizeMinBytes=200M
+Weight=1
diff --git a/projectroot/etc/repart.rc-once.d/20-root.conf b/projectroot/etc/repart.rc-once.d/20-root.conf
new file mode 100644
index 000000000000..3408b6ad156a
--- /dev/null
+++ b/projectroot/etc/repart.rc-once.d/20-root.conf
@@ -0,0 +1,6 @@
+[Partition]
+Label=root-B
+Type=root
+SizeMinBytes=200M
+Weight=1
+Format=ext4
diff --git a/projectroot/etc/repart.rc-once.d/30-data.conf b/projectroot/etc/repart.rc-once.d/30-data.conf
new file mode 100644
index 000000000000..cc5aebfd87d3
--- /dev/null
+++ b/projectroot/etc/repart.rc-once.d/30-data.conf
@@ -0,0 +1,6 @@
+[Partition]
+Label=data
+Type=linux-generic
+SizeMinBytes=200M
+Weight=999999
+Format=ext4
diff --git a/projectroot/usr/lib/systemd/system/systemd-autoformat@.service b/projectroot/usr/lib/systemd/system/systemd-autoformat@.service
deleted file mode 100644
index 75221403398c..000000000000
--- a/projectroot/usr/lib/systemd/system/systemd-autoformat@.service
+++ /dev/null
@@ -1,15 +0,0 @@
-[Unit]
-Before=mnt-data.mount systemd-fsck@%i.service
-Description=Create ext4 Data Partition
-ConditionPathExists=/dev/%i
-
-[Service]
-Environment=DATAPARTITION=3
-Type=oneshot
-# resize partition to maximum
-ExecStart=/bin/sh -c 'echo ",+" | sfdisk --force -N$DATAPARTITION /dev/mmcblk0'
-# force kernel to reload the partition size of partition 3
-ExecStart=/usr/sbin/partx -d -n $DATAPARTITION /dev/mmcblk0
-ExecStart=/usr/sbin/partx -a -n $DATAPARTITION /dev/mmcblk0
-# create filesystem (this service is only started if we have none)
-ExecStart=/sbin/mkfs.ext4 /dev/%i
diff --git a/projectroot/usr/lib/udev/rules.d/91-mkfs-ext4.rules b/projectroot/usr/lib/udev/rules.d/91-mkfs-ext4.rules
deleted file mode 100644
index 8af8f6cd39ba..000000000000
--- a/projectroot/usr/lib/udev/rules.d/91-mkfs-ext4.rules
+++ /dev/null
@@ -1,5 +0,0 @@
-ACTION!="add", GOTO="systemd-autoformat-ext4-devices_end"
-SUBSYSTEM!="block", GOTO="systemd-autoformat-ext4-devices_end"
-ENV{ID_FS_USAGE}!="filesystem", SUBSYSTEMS=="mmc", KERNEL=="mmcblk0p3", ENV{ID_PART_ENTRY_TYPE}=="0x83", ENV{ID_FS_TYPE}!="ext4", ENV{SYSTEMD_WANTS}+="systemd-autoformat@$name.service"
-
-LABEL="systemd-autoformat-ext4-devices_end"
diff --git a/rules/datapartition.in b/rules/datapartition.in
index 4343e7c4e430..5b8c737fb8ad 100644
--- a/rules/datapartition.in
+++ b/rules/datapartition.in
@@ -2,4 +2,7 @@
 
 config DATAPARTITION
 	tristate
+	select RC_ONCE
+	select SYSTEMD
+	select SYSTEMD_REPART
 	default y
diff --git a/rules/datapartition.make b/rules/datapartition.make
index b79bcf01efcc..808448033eee 100644
--- a/rules/datapartition.make
+++ b/rules/datapartition.make
@@ -1,6 +1,7 @@
 # -*-makefile-*-
 #
 # Copyright (C) 2016 by Robert Schwebel <r.schwebel@pengutronix.de>
+# Copyright (C) 2023 Roland Hieber, Pengutronix <rhi@pengutronix.de>
 #
 # For further information about the PTXdist project and license conditions
 # see the README file.
@@ -26,10 +27,12 @@ $(STATEDIR)/datapartition.targetinstall:
 	@$(call install_fixup,datapartition,AUTHOR,"Robert Schwebel <r.schwebel@pengutronix.de>")
 	@$(call install_fixup,datapartition,DESCRIPTION,missing)
 
-	@$(call install_alternative, datapartition, 0, 0, 0644, \
-		/usr/lib/systemd/system/systemd-autoformat@.service)
-	@$(call install_alternative, datapartition, 0, 0, 0644, \
-		/usr/lib/udev/rules.d/91-mkfs-ext4.rules)
+	@# Note: we only want to call systemd-repart in rc-once, so don't
+	@# install the configs to any path picked up by systemd-repart.service
+	@$(call install_alternative_tree, datapartition, 0, 0, \
+		/etc/repart.rc-once.d/)
+	@$(call install_alternative, datapartition, 0, 0, 0755, \
+		/etc/rc.once.d/repart)
 
 	@$(call install_finish,datapartition)
 
-- 
2.39.2




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

* [DistroKit] [PATCH 06/10] datapartition: add missing mount unit
  2023-11-03 18:24 [DistroKit] [PATCH 01/10] treewide: images: unify partition labels Roland Hieber
                   ` (3 preceding siblings ...)
  2023-11-03 18:24 ` [DistroKit] [PATCH 05/10] datapartition: generate partitions via systemd-repart Roland Hieber
@ 2023-11-03 18:24 ` Roland Hieber
  2023-11-03 18:24 ` [DistroKit] [PATCH 07/10] datapartition: set license Roland Hieber
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 16+ messages in thread
From: Roland Hieber @ 2023-11-03 18:24 UTC (permalink / raw)
  To: distrokit; +Cc: Roland Hieber

The data partition has not been mounted since /etc/fstab was removed in
commit 5eb165a3722013d2c80d (2016-08-18, "ptxdist: version bump
2016.07.0 -> 2016.08.0"). Create the mount point, and add a systemd
mount unit based on the /dev/disk/by-usage/data symlink set up by our
custom rauc-udev rule.

Signed-off-by: Roland Hieber <rhi@pengutronix.de>
---
 projectroot/usr/lib/systemd/system/mnt-data.mount | 6 ++++++
 rules/datapartition.make                          | 4 ++++
 2 files changed, 10 insertions(+)
 create mode 100644 projectroot/usr/lib/systemd/system/mnt-data.mount

diff --git a/projectroot/usr/lib/systemd/system/mnt-data.mount b/projectroot/usr/lib/systemd/system/mnt-data.mount
new file mode 100644
index 000000000000..4f418167d95f
--- /dev/null
+++ b/projectroot/usr/lib/systemd/system/mnt-data.mount
@@ -0,0 +1,6 @@
+[Unit]
+Description=Mount data partition
+
+[Mount]
+What=/dev/disk/by-usage/data
+Where=/mnt/data
diff --git a/rules/datapartition.make b/rules/datapartition.make
index 808448033eee..28ab7175940a 100644
--- a/rules/datapartition.make
+++ b/rules/datapartition.make
@@ -27,6 +27,10 @@ $(STATEDIR)/datapartition.targetinstall:
 	@$(call install_fixup,datapartition,AUTHOR,"Robert Schwebel <r.schwebel@pengutronix.de>")
 	@$(call install_fixup,datapartition,DESCRIPTION,missing)
 
+	@$(call install_copy, datapartition, 0, 0, 0755, /mnt/data)
+	@$(call install_alternative, datapartition, 0, 0, 0644, \
+		/usr/lib/systemd/system/mnt-data.mount)
+
 	@# Note: we only want to call systemd-repart in rc-once, so don't
 	@# install the configs to any path picked up by systemd-repart.service
 	@$(call install_alternative_tree, datapartition, 0, 0, \
-- 
2.39.2




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

* [DistroKit] [PATCH 07/10] datapartition: set license
  2023-11-03 18:24 [DistroKit] [PATCH 01/10] treewide: images: unify partition labels Roland Hieber
                   ` (4 preceding siblings ...)
  2023-11-03 18:24 ` [DistroKit] [PATCH 06/10] datapartition: add missing mount unit Roland Hieber
@ 2023-11-03 18:24 ` Roland Hieber
  2023-11-03 18:24 ` [DistroKit] [PATCH 08/10] treewide: images: remove root-B and data partitions Roland Hieber
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 16+ messages in thread
From: Roland Hieber @ 2023-11-03 18:24 UTC (permalink / raw)
  To: distrokit; +Cc: Roland Hieber

DistroKit is licensed as GPL-2.0-only, so is this recipe.

Signed-off-by: Roland Hieber <rhi@pengutronix.de>
---
 rules/datapartition.make | 1 +
 1 file changed, 1 insertion(+)

diff --git a/rules/datapartition.make b/rules/datapartition.make
index 28ab7175940a..615d96ee8bfb 100644
--- a/rules/datapartition.make
+++ b/rules/datapartition.make
@@ -13,6 +13,7 @@
 PACKAGES-$(PTXCONF_DATAPARTITION) += datapartition
 
 DATAPARTITION_VERSION	:= 1
+DATAPARTITION_LICENSE	:= GPL-2.0-only
 
 # ----------------------------------------------------------------------------
 # Target-Install
-- 
2.39.2




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

* [DistroKit] [PATCH 08/10] treewide: images: remove root-B and data partitions
  2023-11-03 18:24 [DistroKit] [PATCH 01/10] treewide: images: unify partition labels Roland Hieber
                   ` (5 preceding siblings ...)
  2023-11-03 18:24 ` [DistroKit] [PATCH 07/10] datapartition: set license Roland Hieber
@ 2023-11-03 18:24 ` Roland Hieber
  2023-11-03 18:24 ` [DistroKit] [PATCH 09/10] rauc-udev: generate symlinks based on GPT partition labels Roland Hieber
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 16+ messages in thread
From: Roland Hieber @ 2023-11-03 18:24 UTC (permalink / raw)
  To: distrokit; +Cc: Roland Hieber

These partitions are now generated on the first boot by systemd-repart.
The second rootfs is not needed for booting, and overwritten by RAUC
when a bundle is installed, so it can as well be empty. Remove the two
partitions to save space in the generated images.

Signed-off-by: Roland Hieber <rhi@pengutronix.de>
---
 configs/platform-mips/config/images/ar9331.config        | 3 ---
 configs/platform-mips/config/images/malta.config         | 3 ---
 configs/platform-mipsel/config/images/malta.config       | 3 ---
 configs/platform-v7a/config/images/at91-sd.config        | 3 ---
 configs/platform-v7a/config/images/beaglebone.config     | 7 -------
 configs/platform-v7a/config/images/gf.config             | 3 ---
 configs/platform-v7a/config/images/riotboard.config      | 9 ---------
 configs/platform-v7a/config/images/rpi2.config           | 7 -------
 configs/platform-v7a/config/images/sabrelite.config      | 3 ---
 configs/platform-v7a/config/images/stm32mp.config        | 6 ------
 configs/platform-v7a/config/images/udoo-neo.config       | 3 ---
 configs/platform-v7a/config/images/vexpress.config       | 8 --------
 configs/platform-v7a_noneon/config/images/at91-sd.config | 3 ---
 .../platform-v7a_noneon/config/images/vexpress.config    | 3 ---
 configs/platform-v8a/config/images/espressobin.config    | 3 ---
 configs/platform-v8a/config/images/rock3a.config         | 3 ---
 16 files changed, 70 deletions(-)

diff --git a/configs/platform-mips/config/images/ar9331.config b/configs/platform-mips/config/images/ar9331.config
index 7685781d231a..b0664f460a53 100644
--- a/configs/platform-mips/config/images/ar9331.config
+++ b/configs/platform-mips/config/images/ar9331.config
@@ -10,9 +10,6 @@ image @IMAGE@ {
 		image = root.ext2
 		partition-type-uuid = e9434544-6e2c-47cc-bae2-12d6deafb44c # root-mips
 	}
-	partition data {
-		autoresize = true
-	}
 }
 
 /* vim: set tabstop=8 noexpandtab : */
diff --git a/configs/platform-mips/config/images/malta.config b/configs/platform-mips/config/images/malta.config
index 7685781d231a..b0664f460a53 100644
--- a/configs/platform-mips/config/images/malta.config
+++ b/configs/platform-mips/config/images/malta.config
@@ -10,9 +10,6 @@ image @IMAGE@ {
 		image = root.ext2
 		partition-type-uuid = e9434544-6e2c-47cc-bae2-12d6deafb44c # root-mips
 	}
-	partition data {
-		autoresize = true
-	}
 }
 
 /* vim: set tabstop=8 noexpandtab : */
diff --git a/configs/platform-mipsel/config/images/malta.config b/configs/platform-mipsel/config/images/malta.config
index 71e367276072..4b6fe4af5332 100644
--- a/configs/platform-mipsel/config/images/malta.config
+++ b/configs/platform-mipsel/config/images/malta.config
@@ -10,9 +10,6 @@ image @IMAGE@ {
 		image = root.ext2
 		partition-type-uuid = 37c58c8a-d913-4156-a25f-48b1b64e07f0 # root-mips-le
 	}
-	partition data {
-		autoresize = true
-	}
 }
 
 /* vim: set tabstop=8 noexpandtab : */
diff --git a/configs/platform-v7a/config/images/at91-sd.config b/configs/platform-v7a/config/images/at91-sd.config
index a892868cd7b7..335273d7ddc9 100644
--- a/configs/platform-v7a/config/images/at91-sd.config
+++ b/configs/platform-v7a/config/images/at91-sd.config
@@ -21,8 +21,5 @@ image @IMAGE@ {
 		image = root.ext2
 		partition-type-uuid = 69dad710-2ce4-4e3c-b16c-21a1d49abed3 # root-arm
 	}
-	partition data {
-		size = 512M
-	}
 }
 /* vim: set tabstop=8 noexpandtab : */
diff --git a/configs/platform-v7a/config/images/beaglebone.config b/configs/platform-v7a/config/images/beaglebone.config
index 7509f501ec86..32abd0b7f4a9 100644
--- a/configs/platform-v7a/config/images/beaglebone.config
+++ b/configs/platform-v7a/config/images/beaglebone.config
@@ -21,12 +21,5 @@ image @IMAGE@ {
 		image = root.ext2
 		partition-type-uuid = 69dad710-2ce4-4e3c-b16c-21a1d49abed3 # root-arm
 	}
-	partition root-B {
-		image = root.ext2
-		partition-type-uuid = 69dad710-2ce4-4e3c-b16c-21a1d49abed3 # root-arm
-	}
-	partition data {
-		size = 512M
-	}
 }
 /* vim: set tabstop=8 noexpandtab : */
diff --git a/configs/platform-v7a/config/images/gf.config b/configs/platform-v7a/config/images/gf.config
index 6ec1d90db659..95c5a545d6e0 100644
--- a/configs/platform-v7a/config/images/gf.config
+++ b/configs/platform-v7a/config/images/gf.config
@@ -21,8 +21,5 @@ image @IMAGE@ {
 		image = root.ext2
 		partition-type-uuid = 69dad710-2ce4-4e3c-b16c-21a1d49abed3 # root-arm
 	}
-	partition data {
-		size = 512M
-	}
 }
 /* vim: set tabstop=8 noexpandtab : */
diff --git a/configs/platform-v7a/config/images/riotboard.config b/configs/platform-v7a/config/images/riotboard.config
index 8ce12a07c71c..bff2528fac57 100644
--- a/configs/platform-v7a/config/images/riotboard.config
+++ b/configs/platform-v7a/config/images/riotboard.config
@@ -16,14 +16,5 @@ image @IMAGE@ {
 		image = root.ext2
 		partition-type-uuid = 69dad710-2ce4-4e3c-b16c-21a1d49abed3 # root-arm
 	}
-
-	partition root-B {
-		image = root.ext2
-		partition-type-uuid = 69dad710-2ce4-4e3c-b16c-21a1d49abed3 # root-arm
-	}
-
-	partition data {
-		size = 512M
-	}
 }
 /* vim: set tabstop=8 noexpandtab : */
diff --git a/configs/platform-v7a/config/images/rpi2.config b/configs/platform-v7a/config/images/rpi2.config
index 71baae3bb8be..68ee0d0d8529 100644
--- a/configs/platform-v7a/config/images/rpi2.config
+++ b/configs/platform-v7a/config/images/rpi2.config
@@ -23,12 +23,5 @@ image @IMAGE@ {
 		image = root.ext2
 		partition-type-uuid = 69dad710-2ce4-4e3c-b16c-21a1d49abed3 # root-arm
 	}
-	partition root-B {
-		image = root.ext2
-		partition-type-uuid = 69dad710-2ce4-4e3c-b16c-21a1d49abed3 # root-arm
-	}
-	partition data {
-		size = 512M
-	}
 }
 /* vim: set tabstop=8 noexpandtab : */
diff --git a/configs/platform-v7a/config/images/sabrelite.config b/configs/platform-v7a/config/images/sabrelite.config
index 2c7109c5c310..6d71c4124c3d 100644
--- a/configs/platform-v7a/config/images/sabrelite.config
+++ b/configs/platform-v7a/config/images/sabrelite.config
@@ -16,8 +16,5 @@ image @IMAGE@ {
 		image = root.ext2
 		partition-type-uuid = 69dad710-2ce4-4e3c-b16c-21a1d49abed3 # root-arm
 	}
-	partition data {
-		size = 512M
-	}
 }
 /* vim: set tabstop=8 noexpandtab : */
diff --git a/configs/platform-v7a/config/images/stm32mp.config b/configs/platform-v7a/config/images/stm32mp.config
index c25f399b2b2a..58b9232d84a6 100644
--- a/configs/platform-v7a/config/images/stm32mp.config
+++ b/configs/platform-v7a/config/images/stm32mp.config
@@ -27,12 +27,6 @@ image @IMAGE@ {
 		partition-type-uuid = 69dad710-2ce4-4e3c-b16c-21a1d49abed3 # root-arm
 		image = root.ext2
 	}
-	partition root-b {
-		image = root.ext2
-	}
-	partition data {
-		size = 100M
-	}
 }
 
 image @STM32MP_BOARD@.fip {
diff --git a/configs/platform-v7a/config/images/udoo-neo.config b/configs/platform-v7a/config/images/udoo-neo.config
index f801b5524baf..2e0f91f2bcb0 100644
--- a/configs/platform-v7a/config/images/udoo-neo.config
+++ b/configs/platform-v7a/config/images/udoo-neo.config
@@ -16,8 +16,5 @@ image @IMAGE@ {
 		image = root.ext2
 		partition-type-uuid = 69dad710-2ce4-4e3c-b16c-21a1d49abed3 # root-arm
 	}
-	partition data {
-		size = 512M
-	}
 }
 /* vim: set tabstop=8 noexpandtab : */
diff --git a/configs/platform-v7a/config/images/vexpress.config b/configs/platform-v7a/config/images/vexpress.config
index 0254ef670227..b982ae2da41c 100644
--- a/configs/platform-v7a/config/images/vexpress.config
+++ b/configs/platform-v7a/config/images/vexpress.config
@@ -10,14 +10,6 @@ image @IMAGE@ {
 		image = root.ext2
 		partition-type-uuid = 69dad710-2ce4-4e3c-b16c-21a1d49abed3 # root-arm
 	}
-	partition root-B {
-		image = root.ext2
-		partition-type-uuid = 69dad710-2ce4-4e3c-b16c-21a1d49abed3 # root-arm
-		size = 96M
-	}
-	partition data {
-		autoresize = true
-	}
 }
 
 /* vim: set tabstop=8 noexpandtab : */
diff --git a/configs/platform-v7a_noneon/config/images/at91-sd.config b/configs/platform-v7a_noneon/config/images/at91-sd.config
index 9bf369ec9c2b..d4e22c82594f 100644
--- a/configs/platform-v7a_noneon/config/images/at91-sd.config
+++ b/configs/platform-v7a_noneon/config/images/at91-sd.config
@@ -21,8 +21,5 @@ image @IMAGE@ {
 		image = root.ext2
 		partition-type-uuid = 69dad710-2ce4-4e3c-b16c-21a1d49abed3 # root-arm
 	}
-	partition data {
-		size = 512M
-	}
 }
 /* vim: set tabstop=8 noexpandtab : */
diff --git a/configs/platform-v7a_noneon/config/images/vexpress.config b/configs/platform-v7a_noneon/config/images/vexpress.config
index 7a5e92ee4033..b982ae2da41c 100644
--- a/configs/platform-v7a_noneon/config/images/vexpress.config
+++ b/configs/platform-v7a_noneon/config/images/vexpress.config
@@ -10,9 +10,6 @@ image @IMAGE@ {
 		image = root.ext2
 		partition-type-uuid = 69dad710-2ce4-4e3c-b16c-21a1d49abed3 # root-arm
 	}
-	partition data {
-		autoresize = true
-	}
 }
 
 /* vim: set tabstop=8 noexpandtab : */
diff --git a/configs/platform-v8a/config/images/espressobin.config b/configs/platform-v8a/config/images/espressobin.config
index e9f4460c9a9a..54a72563526f 100644
--- a/configs/platform-v8a/config/images/espressobin.config
+++ b/configs/platform-v8a/config/images/espressobin.config
@@ -7,9 +7,6 @@ image @IMAGE@ {
 		image = root.ext2
 		partition-type-uuid = 69dad710-2ce4-4e3c-b16c-21a1d49abed3 # root-arm
 	}
-	partition data {
-		size = 512M
-	}
 }
 
 /* vim: set tabstop=8 noexpandtab : */
diff --git a/configs/platform-v8a/config/images/rock3a.config b/configs/platform-v8a/config/images/rock3a.config
index d6d5ada84426..4b53e32ced3d 100644
--- a/configs/platform-v8a/config/images/rock3a.config
+++ b/configs/platform-v8a/config/images/rock3a.config
@@ -26,9 +26,6 @@ image @IMAGE@ {
 		image = "root.ext2"
 		partition-type-uuid = b921b045-1df0-41c3-af44-4c6f280d3fae # root-arm64
 	}
-	partition data {
-		size = 512M
-	}
 }
 
 image barebox-rock3a.norimg {
-- 
2.39.2




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

* [DistroKit] [PATCH 09/10] rauc-udev: generate symlinks based on GPT partition labels
  2023-11-03 18:24 [DistroKit] [PATCH 01/10] treewide: images: unify partition labels Roland Hieber
                   ` (6 preceding siblings ...)
  2023-11-03 18:24 ` [DistroKit] [PATCH 08/10] treewide: images: remove root-B and data partitions Roland Hieber
@ 2023-11-03 18:24 ` Roland Hieber
  2023-11-03 18:24 ` [DistroKit] [PATCH 10/10] v7a: barebox: bootchooser: use " Roland Hieber
  2023-11-06 11:43 ` [DistroKit] [PATCH 01/10] treewide: images: unify " Robert Schwebel
  9 siblings, 0 replies; 16+ messages in thread
From: Roland Hieber @ 2023-11-03 18:24 UTC (permalink / raw)
  To: distrokit; +Cc: Roland Hieber

Now that all our images have a GPT header which contains partitions
with the labels "root-A", "root-B", and "data", we can use those to
generate the symlinks in /dev/disk/by-usage/ instead of using the
hardcoded, number-based kernel device names. This gives us the
flexibility to change the order of the partitions on disk as long as
their GPT partition labels stay the same.

Since the symlinks in /dev/disk/by-partlabel/ are not necessarily unique
(see [1]), we cannot use these here. Instead, rework the current match
clauses to determine the devpath of the boot device based on the board
compatible, and only create by-usage symlinks for partitions on the boot
device.

  [1]: https://github.com/systemd/systemd/pull/29219

Signed-off-by: Roland Hieber <rhi@pengutronix.de>
---
 .../lib/udev/rules.d/90-rauc-partitions.rules | 54 +++++++------------
 1 file changed, 18 insertions(+), 36 deletions(-)

diff --git a/projectroot/usr/lib/udev/rules.d/90-rauc-partitions.rules b/projectroot/usr/lib/udev/rules.d/90-rauc-partitions.rules
index e909df01958f..6bb361554a1f 100644
--- a/projectroot/usr/lib/udev/rules.d/90-rauc-partitions.rules
+++ b/projectroot/usr/lib/udev/rules.d/90-rauc-partitions.rules
@@ -8,42 +8,24 @@ IMPORT{program}="of_base_compatible"
 
 # Add symlinks named /dev/disk/by-usage/{data,rootfs0,rootfs1} pointing
 # to the correct partitions based on the device tree compatible
-ENV{OF_BASE_COMPATIBLE}!="*arm,vexpress,v2p-ca9*", GOTO="qemu_vexpress_end"
-KERNEL=="mmcblk0p1", SYMLINK+="disk/by-usage/rootfs0"
-KERNEL=="mmcblk0p2", SYMLINK+="disk/by-usage/rootfs1"
-KERNEL=="mmcblk0p3", SYMLINK+="disk/by-usage/data"
-GOTO="rauc_partitions_end"
-LABEL="qemu_vexpress_end"
-
-ENV{OF_BASE_COMPATIBLE}!="*lxa,stm32mp157c-mc1*", GOTO="lxa_mc1_end"
-KERNEL=="mmcblk0p6", SYMLINK+="disk/by-usage/rootfs0"
-KERNEL=="mmcblk0p7", SYMLINK+="disk/by-usage/rootfs1"
-KERNEL=="mmcblk0p8", SYMLINK+="disk/by-usage/data"
-GOTO="rauc_partitions_end"
-LABEL="lxa_mc1_end"
-
-ENV{OF_BASE_COMPATIBLE}!="*ti,am335x-bone-black*", GOTO="beaglebone_black_end"
-KERNEL=="mmcblk0p2", SYMLINK+="disk/by-usage/rootfs0"
-KERNEL=="mmcblk0p3", SYMLINK+="disk/by-usage/rootfs1"
-KERNEL=="mmcblk0p4", SYMLINK+="disk/by-usage/data"
-GOTO="rauc_partitions_end"
-LABEL="beaglebone_black_end"
-
-ENV{OF_BASE_COMPATIBLE}!="*raspberrypi,3-model-b*", GOTO="rpi3_end"
-KERNEL=="mmcblk0p2", SYMLINK+="disk/by-usage/rootfs0"
-KERNEL=="mmcblk0p3", SYMLINK+="disk/by-usage/rootfs1"
-KERNEL=="mmcblk0p4", SYMLINK+="disk/by-usage/data"
-GOTO="rauc_partitions_end"
-LABEL="rpi3_end"
-
-ENV{OF_BASE_COMPATIBLE}!="*riot,imx6s-riotboard*", GOTO="riotboard_end"
-KERNEL=="mmcblk2p1", SYMLINK+="disk/by-usage/rootfs0"
-KERNEL=="mmcblk2p2", SYMLINK+="disk/by-usage/rootfs1"
-KERNEL=="mmcblk2p3", SYMLINK+="disk/by-usage/data"
-GOTO="rauc_partitions_end"
-LABEL="riotboard_end"
-
-# fallback for boards not yet supported by RAUC
+
+# first part: find out the boot disk on known platforms
+ENV{OF_BASE_COMPATIBLE}=="*arm,vexpress,v2p-ca9*", ENV{ID_PATH}=="platform-bus@40000000:motherboard-bus@40000000:iofpga@7,00000000-amba-10005000.mmci", TAG+="boot_disk"
+ENV{OF_BASE_COMPATIBLE}=="*lxa,stm32mp157c-mc1*", ENV{ID_PATH}=="platform-soc-amba-58005000.mmc", TAG+="boot_disk"
+ENV{OF_BASE_COMPATIBLE}=="*ti,am335x-bone-black*", ENV{ID_PATH}=="platform-48060000.mmc", TAG+="boot_disk"
+ENV{OF_BASE_COMPATIBLE}=="*raspberrypi,3-model-b*", ENV{ID_PATH}=="platform-3f202000.mmc", TAG+="boot_disk"
+ENV{OF_BASE_COMPATIBLE}=="*riot,imx6s-riotboard*", ENV{ID_PATH}=="platform-2198000.mmc", TAG+="boot_disk"
+
+# second part: create /dev/disk/by-usage/ symlinks
+ENV{DEVTYPE}!="partition", GOTO="rauc_partitions_end"
+
+# fallback for boards not yet supported by RAUC;
+# this will get overwritten below if we detected the boot disk
 KERNEL=="mmcblk0p3", SYMLINK+="disk/by-usage/data"
 
+# symlinks based on GPT partition labels
+TAGS=="boot_disk", ENV{PARTNAME}=="root-A", SYMLINK+="disk/by-usage/rootfs0"
+TAGS=="boot_disk", ENV{PARTNAME}=="root-B", SYMLINK+="disk/by-usage/rootfs1"
+TAGS=="boot_disk", ENV{PARTNAME}=="data",   SYMLINK+="disk/by-usage/data"
+
 LABEL="rauc_partitions_end"
-- 
2.39.2




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

* [DistroKit] [PATCH 10/10] v7a: barebox: bootchooser: use GPT partition labels
  2023-11-03 18:24 [DistroKit] [PATCH 01/10] treewide: images: unify partition labels Roland Hieber
                   ` (7 preceding siblings ...)
  2023-11-03 18:24 ` [DistroKit] [PATCH 09/10] rauc-udev: generate symlinks based on GPT partition labels Roland Hieber
@ 2023-11-03 18:24 ` Roland Hieber
  2023-11-06 11:43 ` [DistroKit] [PATCH 01/10] treewide: images: unify " Robert Schwebel
  9 siblings, 0 replies; 16+ messages in thread
From: Roland Hieber @ 2023-11-03 18:24 UTC (permalink / raw)
  To: distrokit; +Cc: Roland Hieber

Now that every image is in GPT format, we can use the devnodes that
include the partition label instead of the partition number to boot our
rootfs. These names are more readable and also more robust against
changing the order of the partitions. Make the change on all bareboxes
that didn't have that yet.

Signed-off-by: Roland Hieber <rhi@pengutronix.de>
---
 .../barebox-am335x-defaultenv/nv/bootchooser.system0.boot       | 2 +-
 .../barebox-am335x-defaultenv/nv/bootchooser.system1.boot       | 2 +-
 .../barebox-mx6-defaultenv/nv/bootchooser.system0.boot          | 2 +-
 .../barebox-mx6-defaultenv/nv/bootchooser.system1.boot          | 2 +-
 .../barebox-rpi2-defaultenv/nv/bootchooser.system0.boot         | 2 +-
 .../barebox-rpi2-defaultenv/nv/bootchooser.system1.boot         | 2 +-
 .../barebox-vexpress-defaultenv/nv/bootchooser.system0.boot     | 2 +-
 .../barebox-vexpress-defaultenv/nv/bootchooser.system1.boot     | 2 +-
 8 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/configs/platform-v7a/barebox-am335x-defaultenv/nv/bootchooser.system0.boot b/configs/platform-v7a/barebox-am335x-defaultenv/nv/bootchooser.system0.boot
index a6746c31d982..c0c541c8b2a3 100644
--- a/configs/platform-v7a/barebox-am335x-defaultenv/nv/bootchooser.system0.boot
+++ b/configs/platform-v7a/barebox-am335x-defaultenv/nv/bootchooser.system0.boot
@@ -1 +1 @@
-mmc0.1
+mmc0.root-A
diff --git a/configs/platform-v7a/barebox-am335x-defaultenv/nv/bootchooser.system1.boot b/configs/platform-v7a/barebox-am335x-defaultenv/nv/bootchooser.system1.boot
index ecdf1ba55ad6..1d40e339c2fe 100644
--- a/configs/platform-v7a/barebox-am335x-defaultenv/nv/bootchooser.system1.boot
+++ b/configs/platform-v7a/barebox-am335x-defaultenv/nv/bootchooser.system1.boot
@@ -1 +1 @@
-mmc0.2
+mmc0.root-B
diff --git a/configs/platform-v7a/barebox-mx6-defaultenv/nv/bootchooser.system0.boot b/configs/platform-v7a/barebox-mx6-defaultenv/nv/bootchooser.system0.boot
index 597dd55b4974..d2ab6841f086 100644
--- a/configs/platform-v7a/barebox-mx6-defaultenv/nv/bootchooser.system0.boot
+++ b/configs/platform-v7a/barebox-mx6-defaultenv/nv/bootchooser.system0.boot
@@ -1 +1 @@
-mmc2.0
+mmc2.root-A
diff --git a/configs/platform-v7a/barebox-mx6-defaultenv/nv/bootchooser.system1.boot b/configs/platform-v7a/barebox-mx6-defaultenv/nv/bootchooser.system1.boot
index 069ba3685643..2c9bc29fb9a1 100644
--- a/configs/platform-v7a/barebox-mx6-defaultenv/nv/bootchooser.system1.boot
+++ b/configs/platform-v7a/barebox-mx6-defaultenv/nv/bootchooser.system1.boot
@@ -1 +1 @@
-mmc2.1
+mmc2.root-B
diff --git a/configs/platform-v7a/barebox-rpi2-defaultenv/nv/bootchooser.system0.boot b/configs/platform-v7a/barebox-rpi2-defaultenv/nv/bootchooser.system0.boot
index 5676f868b380..582283c385a7 100644
--- a/configs/platform-v7a/barebox-rpi2-defaultenv/nv/bootchooser.system0.boot
+++ b/configs/platform-v7a/barebox-rpi2-defaultenv/nv/bootchooser.system0.boot
@@ -1 +1 @@
-disk0.1
+disk0.root-A
diff --git a/configs/platform-v7a/barebox-rpi2-defaultenv/nv/bootchooser.system1.boot b/configs/platform-v7a/barebox-rpi2-defaultenv/nv/bootchooser.system1.boot
index 1851d291c58c..323bafbde518 100644
--- a/configs/platform-v7a/barebox-rpi2-defaultenv/nv/bootchooser.system1.boot
+++ b/configs/platform-v7a/barebox-rpi2-defaultenv/nv/bootchooser.system1.boot
@@ -1 +1 @@
-disk0.2
+disk0.root-B
diff --git a/configs/platform-v7a/barebox-vexpress-defaultenv/nv/bootchooser.system0.boot b/configs/platform-v7a/barebox-vexpress-defaultenv/nv/bootchooser.system0.boot
index 961e29fe981b..582283c385a7 100644
--- a/configs/platform-v7a/barebox-vexpress-defaultenv/nv/bootchooser.system0.boot
+++ b/configs/platform-v7a/barebox-vexpress-defaultenv/nv/bootchooser.system0.boot
@@ -1 +1 @@
-disk0.0
+disk0.root-A
diff --git a/configs/platform-v7a/barebox-vexpress-defaultenv/nv/bootchooser.system1.boot b/configs/platform-v7a/barebox-vexpress-defaultenv/nv/bootchooser.system1.boot
index 5676f868b380..323bafbde518 100644
--- a/configs/platform-v7a/barebox-vexpress-defaultenv/nv/bootchooser.system1.boot
+++ b/configs/platform-v7a/barebox-vexpress-defaultenv/nv/bootchooser.system1.boot
@@ -1 +1 @@
-disk0.1
+disk0.root-B
-- 
2.39.2




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

* Re: [DistroKit] [PATCH 03/10] treewide: images: remove size specifications for root partitions
  2023-11-03 18:24 ` [DistroKit] [PATCH 03/10] treewide: images: remove size specifications for root partitions Roland Hieber
@ 2023-11-06  8:21   ` Ahmad Fatoum
  2023-11-06  9:40     ` Roland Hieber
  0 siblings, 1 reply; 16+ messages in thread
From: Ahmad Fatoum @ 2023-11-06  8:21 UTC (permalink / raw)
  To: Roland Hieber, distrokit

Hello Roland,

On 03.11.23 19:24, Roland Hieber wrote:
> With current rootfs sizes of below 200 MiB there is no need to have a
> 512 MiB root partition, which will be a lot larger than the file system
> it contains, and which will also all have to be written to the SD card.
> Let genimage determine the partition size based on the file system image
> it contains, thereby reducing the size of the generated disk images.

Does that mean that there will be no free space on the partition whatsoever?
It's beneficial for testing to either have some spare space to remount the
rootfs r/w and place some drop-in configuration files or an overlay that
achieves the same.

Cheers,
Ahmad

> 
> Signed-off-by: Roland Hieber <rhi@pengutronix.de>
> ---
>  configs/platform-mips/config/images/ar9331.config         | 1 -
>  configs/platform-mips/config/images/malta.config          | 1 -
>  configs/platform-mipsel/config/images/malta.config        | 1 -
>  configs/platform-v7a/config/images/vexpress.config        | 1 -
>  configs/platform-v7a_noneon/config/images/vexpress.config | 1 -
>  configs/platform-v8a/config/images/espressobin.config     | 1 -
>  6 files changed, 6 deletions(-)
> 
> diff --git a/configs/platform-mips/config/images/ar9331.config b/configs/platform-mips/config/images/ar9331.config
> index f26627f84cc0..7685781d231a 100644
> --- a/configs/platform-mips/config/images/ar9331.config
> +++ b/configs/platform-mips/config/images/ar9331.config
> @@ -9,7 +9,6 @@ image @IMAGE@ {
>  	partition root-A {
>  		image = root.ext2
>  		partition-type-uuid = e9434544-6e2c-47cc-bae2-12d6deafb44c # root-mips
> -		size = 512M
>  	}
>  	partition data {
>  		autoresize = true
> diff --git a/configs/platform-mips/config/images/malta.config b/configs/platform-mips/config/images/malta.config
> index f26627f84cc0..7685781d231a 100644
> --- a/configs/platform-mips/config/images/malta.config
> +++ b/configs/platform-mips/config/images/malta.config
> @@ -9,7 +9,6 @@ image @IMAGE@ {
>  	partition root-A {
>  		image = root.ext2
>  		partition-type-uuid = e9434544-6e2c-47cc-bae2-12d6deafb44c # root-mips
> -		size = 512M
>  	}
>  	partition data {
>  		autoresize = true
> diff --git a/configs/platform-mipsel/config/images/malta.config b/configs/platform-mipsel/config/images/malta.config
> index c873c7e8b724..71e367276072 100644
> --- a/configs/platform-mipsel/config/images/malta.config
> +++ b/configs/platform-mipsel/config/images/malta.config
> @@ -9,7 +9,6 @@ image @IMAGE@ {
>  	partition root-A {
>  		image = root.ext2
>  		partition-type-uuid = 37c58c8a-d913-4156-a25f-48b1b64e07f0 # root-mips-le
> -		size = 512M
>  	}
>  	partition data {
>  		autoresize = true
> diff --git a/configs/platform-v7a/config/images/vexpress.config b/configs/platform-v7a/config/images/vexpress.config
> index 87eaedfe8b82..67c7638a59b8 100644
> --- a/configs/platform-v7a/config/images/vexpress.config
> +++ b/configs/platform-v7a/config/images/vexpress.config
> @@ -9,7 +9,6 @@ image @IMAGE@ {
>  	partition root-A {
>  		image = root.ext2
>  		partition-type-uuid = 69dad710-2ce4-4e3c-b16c-21a1d49abed3 # root-arm
> -		size = 96M
>  	}
>  	partition root-B {
>  		image = root.ext2
> diff --git a/configs/platform-v7a_noneon/config/images/vexpress.config b/configs/platform-v7a_noneon/config/images/vexpress.config
> index 0712ad82ce96..4200f95b7725 100644
> --- a/configs/platform-v7a_noneon/config/images/vexpress.config
> +++ b/configs/platform-v7a_noneon/config/images/vexpress.config
> @@ -9,7 +9,6 @@ image @IMAGE@ {
>  	partition root-A {
>  		image = root.ext2
>  		partition-type-uuid = 69dad710-2ce4-4e3c-b16c-21a1d49abed3 # root-arm
> -		size = 192M
>  	}
>  	partition data {
>  		autoresize = true
> diff --git a/configs/platform-v8a/config/images/espressobin.config b/configs/platform-v8a/config/images/espressobin.config
> index 188bb9ae4d9e..e9f4460c9a9a 100644
> --- a/configs/platform-v8a/config/images/espressobin.config
> +++ b/configs/platform-v8a/config/images/espressobin.config
> @@ -6,7 +6,6 @@ image @IMAGE@ {
>  	partition root-A {
>  		image = root.ext2
>  		partition-type-uuid = 69dad710-2ce4-4e3c-b16c-21a1d49abed3 # root-arm
> -		size = 512M
>  	}
>  	partition data {
>  		size = 512M

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |




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

* Re: [DistroKit] [PATCH 02/10] v7a: image-stm32mp: set GPT Partition Type UUID
  2023-11-03 18:24 ` [DistroKit] [PATCH 02/10] v7a: image-stm32mp: set GPT Partition Type UUID Roland Hieber
@ 2023-11-06  8:21   ` Ahmad Fatoum
  0 siblings, 0 replies; 16+ messages in thread
From: Ahmad Fatoum @ 2023-11-06  8:21 UTC (permalink / raw)
  To: Roland Hieber, distrokit

On 03.11.23 19:24, Roland Hieber wrote:
> This was forgotten in commit 1022b05b735f6081cf1b.
> 
> Fixes: 1022b05b735f6081cf1b (2023-10-20, "images: convert to GPT format")
> Signed-off-by: Roland Hieber <rhi@pengutronix.de>

Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>

> ---
>  configs/platform-v7a/config/images/stm32mp.config | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/configs/platform-v7a/config/images/stm32mp.config b/configs/platform-v7a/config/images/stm32mp.config
> index 9dd1a8c850da..c25f399b2b2a 100644
> --- a/configs/platform-v7a/config/images/stm32mp.config
> +++ b/configs/platform-v7a/config/images/stm32mp.config
> @@ -24,6 +24,7 @@ image @IMAGE@ {
>  		size = 1M
>  	}
>  	partition root-A {
> +		partition-type-uuid = 69dad710-2ce4-4e3c-b16c-21a1d49abed3 # root-arm
>  		image = root.ext2
>  	}
>  	partition root-b {

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |




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

* Re: [DistroKit] [PATCH 03/10] treewide: images: remove size specifications for root partitions
  2023-11-06  8:21   ` Ahmad Fatoum
@ 2023-11-06  9:40     ` Roland Hieber
  2023-11-06  9:41       ` Ahmad Fatoum
  0 siblings, 1 reply; 16+ messages in thread
From: Roland Hieber @ 2023-11-06  9:40 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: distrokit

On Mon, Nov 06, 2023 at 09:21:20AM +0100, Ahmad Fatoum wrote:
> Hello Roland,
> 
> On 03.11.23 19:24, Roland Hieber wrote:
> > With current rootfs sizes of below 200 MiB there is no need to have a
> > 512 MiB root partition, which will be a lot larger than the file system
> > it contains, and which will also all have to be written to the SD card.
> > Let genimage determine the partition size based on the file system image
> > it contains, thereby reducing the size of the generated disk images.
> 
> Does that mean that there will be no free space on the partition whatsoever?
> It's beneficial for testing to either have some spare space to remount the
> rootfs r/w and place some drop-in configuration files or an overlay that
> achieves the same.

No. That setting is controlled by PTXCONF_IMAGE_ROOT_EXT_SIZE, which is
still at 125%, so the resulting root.ext2 is 25% larger than necessary.

 - Roland

> 
> Cheers,
> Ahmad
> 
> > 
> > Signed-off-by: Roland Hieber <rhi@pengutronix.de>
> > ---
> >  configs/platform-mips/config/images/ar9331.config         | 1 -
> >  configs/platform-mips/config/images/malta.config          | 1 -
> >  configs/platform-mipsel/config/images/malta.config        | 1 -
> >  configs/platform-v7a/config/images/vexpress.config        | 1 -
> >  configs/platform-v7a_noneon/config/images/vexpress.config | 1 -
> >  configs/platform-v8a/config/images/espressobin.config     | 1 -
> >  6 files changed, 6 deletions(-)
> > 
> > diff --git a/configs/platform-mips/config/images/ar9331.config b/configs/platform-mips/config/images/ar9331.config
> > index f26627f84cc0..7685781d231a 100644
> > --- a/configs/platform-mips/config/images/ar9331.config
> > +++ b/configs/platform-mips/config/images/ar9331.config
> > @@ -9,7 +9,6 @@ image @IMAGE@ {
> >  	partition root-A {
> >  		image = root.ext2
> >  		partition-type-uuid = e9434544-6e2c-47cc-bae2-12d6deafb44c # root-mips
> > -		size = 512M
> >  	}
> >  	partition data {
> >  		autoresize = true
> > diff --git a/configs/platform-mips/config/images/malta.config b/configs/platform-mips/config/images/malta.config
> > index f26627f84cc0..7685781d231a 100644
> > --- a/configs/platform-mips/config/images/malta.config
> > +++ b/configs/platform-mips/config/images/malta.config
> > @@ -9,7 +9,6 @@ image @IMAGE@ {
> >  	partition root-A {
> >  		image = root.ext2
> >  		partition-type-uuid = e9434544-6e2c-47cc-bae2-12d6deafb44c # root-mips
> > -		size = 512M
> >  	}
> >  	partition data {
> >  		autoresize = true
> > diff --git a/configs/platform-mipsel/config/images/malta.config b/configs/platform-mipsel/config/images/malta.config
> > index c873c7e8b724..71e367276072 100644
> > --- a/configs/platform-mipsel/config/images/malta.config
> > +++ b/configs/platform-mipsel/config/images/malta.config
> > @@ -9,7 +9,6 @@ image @IMAGE@ {
> >  	partition root-A {
> >  		image = root.ext2
> >  		partition-type-uuid = 37c58c8a-d913-4156-a25f-48b1b64e07f0 # root-mips-le
> > -		size = 512M
> >  	}
> >  	partition data {
> >  		autoresize = true
> > diff --git a/configs/platform-v7a/config/images/vexpress.config b/configs/platform-v7a/config/images/vexpress.config
> > index 87eaedfe8b82..67c7638a59b8 100644
> > --- a/configs/platform-v7a/config/images/vexpress.config
> > +++ b/configs/platform-v7a/config/images/vexpress.config
> > @@ -9,7 +9,6 @@ image @IMAGE@ {
> >  	partition root-A {
> >  		image = root.ext2
> >  		partition-type-uuid = 69dad710-2ce4-4e3c-b16c-21a1d49abed3 # root-arm
> > -		size = 96M
> >  	}
> >  	partition root-B {
> >  		image = root.ext2
> > diff --git a/configs/platform-v7a_noneon/config/images/vexpress.config b/configs/platform-v7a_noneon/config/images/vexpress.config
> > index 0712ad82ce96..4200f95b7725 100644
> > --- a/configs/platform-v7a_noneon/config/images/vexpress.config
> > +++ b/configs/platform-v7a_noneon/config/images/vexpress.config
> > @@ -9,7 +9,6 @@ image @IMAGE@ {
> >  	partition root-A {
> >  		image = root.ext2
> >  		partition-type-uuid = 69dad710-2ce4-4e3c-b16c-21a1d49abed3 # root-arm
> > -		size = 192M
> >  	}
> >  	partition data {
> >  		autoresize = true
> > diff --git a/configs/platform-v8a/config/images/espressobin.config b/configs/platform-v8a/config/images/espressobin.config
> > index 188bb9ae4d9e..e9f4460c9a9a 100644
> > --- a/configs/platform-v8a/config/images/espressobin.config
> > +++ b/configs/platform-v8a/config/images/espressobin.config
> > @@ -6,7 +6,6 @@ image @IMAGE@ {
> >  	partition root-A {
> >  		image = root.ext2
> >  		partition-type-uuid = 69dad710-2ce4-4e3c-b16c-21a1d49abed3 # root-arm
> > -		size = 512M
> >  	}
> >  	partition data {
> >  		size = 512M
> 
> -- 
> Pengutronix e.K.                           |                             |
> Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
> 31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
> 
> 
> 

-- 
Roland Hieber, Pengutronix e.K.          | r.hieber@pengutronix.de     |
Steuerwalder Str. 21                     | https://www.pengutronix.de/ |
31137 Hildesheim, Germany                | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686         | Fax:   +49-5121-206917-5555 |



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

* Re: [DistroKit] [PATCH 03/10] treewide: images: remove size specifications for root partitions
  2023-11-06  9:40     ` Roland Hieber
@ 2023-11-06  9:41       ` Ahmad Fatoum
  0 siblings, 0 replies; 16+ messages in thread
From: Ahmad Fatoum @ 2023-11-06  9:41 UTC (permalink / raw)
  To: Roland Hieber; +Cc: distrokit

On 06.11.23 10:40, Roland Hieber wrote:
> On Mon, Nov 06, 2023 at 09:21:20AM +0100, Ahmad Fatoum wrote:
>> Hello Roland,
>>
>> On 03.11.23 19:24, Roland Hieber wrote:
>>> With current rootfs sizes of below 200 MiB there is no need to have a
>>> 512 MiB root partition, which will be a lot larger than the file system
>>> it contains, and which will also all have to be written to the SD card.
>>> Let genimage determine the partition size based on the file system image
>>> it contains, thereby reducing the size of the generated disk images.
>>
>> Does that mean that there will be no free space on the partition whatsoever?
>> It's beneficial for testing to either have some spare space to remount the
>> rootfs r/w and place some drop-in configuration files or an overlay that
>> achieves the same.
> 
> No. That setting is controlled by PTXCONF_IMAGE_ROOT_EXT_SIZE, which is
> still at 125%, so the resulting root.ext2 is 25% larger than necessary.

Thanks for the clarification. In that case:

Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>

> 
>  - Roland
> 
>>
>> Cheers,
>> Ahmad
>>
>>>
>>> Signed-off-by: Roland Hieber <rhi@pengutronix.de>
>>> ---
>>>  configs/platform-mips/config/images/ar9331.config         | 1 -
>>>  configs/platform-mips/config/images/malta.config          | 1 -
>>>  configs/platform-mipsel/config/images/malta.config        | 1 -
>>>  configs/platform-v7a/config/images/vexpress.config        | 1 -
>>>  configs/platform-v7a_noneon/config/images/vexpress.config | 1 -
>>>  configs/platform-v8a/config/images/espressobin.config     | 1 -
>>>  6 files changed, 6 deletions(-)
>>>
>>> diff --git a/configs/platform-mips/config/images/ar9331.config b/configs/platform-mips/config/images/ar9331.config
>>> index f26627f84cc0..7685781d231a 100644
>>> --- a/configs/platform-mips/config/images/ar9331.config
>>> +++ b/configs/platform-mips/config/images/ar9331.config
>>> @@ -9,7 +9,6 @@ image @IMAGE@ {
>>>  	partition root-A {
>>>  		image = root.ext2
>>>  		partition-type-uuid = e9434544-6e2c-47cc-bae2-12d6deafb44c # root-mips
>>> -		size = 512M
>>>  	}
>>>  	partition data {
>>>  		autoresize = true
>>> diff --git a/configs/platform-mips/config/images/malta.config b/configs/platform-mips/config/images/malta.config
>>> index f26627f84cc0..7685781d231a 100644
>>> --- a/configs/platform-mips/config/images/malta.config
>>> +++ b/configs/platform-mips/config/images/malta.config
>>> @@ -9,7 +9,6 @@ image @IMAGE@ {
>>>  	partition root-A {
>>>  		image = root.ext2
>>>  		partition-type-uuid = e9434544-6e2c-47cc-bae2-12d6deafb44c # root-mips
>>> -		size = 512M
>>>  	}
>>>  	partition data {
>>>  		autoresize = true
>>> diff --git a/configs/platform-mipsel/config/images/malta.config b/configs/platform-mipsel/config/images/malta.config
>>> index c873c7e8b724..71e367276072 100644
>>> --- a/configs/platform-mipsel/config/images/malta.config
>>> +++ b/configs/platform-mipsel/config/images/malta.config
>>> @@ -9,7 +9,6 @@ image @IMAGE@ {
>>>  	partition root-A {
>>>  		image = root.ext2
>>>  		partition-type-uuid = 37c58c8a-d913-4156-a25f-48b1b64e07f0 # root-mips-le
>>> -		size = 512M
>>>  	}
>>>  	partition data {
>>>  		autoresize = true
>>> diff --git a/configs/platform-v7a/config/images/vexpress.config b/configs/platform-v7a/config/images/vexpress.config
>>> index 87eaedfe8b82..67c7638a59b8 100644
>>> --- a/configs/platform-v7a/config/images/vexpress.config
>>> +++ b/configs/platform-v7a/config/images/vexpress.config
>>> @@ -9,7 +9,6 @@ image @IMAGE@ {
>>>  	partition root-A {
>>>  		image = root.ext2
>>>  		partition-type-uuid = 69dad710-2ce4-4e3c-b16c-21a1d49abed3 # root-arm
>>> -		size = 96M
>>>  	}
>>>  	partition root-B {
>>>  		image = root.ext2
>>> diff --git a/configs/platform-v7a_noneon/config/images/vexpress.config b/configs/platform-v7a_noneon/config/images/vexpress.config
>>> index 0712ad82ce96..4200f95b7725 100644
>>> --- a/configs/platform-v7a_noneon/config/images/vexpress.config
>>> +++ b/configs/platform-v7a_noneon/config/images/vexpress.config
>>> @@ -9,7 +9,6 @@ image @IMAGE@ {
>>>  	partition root-A {
>>>  		image = root.ext2
>>>  		partition-type-uuid = 69dad710-2ce4-4e3c-b16c-21a1d49abed3 # root-arm
>>> -		size = 192M
>>>  	}
>>>  	partition data {
>>>  		autoresize = true
>>> diff --git a/configs/platform-v8a/config/images/espressobin.config b/configs/platform-v8a/config/images/espressobin.config
>>> index 188bb9ae4d9e..e9f4460c9a9a 100644
>>> --- a/configs/platform-v8a/config/images/espressobin.config
>>> +++ b/configs/platform-v8a/config/images/espressobin.config
>>> @@ -6,7 +6,6 @@ image @IMAGE@ {
>>>  	partition root-A {
>>>  		image = root.ext2
>>>  		partition-type-uuid = 69dad710-2ce4-4e3c-b16c-21a1d49abed3 # root-arm
>>> -		size = 512M
>>>  	}
>>>  	partition data {
>>>  		size = 512M
>>
>> -- 
>> Pengutronix e.K.                           |                             |
>> Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
>> 31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
>> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
>>
>>
>>
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |




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

* Re: [DistroKit] [PATCH 01/10] treewide: images: unify partition labels
  2023-11-03 18:24 [DistroKit] [PATCH 01/10] treewide: images: unify partition labels Roland Hieber
                   ` (8 preceding siblings ...)
  2023-11-03 18:24 ` [DistroKit] [PATCH 10/10] v7a: barebox: bootchooser: use " Roland Hieber
@ 2023-11-06 11:43 ` Robert Schwebel
  2023-11-06 11:50   ` Robert Schwebel
  9 siblings, 1 reply; 16+ messages in thread
From: Robert Schwebel @ 2023-11-06 11:43 UTC (permalink / raw)
  To: Roland Hieber; +Cc: distrokit

Applied series to next.

On Fri, Nov 03, 2023 at 07:24:29PM +0100, Roland Hieber wrote:
> The partition label is written to the GPT, and systemd-repart can match
> on the partition label, which we'll use in a later commit. Set the name
> of the first root partitions to the same name ("root-A") to give the
> matching algorithm something to work with.
> 
> Signed-off-by: Roland Hieber <rhi@pengutronix.de>
> ---
>  configs/platform-rpi1/config/images/hd.config                   | 2 +-
>  .../barebox-stm32mp-defaultenv/nv/bootchooser.system0.boot      | 2 +-
>  .../barebox-stm32mp-defaultenv/nv/bootchooser.system1.boot      | 2 +-
>  configs/platform-v7a/config/images/hd.config                    | 2 +-
>  configs/platform-v7a/config/images/stm32mp.config               | 2 +-
>  configs/platform-v8a/config/images/imx8m.config                 | 2 +-
>  6 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/configs/platform-rpi1/config/images/hd.config b/configs/platform-rpi1/config/images/hd.config
> index 7b659a3130ad..949bfa2f182f 100644
> --- a/configs/platform-rpi1/config/images/hd.config
> +++ b/configs/platform-rpi1/config/images/hd.config
> @@ -9,7 +9,7 @@ image @IMAGE@ {
>  		partition-type = 0xc
>  		bootable = true
>  	}
> -	partition root {
> +	partition root-A {
>  		image = root.ext2
>  		partition-type-uuid = 69dad710-2ce4-4e3c-b16c-21a1d49abed3 # root-arm
>  	}
> diff --git a/configs/platform-v7a/barebox-stm32mp-defaultenv/nv/bootchooser.system0.boot b/configs/platform-v7a/barebox-stm32mp-defaultenv/nv/bootchooser.system0.boot
> index f3c4d03bcb3e..c0c541c8b2a3 100644
> --- a/configs/platform-v7a/barebox-stm32mp-defaultenv/nv/bootchooser.system0.boot
> +++ b/configs/platform-v7a/barebox-stm32mp-defaultenv/nv/bootchooser.system0.boot
> @@ -1 +1 @@
> -mmc0.root-a
> +mmc0.root-A
> diff --git a/configs/platform-v7a/barebox-stm32mp-defaultenv/nv/bootchooser.system1.boot b/configs/platform-v7a/barebox-stm32mp-defaultenv/nv/bootchooser.system1.boot
> index 6fab4940a0ba..1d40e339c2fe 100644
> --- a/configs/platform-v7a/barebox-stm32mp-defaultenv/nv/bootchooser.system1.boot
> +++ b/configs/platform-v7a/barebox-stm32mp-defaultenv/nv/bootchooser.system1.boot
> @@ -1 +1 @@
> -mmc0.root-b
> +mmc0.root-B
> diff --git a/configs/platform-v7a/config/images/hd.config b/configs/platform-v7a/config/images/hd.config
> index dba48ca106ae..1d041a0ed0a2 100644
> --- a/configs/platform-v7a/config/images/hd.config
> +++ b/configs/platform-v7a/config/images/hd.config
> @@ -7,7 +7,7 @@ image @IMAGE@ {
>  		partition-table-type = "@PARTITION_TABLE_TYPE@"
>  	}
>  	@BOOTLOADER_PARTITIONS@
> -	partition root {
> +	partition root-A {
>  		image = root.ext2
>  		partition-type-uuid = 69dad710-2ce4-4e3c-b16c-21a1d49abed3 # root-arm
>  	}
> diff --git a/configs/platform-v7a/config/images/stm32mp.config b/configs/platform-v7a/config/images/stm32mp.config
> index 38bac2483c9c..9dd1a8c850da 100644
> --- a/configs/platform-v7a/config/images/stm32mp.config
> +++ b/configs/platform-v7a/config/images/stm32mp.config
> @@ -23,7 +23,7 @@ image @IMAGE@ {
>  		partition-type-uuid = "4778ed65-bf42-45fa-9c5b-287a1dc4aab1"
>  		size = 1M
>  	}
> -	partition root-a {
> +	partition root-A {
>  		image = root.ext2
>  	}
>  	partition root-b {
> diff --git a/configs/platform-v8a/config/images/imx8m.config b/configs/platform-v8a/config/images/imx8m.config
> index dfe106612426..59cdac1519db 100644
> --- a/configs/platform-v8a/config/images/imx8m.config
> +++ b/configs/platform-v8a/config/images/imx8m.config
> @@ -9,7 +9,7 @@ image @IMAGE@ {
>                 in-partition-table = false
>                 holes = {"(440; 32K)"}
>         }
> -       partition root {
> +       partition root-A {
>                 offset = 2M
>                 image = "root.ext2"
>                 partition-type-uuid = b921b045-1df0-41c3-af44-4c6f280d3fae
> -- 
> 2.39.2
> 
> 
> 

-- 
Pengutronix e.K.                           | Dipl.-Ing. Robert Schwebel  |
Steuerwalder Str. 21                       | https://www.pengutronix.de/ |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-9    |



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

* Re: [DistroKit] [PATCH 01/10] treewide: images: unify partition labels
  2023-11-06 11:43 ` [DistroKit] [PATCH 01/10] treewide: images: unify " Robert Schwebel
@ 2023-11-06 11:50   ` Robert Schwebel
  0 siblings, 0 replies; 16+ messages in thread
From: Robert Schwebel @ 2023-11-06 11:50 UTC (permalink / raw)
  To: Roland Hieber; +Cc: distrokit

On Mon, Nov 06, 2023 at 12:43:34PM +0100, Robert Schwebel wrote:
> Applied series to next.

... and replaced by v2.

rsc
-- 
Pengutronix e.K.                           | Dipl.-Ing. Robert Schwebel  |
Steuerwalder Str. 21                       | https://www.pengutronix.de/ |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-9    |



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

end of thread, other threads:[~2023-11-06 11:51 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-03 18:24 [DistroKit] [PATCH 01/10] treewide: images: unify partition labels Roland Hieber
2023-11-03 18:24 ` [DistroKit] [PATCH 02/10] v7a: image-stm32mp: set GPT Partition Type UUID Roland Hieber
2023-11-06  8:21   ` Ahmad Fatoum
2023-11-03 18:24 ` [DistroKit] [PATCH 03/10] treewide: images: remove size specifications for root partitions Roland Hieber
2023-11-06  8:21   ` Ahmad Fatoum
2023-11-06  9:40     ` Roland Hieber
2023-11-06  9:41       ` Ahmad Fatoum
2023-11-03 18:24 ` [DistroKit] [PATCH 04/10] treewide: images: increase size of all qemu images to 1 GiB Roland Hieber
2023-11-03 18:24 ` [DistroKit] [PATCH 05/10] datapartition: generate partitions via systemd-repart Roland Hieber
2023-11-03 18:24 ` [DistroKit] [PATCH 06/10] datapartition: add missing mount unit Roland Hieber
2023-11-03 18:24 ` [DistroKit] [PATCH 07/10] datapartition: set license Roland Hieber
2023-11-03 18:24 ` [DistroKit] [PATCH 08/10] treewide: images: remove root-B and data partitions Roland Hieber
2023-11-03 18:24 ` [DistroKit] [PATCH 09/10] rauc-udev: generate symlinks based on GPT partition labels Roland Hieber
2023-11-03 18:24 ` [DistroKit] [PATCH 10/10] v7a: barebox: bootchooser: use " Roland Hieber
2023-11-06 11:43 ` [DistroKit] [PATCH 01/10] treewide: images: unify " Robert Schwebel
2023-11-06 11:50   ` Robert Schwebel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox