am335x_evm: Switch to DT boot, add another platform
v2 cover 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.
Signature · 1 line
Tom
PATCH v2 1/3 am335x_evm: add support for BeagleBone Black DT name
From: Koen Kooi <[email protected]>
--- include/configs/am335x_evm.h | 2 ++ 1 file changed, 2 insertions(+)
include/configs/am335x_evm.h +2 -0
@@ -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 " \
Signature · 1 line
1.7.9.5
PATCH v2 1/3 am335x_evm: add support for BeagleBone Black DT name
Quoted 13 lines · Tom Rini
From: Koen Kooi <[email protected]>
Signed-off-by Koen Kooi <[email protected]>Acked-by Peter Korsgaard <[email protected]>--- include/configs/am335x_evm.h | 2 ++ 1 file changed, 2 insertions(+)include/configs/am335x_evm.h +0
-0
include/configs/am335x_evm.h line 91
Quoted 5 lines
include/configs/am335x_evm.h +2
-0@@ -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?
Quoted 10 lines
include/configs/am335x_evm.h +0
-0"if test $board_name = A33515BB; then " \"setenv fdtfile am335x-evm.dtb; fi; " \"if test $board_name = A335X_SK; then " \Signature · 6 lines
1.7.9.5 _______________________________________________ U-Boot mailing list U-Boot at lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Signature · 2 lines
Regards, Nishanth Menon
PATCH v2 1/3 am335x_evm: add support for BeagleBone Black DT name
Op 13 mrt. 2013, om 15:35 heeft Nishanth Menon <[email protected]> het volgende geschreven:
Quoted 9 lines · Tom Rini
Quoted 8 lines
From: Koen Kooi <[email protected]>
Signed-off-by Koen Kooi <[email protected]>Acked-by Peter Korsgaard <[email protected]>---
include/configs/am335x_evm.h| 2 ++1 file changed, 2 insertions(+)
Quoted 11 lines
include/configs/am335x_evm.h line 91
Quoted 10 lines
include/configs/am335x_evm.h +2
-0@@ -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
PATCH v2 1/3 am335x_evm: add support for BeagleBone Black DT name
Quoted 24 lines · Koen Kooi
Op 13 mrt. 2013, om 15:35 heeft Nishanth Menon <[email protected]> het volgende geschreven:
Quoted 9 lines · Tom Rini
Quoted 8 lines
From: Koen Kooi <[email protected]>
Signed-off-by Koen Kooi <[email protected]>Acked-by Peter Korsgaard <[email protected]>---
include/configs/am335x_evm.h| 2 ++1 file changed, 2 insertions(+)Quoted 11 lines
include/configs/am335x_evm.h line 91
Quoted 10 lines
include/configs/am335x_evm.h +2
-0@@ -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?
Quoted 1 line
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
PATCH v2 1/3 am335x_evm: add support for BeagleBone Black DT name
Op 13 mrt. 2013, om 16:02 heeft Nishanth Menon <[email protected]> het volgende geschreven:
Quoted 25 lines · Koen Kooi
Quoted 24 lines
Op 13 mrt. 2013, om 15:35 heeft Nishanth Menon <[email protected]> het volgende geschreven:
Quoted 20 lines · Tom Rini
Quoted 13 lines
From: Koen Kooi <[email protected]>
Signed-off-by Koen Kooi <[email protected]>Acked-by Peter Korsgaard <[email protected]>---
include/configs/am335x_evm.h| 2 ++1 file changed, 2 insertions(+)include/configs/am335x_evm.h +0
-0include/configs/am335x_evm.h line 91
Quoted 5 lines
include/configs/am335x_evm.h +2
-0@@ -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?
Quoted 6 lines
Quoted 1 line
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.
PATCH v2 1/3 am335x_evm: add support for BeagleBone Black DT name
Quoted 28 lines · Koen Kooi
Op 13 mrt. 2013, om 16:02 heeft Nishanth Menon <[email protected]> het volgende geschreven:
Quoted 25 lines · Koen Kooi
Quoted 24 lines
Op 13 mrt. 2013, om 15:35 heeft Nishanth Menon <[email protected]> het volgende geschreven:
Quoted 20 lines · Tom Rini
Quoted 13 lines
From: Koen Kooi <[email protected]>
Signed-off-by Koen Kooi <[email protected]>Acked-by Peter Korsgaard <[email protected]>---
include/configs/am335x_evm.h| 2 ++1 file changed, 2 insertions(+)include/configs/am335x_evm.h +0
-0include/configs/am335x_evm.h line 91
Quoted 5 lines
include/configs/am335x_evm.h +2
-0@@ -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?
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
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.
Signature · 2 lines
Regards, Nishanth Menon
PATCH v2 1/3 am335x_evm: add support for BeagleBone Black DT name
Op 13 mrt. 2013, om 16:07 heeft Nishanth Menon <[email protected]> het volgende geschreven:
Quoted 36 lines · Koen Kooi
Quoted 35 lines
Op 13 mrt. 2013, om 16:02 heeft Nishanth Menon <[email protected]> het volgende geschreven:
Quoted 31 lines · Koen Kooi
Quoted 24 lines
Op 13 mrt. 2013, om 15:35 heeft Nishanth Menon <[email protected]> het volgende geschreven:
Quoted 9 lines · Tom Rini
Quoted 8 lines
From: Koen Kooi <[email protected]>
Signed-off-by Koen Kooi <[email protected]>Acked-by Peter Korsgaard <[email protected]>---
include/configs/am335x_evm.h| 2 ++1 file changed, 2 insertions(+)Quoted 11 lines
include/configs/am335x_evm.h line 91
Quoted 10 lines
include/configs/am335x_evm.h +2
-0@@ -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?
Quoted 1 line
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 ???
Quoted 5 lines
Quoted 1 line
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 :)
PATCH v2 1/3 am335x_evm: add support for BeagleBone Black DT name
Quoted 39 lines · Koen Kooi
Op 13 mrt. 2013, om 16:07 heeft Nishanth Menon <[email protected]> het volgende geschreven:
Quoted 36 lines · Koen Kooi
Quoted 35 lines
Op 13 mrt. 2013, om 16:02 heeft Nishanth Menon <[email protected]> het volgende geschreven:
Quoted 31 lines · Koen Kooi
Quoted 24 lines
Op 13 mrt. 2013, om 15:35 heeft Nishanth Menon <[email protected]> het volgende geschreven:
Quoted 9 lines · Tom Rini
Quoted 8 lines
From: Koen Kooi <[email protected]>
Signed-off-by Koen Kooi <[email protected]>Acked-by Peter Korsgaard <[email protected]>---
include/configs/am335x_evm.h| 2 ++1 file changed, 2 insertions(+)Quoted 11 lines
include/configs/am335x_evm.h line 91
Quoted 10 lines
include/configs/am335x_evm.h +2
-0@@ -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?
Quoted 1 line
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 ???
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
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.dtsupstream 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 ;)
Signature · 2 lines
Regards, Nishanth Menon
PATCH v2 1/3 am335x_evm: add support for BeagleBone Black DT name
In reply to Koen KooiQuoted 39 lines · Koen Kooi
Op 13 mrt. 2013, om 16:07 heeft Nishanth Menon <[email protected]> het volgende geschreven:
Quoted 36 lines · Koen Kooi
Quoted 35 lines
Op 13 mrt. 2013, om 16:02 heeft Nishanth Menon <[email protected]> het volgende geschreven:
Quoted 31 lines · Koen Kooi
Quoted 24 lines
Op 13 mrt. 2013, om 15:35 heeft Nishanth Menon <[email protected]> het volgende geschreven:
Quoted 9 lines · Tom Rini
Quoted 8 lines
From: Koen Kooi <[email protected]>
Signed-off-by Koen Kooi <[email protected]>Acked-by Peter Korsgaard <[email protected]>---
include/configs/am335x_evm.h| 2 ++1 file changed, 2 insertions(+)Quoted 11 lines
include/configs/am335x_evm.h line 91
Quoted 10 lines
include/configs/am335x_evm.h +2
-0@@ -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?
Quoted 1 line
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 ???
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
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.dtsupstream 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
PATCH v2 1/3 am335x_evm: add support for BeagleBone Black DT name
Op 13 mrt. 2013, om 21:19 heeft Matt Porter <[email protected]> het volgende geschreven:
Quoted 46 lines · Koen Kooi
Quoted 45 lines
Op 13 mrt. 2013, om 16:07 heeft Nishanth Menon <[email protected]> het volgende geschreven:
Quoted 41 lines · Koen Kooi
Quoted 28 lines
Op 13 mrt. 2013, om 16:02 heeft Nishanth Menon <[email protected]> het volgende geschreven:
Quoted 25 lines · Koen Kooi
Quoted 24 lines
Op 13 mrt. 2013, om 15:35 heeft Nishanth Menon <[email protected]> het volgende geschreven:
Quoted 20 lines · Tom Rini
Quoted 13 lines
From: Koen Kooi <[email protected]>
Signed-off-by Koen Kooi <[email protected]>Acked-by Peter Korsgaard <[email protected]>---
include/configs/am335x_evm.h| 2 ++1 file changed, 2 insertions(+)include/configs/am335x_evm.h +0
-0include/configs/am335x_evm.h line 91
Quoted 5 lines
include/configs/am335x_evm.h +2
-0@@ -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?
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
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.
Quoted 5 lines
Quoted 1 line
I'm in charge of pushing the
am335x-bonelt.dtsupstream 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
PATCH v2 1/3 am335x_evm: add support for BeagleBone Black DT name
Quoted 51 lines · Koen Kooi
Op 13 mrt. 2013, om 21:19 heeft Matt Porter <[email protected]> het volgende geschreven:
Quoted 48 lines · Koen Kooi
Quoted 46 lines
Op 13 mrt. 2013, om 16:07 heeft Nishanth Menon <[email protected]> het volgende geschreven:
Quoted 36 lines · Koen Kooi
Quoted 35 lines
Op 13 mrt. 2013, om 16:02 heeft Nishanth Menon <[email protected]> het volgende geschreven:
Quoted 31 lines · Koen Kooi
Quoted 24 lines
Op 13 mrt. 2013, om 15:35 heeft Nishanth Menon <[email protected]> het volgende geschreven:
Quoted 9 lines · Tom Rini
Quoted 8 lines
From: Koen Kooi <[email protected]>
Signed-off-by Koen Kooi <[email protected]>Acked-by Peter Korsgaard <[email protected]>---
include/configs/am335x_evm.h| 2 ++1 file changed, 2 insertions(+)Quoted 11 lines
include/configs/am335x_evm.h line 91
Quoted 10 lines
include/configs/am335x_evm.h +2
-0@@ -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?
Quoted 1 line
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 ???Quoted 5 lines
Quoted 1 line
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.dtsupstream 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 :)
Quoted 7 lines
Quoted 3 lines
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
PATCH v2 2/3 am335x_evm: Enable CMD_EXT4 and CMD_FS_GENERIC, add bootpart to env
In reply to Tom RiniFrom: Koen Kooi <[email protected]>
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.
--- include/configs/am335x_evm.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
include/configs/am335x_evm.h +6 -4
@@ -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
Signature · 1 line
1.7.9.5
PATCH v2 2/3 am335x_evm: Enable CMD_EXT4 and CMD_FS_GENERIC, add bootpart to env
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Tom" == Tom Rini <[email protected]> writes:
Tom> From: Koen Kooi <[email protected]>
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 <[email protected]> Tom> Signed-off-by: Tom Rini <[email protected]>
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,
Signature · 1 line
Bye, Peter Korsgaard
PATCH v2 2/3 am335x_evm: Enable CMD_EXT4 and CMD_FS_GENERIC, add bootpart to env
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 12 lines · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Tom" == Tom Rini <[email protected]> writes:
Tom> From: Koen Kooi <[email protected]> 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 <[email protected]> Tom>
Signed-off-by Tom Rini <[email protected]> Tom> --- Tom>
include/configs/am335x_evm.h| 10 ++++++---- Tom> 1 file
changed, 6 insertions(+), 4 deletions(-)
Quoted 8 lines
Tom> diff --git
a/include/configs/am335x_evm.hb/include/configs/am335x_evm.hTom> index abf4e39..ec4ddbc 100644 Tom> ---a/include/configs/am335x_evm.hTom> +++b/include/configs/am335x_evm.hTom> @@ -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 ...'.
Quoted 5 lines
Tom> @@ -147,6 +147,8 @@ Tom> #define
CONFIG_DOS_PARTITIONTom> #defineCONFIG_CMD_FATTom> #defineCONFIG_CMD_EXT2Tom> +#defineCONFIG_CMD_EXT4Tom> +#defineCONFIG_CMD_FS_GENERIC
CMD_EXT2can presumably be dropped now?
I'd rather not in case people have scripts using ext2load already.
- --
Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQIcBAEBAgAGBQJRQJdIAAoJENk4IS6UOR1WumgP+wZRgnKi0Zds9g7a9rODiu0U 2WyzUE912hc1ifq0o2IEHzksrVBvg6wSbQtHFFPJKbecJf11V/SZINWnQXVbd8xU IRPmyd12CbdYK+XiJbIRVCfJueHYIK5kgZo96vm0w3Hh90yuUVfvJtrYu2nlqad5 QOXXwfWRuD/VYZSjIUVKxG4RJBUVv2RrIUCFOMdxoC8osu/Ea/bCm178+kdIGvSC Ij3dRefn6IsnEoa+VswY4oA9IRP69nTbIGZBXUQk+haIEjMKcYV2RknkKN9YW0Cj 6viKXJJm8HenBdbZ0ZSv7HWKPqtN5VWvzqHbMjj09r1P1WQ1jT+CERdNdIN5DYI0 YvTgBnyuOmw4b0WI5GQVnk3gNhX5PEw/OQqsI2WTlV/5kmckhz8+xNby5t8khxET lphYKI7bLedpOETrwXl6SdzkeHQ8NfT2vSKKy2GBKBA9JtY3mMpxx2A89tgItw2B QSLYZn425mMLPQzH6eOt7kXphqyWodbiypn/WFDRD6lhtD3yMZwmpZ5wHIkptw9r GA1LIp7R+MMDu4srJvsF8VH1bKuDFB8Nde44iCD9JwSMqtiycbf3wMXrsKbQxLld KQXvMiFZMz4VESiIGNEFvKMTsmbDeKnKsFt37eoUWyAeHCkbP/Or5gpD7uhkyaEm zByAl7YtpdYbfSlEco+o
=tasN
-----END PGP SIGNATURE-----
PATCH v2 2/3 am335x_evm: Enable CMD_EXT4 and CMD_FS_GENERIC, add bootpart to env
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Tom" == Tom Rini <[email protected]> writes:
Hi,
Quoted 1 line
Quoted 1 line
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>
Quoted 4 lines
Quoted 4 lines
#define
CONFIG_CMD_FATTom> #defineCONFIG_CMD_EXT2Tom> +#defineCONFIG_CMD_EXT4Tom> +#defineCONFIG_CMD_FS_GENERIC
CMD_EXT2can 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.
Signature · 1 line
Bye, Peter Korsgaard
PATCH v2 3/3 am335x_evm: Add more variables and switch to DT booting.
In reply to Tom RiniFrom: Koen Kooi <[email protected]>
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.
--- include/configs/am335x_evm.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
include/configs/am335x_evm.h +8 -3
@@ -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;" \
Signature · 1 line
1.7.9.5
PATCH v2 3/3 am335x_evm: Add more variables and switch to DT booting.
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Tom" == Tom Rini <[email protected]> writes:
Hi,
Tom> From: Koen Kooi <[email protected]>
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 <[email protected]> Tom> Signed-off-by: Tom Rini <[email protected]>
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,
Signature · 1 line
Bye, Peter Korsgaard