summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorMarco Felsch <m.felsch@pengutronix.de>2021-05-10 12:25:23 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2021-05-12 07:25:13 +0200
commitbb4840d2fdf357992815bf3a22b5732c460bc485 (patch)
tree837620f1d0272e99819216cc22dee771403cef70 /common
parent8b17ebc319085294663555cd1aa30c89b9e525e7 (diff)
downloadbarebox-bb4840d2fdf357992815bf3a22b5732c460bc485.tar.gz
barebox-bb4840d2fdf357992815bf3a22b5732c460bc485.tar.xz
fs: add linux_rootarg 'root=mmcblkXpN' support
Since commit fa2d0aa96941 ("mmc: core: Allow setting slot index via device tree alias") the linux kernel supports stable mmc device names. Barebox has stable names since years so now we can connect both which allows us to pass 'root=mmcblkXpN' as argument for the cmdline. Note: it is crucial that the kernel device tree and the barebox device tree uses the same mmc aliases. This patch adds the support to store the above cmdline as linux_rootarg if enabled. The partuuid is now used as fallback since it is not as unique as the mmcblkXpN scheme. It is added as build option since the system integrator needs to check if the used kernel contains the above commit. Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20210510102523.7147-3-m.felsch@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common')
-rw-r--r--common/Kconfig21
1 files changed, 21 insertions, 0 deletions
diff --git a/common/Kconfig b/common/Kconfig
index bddf802d3b..939cfab4f7 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -704,6 +704,27 @@ config FLEXIBLE_BOOTARGS
to replace parts of the bootargs string without reconstructing it
completely.
+config MMCBLKDEV_ROOTARG
+ bool
+ prompt "Support 'root=mmcblkXpN' cmdline appending"
+ depends on FLEXIBLE_BOOTARGS
+ depends on MCI
+ depends on OFTREE
+ help
+ Enable this option to append 'root=mmcblkXpN' to the cmdline instead
+ of 'root=PARTUUID=XYZ'. Don't enable this option if your used linux
+ kernel doesn't contain commit [1]. The first linux kernel release
+ containing that commit is v5.10-rc1.
+
+ The appending only happen if barebox 'linux.bootargs.bootm.appendroot'
+ variable is set or the used blspec entry contains 'linux-appendroot'.
+
+ Note: It is crucial that the kernel device tree and the barebox device
+ tree uses the same mmc aliases.
+
+ [1] fa2d0aa96941 ("mmc: core: Allow setting slot index via device tree
+ alias")
+
config BAREBOX_UPDATE
bool "In-system barebox update infrastructure"