Re: [U-Boot] [PATCH v2] Support for the OpenRD base board
> -Original Message- > From: Simon Kagstrom [mailto:simon.kagst...@netinsight.net] > Sent: Friday, September 11, 2009 7:22 PM > To: Prafulla Wadaskar > Cc: U-Boot ML; Dhaval Vasa; Prabhanjan Sarnaik; Ashish > Karkare; Ben Warren > Subject: Re: [PATCH v2] Support for the OpenRD base board > > On Fri, 11 Sep 2009 06:33:44 -0700 > Prafulla Wadaskar wrote: > > > > > > +#define CONFIG_ENV_SIZE 0x2 > /* 128k */ > > > > > +#define CONFIG_ENV_ADDR 0xa > > > > > +#define CONFIG_ENV_OFFSET0xa /* env > > > starts here */ > > > > Do you really need this address? the u-boot binary is > > > within 256kb, at the most it can go till 512kb > > > > > > This is where the default environment (for the U-boot shipped by > > > Marvell) resides. Like on Sheevaplug, it uses 4-bit ECC, > so current > > > U-boot won't be able to read it, but I know you're working on it. > > So I think, you want to retain both environment variables untouched > > ( i.e. latest u-boot and u-boot shipped by Marvell) > > But so far as mainlined u-boot is considered, > > doesn't it make sense to pack uboot-bin and environment > sector together? > > like sheevaplug, I think first 2 sectors for u-boot and > next once sector for env should be better to choose. > > Right, makes sense. I'll update that and skip the current address. > > > > > > +#define MTDIDS_DEFAULT "nand0=nand_mtd" > > > > > +#define MTDPARTS_DEFAULT > > > > > "mtdparts=nand_mtd:0x100...@0x00(uboot),0x400...@0x10( > > > > > uImage),"\ > > > > > + "0x1fb00...@0x50(rootfs)" > > > > > I don't quite understand this. This is also the default addresses > > > shipped with the board. > > > W..r.to line 24 at > http://git.marvell.com/?p=orion.git;a=blob;f=arch/arm/mach-kir > kwood/openrd_base-setup.c;h=947dfb8cd5b252bf326d691ee5179e29ad > 07a9a9;hb=HEAD > > By default kernel has same mdtpart configuration as you are > describing here. > > So you don't need this default setup here, you should skip it > > OK, I understand. However, but it might also be useful from U-boot. > Locally, I've loaded the kernel from the ubifs partition, and > then it's > useful to have this defined in U-boot as well. If it > shouldn't be there > by default, I'll remove it though. Yes. I leave decision up to you for this. My intension was to save some thing which is not required Regards.. Prafulla. . . > > // Simon > ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] Support for the OpenRD base board
On Fri, 11 Sep 2009 06:33:44 -0700 Prafulla Wadaskar wrote: > > > > +#define CONFIG_ENV_SIZE 0x2 /* 128k */ > > > > +#define CONFIG_ENV_ADDR 0xa > > > > +#define CONFIG_ENV_OFFSET0xa /* env > > starts here */ > > > Do you really need this address? the u-boot binary is > > within 256kb, at the most it can go till 512kb > > > > This is where the default environment (for the U-boot shipped by > > Marvell) resides. Like on Sheevaplug, it uses 4-bit ECC, so current > > U-boot won't be able to read it, but I know you're working on it. > So I think, you want to retain both environment variables untouched > ( i.e. latest u-boot and u-boot shipped by Marvell) > But so far as mainlined u-boot is considered, > doesn't it make sense to pack uboot-bin and environment sector together? > like sheevaplug, I think first 2 sectors for u-boot and next once sector for > env should be better to choose. Right, makes sense. I'll update that and skip the current address. > > > > +#define MTDIDS_DEFAULT "nand0=nand_mtd" > > > > +#define MTDPARTS_DEFAULT > > > > "mtdparts=nand_mtd:0x100...@0x00(uboot),0x400...@0x10( > > > > uImage),"\ > > > > + "0x1fb00...@0x50(rootfs)" > > > I don't quite understand this. This is also the default addresses > > shipped with the board. > W..r.to line 24 at > http://git.marvell.com/?p=orion.git;a=blob;f=arch/arm/mach-kirkwood/openrd_base-setup.c;h=947dfb8cd5b252bf326d691ee5179e29ad07a9a9;hb=HEAD > By default kernel has same mdtpart configuration as you are describing here. > So you don't need this default setup here, you should skip it OK, I understand. However, but it might also be useful from U-boot. Locally, I've loaded the kernel from the ubifs partition, and then it's useful to have this defined in U-boot as well. If it shouldn't be there by default, I'll remove it though. // Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] Support for the OpenRD base board
> -Original Message- > From: Simon Kagstrom [mailto:simon.kagst...@netinsight.net] > Sent: Friday, September 11, 2009 5:48 PM > To: Prafulla Wadaskar > Cc: U-Boot ML; Dhaval Vasa; Prabhanjan Sarnaik; Ashish Karkare > Subject: Re: [PATCH v2] Support for the OpenRD base board > > Thanks for the comments Prafulla! > > I'll update the patch according to them, but have some questions: > > On Fri, 11 Sep 2009 03:43:04 -0700 > Prafulla Wadaskar wrote: > > > > +#define CONFIG_ENV_SIZE 0x2 /* 128k */ > > > +#define CONFIG_ENV_ADDR 0xa > > > +#define CONFIG_ENV_OFFSET0xa /* env > starts here */ > > Do you really need this address? the u-boot binary is > within 256kb, at the most it can go till 512kb > > This is where the default environment (for the U-boot shipped by > Marvell) resides. Like on Sheevaplug, it uses 4-bit ECC, so current > U-boot won't be able to read it, but I know you're working on it. So I think, you want to retain both environment variables untouched ( i.e. latest u-boot and u-boot shipped by Marvell) But so far as mainlined u-boot is considered, doesn't it make sense to pack uboot-bin and environment sector together? like sheevaplug, I think first 2 sectors for u-boot and next once sector for env should be better to choose. > > > > +#define MTDIDS_DEFAULT "nand0=nand_mtd" > > > +#define MTDPARTS_DEFAULT > > > "mtdparts=nand_mtd:0x100...@0x00(uboot),0x400...@0x10( > > > uImage),"\ > > > + "0x1fb00...@0x50(rootfs)" > > This is must be the default setup in board setup file for > openrd_base (if it is again derived from sheevaplug) > > In that case this settings not required > > I don't quite understand this. This is also the default addresses > shipped with the board. W..r.to line 24 at http://git.marvell.com/?p=orion.git;a=blob;f=arch/arm/mach-kirkwood/openrd_base-setup.c;h=947dfb8cd5b252bf326d691ee5179e29ad07a9a9;hb=HEAD By default kernel has same mdtpart configuration as you are describing here. So you don't need this default setup here, you should skip it > > > > +#define CONFIG_EXTRA_ENV_SETTINGS"x_bootargs=console"\ > > > + "=ttyS0,115200 "MTDPARTS_DEFAULT " rw ubi.mtd=2,2048\0" \ > > > + "x_bootcmd_kernel=nand read 0x640 0x10 0x30\0" \ > > > + "x_bootcmd_usb=usb start\0" \ > > You must add x_bootcmd_eth for program MAC addrss in > hardware before kernel boot. > > Well, we need to figure out some generic way of giving Linux the MAC > address on these boards, but I've understood that initializing the > interface without using it is not popular, so in this case > I'd just let > the problem remain (no x_bootcmd_eth). Okay, > > Or did I misunderstand your comment? No you understood it properly As per my knowledge, I don't this the any hack for this in kernel will be accepted. The same is with u-boot arm net drivers. At both places fingures are crossed. s/w guys thinks h/w should take care of this. But unfortunately this is not happening with this h/w (may be there are few more). I personally feel that u-boot should handle this (copying ben for this) Regards.. Prafulla . . > > // Simon > ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] Support for the OpenRD base board
Thanks for the comments Prafulla! I'll update the patch according to them, but have some questions: On Fri, 11 Sep 2009 03:43:04 -0700 Prafulla Wadaskar wrote: > > +#define CONFIG_ENV_SIZE 0x2 /* 128k */ > > +#define CONFIG_ENV_ADDR 0xa > > +#define CONFIG_ENV_OFFSET0xa /* env starts here */ > Do you really need this address? the u-boot binary is within 256kb, at the > most it can go till 512kb This is where the default environment (for the U-boot shipped by Marvell) resides. Like on Sheevaplug, it uses 4-bit ECC, so current U-boot won't be able to read it, but I know you're working on it. > > +#define MTDIDS_DEFAULT "nand0=nand_mtd" > > +#define MTDPARTS_DEFAULT > > "mtdparts=nand_mtd:0x100...@0x00(uboot),0x400...@0x10( > > uImage),"\ > > + "0x1fb00...@0x50(rootfs)" > This is must be the default setup in board setup file for openrd_base (if it > is again derived from sheevaplug) > In that case this settings not required I don't quite understand this. This is also the default addresses shipped with the board. > > +#define CONFIG_EXTRA_ENV_SETTINGS"x_bootargs=console"\ > > + "=ttyS0,115200 "MTDPARTS_DEFAULT " rw ubi.mtd=2,2048\0" \ > > + "x_bootcmd_kernel=nand read 0x640 0x10 0x30\0" \ > > + "x_bootcmd_usb=usb start\0" \ > You must add x_bootcmd_eth for program MAC addrss in hardware before kernel > boot. Well, we need to figure out some generic way of giving Linux the MAC address on these boards, but I've understood that initializing the interface without using it is not popular, so in this case I'd just let the problem remain (no x_bootcmd_eth). Or did I misunderstand your comment? // Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] Support for the OpenRD base board
> -Original Message- > From: Simon Kagstrom [mailto:simon.kagst...@netinsight.net] > Sent: Friday, September 11, 2009 1:45 PM > To: U-Boot ML > Cc: Prafulla Wadaskar; Dhaval Vasa; Prabhanjan Sarnaik; Ashish Karkare > Subject: [PATCH v2] Support for the OpenRD base board > > Support for the OpenRD base board > > The implementation is borrowed from the sheevaplug board and > the Marvell > 1.1.4 code and likely to be a bit incomplete. > > Signed-off-by: Simon Kagstrom > --- > The configuration does not include UBIFS support, which still needs > he remaining patches for the bitops cleanup and fixes: Pls correct typo here > > http://lists.denx.de/pipermail/u-boot/2009-August/059285.html > > to build. Until those are applied, it's turned off here. > > > I get run-time problems when building for armv5te for OpenRD base > (apparently the same problem occurs for other Kirkwood boards). This > patch fixes that: > > http://lists.denx.de/pipermail/u-boot/2009-September/059896.html > > > The second version contains the kwbimage.cfg needed to > produce an image > to install on the NAND flash. > > MAINTAINERS |4 + > MAKEALL |1 + > Makefile|3 + > board/Marvell/openrd_base/Makefile | 51 +++ > board/Marvell/openrd_base/config.mk | 28 > board/Marvell/openrd_base/kwbimage.cfg | 168 > > board/Marvell/openrd_base/openrd_base.c | 158 ++ > board/Marvell/openrd_base/openrd_base.h | 46 +++ > include/configs/openrd_base.h | 218 > +++ > 9 files changed, 677 insertions(+), 0 deletions(-) > create mode 100644 board/Marvell/openrd_base/Makefile > create mode 100644 board/Marvell/openrd_base/config.mk > create mode 100644 board/Marvell/openrd_base/kwbimage.cfg > create mode 100644 board/Marvell/openrd_base/openrd_base.c > create mode 100644 board/Marvell/openrd_base/openrd_base.h > create mode 100644 include/configs/openrd_base.h > > diff --git a/MAINTAINERS b/MAINTAINERS > index e9db278..99cdc12 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -588,6 +588,10 @@ Gary Jennejohn > Konstantin Kletschke > scb9328 ARM920T > > +Simon Kagstrom > + > + openrd_base ARM926EJS (Kirkwood SoC) > + > Nishant Kamat > > omap1610h2 ARM926EJS > diff --git a/MAKEALL b/MAKEALL > index f0ed8ea..9e6eee2 100755 > --- a/MAKEALL > +++ b/MAKEALL > @@ -533,6 +533,7 @@ LIST_ARM9=" \ > omap1610inn \ > omap5912osk \ > omap730p2 \ > + openrd_base \ > rd6281a \ > sbc2410x\ > scb9328 \ > diff --git a/Makefile b/Makefile > index 9764cea..6cef82a 100644 > --- a/Makefile > +++ b/Makefile > @@ -3022,6 +3022,9 @@ omap1610h2_cs_autoboot_config: unconfig > omap5912osk_config : unconfig > @$(MKCONFIG) $(@:_config=) arm arm926ejs omap5912osk ti omap > > +openrd_base_config: unconfig > + @$(MKCONFIG) $(@:_config=) arm arm926ejs $(@:_config=) > Marvell kirkwood > + > xtract_omap730p2 = $(subst _cs0boot,,$(subst _cs3boot,, > $(subst _config,,$1))) > > omap730p2_config \ > diff --git a/board/Marvell/openrd_base/Makefile > b/board/Marvell/openrd_base/Makefile > new file mode 100644 > index 000..defbb08 > --- /dev/null > +++ b/board/Marvell/openrd_base/Makefile > @@ -0,0 +1,51 @@ > +# > +# (C) Copyright 2009 > +# Marvell Semiconductor > +# Written-by: Prafulla Wadaskar I think you must add your reference here.. > +# > +# See file CREDITS for list of people who contributed to this > +# project. > +# > +# This program is free software; you can redistribute it and/or > +# modify it under the terms of the GNU General Public License as > +# published by the Free Software Foundation; either version 2 of > +# the License, or (at your option) any later version. > +# > +# This program is distributed in the hope that it will be useful, > +# but WITHOUT ANY WARRANTY; without even the implied warranty of > +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the > +# GNU General Public License for more details. > +# > +# You should have received a copy of the GNU General Public License > +# along with this program; if not, write to the Free Software > +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, > +# MA 02110-1301 USA > +# > + > +include $(TOPDIR)/config.mk > + > +LIB = $(obj)lib$(BOARD).a > + > +COBJS:= openrd_base.o > + > +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) > +OBJS := $(addprefix $(obj),$(COBJS)) > +SOBJS:= $(addprefix $(obj),$(SOBJS)) > + > +$(LIB): $(obj).depend $(OBJS) $(SOBJS) > + $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS) > + > +clean: > + rm -f $(SOBJS) $(OBJS) > + > +distclean: clean > + rm -f $(LIB) core *.bak .depend > + > +
[U-Boot] [PATCH v2] Support for the OpenRD base board
Support for the OpenRD base board The implementation is borrowed from the sheevaplug board and the Marvell 1.1.4 code and likely to be a bit incomplete. Signed-off-by: Simon Kagstrom --- The configuration does not include UBIFS support, which still needs he remaining patches for the bitops cleanup and fixes: http://lists.denx.de/pipermail/u-boot/2009-August/059285.html to build. Until those are applied, it's turned off here. I get run-time problems when building for armv5te for OpenRD base (apparently the same problem occurs for other Kirkwood boards). This patch fixes that: http://lists.denx.de/pipermail/u-boot/2009-September/059896.html The second version contains the kwbimage.cfg needed to produce an image to install on the NAND flash. MAINTAINERS |4 + MAKEALL |1 + Makefile|3 + board/Marvell/openrd_base/Makefile | 51 +++ board/Marvell/openrd_base/config.mk | 28 board/Marvell/openrd_base/kwbimage.cfg | 168 board/Marvell/openrd_base/openrd_base.c | 158 ++ board/Marvell/openrd_base/openrd_base.h | 46 +++ include/configs/openrd_base.h | 218 +++ 9 files changed, 677 insertions(+), 0 deletions(-) create mode 100644 board/Marvell/openrd_base/Makefile create mode 100644 board/Marvell/openrd_base/config.mk create mode 100644 board/Marvell/openrd_base/kwbimage.cfg create mode 100644 board/Marvell/openrd_base/openrd_base.c create mode 100644 board/Marvell/openrd_base/openrd_base.h create mode 100644 include/configs/openrd_base.h diff --git a/MAINTAINERS b/MAINTAINERS index e9db278..99cdc12 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -588,6 +588,10 @@ Gary Jennejohn Konstantin Kletschke scb9328 ARM920T +Simon Kagstrom + + openrd_base ARM926EJS (Kirkwood SoC) + Nishant Kamat omap1610h2 ARM926EJS diff --git a/MAKEALL b/MAKEALL index f0ed8ea..9e6eee2 100755 --- a/MAKEALL +++ b/MAKEALL @@ -533,6 +533,7 @@ LIST_ARM9=" \ omap1610inn \ omap5912osk \ omap730p2 \ + openrd_base \ rd6281a \ sbc2410x\ scb9328 \ diff --git a/Makefile b/Makefile index 9764cea..6cef82a 100644 --- a/Makefile +++ b/Makefile @@ -3022,6 +3022,9 @@ omap1610h2_cs_autoboot_config:unconfig omap5912osk_config : unconfig @$(MKCONFIG) $(@:_config=) arm arm926ejs omap5912osk ti omap +openrd_base_config: unconfig + @$(MKCONFIG) $(@:_config=) arm arm926ejs $(@:_config=) Marvell kirkwood + xtract_omap730p2 = $(subst _cs0boot,,$(subst _cs3boot,, $(subst _config,,$1))) omap730p2_config \ diff --git a/board/Marvell/openrd_base/Makefile b/board/Marvell/openrd_base/Makefile new file mode 100644 index 000..defbb08 --- /dev/null +++ b/board/Marvell/openrd_base/Makefile @@ -0,0 +1,51 @@ +# +# (C) Copyright 2009 +# Marvell Semiconductor +# Written-by: Prafulla Wadaskar +# +# See file CREDITS for list of people who contributed to this +# project. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301 USA +# + +include $(TOPDIR)/config.mk + +LIB= $(obj)lib$(BOARD).a + +COBJS := openrd_base.o + +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + +$(LIB):$(obj).depend $(OBJS) $(SOBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS) + +clean: + rm -f $(SOBJS) $(OBJS) + +distclean: clean + rm -f $(LIB) core *.bak .depend + +# + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +# diff --git a/board/Marvell/openrd_base/config.mk b/board/Marvell/openrd_base/config.mk new file mode 100644 index 000..2bd9f79 --- /dev/null +++ b/board/Marvell/openrd_base/config.mk @@ -0,0 +1,28 @@ +# +# (C) Copyright 2009 +# Marvell Semiconductor +# Written-by: Prafulla Wadaskar +# +# See file CREDITS for list of people who contributed to this +# project. +# +# This progr