yocto-bsps: u-boot: Search for rootfs partitions on both SD and eMMC
PATCH 1/1 yocto-bsps: u-boot: Search for rootfs partitions on both SD and eMMC
From: Jussi Laako <[email protected]>
On BeagleBone Black, first attempt to find rootfs from microSD and then from eMMC if not available.
---
This is based on the patch [1] posted by Jussi Laako. Add the Upstream-Status tag as required by Saul, also tweak the subject and u-boot version.
[1] https://lists.yoctoproject.org/pipermail/poky/2016-March/010419.html
...r-bootable-partitions-on-both-SD-and-eMMC.patch | 42 ++++++++++++++++++++++ .../recipes-bsp/u-boot/u-boot_2016.03.bbappend | 3 ++ 2 files changed, 45 insertions(+) create mode 100644 meta-yocto-bsp/recipes-bsp/u-boot/u-boot/0001-Search-for-bootable-partitions-on-both-SD-and-eMMC.patch create mode 100644 meta-yocto-bsp/recipes-bsp/u-boot/u-boot_2016.03.bbappend
meta-yocto-bsp/recipes-bsp/u-boot/u-boot/0001-Search-for-bootable-partitions-on-both-SD-and-eMMC.patch new file +42 -0
@@ -0,0 +1,42 @@ +From 86cc560ff9a6578326532e277d987e24661e5f04 Mon Sep 17 00:00:00 2001 +From: Jussi Laako <[email protected]> +Date: Fri, 26 Feb 2016 14:58:32 +0200 +Subject: [PATCH] Search for bootable partitions on both SD and eMMC + +On BeagleBone Black, first attempt to boot from microSD and then from +eMMC if not available. + +Upstream-Status: Inappropriate [not author] + +Signed-off-by: Jussi Laako <[email protected]> +[Kevin: Add the Upstream-Status tag] +Signed-off-by: Kevin Hao <[email protected]> +--- + include/configs/ti_armv7_common.h | 11 ++++++++++- + 1 file changed, 10 insertions(+), 1 deletion(-) + +diff --git a/include/configs/ti_armv7_common.h b/include/configs/ti_armv7_common.h +index 199612b..ece87ab 100644 +--- a/include/configs/ti_armv7_common.h ++++ b/include/configs/ti_armv7_common.h +@@ -60,7 +60,16 @@ + #define DEFAULT_MMC_TI_ARGS \ + "mmcdev=0\0" \ + "mmcrootfstype=ext4 rootwait\0" \ +- "finduuid=part uuid mmc 0:2 uuid\0" \ ++ "findsduuid=part uuid mmc 0:2 sduuid\0" \ ++ "findemmcuuid=part uuid mmc 1:2 emmcuuid\0" \ ++ "finduuid=if run findsduuid; then "\ ++ "echo \"Boot from microSD\"; "\ ++ "setenv uuid ${sduuid}; " \ ++ "else " \ ++ "run findemmcuuid; " \ ++ "echo \"Boot from eMMC\"; " \ ++ "setenv uuid ${emmcuuid}; " \ ++ "fi;\0" \ + "args_mmc=run finduuid;setenv bootargs console=${console} " \ + "${optargs} " \ + "root=PARTUUID=${uuid} rw " \ +-- +2.7.0 +
meta-yocto-bsp/recipes-bsp/u-boot/u-boot_2016.03.bbappend new file +3 -0
@@ -0,0 +1,3 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI_append = " file://0001-Search-for-bootable-partitions-on-both-SD-and-eMMC.patch"
Signature · 1 line
2.8.1
Quoted 6 lines · Kevin Hao
From: Jussi Laako <[email protected]>
On BeagleBone Black, first attempt to find rootfs from microSD and then from eMMC if not available.
Quoted 7 lines
Fixes #9176Signed-off-by Jussi Laako <[email protected]>[Kevin: update to 2016.03, also add subject prefix and Upstream-Status]Signed-off-by Kevin Hao <[email protected]>---
This is based on the patch [1] posted by Jussi Laako. Add the
Upstream-Status
Quoted 5 lines
tag as required by Saul, also tweak the subject and u-boot version.
[1] https://lists.yoctoproject.org/pipermail/poky/2016-March/010419.html
...r-bootable-partitions-on-both-SD-and-eMMC.patch | 42
++++++++++++++++++++++
Quoted 3 lines
.../recipes-bsp/u-boot/u-boot_2016.03.bbappend | 3 ++ 2 files changed, 45 insertions(+) create mode 100644
meta-yocto-bsp/recipes-bsp/u-boot/u-boot/0001-Search-for-bootable-partitions-on-both-SD-and-eMMC.patch
Quoted 1 line
create mode 100644
meta-yocto-bsp/recipes-bsp/u-boot/u-boot_2016.03.bbappend
Quoted 2 lines
diff --git
a/meta-yocto-bsp/recipes-bsp/u-boot/u-boot/0001-Search-for-bootable-partitions-on-both-SD-and-eMMC.patch b/meta-yocto-bsp/recipes-bsp/u-boot/u-boot/0001-Search-for-bootable-partitions-on-both-SD-and-eMMC.patch
Quoted 4 lines
new file mode 100644
index 0000000..6c4c59b
---/dev/null
+++
b/meta-yocto-bsp/recipes-bsp/u-boot/u-boot/0001-Search-for-bootable-partitions-on-both-SD-and-eMMC.patch
meta-yocto-bsp/recipes-bsp/u-boot/u-boot/0001-Search-for-bootable-partitions-on-both-SD-and-eMMC.patch line 12
Quoted 13 lines
meta-yocto-bsp/recipes-bsp/u-boot/u-boot/0001-Search-for-bootable-partitions-on-both-SD-and-eMMC.patch new file +12
-0@@ -0,0 +1,42 @@ +From 86cc560ff9a6578326532e277d987e24661e5f04 Mon Sep 17 00:00:00 2001 +From: Jussi Laako <[email protected]> +Date: Fri, 26 Feb 2016 14:58:32 +0200 +Subject: [PATCH] Search for bootable partitions on both SD and eMMC + +On BeagleBone Black, first attempt to boot from microSD and then from +eMMC if not available. + +Upstream-Status: Inappropriate [not author] + +Signed-off-by: Jussi Laako <[email protected]> +[Kevin: Add the Upstream-Status tag]
I realise there are cases when upstreaming is not a good choice but ... I don't think this was what Saul was hoping for when he recommended upstreaming and asked for an Upstream-Status the first time this patch was sent.
Jussi
meta-yocto-bsp/recipes-bsp/u-boot/u-boot/0001-Search-for-bootable-partitions-on-both-SD-and-eMMC.patch
Quoted 6 lines
meta-yocto-bsp/recipes-bsp/u-boot/u-boot/0001-Search-for-bootable-partitions-on-both-SD-and-eMMC.patch new file +6
-0+Signed-off-by: Kevin Hao <[email protected]> +--- + include/configs/ti_armv7_common.h | 11 ++++++++++- + 1 file changed, 10 insertions(+), 1 deletion(-) + +diff --git a/include/configs/ti_armv7_common.h
b/include/configs/ti_armv7_common.h
Review
Quoted 25 lines
meta-yocto-bsp/recipes-bsp/u-boot/u-boot/0001-Search-for-bootable-partitions-on-both-SD-and-eMMC.patch new file +24
-0+index 199612b..ece87ab 100644 +--- a/include/configs/ti_armv7_common.h ++++ b/include/configs/ti_armv7_common.h +@@ -60,7 +60,16 @@ + #define DEFAULT_MMC_TI_ARGS \ + "mmcdev=0\0" \ + "mmcrootfstype=ext4 rootwait\0" \ +- "finduuid=part uuid mmc 0:2 uuid\0" \ ++ "findsduuid=part uuid mmc 0:2 sduuid\0" \ ++ "findemmcuuid=part uuid mmc 1:2 emmcuuid\0" \ ++ "finduuid=if run findsduuid; then "\ ++ "echo \"Boot from microSD\"; "\ ++ "setenv uuid ${sduuid}; " \ ++ "else " \ ++ "run findemmcuuid; " \ ++ "echo \"Boot from eMMC\"; " \ ++ "setenv uuid ${emmcuuid}; " \ ++ "fi;\0" \ + "args_mmc=run finduuid;setenv bootargs console=${console} " \ + "${optargs} " \ + "root=PARTUUID=${uuid} rw " \ +-- +2.7.0 +(quoted diff) +0
-0
b/meta-yocto-bsp/recipes-bsp/u-boot/u-boot_2016.03.bbappend
meta-yocto-bsp/recipes-bsp/u-boot/u-boot_2016.03.bbappend line 3
Quoted 8 lines
new file mode 100644
index 0000000..01c8e68meta-yocto-bsp/recipes-bsp/u-boot/u-boot_2016.03.bbappend new file +3
-0@@ -0,0 +1,3 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI_append = "
file://0001-Search-for-bootable-partitions-on-both-SD-and-eMMC.patch"
Quoted 8 lines
--
2.8.1--
_______________________________________________
poky mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/poky
Quoted 8 lines · Jussi Kukkonen
meta-yocto-bsp/recipes-bsp/u-boot/u-boot/0001-Search-for-bootable-partitions-on-both-SD-and-eMMC.patch line 12
Quoted 4 lines
meta-yocto-bsp/recipes-bsp/u-boot/u-boot/0001-Search-for-bootable-partitions-on-both-SD-and-eMMC.patch new file +4
-0+Upstream-Status: Inappropriate [not author] + +Signed-off-by: Jussi Laako <[email protected]> +[Kevin: Add the Upstream-Status tag]I realise there are cases when upstreaming is not a good choice but ... I don't think this was what Saul was hoping for when he recommended upstreaming and asked for an Upstream-Status the first time this patch was sent.
I only saw that Saul asked to add the Upstream-Status tag in the patch in order to be compatible with the yocto requirement. I didn't noticed that he also asked to submit this patch to upstream.
For upstreaming:
1) This is not a patch from me.
2) The macro DEFAULT_MMC_TI_ARGS is also used by other TI boards. Some boards may not have the mmc 1 device at all. So this change makes no sense to these boards.
3) We have many ways to overwrite the default value of "finduuid" such as (boot.scr, uEnv.txt). The default env for this board is already very complex, I don't like to make it even more complex.
Give the above reasons, I am fine to integrate this patch to yocto-bsps for our convenient. But I will not take the responsibility to upstreaming it.
Thanks,
Kevin
Quoted 24 lines · On Thu, 02 Jun 2016 17:40:12 Kevin Hao wrote:
Quoted 9 lines · Jussi Kukkonen
meta-yocto-bsp/recipes-bsp/u-boot/u-boot/0001-Search-for-bootable-partitions-on-both-SD-and-eMMC.patch line 12
Quoted 4 lines
meta-yocto-bsp/recipes-bsp/u-boot/u-boot/0001-Search-for-bootable-partitions-on-both-SD-and-eMMC.patch new file +4
-0+Upstream-Status: Inappropriate [not author] + +Signed-off-by: Jussi Laako <[email protected]> +[Kevin: Add the Upstream-Status tag]I realise there are cases when upstreaming is not a good choice but ... I don't think this was what Saul was hoping for when he recommended upstreaming and asked for an Upstream-Status the first time this patch was sent.
I only saw that Saul asked to add the Upstream-Status tag in the patch in order to be compatible with the yocto requirement. I didn't noticed that he also asked to submit this patch to upstream.
For upstreaming:
1) This is not a patch from me.
2) The macroDEFAULT_MMC_TI_ARGSis also used by other TI boards. Some boards may not have the mmc 1 device at all. So this change makes no sense to these boards.
3) We have many ways to overwrite the default value of "finduuid" such as (boot.scr, uEnv.txt). The default env for this board is already very complex, I don't like to make it even more complex.
Quoted 2 lines
Give the above reasons, I am fine to integrate this patch to yocto-bsps for our convenient. But I will not take the responsibility to upstreaming it.
I hadn't realised until I checked, but we do actually officially list "Inappropriate [not author]" as a reason that can be given, so as things stand right now officially there's nothing wrong with using this status.
I don't think that's ideal though. I'm not suggesting requiring submitters to take responsibility for upstreaming the patch, but I think we do need a better distinction between "this patch isn't appropriate to be sent upstream [for this reason relating to the patch itself]" and "this patch looks like it could go upstream if someone took the responsibility of doing it in the future". It would be nice if when scanning through for patches for upstreaming at least on the first pass we could filter out the "Inappropriate" ones without filtering out patches that may in fact be appropriate for upstreaming based on the patch content alone.
I wonder if it's time to revisit our Upstream-Status values and check if we want to do an overhaul - besides the above I've always felt that "Denied" was poorly named and I know "Pending" has raised some complaints about being too vague also.
Cheers,
Paul
Signature · 2 lines
Paul Eggleton Intel Open Source Technology Centre