Skip to content
Snippets Groups Projects
Commit 42ec247e authored by Kever Yang's avatar Kever Yang Committed by Philipp Tomsich
Browse files

rockchip: use UUID for root partitions

We use to use /dev/mmcbl0p7 as root partition, and pass it
to kernel by cmdline, but the mmc number in kernel in not
fixed, we need to change the bootargs to adapt it from time
to time.
We can use the UUID to fix it, the ID is from:
https://www.freedesktop.org/wiki/Specifications/DiscoverablePartitionsSpec/


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

Signed-off-by: default avatarKever Yang <kever.yang@rock-chips.com>
Acked-by: default avatarPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: default avatarPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>
parent 4436c5db
No related branches found
No related tags found
No related merge requests found
...@@ -28,6 +28,12 @@ ...@@ -28,6 +28,12 @@
#endif #endif
#define CONFIG_RANDOM_UUID #define CONFIG_RANDOM_UUID
#ifdef CONFIG_ARM64
#define ROOT_UUID "B921B045-1DF0-41C3-AF44-4C6F280D3FAE;\0"
#else
#define ROOT_UUID "69DAD710-2CE4-4E3C-B16C-21A1D49ABED3;\0"
#endif
#define PARTS_DEFAULT \ #define PARTS_DEFAULT \
"uuid_disk=${uuid_gpt_disk};" \ "uuid_disk=${uuid_gpt_disk};" \
"name=loader1,start=32K,size=4000K,uuid=${uuid_gpt_loader1};" \ "name=loader1,start=32K,size=4000K,uuid=${uuid_gpt_loader1};" \
...@@ -36,7 +42,7 @@ ...@@ -36,7 +42,7 @@
"name=loader2,size=4MB,uuid=${uuid_gpt_loader2};" \ "name=loader2,size=4MB,uuid=${uuid_gpt_loader2};" \
"name=atf,size=4M,uuid=${uuid_gpt_atf};" \ "name=atf,size=4M,uuid=${uuid_gpt_atf};" \
"name=boot,size=112M,bootable,uuid=${uuid_gpt_boot};" \ "name=boot,size=112M,bootable,uuid=${uuid_gpt_boot};" \
"name=rootfs,size=-,uuid=${uuid_gpt_rootfs};\0" \ "name=rootfs,size=-,uuid="ROOT_UUID
#endif #endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment