]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arm/km: enable FDT for km_kirwkood
authorGerlando Falauto <gerlando.falauto@keymile.com>
Mon, 27 Jan 2014 15:58:27 +0000 (16:58 +0100)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Thu, 13 Feb 2014 15:17:54 +0000 (16:17 +0100)
This consists of:
a) Defining the addresses, enabling fdtsupport [arm]
b) Defining "cramfsloadfdt"  [arm,powerpc => common]
c) Adding the FDT address to bootm [arm,powerpc => common]
d) Defining "tftpfdt" in ramfs-,develop- [arm,powerpc >= common]

This should work with 3.10 kernels, whether loaded through TFTP
(with rootfs either through NFS or TFTP-ramfs) or from the NAND.

The machid was left unchanged, this should keep compatibility with both
older and newer kernels.

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>
board/keymile/scripts/develop-arm.txt
board/keymile/scripts/develop-common.txt
board/keymile/scripts/develop-ppc_82xx.txt
board/keymile/scripts/develop-ppc_8xx.txt
board/keymile/scripts/ramfs-arm.txt
board/keymile/scripts/ramfs-common.txt
board/keymile/scripts/ramfs-ppc_82xx.txt
board/keymile/scripts/ramfs-ppc_8xx.txt
include/configs/km/keymile-common.h
include/configs/km/km-powerpc.h
include/configs/km/km_arm.h

index 922afea2778749b4aa6beb47309607c8ee555f32..d3c974f1f912fa9e38ec0fcf88a004256b026d64 100644 (file)
@@ -1,2 +1 @@
 setup_debug_env=tftpboot 0x200000 scripts/develop-common.txt && env import -t 0x200000 ${filesize} && run configure
-tftpfdt=true
index a6bb1b1d4a91f8945b872a328072a0c31c465e1e..f49b26a23308f2656234c4ef1153fb4befe3290f 100644 (file)
@@ -3,6 +3,7 @@ bootcmd=run ${subbootcmds}
 configure=run set_uimage; km_setboardid && saveenv && reset
 subbootcmds=tftpfdt tftpkernel nfsargs add_default boot
 nfsargs=setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${toolchain}/${arch}
+tftpfdt=tftpboot ${fdt_addr_r} ${hostname}/${hostname}.dtb
 tftpkernel=tftpboot ${load_addr_r} ${hostname}/${uimage}
 toolchain=/opt/eldk
 rootfssize=0
index 909f6a3cee38cfdf7dcf61eb83a3fa5ec9604ebe..d3c974f1f912fa9e38ec0fcf88a004256b026d64 100644 (file)
@@ -1,2 +1 @@
 setup_debug_env=tftpboot 0x200000 scripts/develop-common.txt && env import -t 0x200000 ${filesize} && run configure
-tftpfdt=tftpboot ${fdt_addr_r} ${hostname}/${hostname}.dtb
index 909f6a3cee38cfdf7dcf61eb83a3fa5ec9604ebe..d3c974f1f912fa9e38ec0fcf88a004256b026d64 100644 (file)
@@ -1,2 +1 @@
 setup_debug_env=tftpboot 0x200000 scripts/develop-common.txt && env import -t 0x200000 ${filesize} && run configure
-tftpfdt=tftpboot ${fdt_addr_r} ${hostname}/${hostname}.dtb
index 79974f1b70e85c669226fd35cfcf372d79b647a1..87e984e179b9081a85f37e710d8c14aee1444b1d 100644 (file)
@@ -1,2 +1 @@
 setup_debug_env=tftpboot 0x200000 scripts/ramfs-common.txt && env import -t 0x200000 ${filesize} && run configure
-tftpfdt=true
index 502c8631f4f766e55c952e6df12761df2ce51364..0cfb36fba01c2efdf993ddcba8d334d1f7d952b8 100644 (file)
@@ -7,6 +7,7 @@ nfsargs=setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath}
 configure=run set_uimage; km_setboardid && saveenv && reset
 rootfsfile=${hostname}/rootfsImage
 setrootfsaddr=setexpr value ${pnvramaddr} - ${rootfssize} && setenv rootfsaddr 0x${value}
+tftpfdt=tftpboot ${fdt_addr_r} ${hostname}/${hostname}.dtb
 tftpkernel=tftpboot ${load_addr_r} ${hostname}/${uimage}
 tftpramfs=tftpboot ${rootfsaddr} ${hostname}/rootfsImage
 set_uimage=printenv uimage || setenv uimage uImage
index 970927a2fada7125659c3cc2ac9374d6d210bcec..87e984e179b9081a85f37e710d8c14aee1444b1d 100644 (file)
@@ -1,2 +1 @@
 setup_debug_env=tftpboot 0x200000 scripts/ramfs-common.txt && env import -t 0x200000 ${filesize} && run configure
-tftpfdt=tftpboot ${fdt_addr_r} ${hostname}/${hostname}.dtb
index 970927a2fada7125659c3cc2ac9374d6d210bcec..87e984e179b9081a85f37e710d8c14aee1444b1d 100644 (file)
@@ -1,2 +1 @@
 setup_debug_env=tftpboot 0x200000 scripts/ramfs-common.txt && env import -t 0x200000 ${filesize} && run configure
-tftpfdt=tftpboot ${fdt_addr_r} ${hostname}/${hostname}.dtb
index 2a15ad469b102b91362c040eef6d618fe7d9a699..cb53dbd768f7a7d21e836b73573b0bc5ae264f2d 100644 (file)
        CONFIG_KM_DEF_ENV_FLASH_BOOT                                    \
        CONFIG_KM_DEF_ENV_CONSTANTS                                     \
        "altbootcmd=run bootcmd\0"                                      \
+       "boot=bootm ${load_addr_r} - ${fdt_addr_r}\0"                   \
        "bootcmd=km_checkbidhwk &&  "                                   \
                "setenv bootcmd \'if km_checktestboot; then; "          \
                                "setenv boot_bank ${test_bank}; else; " \
                        "run ${subbootcmds}; reset\' && "               \
                "saveenv && saveenv && boot\0"                          \
        "bootlimit=3\0"                                                 \
+       "cramfsloadfdt="                                                \
+               "cramfsload ${fdt_addr_r} "                             \
+               "fdt_0x${IVM_BoardId}_0x${IVM_HWKey}.dtb\0"             \
+       "fdt_addr_r="__stringify(CONFIG_KM_FDT_ADDR) "\0"               \
        "init=/sbin/init-overlay.sh\0"                                  \
        "load_addr_r="__stringify(CONFIG_KM_KERNEL_ADDR) "\0"           \
        "load=tftpboot ${load_addr_r} ${u-boot}\0"                      \
index 2cebb2bb0cc008609b523d78f63e957705d5ccd0..b03fdd9b66adecc2906eb20c96e391bedb21f7e1 100644 (file)
 #define CONFIG_KM_DEF_BOOT_ARGS_CPU            ""
 
 #define CONFIG_KM_DEF_ENV_CPU                                          \
-       "boot=bootm ${load_addr_r} - ${fdt_addr_r}\0"                   \
-       "cramfsloadfdt="                                                \
-               "cramfsload ${fdt_addr_r} "                             \
-               "fdt_0x${IVM_BoardId}_0x${IVM_HWKey}.dtb\0"             \
-       "fdt_addr_r=" __stringify(CONFIG_KM_FDT_ADDR) "\0"              \
        "u-boot="__stringify(CONFIG_HOSTNAME) "/u-boot.bin\0"           \
        "update="                                                       \
                "protect off " __stringify(BOOTFLASH_START) " +${filesize} && "\
index 6278e76d9f80da11162cf9891634e439595f692a..a5cc1c5126a9389fe49d329852a1eb3dada4e6e9 100644 (file)
@@ -70,7 +70,8 @@
 #define CONFIG_KM_PHRAM                0x17F000
 
 #define CONFIG_KM_CRAMFS_ADDR  0x2400000
-#define CONFIG_KM_KERNEL_ADDR  0x2000000       /* 4096KBytes */
+#define CONFIG_KM_KERNEL_ADDR  0x2000000       /* 3098KBytes */
+#define CONFIG_KM_FDT_ADDR     0x23E0000       /*  128KBytes */
 
 /* architecture specific default bootargs */
 #define CONFIG_KM_DEF_BOOT_ARGS_CPU                                    \
@@ -78,8 +79,6 @@
                " boardid=0x${IVM_BoardId} hwkey=0x${IVM_HWKey}"
 
 #define CONFIG_KM_DEF_ENV_CPU                                          \
-       "boot=bootm ${load_addr_r} - -\0"                               \
-       "cramfsloadfdt=true\0"                                          \
        "u-boot="__stringify(CONFIG_HOSTNAME) "/u-boot.kwb\0"           \
        CONFIG_KM_UPDATE_UBOOT                                          \
        ""
@@ -87,6 +86,9 @@
 #define CONFIG_SKIP_LOWLEVEL_INIT      /* disable board lowlevel_init */
 #define CONFIG_MISC_INIT_R
 
+/* Pass open firmware flat tree */
+#define CONFIG_OF_LIBFDT
+
 /*
  * NS16550 Configuration
  */