microblaze: generic: adding DHCP support
PATCH 1/4 microblaze: generic: adding DHCP support
--- include/configs/microblaze-generic.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
include/configs/microblaze-generic.h +1 -0
@@ -231,6 +231,7 @@#undef CONFIG_CMD_NET#else #define CONFIG_CMD_PING +#define CONFIG_CMD_DHCP #endif #if defined(CONFIG_SYSTEMACE )
Signature · 1 line
1.6.0.4
PATCH 2/4 microblaze: generic: rename MTD partition set to 'flash-0'
--- include/configs/microblaze-generic.h | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
include/configs/microblaze-generic.h +4 -4
@@ -260,10 +260,10 @@#define CONFIG_CMD_MTDPARTS /* mtdparts command line support */ #define CONFIG_MTD_DEVICE /* needed for mtdparts commands */ #define CONFIG_FLASH_CFI_MTD -#define MTDIDS_DEFAULT "nor0=ml401-0" +#define MTDIDS_DEFAULT "nor0=flash-0"/* default mtd partition table */ -#define MTDPARTS_DEFAULT "mtdparts=ml401-0:256k(u-boot),"\ +#define MTDPARTS_DEFAULT "mtdparts=flash-0:256k(u-boot),"\ "256k(env),3m(kernel),1m(romfs),"\ "1m(cramfs),-(jffs2)"#endif
@@ -292,8 +292,8 @@#define CONFIG_PREBOOT "echo U-BOOT for ${hostname};setenv preboot;echo"#define CONFIG_EXTRA_ENV_SETTINGS "unlock=yes\0"/* hardware flash protection */ \ -"nor0=ml401-0\0" \ -"mtdparts=mtdparts=ml401-0:" \ +"nor0=flash-0\0" \ +"mtdparts=mtdparts=flash-0:" \"256k(u-boot),256k(env),3m(kernel)," \"1m(romfs),1m(cramfs),-(jffs2)\0"
Signature · 1 line
1.6.0.4
PATCH 3/4 microblaze: enable LMB support
Foresighted to support flat device tree realocations we need to use the new Logical memory blocks library in a manner as been used by all other architectures.
--- arch/microblaze/include/asm/config.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
arch/microblaze/include/asm/config.h +2 -0
@@ -21,6 +21,8 @@#ifndef _ASM_CONFIG_H_#define _ASM_CONFIG_H_ +#define CONFIG_LMB +/* Relocation to SDRAM works on all Microblaze boards */ #define CONFIG_RELOC_FIXUP_WORKS
Signature · 1 line
1.6.0.4
PATCH 4/4 microblaze: generic: enable FDT support
--- include/configs/microblaze-generic.h | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)
include/configs/microblaze-generic.h +8 -0
@@ -305,4 +305,12 @@#define CONFIG_SYS_PROMPT_HUSH_PS2 "> "#endif +/* pass open firmware flat tree */ +#define CONFIG_FIT 1 +#define CONFIG_OF_LIBFDT 1 + +/* Initial Memory map for Linux */ +#define CONFIG_SYS_BOOTMAPSZ (8 << 20) + +#endif /* __CONFIG_H */
Signature · 1 line
1.6.0.4
Michal Simek
maintainerPATCH 4/4 microblaze: generic: enable FDT support
Quoted 10 lines · Stephan Linz
Signed-off-by Stephan Linz <[email protected]>--- include/configs/microblaze-generic.h | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)include/configs/microblaze-generic.h +0
-0
include/configs/microblaze-generic.h line 311
Quoted 7 lines
include/configs/microblaze-generic.h +4
-0@@ -305,4 +305,12 @@#define CONFIG_SYS_PROMPT_HUSH_PS2 "> "#endif +/* pass open firmware flat tree */ +#define CONFIG_FIT 1 +#define CONFIG_OF_LIBFDT 1 +
that's ok.
include/configs/microblaze-generic.h line 313
Quoted 2 lines
include/configs/microblaze-generic.h +2
-0+/* Initial Memory map for Linux */ +#define CONFIG_SYS_BOOTMAPSZ (8 << 20)
Why is this value setup to 0x800000?
include/configs/microblaze-generic.h line 315
Quoted 2 lines
include/configs/microblaze-generic.h +2
-0+ +
BTW: One black line is enough
Thanks,
Michal
Signature · 4 lines
Michal Simek, Ing. (M.Eng) w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/ Microblaze U-BOOT custodian
PATCH 4/4 microblaze: generic: enable FDT support
Am Dienstag, 22. Juni 2010 09:25:56 schrieb Michal Simek:
Quoted 21 lines
Quoted 10 lines · Stephan Linz
Signed-off-by Stephan Linz <[email protected]>--- include/configs/microblaze-generic.h | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)(quoted diff) +0
-0
b/include/configs/microblaze-generic.hindex 28cee47..89e6dbb 100644include/configs/microblaze-generic.h line 311
Quoted 7 lines
include/configs/microblaze-generic.h +4
-0@@ -305,4 +305,12 @@#define CONFIG_SYS_PROMPT_HUSH_PS2 "> "#endif +/* pass open firmware flat tree */ +#define CONFIG_FIT 1 +#define CONFIG_OF_LIBFDT 1 +that's ok.
Quoted 4 lines
include/configs/microblaze-generic.h line 313
Quoted 2 lines
include/configs/microblaze-generic.h +2
-0+/* Initial Memory map for Linux */ +#define CONFIG_SYS_BOOTMAPSZ (8 << 20)Why is this value setup to
0x800000?
First of all the flat device tree handling depends on CONFIG_SYS_BOOTMAPSZ. So I have to define a valid value. As far as I understand the initial memory map for Linux there have to be space for the kernel (text+data), fdt_blob and kernel parameters (at least). I'm unsure with an embedded init ramdisk as produced by simpleImage. The simpleImage can quickly grow up over 6MB with embedded initrd.
So I borrowed this configuration (8MB) from most other configurations (mainly PowerPC).
br,
Stephan
Quoted 8 lines
include/configs/microblaze-generic.h line 315
Quoted 3 lines
include/configs/microblaze-generic.h +2
-0+ +BTW: One black line is enough
Thanks,
Michal
Signature · 9 lines
Viele Gr??e, Stephan Linz ______________________________________________________________________________ OpenDCC: http://www.li-pro.net/opendcc.phtml PC/M: http://www.li-pro.net/pcm.phtml CDK4AVR: http://cdk4avr.sourceforge.net/ CDK4NIOS: http://cdk4nios.sourceforge.net/ CDK4MSP: http://cdk4msp.sourceforge.net/ CPM4L: http://download.opensuse.org/repositories/home:/rexut:/CPM4L
Michal Simek
maintainerPATCH 4/4 microblaze: generic: enable FDT support
Quoted 32 lines · Stephan Linz
Am Dienstag, 22. Juni 2010 09:25:56 schrieb Michal Simek:
Quoted 20 lines
Quoted 10 lines · Stephan Linz
Signed-off-by Stephan Linz <[email protected]>--- include/configs/microblaze-generic.h | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)(quoted diff) +0
-0
b/include/configs/microblaze-generic.hindex 28cee47..89e6dbb 100644include/configs/microblaze-generic.h line 311
Quoted 7 lines
include/configs/microblaze-generic.h +4
-0@@ -305,4 +305,12 @@#define CONFIG_SYS_PROMPT_HUSH_PS2 "> "#endif +/* pass open firmware flat tree */ +#define CONFIG_FIT 1 +#define CONFIG_OF_LIBFDT 1 +that's ok.
Quoted 3 lines
include/configs/microblaze-generic.h line 313
Quoted 2 lines
include/configs/microblaze-generic.h +2
-0+/* Initial Memory map for Linux */ +#define CONFIG_SYS_BOOTMAPSZ (8 << 20)Why is this value setup to
0x800000?First of all the flat device tree handling depends on
CONFIG_SYS_BOOTMAPSZ. So I have to define a valid value. As far as I understand the initial memory map for Linux there have to be space for the kernel (text+data),fdt_bloband kernel parameters (at least). I'm unsure with an embedded init ramdisk as produced by simpleImage. The simpleImage can quickly grow up over 6MB with embedded initrd.
Quoted 2 lines
So I borrowed this configuration (8MB) from most other configurations (mainly PowerPC).
ok. Microblaze handles FDT blob in different way. Kernel just need to know where it is and then is copied to another place.
We don't have any limits like 8MB or so that's why I prefer to setup ~0UL value or something like that.
Can you please test it?
Thanks,
Michal
Signature · 4 lines
Michal Simek, Ing. (M.Eng) w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/ Microblaze U-BOOT custodian
PATCH 4/4 microblaze: generic: enable FDT support
Hi Michal,
I will work on your proposals today or tomorrow (European time). Please give me some time.
br,
Stephan
Am Mittwoch, 23. Juni 2010 08:27:22 schrieb Michal Simek:
Quoted 47 lines
Quoted 34 lines · Stephan Linz
Am Dienstag, 22. Juni 2010 09:25:56 schrieb Michal Simek:
Quoted 21 lines
Quoted 10 lines · Stephan Linz
Signed-off-by Stephan Linz <[email protected]>--- include/configs/microblaze-generic.h | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)(quoted diff) +0
-0
b/include/configs/microblaze-generic.hindex 28cee47..89e6dbb 100644include/configs/microblaze-generic.h line 311
Quoted 7 lines
include/configs/microblaze-generic.h +4
-0@@ -305,4 +305,12 @@#define CONFIG_SYS_PROMPT_HUSH_PS2 "> "#endif +/* pass open firmware flat tree */ +#define CONFIG_FIT 1 +#define CONFIG_OF_LIBFDT 1 +that's ok.
Quoted 4 lines
include/configs/microblaze-generic.h line 313
Quoted 2 lines
include/configs/microblaze-generic.h +2
-0+/* Initial Memory map for Linux */ +#define CONFIG_SYS_BOOTMAPSZ (8 << 20)Why is this value setup to
0x800000?First of all the flat device tree handling depends on
CONFIG_SYS_BOOTMAPSZ. So I have to define a valid value. As far as I understand the initial memory map for Linux there have to be space for the kernel (text+data),fdt_bloband kernel parameters (at least). I'm unsure with an embedded init ramdisk as produced by simpleImage. The simpleImage can quickly grow up over 6MB with embedded initrd.Quoted 2 lines
So I borrowed this configuration (8MB) from most other configurations (mainly PowerPC).
ok. Microblaze handles FDT blob in different way. Kernel just need to know where it is and then is copied to another place.
We don't have any limits like 8MB or so that's why I prefer to setup ~0UL value or something like that.Can you please test it?
Thanks,
Michal
Signature · 9 lines
Viele Gr??e, Stephan Linz ______________________________________________________________________________ OpenDCC: http://www.li-pro.net/opendcc.phtml PC/M: http://www.li-pro.net/pcm.phtml CDK4AVR: http://cdk4avr.sourceforge.net/ CDK4NIOS: http://cdk4nios.sourceforge.net/ CDK4MSP: http://cdk4msp.sourceforge.net/ CPM4L: http://download.opensuse.org/repositories/home:/rexut:/CPM4L
Michal Simek
maintainerPATCH 3/4 microblaze: enable LMB support
In reply to Stephan LinzQuoted 14 lines · Stephan Linz
Foresighted to support flat device tree realocations we need to use the new Logical memory blocks library in a manner as been used by all other architectures.
Signed-off-by Stephan Linz <[email protected]>--- arch/microblaze/include/asm/config.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)arch/microblaze/include/asm/config.h +0
-0
arch/microblaze/include/asm/config.h line 25
Quoted 5 lines
arch/microblaze/include/asm/config.h +2
-0@@ -21,6 +21,8 @@#ifndef _ASM_CONFIG_H_#define _ASM_CONFIG_H_ +#define CONFIG_LMB +
I see what you are trying to do but what is your point with enabling LMB support ?
I am not sure if this enabling bring us any feature which we need.
Thanks,
Michal
Signature · 4 lines
Michal Simek, Ing. (M.Eng) w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/ Microblaze U-BOOT custodian
PATCH 3/4 microblaze: enable LMB support
Am Dienstag, 22. Juni 2010 09:24:40 schrieb Michal Simek:
Quoted 18 lines
Quoted 17 lines · Stephan Linz
Foresighted to support flat device tree realocations we need to use the new Logical memory blocks library in a manner as been used by all other architectures.
Signed-off-by Stephan Linz <[email protected]>--- arch/microblaze/include/asm/config.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)(quoted diff) +0
-0
b/arch/microblaze/include/asm/config.hindex 8a9064b..ec2c316 100644arch/microblaze/include/asm/config.h +0
-0@@ -21,6 +21,8 @@#ifndef _ASM_CONFIG_H_#define _ASM_CONFIG_H_
Quoted 5 lines
arch/microblaze/include/asm/config.h line 25
Quoted 2 lines
arch/microblaze/include/asm/config.h +2
-0+#define CONFIG_LMB +I see what you are trying to do but what
is your point with enabling LMB support ?
Hm, mainly a clean compilation. Without this define I can not enable the flat device tree handling. LMB is quite new in U-Boot (PowerPC) and there are some dependencies to the FDT support. That force to enable even this feature on MicroBlaze too. I want to avoid a deep intrusion into the code.
Quoted 2 lines
I am not sure if this enabling bring us any feature which we need.
Hm, could you pleace consult the PowerPC folks? I think LMB is used to transfer system memory map from U-Boot to Linux kernel in a common way (similar like on x86 PC from BIOS to kernel), or not? Any comments?
br,
Stephan
Quoted 3 lines
Thanks,
Michal
Signature · 9 lines
Viele Gr??e, Stephan Linz ______________________________________________________________________________ OpenDCC: http://www.li-pro.net/opendcc.phtml PC/M: http://www.li-pro.net/pcm.phtml CDK4AVR: http://cdk4avr.sourceforge.net/ CDK4NIOS: http://cdk4nios.sourceforge.net/ CDK4MSP: http://cdk4msp.sourceforge.net/ CPM4L: http://download.opensuse.org/repositories/home:/rexut:/CPM4L
Michal Simek
maintainerPATCH 3/4 microblaze: enable LMB support
Quoted 24 lines · Stephan Linz
Am Dienstag, 22. Juni 2010 09:24:40 schrieb Michal Simek:
Quoted 18 lines
Quoted 17 lines · Stephan Linz
Foresighted to support flat device tree realocations we need to use the new Logical memory blocks library in a manner as been used by all other architectures.
Signed-off-by Stephan Linz <[email protected]>--- arch/microblaze/include/asm/config.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)(quoted diff) +0
-0
b/arch/microblaze/include/asm/config.hindex 8a9064b..ec2c316 100644arch/microblaze/include/asm/config.h +0
-0@@ -21,6 +21,8 @@#ifndef _ASM_CONFIG_H_#define _ASM_CONFIG_H_Quoted 4 lines
arch/microblaze/include/asm/config.h line 25
Quoted 2 lines
arch/microblaze/include/asm/config.h +2
-0+#define CONFIG_LMB +I see what you are trying to do but what
is your point with enabling LMB support ?
Quoted 4 lines
Hm, mainly a clean compilation. Without this define I can not enable the flat device tree handling. LMB is quite new in U-Boot (PowerPC) and there are some dependencies to the FDT support. That force to enable even this feature on MicroBlaze too. I want to avoid a deep intrusion into the code.
I am not using the latest u-boot code - just checking if compilation is OK. But I can't see a reason why we should enable LMB because we don't need it. If there is any dependency then there are missing some ifdefs.
Quoted 6 lines
Quoted 2 lines
I am not sure if this enabling bring us any feature which we need.
Hm, could you pleace consult the PowerPC folks? I think LMB is used to transfer system memory map from U-Boot to Linux kernel in a common way (similar like on x86 PC from BIOS to kernel), or not? Any comments?
Stefan: How is LMB used in PowerPC? Microblaze uses LMB in kernel but IMHO we don't need to use it in u-boot and kernel is not ready for passing any memory map from U-BOOT. Maybe I am wrong that's why I would like to check this with you.
Thanks,
Michal
Signature · 4 lines
Michal Simek, Ing. (M.Eng) w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/ Microblaze U-BOOT custodian
PATCH 3/4 microblaze: enable LMB support
Am Mittwoch, 23. Juni 2010 08:31:59 schrieb Michal Simek:
Quoted 15 lines
--8<--snip -->8--
Quoted 14 lines
Quoted 13 lines
arch/microblaze/include/asm/config.h line 25
Quoted 10 lines
(quoted diff) +0
-0
b/arch/microblaze/include/asm/config.hindex 8a9064b..ec2c316 100644arch/microblaze/include/asm/config.h +2
-0@@ -21,6 +21,8 @@#ifndef _ASM_CONFIG_H_#define _ASM_CONFIG_H_ +#define CONFIG_LMB +I see what you are trying to do but what
is your point with enabling LMB support ?
Quoted 7 lines
Quoted 3 lines
Hm, mainly a clean compilation. Without this define I can not enable the flat device tree handling. LMB is quite new in U-Boot ... --8<--snip -->8--
I am not using the latest u-boot code - just checking if compilation is OK. But I can't see a reason why we should enable LMB because we don't need it. If there is any dependency then there are missing some ifdefs.
Hi Michal,
you are right. There are missing some ifdefs in the relocation code so there is no need to enable the LMB in U-Boot on Microblaze (also applies to the 8MB problem, CONFIG_SYS_BOOTMAPSZ).
Please be patient. I prepare a new patch set. I'll roll out as fast as possible ...
br,
Stephan
Michal Simek
maintainerPATCH 2/4 microblaze: generic: rename MTD partition set to 'flash-0'
In reply to Stephan LinzQuoted 23 lines · Stephan Linz
Signed-off-by Stephan Linz <[email protected]>--- include/configs/microblaze-generic.h | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)include/configs/microblaze-generic.h +2
-2@@ -260,10 +260,10 @@#define CONFIG_CMD_MTDPARTS /* mtdparts command line support */ #define CONFIG_MTD_DEVICE /* needed for mtdparts commands */ #define CONFIG_FLASH_CFI_MTD -#define MTDIDS_DEFAULT "nor0=ml401-0" +#define MTDIDS_DEFAULT "nor0=flash-0"/* default mtd partition table */ -#define MTDPARTS_DEFAULT "mtdparts=ml401-0:256k(u-boot),"\ +#define MTDPARTS_DEFAULT "mtdparts=flash-0:256k(u-boot),"\ "256k(env),3m(kernel),1m(romfs),"\ "1m(cramfs),-(jffs2)"#endif
include/configs/microblaze-generic.h line 299
Quoted 10 lines
include/configs/microblaze-generic.h +2
-2@@ -292,8 +292,8 @@#define CONFIG_PREBOOT "echo U-BOOT for ${hostname};setenv preboot;echo"#define CONFIG_EXTRA_ENV_SETTINGS "unlock=yes\0"/* hardware flash protection */ \ -"nor0=ml401-0\0" \ -"mtdparts=mtdparts=ml401-0:" \ +"nor0=flash-0\0" \ +"mtdparts=mtdparts=flash-0:" \"256k(u-boot),256k(env),3m(kernel)," \"1m(romfs),1m(cramfs),-(jffs2)\0"
Will add.
Thanks,
Michal
Signature · 4 lines
Michal Simek, Ing. (M.Eng) w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/ Microblaze U-BOOT custodian
PATCH 1/4 microblaze: generic: adding DHCP support
In reply to Stephan Linzinclude/configs/microblaze-generic.h line 235
Quoted 3 lines · On Monday, June 21, 2010 16:58:09 Stephan Linz wrote:
include/configs/microblaze-generic.h +1
-0#define CONFIG_CMD_PING +#define CONFIG_CMD_DHCP #endif
not specific to this commit, but preprocessor statements really shouldnt be intended like this
- #define FOO
+# define FOO
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20100621/8556b858/attachment.pgp
PATCH 1/4 microblaze: generic: adding DHCP support
Am Montag, 21. Juni 2010 23:21:02 schrieb Mike Frysinger:
Review
Quoted 10 lines · On Monday, June 21, 2010 16:58:09 Stephan Linz wrote:
include/configs/microblaze-generic.h line 235
Quoted 3 lines
include/configs/microblaze-generic.h +1
-0#define CONFIG_CMD_PING +#define CONFIG_CMD_DHCP #endif not specific to this commit, but preprocessor statements really shouldnt be intended like this
(quoted diff) +1
-2- #define FOO +# define FOO -mike
You're right. But I modified only a small pices and not the whole file.
Signature · 9 lines
Viele Gr??e, Stephan Linz ______________________________________________________________________________ OpenDCC: http://www.li-pro.net/opendcc.phtml PC/M: http://www.li-pro.net/pcm.phtml CDK4AVR: http://cdk4avr.sourceforge.net/ CDK4NIOS: http://cdk4nios.sourceforge.net/ CDK4MSP: http://cdk4msp.sourceforge.net/ CPM4L: http://download.opensuse.org/repositories/home:/rexut:/CPM4L
Michal Simek
maintainerPATCH 1/4 microblaze: generic: adding DHCP support
In reply to Stephan LinzQuoted 10 lines · Stephan Linz
Signed-off-by Stephan Linz <[email protected]>--- include/configs/microblaze-generic.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)include/configs/microblaze-generic.h +0
-0
include/configs/microblaze-generic.h line 237
Quoted 7 lines
include/configs/microblaze-generic.h +1
-0@@ -231,6 +231,7 @@#undef CONFIG_CMD_NET#else #define CONFIG_CMD_PING +#define CONFIG_CMD_DHCP #endif #if defined(CONFIG_SYSTEMACE )
Will add.
Thanks,
Michal
Signature · 4 lines
Michal Simek, Ing. (M.Eng) w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/ Microblaze U-BOOT custodian