am335x_evm: Switch to DT boot, add another platform
v3 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 v2:
- Don't add extra line in am335x_evm.h, note why we keep CONFIG_CMD_EXT2 (Peter)
- Update the dtb name for the new device (Matt, Nishanth, Koen)
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 v3 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-boneblack.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 v3 1/3 am335x_evm: add support for BeagleBone Black DT name
Quoted 15 lines · Tom Rini
From: Koen Kooi <[email protected]>
Cc Matt Porter <[email protected]>Cc Nishanth Menon <[email protected]>Signed-off-by Koen Kooi <[email protected]>Signed-off-by Tom Rini <[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 94
Quoted 8 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-boneblack.dtb; fi; " \"if test $board_name = A33515BB; then " \"setenv fdtfile am335x-evm.dtb; fi; " \"if test $board_name = A335X_SK; then " \
Koen has merged my pull request to the beagleboard/kernel tree so...
PATCH v3 1/3 am335x_evm: add support for BeagleBone Black DT name
In reply to Tom RiniQuoted 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> Cc: Matt Porter <[email protected]>
Tom> Cc: Nishanth Menon <[email protected]>
Tom> Signed-off-by: Koen Kooi <[email protected]> Tom> Signed-off-by: Tom Rini <[email protected]>
Tom> ---
Tom> include/configs/am335x_evm.h | 2 ++
Tom> 1 file changed, 2 insertions(+)
Tom> diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h Tom> index 33ee2c4..377a3c5 100644
Tom> --- a/include/configs/am335x_evm.h
Tom> +++ b/include/configs/am335x_evm.h
Tom> @@ -87,6 +87,8 @@
Tom> "findfdt="\ Tom> "if test $board_name = A335BONE; then " \ Tom> "setenv fdtfile am335x-bone.dtb; fi; " \ Tom> + "if test $board_name = A335BNLT; then " \ Tom> + "setenv fdtfile am335x-boneblack.dtb; fi; " \ Tom> "if test $board_name = A33515BB; then " \ Tom> "setenv fdtfile am335x-evm.dtb; fi; " \ Tom> "if test $board_name = A335X_SK; then " \
Tom> --
Tom> 1.7.9.5
Signature · 1 line
Bye, Peter Korsgaard
PATCH v3 1/3 am335x_evm: add support for BeagleBone Black DT name
In reply to Tom RiniQuoted 15 lines · Tom Rini
From: Koen Kooi <[email protected]>
Cc Matt Porter <[email protected]>Cc Nishanth Menon <[email protected]>Signed-off-by Koen Kooi <[email protected]>Signed-off-by Tom Rini <[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-boneblack.dtb; fi; " \
Regards,
Nishanth Menon
PATCH v3 1/3 am335x_evm: add support for BeagleBone Black DT name
In reply to Tom RiniQuoted 9 lines · Tom Rini
From: Koen Kooi <[email protected]>
Cc Matt Porter <[email protected]>Cc Nishanth Menon <[email protected]>Signed-off-by Koen Kooi <[email protected]>Signed-off-by Tom Rini <[email protected]>Acked-by Matt Porter <[email protected]>Acked-by Peter Korsgaard <[email protected]>Acked-by Nishanth Menon <[email protected]>
Along with the rest of the series, applied to u-boot-ti/master (and already pulled into u-boot-arm/master), thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130326/5eb9ff4e/attachment.pgp>
PATCH v3 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. We leave CONFIG_CMD_EXT2 for existing scripts that use ext2load.
--- 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 v3 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. We leave Tom> CONFIG_CMD_EXT2 for existing scripts that use ext2load.
Tom> Signed-off-by: Koen Kooi <[email protected]> Tom> Signed-off-by: Tom Rini <[email protected]>
Signature · 1 line
Bye, Peter Korsgaard
PATCH v3 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 | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
include/configs/am335x_evm.h +7 -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" \
@@ -95,6 +97,7 @@"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 +109,7 @@"run uenvcmd;" \"fi;" \"if run loaduimage; then " \ +"run loadfdt;" \"run mmcboot;" \"fi;" \"fi;" \
Signature · 1 line
1.7.9.5
PATCH v3 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:
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]>
Signature · 1 line
Bye, Peter Korsgaard