[U-Boot-Users] [PATCH] ARM926: Display Ethernet info in do_bdinfo only if CONFIG_CMD_NET is defined

Hi,
This Patch adds if define to bdinfo command to display ethernet information only if CONFIG_CMD_NET is defined for arm modules.
--- u-boot-1.3.1/common/cmd_bdinfo.c 2007-12-06 01:21:19.000000000 -0800 +++ uboot/common/cmd_bdinfo.c 2007-12-18 19:46:41.625000000 -0800 @@ -314,6 +314,7 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int fl print_num("-> size", bd->bi_dram[i].size); }
+#if defined(CONFIG_CMD_NET) puts ("ethaddr ="); for (i=0; i<6; ++i) { printf ("%c%02X", i ? ':' : ' ', bd->bi_enetaddr[i]); @@ -321,6 +322,7 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int fl puts ( "\n" "ip_addr = "); print_IPaddr (bd->bi_ip_addr); +#endif printf ("\n" "baudrate = %d bps\n", bd->bi_baudrate);
Signed-off-by: Hebbar
I welcome comments, complaints, suggestions and advices.
Regards Gururaja

Hi,
This Patch adds if define to bdinfo command to display ethernet information only if CONFIG_CMD_NET is defined for arm modules.
Signed-off-by: K R Gururaja Hebbar gururajakr@sanyo.co.in
--- u-boot-1.3.1/common/cmd_bdinfo.c 2007-12-06 01:21:19.000000000 -0800 +++ uboot/common/cmd_bdinfo.c 2007-12-18 19:46:41.625000000 -0800 @@ -314,6 +314,7 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int fl print_num("-> size", bd->bi_dram[i].size); }
+#if defined(CONFIG_CMD_NET) puts ("ethaddr ="); for (i=0; i<6; ++i) { printf ("%c%02X", i ? ':' : ' ', bd->bi_enetaddr[i]); @@ -321,6 +322,7 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int fl puts ( "\n" "ip_addr = "); print_IPaddr (bd->bi_ip_addr); +#endif printf ("\n" "baudrate = %d bps\n", bd->bi_baudrate);
I welcome comments, complaints, suggestions and advices.
Regards Gururaja

In message 14408496.post@talk.nabble.com you wrote:
This Patch adds if define to bdinfo command to display ethernet information only if CONFIG_CMD_NET is defined for arm modules.
Signed-off-by: K R Gururaja Hebbar gururajakr@sanyo.co.in
There were no negative comments to this modification (just my own mis-interpretation), so I added this, thanks.
--- u-boot-1.3.1/common/cmd_bdinfo.c 2007-12-06 01:21:19.000000000 -0800 +++ uboot/common/cmd_bdinfo.c 2007-12-18 19:46:41.625000000 -0800
Umm... could you please start using git tools for creating patches etc.? That would make life much easier for us. Thanks.
Best regards,
Wolfgang Denk

Hi Wolfgang,
Thanks. Will sure learn about GIT Process.
Regards Gururaja
-----Original Message----- From: wd@denx.de [mailto:wd@denx.de] Sent: Monday, February 04, 2008 2:19 PM To: Gururaja Hebbar K R Cc: u-boot-users@lists.sourceforge.net Subject: Re: [U-Boot-Users] [PATCH] ARM926: Display Ethernet info in do_bdinfo only if CONFIG_CMD_NET is defined
In message 14408496.post@talk.nabble.com you wrote:
This Patch adds if define to bdinfo command to display ethernet information only if CONFIG_CMD_NET is defined for arm modules.
Signed-off-by: K R Gururaja Hebbar gururajakr@sanyo.co.in
There were no negative comments to this modification (just my own mis-interpretation), so I added this, thanks.
--- u-boot-1.3.1/common/cmd_bdinfo.c 2007-12-06 01:21:19.000000000
-0800
+++ uboot/common/cmd_bdinfo.c 2007-12-18 19:46:41.625000000 -0800
Umm... could you please start using git tools for creating patches etc.? That would make life much easier for us. Thanks.
Best regards,
Wolfgang Denk

In message 14408226.post@talk.nabble.com you wrote:
This Patch adds if define to bdinfo command to display ethernet information only if CONFIG_CMD_NET is defined for arm modules.
Um... you claim to do this for ARM modules only, but actually yoru code is a global modification to ALL systems.
And ARM doesn't even have a specific way to pass the MAC address to Linux.
Your modification makes no sense to me. I tend to reject it.
Best regards,
Wolfgang Denk

Hi,
Sorry for the late reply. was out of connection from the e-world for some time.
At present, in the file u-boot-1.3.1/common/cmd_bdinfo.c,
(CONFIG_NIOS2) /* Nios-II */ at line 170 (CONFIG_MICROBLAZE) /* ! PPC, which leaves Microblaze */ at line 197 (CONFIG_M68K) /* M68K */ at line 239
for all these configs we have the ifdef's.
Only for CONFIG_PPC, (CONFIG_NIOS) /* NIOS*/ , MIPS & ARM doesnt have this ifdefs. hence i added this for ARM Config Also this option i have added only to ARM section which is at the end. At this point in the code, all other configs (NIOS, PPC, MIPS etc) are eliminated and only ARM is left out. So it doent effect any other systems.
Kindly correct me if i am wrong
Regards Gururaja
-----Original Message----- From: wd@denx.de [mailto:wd@denx.de] Sent: Tuesday, January 08, 2008 11:51 PM To: Gururaja Hebbar K R Cc: u-boot-users@lists.sourceforge.net Subject: Re: [U-Boot-Users] [PATCH] ARM926: Display Ethernet info in do_bdinfo only if CONFIG_CMD_NET is defined
In message 14408226.post@talk.nabble.com you wrote:
This Patch adds if define to bdinfo command to display ethernet information only if CONFIG_CMD_NET is defined for arm modules.
Um... you claim to do this for ARM modules only, but actually yoru code is a global modification to ALL systems.
And ARM doesn't even have a specific way to pass the MAC address to Linux.
Your modification makes no sense to me. I tend to reject it.
Best regards,
Wolfgang Denk

-----Original Message----- From: u-boot-users-bounces@lists.sourceforge.net [mailto:u-boot-users-bounces@lists.sourceforge.net] On Behalf Of Wolfgang Denk Sent: 09 January 2008 07:51 To: Hebbar Cc: u-boot-users@lists.sourceforge.net Subject: Re: [U-Boot-Users] [PATCH] ARM926: Display Ethernet info indo_bdinfo only if CONFIG_CMD_NET is defined
Wolfgang You wrote:
And ARM doesn't even have a specific way to pass the MAC address to Linux.
Please expand on this comment for me.
Is there another architecture in U-Boot passing the MAC address that I could look at to understand what you mean?
Or are you referring to a kernel, architecture specific, command line feature?
Regards
Peter

Peter Pearse wrote:
Wolfgang You wrote:
And ARM doesn't even have a specific way to pass the MAC address to Linux.
Please expand on this comment for me.
He is referign to the numerous kcooments on this list over the past few years of how ARM dos not have a way for u-boot to pass inthe MAC to the kernel (via ATAG or any ohter easy way). THe kernel has to, by itself, figure out the MAC.
Is there another architecture in U-Boot passing the MAC address that I could look at to understand what you mean?
Or are you referring to a kernel, architecture specific, command line feature?
look at PPC. old-style passses the MAC for each interface in the bd_t struct. new-style passes the mac address for each interface in the device tree (as local-mac-address tag)
This is highly useful where there is no _common_ place to store the MAC that the eth driver knows about without a platform specific hack. This way the driver just looks in the dts tree and is happy.

On Fri, 1 Feb 2008 12:01:36 -0000 "Peter Pearse" peter.pearse@arm.com wrote:
Is there another architecture in U-Boot passing the MAC address that I could look at to understand what you mean?
AVR32 passes it through ATAGs. That should be easily portable to ARM.
Look at setup_ethernet_tags() in lib_avr32/avr32_linux.c
Haavard

In message 20080202123057.2b2920bd@siona you wrote:
AVR32 passes it through ATAGs. That should be easily portable to ARM.
Easily portable from the technical point of view; but it will not be accepted for the ARM Linux kernel tree. See the FAQ.
Best regards,
Wolfgang Denk
participants (6)
-
Gururaja Hebbar K R
-
Haavard Skinnemoen
-
Hebbar
-
Peter Pearse
-
Rune Torgersen
-
Wolfgang Denk