integrator: pass a Device Tree by default
PATCH 1/1 integrator: pass a Device Tree by default
This, enabled the FDT library for the Integrators, updates the Integrator/CP default command to load and pass a Device Tree when booting the kernel from the on-board ethernet, define same environment for the Integrator/AP and move the load address around to something even.
--- include/configs/integrator-common.h | 3 ++- include/configs/integratorap.h | 8 ++++++-- include/configs/integratorcp.h | 10 +++++++--- 3 files changed, 15 insertions(+), 6 deletions(-)
include/configs/integrator-common.h +2 -1
@@ -30,7 +30,7 @@#define CONFIG_SYS_MEMTEST_END 0x10000000#define CONFIG_SYS_HZ 1000#define CONFIG_SYS_TIMERBASE 0x13000100/* Timer1 */ -#define CONFIG_SYS_LOAD_ADDR 0x7fc0/* default load address */ +#define CONFIG_SYS_LOAD_ADDR 0x800/* default load address */ #define CONFIG_SYS_LONGHELP #define CONFIG_SYS_HUSH_PARSER #define CONFIG_SYS_CBSIZE 256/* Console I/O Buffer Size*/
@@ -41,6 +41,7 @@#define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */ #define CONFIG_SETUP_MEMORY_TAGS +#define CONFIG_OF_LIBFDT /* enable passing a Device Tree */ #define CONFIG_MISC_INIT_R /* call misc_init_r during start up */ /*
include/configs/integratorap.h +6 -2
@@ -62,9 +62,13 @@*/ #include <config_cmd_default.h> -#define CONFIG_BOOTDELAY 2 +#define CONFIG_BOOTDELAY 0#define CONFIG_BOOTARGS "root=/dev/mtdblock0 console=ttyAM0 console=tty" -#define CONFIG_BOOTCOMMAND "" +#define CONFIG_BOOTCOMMAND "setenv servip 192.168.1.100 ; " \ + "setenv loadaddr 0x00000800 ; " \ + "setenv fdtaddr 0x00800000 ; " \ + "echo \"\\\\$loadaddr = $loadaddr, \\\\$fdtaddr=$fdtaddr\" ; " \ + "echo \"load binaries then: bootm $loadaddr - $fdtaddr\""/* * Miscellaneous configurable options
include/configs/integratorcp.h +7 -3
@@ -60,11 +60,15 @@#include <config_cmd_default.h> #define CONFIG_BOOTDELAY 2 -#define CONFIG_BOOTARGS "root=/dev/mtdblock0 console=ttyAMA0 console=tty ip=dhcp netdev=27,0,0xfc800000,0xfc800010,eth0 video=clcdfb:0" -#define CONFIG_BOOTCOMMAND "tftpboot ; bootm"#define CONFIG_SERVERIP 192.168.1.100#define CONFIG_IPADDR 192.168.1.104 -#define CONFIG_BOOTFILE "uImage" +#define CONFIG_BOOTARGS "root=/dev/mtdblock0 console=ttyAMA0 console=tty ip=dhcp netdev=27,0,0xfc800000,0xfc800010,eth0 video=clcdfb:0" +#define CONFIG_BOOTCOMMAND "setenv servip 192.168.1.100 ; " \ + "setenv loadaddr 0x00000800 ; " \ + "setenv fdtaddr 0x00800000 ; " \ + "bootp $loadaddr $servip:uImage ; " \ + "bootp $fdtaddr $servip:integratorcp.dtb ; " \ + "bootm $loadaddr - $fdtaddr"/* * Miscellaneous configurable options
Signature · 1 line
1.8.0.2
PATCH 1/1 integrator: pass a Device Tree by default
Dear Linus Walleij,
Quoted 7 lines
This, enabled the FDT library for the Integrators, updates the Integrator/CP default command to load and pass a Device Tree when booting the kernel from the on-board ethernet, define same environment for the Integrator/AP and move the load address around to something even.
Signed-off-by Linus Walleij <[email protected]>
Shouldn't the load address be 0x8000 instead of 0x800 (it used to be 0x7fc0) ?
Also, "setenv loadaddr nnnn" is nonsense, just use the usual CONFIG_SYS_LOAD_ADDR (which inherently sets the loadaddr env variable). Or do you see a problem there?
Best regards,
Marek Vasut
PATCH 1/1 integrator: pass a Device Tree by default
Quoted 11 lines · Marek Vasut
Dear Linus Walleij,
Quoted 7 lines
This, enabled the FDT library for the Integrators, updates the Integrator/CP default command to load and pass a Device Tree when booting the kernel from the on-board ethernet, define same environment for the Integrator/AP and move the load address around to something even.
Signed-off-by Linus Walleij <[email protected]>Shouldn't the load address be
0x8000instead of0x800(it used to be0x7fc0) ?
0x800 works fine, but honestly I don't know why Peter P ages ago chose the very odd address 0x7fc0.
But you know U-boot way better than me, and most things work fine it seems. What is a typical load address?
Quoted 3 lines
Also, "setenv loadaddr nnnn" is nonsense, just use the usual
CONFIG_SYS_LOAD_ADDR(which inherently sets the loadaddr env variable). Or do you see a problem there?
Not really, it was mainly because there is no way to set the FDT load address as a variable, e.g. we don't have CONFIG_FDT_LOAD_ADDR, and I wanted to keep both definitions in the same place, i.e. in the default boot script.
On the Integrator/AP I have to load the two pieces one at the time, manually using loady, so it is a bit helpful to have the address prints at least.
Yours,
Linus Walleij
PATCH 1/1 integrator: pass a Device Tree by default
Dear Linus Walleij,
Quoted 11 lines · Marek Vasut
Quoted 10 lines
Dear Linus Walleij,
Quoted 7 lines
This, enabled the FDT library for the Integrators, updates the Integrator/CP default command to load and pass a Device Tree when booting the kernel from the on-board ethernet, define same environment for the Integrator/AP and move the load address around to something even.
Signed-off-by Linus Walleij <[email protected]>
Quoted 8 lines
Quoted 2 lines
Shouldn't the load address be
0x8000instead of0x800(it used to be0x7fc0) ?
0x800works fine, but honestly I don't know why Peter P ages ago chose the very odd address0x7fc0.But you know U-boot way better than me, and most things work fine it seems. What is a typical load address?
Heh, there ain't any "typical load address", the FDT binary is relocated at the end of RAM just before boot anyway, so I'm ok with any address you pick, just make it a sane one ;)
Quoted 8 lines
Quoted 3 lines
Also, "setenv loadaddr nnnn" is nonsense, just use the usual
CONFIG_SYS_LOAD_ADDR(which inherently sets the loadaddr env variable). Or do you see a problem there?Not really, it was mainly because there is no way to set the FDT load address as a variable, e.g. we don't have
CONFIG_FDT_LOAD_ADDR, and I wanted to keep both definitions in the same place, i.e. in the default boot script.
Makes sense, I'll CC Albert.
Quoted 3 lines
On the Integrator/AP I have to load the two pieces one at the time, manually using loady, so it is a bit helpful to have the address prints at least.
Yup.
Quoted 2 lines
Yours,
Linus Walleij
Best regards,
Marek Vasut
PATCH 1/1 integrator: pass a Device Tree by default
Quoted 8 lines · Marek Vasut
Quoted 8 lines · Marek Vasut
Quoted 3 lines
Shouldn't the load address be
0x8000instead of0x800(it used to be0x7fc0) ?
0x800works fine, but honestly I don't know why Peter P ages ago chose the very odd address0x7fc0.
Quoted 6 lines
Quoted 2 lines
But you know U-boot way better than me, and most things work fine it seems. What is a typical load address?
Heh, there ain't any "typical load address", the FDT binary is relocated at the end of RAM just before boot anyway, so I'm ok with any address you pick, just make it a sane one ;)
OK but 0x7fc0 was the load address for the kernel, so I was sort of wondering what a "typical" place to load the kernel would be, because 0x7fc0 seems quite arbitrarily chosen...
Yours,
Linus Walleij
PATCH 1/1 integrator: pass a Device Tree by default
Dear Linus Walleij,
Quoted 11 lines · Marek Vasut
Quoted 10 lines
Quoted 9 lines · Marek Vasut
Quoted 2 lines
Shouldn't the load address be
0x8000instead of0x800(it used to be0x7fc0) ?
0x800works fine, but honestly I don't know why Peter P ages ago chose the very odd address0x7fc0.But you know U-boot way better than me, and most things work fine it seems. What is a typical load address?
Quoted 7 lines
Quoted 3 lines
Heh, there ain't any "typical load address", the FDT binary is relocated at the end of RAM just before boot anyway, so I'm ok with any address you pick, just make it a sane one ;)
OK but
0x7fc0was the load address for the kernel, so I was sort of wondering what a "typical" place to load the kernel would be, because0x7fc0seems quite arbitrarily chosen...
Indeed. I usually stick FDT far past the kernel, but that's just my preference I think.
Quoted 2 lines
Yours,
Linus Walleij
Best regards,
Marek Vasut