diff options
author | Gerlando Falauto <gerlando.falauto@keymile.com> | 2014-01-27 16:58:28 +0100 |
---|---|---|
committer | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2014-02-13 16:18:13 +0100 |
commit | b1c2a7ae32b6c5dd1dcb7cb29c862af01523ba36 (patch) | |
tree | 21a3b3d3f230342ef08055258472862fad708fa1 /include/configs | |
parent | 7b2268b88fb9a67b13563fa61b8ae282b9aa6e00 (diff) | |
download | u-boot-imx-b1c2a7ae32b6c5dd1dcb7cb29c862af01523ba36.zip u-boot-imx-b1c2a7ae32b6c5dd1dcb7cb29c862af01523ba36.tar.gz u-boot-imx-b1c2a7ae32b6c5dd1dcb7cb29c862af01523ba36.tar.bz2 |
arm/km: define fdt_high env variable and allow backwards compatibility
Add set_fdthigh subcommand to "subbootcmds" (release) so to set "fdt_high"
This is necessary on Kirkwood so that the FDT does not get relocated
above the memory limit that the kernel cannot access
(that is the memory part reserved for the switch).
This was tested on NUSA1, where it is necessary, and on ETER1, where it
doesn't seem to hurt.
We want the scripts to also work with older versions of u-boot, where:
a) set_fdthigh is not defined (will be default env for newer u-boots)
b) the fdt will not be available
For this reason, we use "set_fdthigh" to tell whether we are running
a newer (FDT-aware) u-boot or not.
So if "set_fdthigh" runs successfully or arch != arm we try loading
the fdt; otherwise we proceed normally.
Notice how, contrary to release mode, set_fdthigh will _not_ be part of
subbootcmds for develop and ramfs, but will be executed as part of
"tftpfdt".
Since this is only needed for kirkwood cards, and it prevents the kernel
from booting on QorIQ (though it seemed to work on ETER1), we change
its definition in the default env for powerpc so that the value is only
set on ARM.
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Signed-off-by: Gerlando Falauto <gerlando.falauto@keymile.com>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Acked-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Diffstat (limited to 'include/configs')
-rw-r--r-- | include/configs/km/keymile-common.h | 4 | ||||
-rw-r--r-- | include/configs/km/km-powerpc.h | 1 | ||||
-rw-r--r-- | include/configs/km/km_arm.h | 1 | ||||
-rw-r--r-- | include/configs/km/kmp204x-common.h | 1 |
4 files changed, 5 insertions, 2 deletions
diff --git a/include/configs/km/keymile-common.h b/include/configs/km/keymile-common.h index cb53dbd..7361072 100644 --- a/include/configs/km/keymile-common.h +++ b/include/configs/km/keymile-common.h @@ -135,8 +135,8 @@ * - 'release': for a standalone system kernel/rootfs from flash */ #define CONFIG_KM_DEF_ENV_BOOTTARGETS \ - "subbootcmds=ubiattach ubicopy cramfsloadfdt cramfsloadkernel " \ - "flashargs add_default addpanic boot\0" \ + "subbootcmds=ubiattach ubicopy cramfsloadfdt set_fdthigh " \ + "cramfsloadkernel flashargs add_default addpanic boot\0"\ "develop=" \ "tftp 200000 scripts/develop-${arch}.txt && " \ "env import -t 200000 ${filesize} && " \ diff --git a/include/configs/km/km-powerpc.h b/include/configs/km/km-powerpc.h index b03fdd9..763c5ba 100644 --- a/include/configs/km/km-powerpc.h +++ b/include/configs/km/km-powerpc.h @@ -77,6 +77,7 @@ "cp.b ${load_addr_r} " __stringify(BOOTFLASH_START) \ " ${filesize} && " \ "protect on " __stringify(BOOTFLASH_START) " +${filesize}\0"\ + "set_fdthigh=true\0" \ "" #endif /* __CONFIG_KEYMILE_POWERPC_H */ diff --git a/include/configs/km/km_arm.h b/include/configs/km/km_arm.h index a5cc1c5..6d77680 100644 --- a/include/configs/km/km_arm.h +++ b/include/configs/km/km_arm.h @@ -81,6 +81,7 @@ #define CONFIG_KM_DEF_ENV_CPU \ "u-boot="__stringify(CONFIG_HOSTNAME) "/u-boot.kwb\0" \ CONFIG_KM_UPDATE_UBOOT \ + "set_fdthigh=setenv fdt_high ${kernelmem}\0" \ "" #define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */ diff --git a/include/configs/km/kmp204x-common.h b/include/configs/km/kmp204x-common.h index 2466649..569b574 100644 --- a/include/configs/km/kmp204x-common.h +++ b/include/configs/km/kmp204x-common.h @@ -420,6 +420,7 @@ unsigned long get_board_sys_clk(unsigned long dummy); "update=" \ "sf probe 0;sf erase 0 +${filesize};" \ "sf write ${load_addr_r} 0 ${filesize};\0" \ + "set_fdthigh=true\0" \ "" #define CONFIG_HW_ENV_SETTINGS \ |