[U-Boot] [PATCH v2 0/3] am335x_evm: Switch to DT boot, add another platform

The following is an update to Koen Kooi's original series that updates support for the next beaglebone platform and switches to DT booting as the default.
I want to spell out that part of the changes I've done here are adding two variables to make it easier to control where we load our kernel/dtb from. For example, some distributions may place these on an ext* partition while others may lump them into the FAT partition up front for "easy" updating. The first variable (bootpart) lets us control that as well as which MMC device (SD card or eMMC) they are grabbed from at all. The second variable, bootdir lets us control where we load the files from, within the device. This is needed because findfdt will tell us 'am335x-bone.dtb' but that might be /boot or it might be top level. We assume /boot but can easily override this with uEnv.txt
Changes since v1: - Add CONFIG_CMD_FS_GENERIC, use in parts 2 and 3 - As part of this, kill loaduimagefat since loaduimage uses the generic load command. - Add loadfdt command rather than a direct call to load the fdt.

From: Koen Kooi koen@dominion.thruhere.net
Signed-off-by: Koen Kooi koen@dominion.thruhere.net Acked-by: Peter Korsgaard jacmet@sunsite.dk --- include/configs/am335x_evm.h | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h index 33ee2c4..abf4e39 100644 --- a/include/configs/am335x_evm.h +++ b/include/configs/am335x_evm.h @@ -87,6 +87,8 @@ "findfdt="\ "if test $board_name = A335BONE; then " \ "setenv fdtfile am335x-bone.dtb; fi; " \ + "if test $board_name = A335BNLT; then " \ + "setenv fdtfile am335x-bonelt.dtb; fi; " \ "if test $board_name = A33515BB; then " \ "setenv fdtfile am335x-evm.dtb; fi; " \ "if test $board_name = A335X_SK; then " \

On 10:20-20130313, Tom Rini wrote:
From: Koen Kooi koen@dominion.thruhere.net
Signed-off-by: Koen Kooi koen@dominion.thruhere.net Acked-by: Peter Korsgaard jacmet@sunsite.dk
include/configs/am335x_evm.h | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h index 33ee2c4..abf4e39 100644 --- a/include/configs/am335x_evm.h +++ b/include/configs/am335x_evm.h @@ -87,6 +87,8 @@ "findfdt="\ "if test $board_name = A335BONE; then " \ "setenv fdtfile am335x-bone.dtb; fi; " \
"if test $board_name = A335BNLT; then " \
"setenv fdtfile am335x-bonelt.dtb; fi; " \
could we not use am335x-boneblack.dtb instead?
"if test $board_name = A33515BB; then " \ "setenv fdtfile am335x-evm.dtb; fi; " \ "if test $board_name = A335X_SK; then " \
-- 1.7.9.5
U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot

Op 13 mrt. 2013, om 15:35 heeft Nishanth Menon nm@ti.com het volgende geschreven:
On 10:20-20130313, Tom Rini wrote:
From: Koen Kooi koen@dominion.thruhere.net
Signed-off-by: Koen Kooi koen@dominion.thruhere.net Acked-by: Peter Korsgaard jacmet@sunsite.dk
include/configs/am335x_evm.h | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h index 33ee2c4..abf4e39 100644 --- a/include/configs/am335x_evm.h +++ b/include/configs/am335x_evm.h @@ -87,6 +87,8 @@ "findfdt="\ "if test $board_name = A335BONE; then " \ "setenv fdtfile am335x-bone.dtb; fi; " \
"if test $board_name = A335BNLT; then " \
"setenv fdtfile am335x-bonelt.dtb; fi; " \
could we not use am335x-boneblack.dtb instead?
it's bonelt in the kernel, so boneblack would fail to load a dtb
Koen

On Wed, Mar 13, 2013 at 9:57 AM, Koen Kooi koen@dominion.thruhere.net wrote:
Op 13 mrt. 2013, om 15:35 heeft Nishanth Menon nm@ti.com het volgende geschreven:
On 10:20-20130313, Tom Rini wrote:
From: Koen Kooi koen@dominion.thruhere.net
Signed-off-by: Koen Kooi koen@dominion.thruhere.net Acked-by: Peter Korsgaard jacmet@sunsite.dk
include/configs/am335x_evm.h | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h index 33ee2c4..abf4e39 100644 --- a/include/configs/am335x_evm.h +++ b/include/configs/am335x_evm.h @@ -87,6 +87,8 @@ "findfdt="\ "if test $board_name = A335BONE; then " \ "setenv fdtfile am335x-bone.dtb; fi; " \
"if test $board_name = A335BNLT; then " \
"setenv fdtfile am335x-bonelt.dtb; fi; " \
could we not use am335x-boneblack.dtb instead?
it's bonelt in the kernel, so boneblack would fail to load a dtb
$ git describe v3.9-rc2 $ ls arch/arm/boot/dts/*bone*.dts* arch/arm/boot/dts/am335x-bone.dts ??? If we need to fix the kernel naming, lets fix it instead of having to deal with people asking - which dtb should i use for beaglebone black? Regards, Nishanth Menon

Op 13 mrt. 2013, om 16:02 heeft Nishanth Menon nm@ti.com het volgende geschreven:
On Wed, Mar 13, 2013 at 9:57 AM, Koen Kooi koen@dominion.thruhere.net wrote:
Op 13 mrt. 2013, om 15:35 heeft Nishanth Menon nm@ti.com het volgende geschreven:
On 10:20-20130313, Tom Rini wrote:
From: Koen Kooi koen@dominion.thruhere.net
Signed-off-by: Koen Kooi koen@dominion.thruhere.net Acked-by: Peter Korsgaard jacmet@sunsite.dk
include/configs/am335x_evm.h | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h index 33ee2c4..abf4e39 100644 --- a/include/configs/am335x_evm.h +++ b/include/configs/am335x_evm.h @@ -87,6 +87,8 @@ "findfdt="\ "if test $board_name = A335BONE; then " \ "setenv fdtfile am335x-bone.dtb; fi; " \
"if test $board_name = A335BNLT; then " \
"setenv fdtfile am335x-bonelt.dtb; fi; " \
could we not use am335x-boneblack.dtb instead?
it's bonelt in the kernel, so boneblack would fail to load a dtb
$ git describe v3.9-rc2 $ ls arch/arm/boot/dts/*bone*.dts* arch/arm/boot/dts/am335x-bone.dts ???
What a surprise, missing stuff in mainline! It's present in the vendor kernel, which is what is shipping with the board.

On 16:05-20130313, Koen Kooi wrote:
Op 13 mrt. 2013, om 16:02 heeft Nishanth Menon nm@ti.com het volgende geschreven:
On Wed, Mar 13, 2013 at 9:57 AM, Koen Kooi koen@dominion.thruhere.net wrote:
Op 13 mrt. 2013, om 15:35 heeft Nishanth Menon nm@ti.com het volgende geschreven:
On 10:20-20130313, Tom Rini wrote:
From: Koen Kooi koen@dominion.thruhere.net
Signed-off-by: Koen Kooi koen@dominion.thruhere.net Acked-by: Peter Korsgaard jacmet@sunsite.dk
include/configs/am335x_evm.h | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h index 33ee2c4..abf4e39 100644 --- a/include/configs/am335x_evm.h +++ b/include/configs/am335x_evm.h @@ -87,6 +87,8 @@ "findfdt="\ "if test $board_name = A335BONE; then " \ "setenv fdtfile am335x-bone.dtb; fi; " \
"if test $board_name = A335BNLT; then " \
"setenv fdtfile am335x-bonelt.dtb; fi; " \
could we not use am335x-boneblack.dtb instead?
it's bonelt in the kernel, so boneblack would fail to load a dtb
$ git describe v3.9-rc2 $ ls arch/arm/boot/dts/*bone*.dts* arch/arm/boot/dts/am335x-bone.dts ???
What a surprise, missing stuff in mainline! It's present in the vendor kernel, which is what is shipping with the board.
No surprise there as marketing names are finalized close to product launches. If there is an vendor u-boot, it can remain in sync with what ever the vendor kernel is. If it is upstream, we might want to think longterm.

Op 13 mrt. 2013, om 16:07 heeft Nishanth Menon nm@ti.com het volgende geschreven:
On 16:05-20130313, Koen Kooi wrote:
Op 13 mrt. 2013, om 16:02 heeft Nishanth Menon nm@ti.com het volgende geschreven:
On Wed, Mar 13, 2013 at 9:57 AM, Koen Kooi koen@dominion.thruhere.net wrote:
Op 13 mrt. 2013, om 15:35 heeft Nishanth Menon nm@ti.com het volgende geschreven:
On 10:20-20130313, Tom Rini wrote:
From: Koen Kooi koen@dominion.thruhere.net
Signed-off-by: Koen Kooi koen@dominion.thruhere.net Acked-by: Peter Korsgaard jacmet@sunsite.dk
include/configs/am335x_evm.h | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h index 33ee2c4..abf4e39 100644 --- a/include/configs/am335x_evm.h +++ b/include/configs/am335x_evm.h @@ -87,6 +87,8 @@ "findfdt="\ "if test $board_name = A335BONE; then " \ "setenv fdtfile am335x-bone.dtb; fi; " \
"if test $board_name = A335BNLT; then " \
"setenv fdtfile am335x-bonelt.dtb; fi; " \
could we not use am335x-boneblack.dtb instead?
it's bonelt in the kernel, so boneblack would fail to load a dtb
$ git describe v3.9-rc2 $ ls arch/arm/boot/dts/*bone*.dts* arch/arm/boot/dts/am335x-bone.dts ???
What a surprise, missing stuff in mainline! It's present in the vendor kernel, which is what is shipping with the board.
No surprise there as marketing names are finalized close to product launches. If there is an vendor u-boot, it can remain in sync with what ever the vendor kernel is. If it is upstream, we might want to think longterm.
I'm in charge of pushing the am335x-bonelt.dts upstream to Linus and I'd like to keep everything in sync. I'm not fond of renaming it again, the EEPROM says BNLT, not BNB :)

On 20:02-20130313, Koen Kooi wrote:
Op 13 mrt. 2013, om 16:07 heeft Nishanth Menon nm@ti.com het volgende geschreven:
On 16:05-20130313, Koen Kooi wrote:
Op 13 mrt. 2013, om 16:02 heeft Nishanth Menon nm@ti.com het volgende geschreven:
On Wed, Mar 13, 2013 at 9:57 AM, Koen Kooi koen@dominion.thruhere.net wrote:
Op 13 mrt. 2013, om 15:35 heeft Nishanth Menon nm@ti.com het volgende geschreven:
On 10:20-20130313, Tom Rini wrote: > From: Koen Kooi koen@dominion.thruhere.net > > Signed-off-by: Koen Kooi koen@dominion.thruhere.net > Acked-by: Peter Korsgaard jacmet@sunsite.dk > --- > include/configs/am335x_evm.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h > index 33ee2c4..abf4e39 100644 > --- a/include/configs/am335x_evm.h > +++ b/include/configs/am335x_evm.h > @@ -87,6 +87,8 @@ > "findfdt="\ > "if test $board_name = A335BONE; then " \ > "setenv fdtfile am335x-bone.dtb; fi; " \ > + "if test $board_name = A335BNLT; then " \ > + "setenv fdtfile am335x-bonelt.dtb; fi; " \ could we not use am335x-boneblack.dtb instead?
it's bonelt in the kernel, so boneblack would fail to load a dtb
$ git describe v3.9-rc2 $ ls arch/arm/boot/dts/*bone*.dts* arch/arm/boot/dts/am335x-bone.dts ???
What a surprise, missing stuff in mainline! It's present in the vendor kernel, which is what is shipping with the board.
No surprise there as marketing names are finalized close to product launches. If there is an vendor u-boot, it can remain in sync with what ever the vendor kernel is. If it is upstream, we might want to think longterm.
I'm in charge of pushing the am335x-bonelt.dts upstream to Linus and I'd like to keep everything in sync. I'm not fond of renaming it again, the EEPROM says BNLT, not BNB :)
:) I will leave it at EEPROM entry defining what the file name should be and if it is not same as product's official name, guess it is some one's future explanation burden ;)

On Wed, Mar 13, 2013 at 08:02:26PM +0100, Koen Kooi wrote:
Op 13 mrt. 2013, om 16:07 heeft Nishanth Menon nm@ti.com het volgende geschreven:
On 16:05-20130313, Koen Kooi wrote:
Op 13 mrt. 2013, om 16:02 heeft Nishanth Menon nm@ti.com het volgende geschreven:
On Wed, Mar 13, 2013 at 9:57 AM, Koen Kooi koen@dominion.thruhere.net wrote:
Op 13 mrt. 2013, om 15:35 heeft Nishanth Menon nm@ti.com het volgende geschreven:
On 10:20-20130313, Tom Rini wrote: > From: Koen Kooi koen@dominion.thruhere.net > > Signed-off-by: Koen Kooi koen@dominion.thruhere.net > Acked-by: Peter Korsgaard jacmet@sunsite.dk > --- > include/configs/am335x_evm.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h > index 33ee2c4..abf4e39 100644 > --- a/include/configs/am335x_evm.h > +++ b/include/configs/am335x_evm.h > @@ -87,6 +87,8 @@ > "findfdt="\ > "if test $board_name = A335BONE; then " \ > "setenv fdtfile am335x-bone.dtb; fi; " \ > + "if test $board_name = A335BNLT; then " \ > + "setenv fdtfile am335x-bonelt.dtb; fi; " \ could we not use am335x-boneblack.dtb instead?
it's bonelt in the kernel, so boneblack would fail to load a dtb
$ git describe v3.9-rc2 $ ls arch/arm/boot/dts/*bone*.dts* arch/arm/boot/dts/am335x-bone.dts ???
What a surprise, missing stuff in mainline! It's present in the vendor kernel, which is what is shipping with the board.
No surprise there as marketing names are finalized close to product launches. If there is an vendor u-boot, it can remain in sync with what ever the vendor kernel is. If it is upstream, we might want to think longterm.
I'm in charge of pushing the am335x-bonelt.dts upstream to Linus and I'd like to keep everything in sync. I'm not fond of renaming it again, the EEPROM says BNLT, not BNB :)
That's a horrible reason to confuse users. The EEPROM contents are irrelevant. Users look for something to match the board name, this does not. It's wrong.
-Matt

Op 13 mrt. 2013, om 21:19 heeft Matt Porter mporter@ti.com het volgende geschreven:
On Wed, Mar 13, 2013 at 08:02:26PM +0100, Koen Kooi wrote:
Op 13 mrt. 2013, om 16:07 heeft Nishanth Menon nm@ti.com het volgende geschreven:
On 16:05-20130313, Koen Kooi wrote:
Op 13 mrt. 2013, om 16:02 heeft Nishanth Menon nm@ti.com het volgende geschreven:
On Wed, Mar 13, 2013 at 9:57 AM, Koen Kooi koen@dominion.thruhere.net wrote:
Op 13 mrt. 2013, om 15:35 heeft Nishanth Menon nm@ti.com het volgende geschreven:
> On 10:20-20130313, Tom Rini wrote: >> From: Koen Kooi koen@dominion.thruhere.net >> >> Signed-off-by: Koen Kooi koen@dominion.thruhere.net >> Acked-by: Peter Korsgaard jacmet@sunsite.dk >> --- >> include/configs/am335x_evm.h | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h >> index 33ee2c4..abf4e39 100644 >> --- a/include/configs/am335x_evm.h >> +++ b/include/configs/am335x_evm.h >> @@ -87,6 +87,8 @@ >> "findfdt="\ >> "if test $board_name = A335BONE; then " \ >> "setenv fdtfile am335x-bone.dtb; fi; " \ >> + "if test $board_name = A335BNLT; then " \ >> + "setenv fdtfile am335x-bonelt.dtb; fi; " \ > could we not use am335x-boneblack.dtb instead?
it's bonelt in the kernel, so boneblack would fail to load a dtb
$ git describe v3.9-rc2 $ ls arch/arm/boot/dts/*bone*.dts* arch/arm/boot/dts/am335x-bone.dts ???
What a surprise, missing stuff in mainline! It's present in the vendor kernel, which is what is shipping with the board.
No surprise there as marketing names are finalized close to product launches. If there is an vendor u-boot, it can remain in sync with what ever the vendor kernel is. If it is upstream, we might want to think longterm.
I'm in charge of pushing the am335x-bonelt.dts upstream to Linus and I'd like to keep everything in sync. I'm not fond of renaming it again, the EEPROM says BNLT, not BNB :)
That's a horrible reason to confuse users. The EEPROM contents are irrelevant. Users look for something to match the board name, this does not. It's wrong.
It is stupid, but that's what you get for renaming boards. The real problem with this is that it is a flag day, the kernel and u-boot need to change both at the same time. And after that you'll have a mismatch if you use different versions.
Anyway, patches welcome for the vendor kernel to rename it.
regards,
Koen

On Thu, Mar 14, 2013 at 07:53:07AM +0100, Koen Kooi wrote:
Op 13 mrt. 2013, om 21:19 heeft Matt Porter mporter@ti.com het volgende geschreven:
On Wed, Mar 13, 2013 at 08:02:26PM +0100, Koen Kooi wrote:
Op 13 mrt. 2013, om 16:07 heeft Nishanth Menon nm@ti.com het volgende geschreven:
On 16:05-20130313, Koen Kooi wrote:
Op 13 mrt. 2013, om 16:02 heeft Nishanth Menon nm@ti.com het volgende geschreven:
On Wed, Mar 13, 2013 at 9:57 AM, Koen Kooi koen@dominion.thruhere.net wrote: > > Op 13 mrt. 2013, om 15:35 heeft Nishanth Menon nm@ti.com het volgende geschreven: > >> On 10:20-20130313, Tom Rini wrote: >>> From: Koen Kooi koen@dominion.thruhere.net >>> >>> Signed-off-by: Koen Kooi koen@dominion.thruhere.net >>> Acked-by: Peter Korsgaard jacmet@sunsite.dk >>> --- >>> include/configs/am335x_evm.h | 2 ++ >>> 1 file changed, 2 insertions(+) >>> >>> diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h >>> index 33ee2c4..abf4e39 100644 >>> --- a/include/configs/am335x_evm.h >>> +++ b/include/configs/am335x_evm.h >>> @@ -87,6 +87,8 @@ >>> "findfdt="\ >>> "if test $board_name = A335BONE; then " \ >>> "setenv fdtfile am335x-bone.dtb; fi; " \ >>> + "if test $board_name = A335BNLT; then " \ >>> + "setenv fdtfile am335x-bonelt.dtb; fi; " \ >> could we not use am335x-boneblack.dtb instead? > > it's bonelt in the kernel, so boneblack would fail to load a dtb $ git describe v3.9-rc2 $ ls arch/arm/boot/dts/*bone*.dts* arch/arm/boot/dts/am335x-bone.dts ???
What a surprise, missing stuff in mainline! It's present in the vendor kernel, which is what is shipping with the board.
No surprise there as marketing names are finalized close to product launches. If there is an vendor u-boot, it can remain in sync with what ever the vendor kernel is. If it is upstream, we might want to think longterm.
I'm in charge of pushing the am335x-bonelt.dts upstream to Linus and I'd like to keep everything in sync. I'm not fond of renaming it again, the EEPROM says BNLT, not BNB :)
That's a horrible reason to confuse users. The EEPROM contents are irrelevant. Users look for something to match the board name, this does not. It's wrong.
It is stupid, but that's what you get for renaming boards. The real problem with this is that it is a flag day, the kernel and u-boot need to change both at the same time. And after that you'll have a mismatch if you use different versions.
Anyway, patches welcome for the vendor kernel to rename it.
The pull request is https://github.com/beagleboard/kernel/pull/33
Should be easy to keep those in sync as you control the s/w going out on all the new BeagleBones. The type of people that have early boards can all handle s/w changes like this otherwise they shouldn't be in the alpha test group.
Anything else that prevents us from fixing this fdtfile hunk now?
-Matt

From: Koen Kooi koen@dominion.thruhere.net
The kernel is loaded from some form of ext[234] or FAT, depending on the distribution used. We add a bootpart variable to the environment so that we can load from the correct mmc partition as well.
Signed-off-by: Koen Kooi koen@dominion.thruhere.net Signed-off-by: Tom Rini trini@ti.com --- include/configs/am335x_evm.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h index abf4e39..ec4ddbc 100644 --- a/include/configs/am335x_evm.h +++ b/include/configs/am335x_evm.h @@ -61,6 +61,7 @@ "mmcdev=0\0" \ "mmcroot=/dev/mmcblk0p2 ro\0" \ "mmcrootfstype=ext4 rootwait\0" \ + "bootpart=0:2\0" \ "ramroot=/dev/ram0 rw ramdisk_size=65536 initrd=${rdaddr},64M\0" \ "ramrootfstype=ext2\0" \ "mmcargs=setenv bootargs console=${console} " \ @@ -68,16 +69,15 @@ "root=${mmcroot} " \ "rootfstype=${mmcrootfstype}\0" \ "bootenv=uEnv.txt\0" \ - "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \ + "loadbootenv=load mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \ "importbootenv=echo Importing environment from mmc ...; " \ "env import -t $loadaddr $filesize\0" \ "ramargs=setenv bootargs console=${console} " \ "${optargs} " \ "root=${ramroot} " \ "rootfstype=${ramrootfstype}\0" \ - "loadramdisk=fatload mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \ - "loaduimagefat=fatload mmc ${mmcdev} ${loadaddr} ${bootfile}\0" \ - "loaduimage=ext2load mmc ${mmcdev}:2 ${loadaddr} ${bootfile}\0" \ + "loadramdisk=load mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \ + "loaduimage=load mmc ${bootpart} ${loadaddr} ${bootfile}\0" \ "mmcboot=echo Booting from mmc ...; " \ "run mmcargs; " \ "bootm ${loadaddr}\0" \ @@ -147,6 +147,8 @@ #define CONFIG_DOS_PARTITION #define CONFIG_CMD_FAT #define CONFIG_CMD_EXT2 +#define CONFIG_CMD_EXT4 +#define CONFIG_CMD_FS_GENERIC
#define CONFIG_SPI #define CONFIG_OMAP3_SPI

"Tom" == Tom Rini trini@ti.com writes:
Tom> From: Koen Kooi koen@dominion.thruhere.net Tom> The kernel is loaded from some form of ext[234] or FAT, depending on the Tom> distribution used. We add a bootpart variable to the environment so Tom> that we can load from the correct mmc partition as well.
Tom> Signed-off-by: Koen Kooi koen@dominion.thruhere.net Tom> Signed-off-by: Tom Rini trini@ti.com Tom> --- Tom> include/configs/am335x_evm.h | 10 ++++++---- Tom> 1 file changed, 6 insertions(+), 4 deletions(-)
Tom> diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h Tom> index abf4e39..ec4ddbc 100644 Tom> --- a/include/configs/am335x_evm.h Tom> +++ b/include/configs/am335x_evm.h Tom> @@ -61,6 +61,7 @@ Tom> "mmcdev=0\0" \ Tom> "mmcroot=/dev/mmcblk0p2 ro\0" \ Tom> "mmcrootfstype=ext4 rootwait\0" \ Tom> + "bootpart=0:2\0" \
You could argue this should be ${mmcdev}:2 instead.
Tom> @@ -147,6 +147,8 @@ Tom> #define CONFIG_DOS_PARTITION Tom> #define CONFIG_CMD_FAT Tom> #define CONFIG_CMD_EXT2 Tom> +#define CONFIG_CMD_EXT4 Tom> +#define CONFIG_CMD_FS_GENERIC
CMD_EXT2 can presumably be dropped now?
Other than that,
Acked-by: Peter Korsgaard jacmet@sunsite.dk

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 03/13/2013 11:04 AM, Peter Korsgaard wrote:
"Tom" == Tom Rini trini@ti.com writes:
Tom> From: Koen Kooi koen@dominion.thruhere.net Tom> The kernel is loaded from some form of ext[234] or FAT, depending on the Tom> distribution used. We add a bootpart variable to the environment so Tom> that we can load from the correct mmc partition as well.
Tom> Signed-off-by: Koen Kooi koen@dominion.thruhere.net Tom> Signed-off-by: Tom Rini trini@ti.com Tom> --- Tom> include/configs/am335x_evm.h | 10 ++++++---- Tom> 1 file changed, 6 insertions(+), 4 deletions(-)
Tom> diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h Tom> index abf4e39..ec4ddbc 100644 Tom> --- a/include/configs/am335x_evm.h Tom> +++ b/include/configs/am335x_evm.h Tom> @@ -61,6 +61,7 @@ Tom> "mmcdev=0\0" \ Tom> "mmcroot=/dev/mmcblk0p2 ro\0" \ Tom> "mmcrootfstype=ext4 rootwait\0" \ Tom> + "bootpart=0:2\0" \
You could argue this should be ${mmcdev}:2 instead.
Should but can't, sadly. I did that at first but we don't get re-expansion and it becomes later on 'load mmc ${mmcdev}:2 ...'.
Tom> @@ -147,6 +147,8 @@ Tom> #define CONFIG_DOS_PARTITION Tom> #define CONFIG_CMD_FAT Tom> #define CONFIG_CMD_EXT2 Tom> +#define CONFIG_CMD_EXT4 Tom> +#define CONFIG_CMD_FS_GENERIC
CMD_EXT2 can presumably be dropped now?
I'd rather not in case people have scripts using ext2load already.
- -- Tom

"Tom" == Tom Rini trini@ti.com writes:
Hi,
You could argue this should be ${mmcdev}:2 instead.
Tom> Should but can't, sadly. I did that at first but we don't get Tom> re-expansion and it becomes later on 'load mmc ${mmcdev}:2 ...'.
Ahh, ok.
Tom> @@ -147,6 +147,8 @@ Tom> #define CONFIG_DOS_PARTITION Tom>
#define CONFIG_CMD_FAT Tom> #define CONFIG_CMD_EXT2 Tom> +#define CONFIG_CMD_EXT4 Tom> +#define CONFIG_CMD_FS_GENERIC
CMD_EXT2 can presumably be dropped now?
Tom> I'd rather not in case people have scripts using ext2load already.
Ok, could be good to mention that in the commit message.

From: Koen Kooi koen@dominion.thruhere.net
Make bootcmd run findfdt so that we know what dtb file to load. Add a loadfdt command to load this file in. Make mmcboot pass in ${fdtaddr} and make the mmc section of bootcmd run loadfdt.
Signed-off-by: Koen Kooi koen@dominion.thruhere.net Signed-off-by: Tom Rini trini@ti.com --- include/configs/am335x_evm.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h index ec4ddbc..c7179cd 100644 --- a/include/configs/am335x_evm.h +++ b/include/configs/am335x_evm.h @@ -54,7 +54,8 @@ "fdtaddr=0x80F80000\0" \ "fdt_high=0xffffffff\0" \ "rdaddr=0x81000000\0" \ - "bootfile=/boot/uImage\0" \ + "bootdir=/boot\0" \ + "bootfile=uImage\0" \ "fdtfile=\0" \ "console=ttyO0,115200n8\0" \ "optargs=\0" \ @@ -77,10 +78,11 @@ "root=${ramroot} " \ "rootfstype=${ramrootfstype}\0" \ "loadramdisk=load mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \ - "loaduimage=load mmc ${bootpart} ${loadaddr} ${bootfile}\0" \ + "loaduimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \ + "loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \ "mmcboot=echo Booting from mmc ...; " \ "run mmcargs; " \ - "bootm ${loadaddr}\0" \ + "bootm ${loadaddr} - ${fdtaddr}\0" \ "ramboot=echo Booting from ramdisk ...; " \ "run ramargs; " \ "bootm ${loadaddr}\0" \ @@ -94,7 +96,9 @@ "if test $board_name = A335X_SK; then " \ "setenv fdtfile am335x-evmsk.dtb; fi\0" \
+ #define CONFIG_BOOTCOMMAND \ + "run findfdt; " \ "mmc dev ${mmcdev}; if mmc rescan; then " \ "echo SD/MMC found on device ${mmcdev};" \ "if run loadbootenv; then " \ @@ -106,6 +110,7 @@ "run uenvcmd;" \ "fi;" \ "if run loaduimage; then " \ + "run loadfdt;" \ "run mmcboot;" \ "fi;" \ "fi;" \

"Tom" == Tom Rini trini@ti.com writes:
Hi,
Tom> From: Koen Kooi koen@dominion.thruhere.net Tom> Make bootcmd run findfdt so that we know what dtb file to load. Add a Tom> loadfdt command to load this file in. Make mmcboot pass in ${fdtaddr} Tom> and make the mmc section of bootcmd run loadfdt.
Tom> Signed-off-by: Koen Kooi koen@dominion.thruhere.net Tom> Signed-off-by: Tom Rini trini@ti.com Tom> --- Tom> include/configs/am335x_evm.h | 11 ++++++++--- Tom> 1 file changed, 8 insertions(+), 3 deletions(-)
Tom> diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h Tom> index ec4ddbc..c7179cd 100644 Tom> --- a/include/configs/am335x_evm.h Tom> +++ b/include/configs/am335x_evm.h Tom> @@ -54,7 +54,8 @@ Tom> "fdtaddr=0x80F80000\0" \ Tom> "fdt_high=0xffffffff\0" \ Tom> "rdaddr=0x81000000\0" \ Tom> - "bootfile=/boot/uImage\0" \ Tom> + "bootdir=/boot\0" \ Tom> + "bootfile=uImage\0" \ Tom> "fdtfile=\0" \ Tom> "console=ttyO0,115200n8\0" \ Tom> "optargs=\0" \ Tom> @@ -77,10 +78,11 @@ Tom> "root=${ramroot} " \ Tom> "rootfstype=${ramrootfstype}\0" \ Tom> "loadramdisk=load mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \ Tom> - "loaduimage=load mmc ${bootpart} ${loadaddr} ${bootfile}\0" \ Tom> + "loaduimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \ Tom> + "loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \ Tom> "mmcboot=echo Booting from mmc ...; " \ Tom> "run mmcargs; " \ Tom> - "bootm ${loadaddr}\0" \ Tom> + "bootm ${loadaddr} - ${fdtaddr}\0" \ Tom> "ramboot=echo Booting from ramdisk ...; " \ Tom> "run ramargs; " \ Tom> "bootm ${loadaddr}\0" \ Tom> @@ -94,7 +96,9 @@ Tom> "if test $board_name = A335X_SK; then " \ Tom> "setenv fdtfile am335x-evmsk.dtb; fi\0" \
Tom> +
Except for the extra line here,
Acked-by: Peter Korsgaard jacmet@sunsite.dk
participants (5)
-
Koen Kooi
-
Matt Porter
-
Nishanth Menon
-
Peter Korsgaard
-
Tom Rini