Skip to contentSkip to conversation

rename root partition

PATCH Applied Trevor Woerner 1 participant 6 messages May 24, 2024 – May 26, 2024 1 message not in the archive Arm Rockchip

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/3 rename root partition

Rename the root partition to "rootfsA" in the off-chance the user may someday be interested in implementing some sort of whole-partition update mechanism.

---
v2 changes:
- (none)

---
 conf/machine/include/rockchip-extlinux.inc | 2 +-
 wic/rockchip.wks                           | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
conf/machine/include/rockchip-extlinux.inc +1 -1
index ca33f4c7f42a..ab46b76d33a1 100644
@@ -12,7 +12,7 @@
 NONFITDT ?= "${@d.getVar('KERNEL_DEVICETREE').split('/')[1]}"
 
 UBOOT_EXTLINUX ?= "1"
-UBOOT_EXTLINUX_ROOT ?= "root=PARTLABEL=root"
+UBOOT_EXTLINUX_ROOT ?= "root=PARTLABEL=rootfsA"
 UBOOT_EXTLINUX_FDTDIR ?= "${@bb.utils.contains('KERNEL_IMAGETYPE', 'fitImage', '', '/boot', d)}"
 UBOOT_EXTLINUX_FDT ?= "${@bb.utils.contains('KERNEL_IMAGETYPE', 'fitImage', '', '${NONFITDT}', d)}"
 UBOOT_EXTLINUX_CONSOLE ?= "earlycon console=tty1 console=${RK_CONSOLE_DEVICE},${RK_CONSOLE_BAUD}n8"
wic/rockchip.wks +1 -1
index bc65f73b0cf3..e1d74d9983ab 100644
@@ -26,6 +26,6 @@ part uboot_env --offset 8128s  --fixed-size 32K   --fstype=none --part-name uboo
 part reserved2 --offset 8192s  --fixed-size 4096K --fstype=none --part-name reserved2
 part loader2   --offset 16384s --fixed-size 4096K --fstype=none --part-name loader2   --source rawcopy --sourceparams="file=u-boot.${UBOOT_SUFFIX}"
 part atf       --offset 24576s --fixed-size 4096K --fstype=none --part-name atf
-part /         --label root    --active           --fstype=ext4 --part-name root      --source rootfs
+part /         --label rootfsA --active           --fstype=ext4 --part-name rootfsA   --source rootfs
 
 bootloader --ptable gpt
Signature · 1 line
2.44.0.478.g7774cfed6261
#1 lore raw

PATCH v2 2/3 specify root partition type

Specify the root partition's type according to the Discoverable Partitions Specification:

	32-bit ARM: 69dad710-2ce4-4e3c-b16c-21a1d49abed3
	64-bit ARM: b921b045-1df0-41c3-af44-4c6f280d3fae

---
v2 changes:
- use lower-case for both partition identifiers (in code and in commit msg)
- use Arm overrides instead of MACHINE overrides to identify which identifiers are used for which builds, this clarifies why the 2 identifiers are needed

---
 conf/machine/include/rockchip-defaults.inc | 4 ++++
 conf/machine/include/rockchip-wic.inc      | 1 +
 wic/rockchip.wks                           | 2 +-
 3 files changed, 6 insertions(+), 1 deletion(-)
conf/machine/include/rockchip-defaults.inc +4 -0
index 2387eb909934..e33a25c07b5a 100644
@@ -21,3 +21,7 @@ XSERVER = " \
 SERIAL_CONSOLES ?= "1500000;ttyS2"
 RK_CONSOLE_BAUD ?= "${@d.getVar('SERIAL_CONSOLES').split(';')[0]}"
 RK_CONSOLE_DEVICE ?= "${@d.getVar('SERIAL_CONSOLES').split(';')[1].split()[0]}"
+
+# Discoverable Partitions Specification (DPS)
+ROOT_DPS:arm = "69dad710-2ce4-4e3c-b16c-21a1d49abed3"
+ROOT_DPS:aarch64 = "b921b045-1df0-41c3-af44-4c6f280d3fae"
conf/machine/include/rockchip-wic.inc +1 -0
index b5ee6e0c2724..dab61d83ed2c 100644
@@ -19,6 +19,7 @@ RK_UBOOT_ENV:rk-u-boot-env = "${@ '--source rawcopy --sourceparams=file=u-boot.e
 
 WICVARS:append = " \
 	RK_UBOOT_ENV \
+	ROOT_DPS \
 	SPL_BINARY \
 	UBOOT_SUFFIX \
 	"
wic/rockchip.wks +1 -1
index e1d74d9983ab..cabdb6559550 100644
@@ -26,6 +26,6 @@ part uboot_env --offset 8128s  --fixed-size 32K   --fstype=none --part-name uboo
 part reserved2 --offset 8192s  --fixed-size 4096K --fstype=none --part-name reserved2
 part loader2   --offset 16384s --fixed-size 4096K --fstype=none --part-name loader2   --source rawcopy --sourceparams="file=u-boot.${UBOOT_SUFFIX}"
 part atf       --offset 24576s --fixed-size 4096K --fstype=none --part-name atf
-part /         --label rootfsA --active           --fstype=ext4 --part-name rootfsA   --source rootfs
+part /         --label rootfsA --active           --fstype=ext4 --part-name rootfsA   --source rootfs  --part-type ${ROOT_DPS}
 
 bootloader --ptable gpt
Signature · 1 line
2.44.0.478.g7774cfed6261
#3 lore raw

PATCH v2 3/3 u-boot: remove upstreamed dependency

In reply to Trevor Woerner

The dependency on pyelftools is now in upstream oe-core making this one redundant.

oe-core: 70eca6a5ccf4 ("u-boot: add missing dependency on pyelftools-native")

---
v2 changes:
- add a git fixes-style link pointing to the upstream oe-core commit mentioned in the commit message
- added Reviewed-by tag

---
 recipes-bsp/u-boot/u-boot_%.bbappend | 2 --
 1 file changed, 2 deletions(-)
recipes-bsp/u-boot/u-boot_%.bbappend +0 -2
index 33b521021a1c..5c9e442cca8d 100644
@@ -3,8 +3,6 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
 SRC_URI:append:rk-u-boot-env = " file://rockchip-enable-environment-mmc.cfg"
 SRCREV:rk-u-boot-env = "cdfcc37428e06f4730ab9a17cc084eeb7676ea1a"
 
-# various machines require the pyelftools library for parsing dtb files
-DEPENDS:append = " python3-pyelftools-native"
 DEPENDS:append:rk3308 = " u-boot-tools-native"
 DEPENDS:append:rock-pi-4 = " gnutls-native"
 DEPENDS:append:rk-u-boot-env = " u-boot-mkenvimage-native"
Signature · 1 line
2.44.0.478.g7774cfed6261
author Applied
#4 lore raw
In reply to Trevor Woerner
Quoted 11 lines · Trevor Woerner

Rename the root partition to "rootfsA" in the off-chance the user may someday be interested in implementing some sort of whole-partition update mechanism.

---
v2 changes:
- (none)

---
 conf/machine/include/rockchip-extlinux.inc | 2 +-
 wic/rockchip.wks                           | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Applied to meta-rockchip, master branch.

author Applied
#2 lore raw

Re: [meta-rockchip][PATCH v2 2/3] specify root partition type

In reply to Trevor Woerner
Quoted 13 lines · Trevor Woerner

Specify the root partition's type according to the Discoverable Partitions Specification:

	32-bit ARM: 69dad710-2ce4-4e3c-b16c-21a1d49abed3
	64-bit ARM: b921b045-1df0-41c3-af44-4c6f280d3fae

---
v2 changes:
- use lower-case for both partition identifiers (in code and in commit msg)
- use Arm overrides instead of MACHINE overrides to identify which identifiers are used for which builds, this clarifies why the 2 identifiers are needed

Quoted 5 lines
---
 conf/machine/include/rockchip-defaults.inc | 4 ++++
 conf/machine/include/rockchip-wic.inc      | 1 +
 wic/rockchip.wks                           | 2 +-
 3 files changed, 6 insertions(+), 1 deletion(-)

Applied to meta-rockchip, master branch.

author Applied
#6 lore raw

Re: [yocto-patches] [meta-rockchip][PATCH v2 3/3] u-boot: remove upstreamed dependency

In reply to a message not in the archive
Quoted 6 lines · Trevor Woerner via lists.yoctoproject.org

The dependency on pyelftools is now in upstream oe-core making this one redundant.

oe-core: 70eca6a5ccf4 ("u-boot: add missing dependency on pyelftools-native")

Quoted 8 lines

---
v2 changes:
- add a git fixes-style link pointing to the upstream oe-core commit mentioned in the commit message
- added Reviewed-by tag

---
 recipes-bsp/u-boot/u-boot_%.bbappend | 2 --
 1 file changed, 2 deletions(-)

Applied to meta-rockchip, master branch.