Re: [U-Boot] [PATCH v2] lsxl: add support for lschlv2 and lsxhl
-Original Message- From: Michael Walle [mailto:mich...@walle.cc] Sent: 30 March 2012 19:27 To: Prafulla Wadaskar Cc: u-boot@lists.denx.de; Wolfgang Denk Subject: Re: [PATCH v2] lsxl: add support for lschlv2 and lsxhl Hi Prafulla, [ I'm CCing Wolfgang on this, because i don't know who's responsible for the build/make infrastructure. ] AFAIK, you need to pass only u-boot.kwb to the make (no $(okj) needed) Sorry you're wrong here, that won't work for out-of-tree builds, see below. Kirkwood is not only target that may need to be build for out-of-tree builds. This should be addressed for generic use case. [mw@thanatos b-u-boot]$ LANG=C make -j3 -C ../u-boot O=`pwd` CROSS_COMPILE=arm-linux-gnueabi- u-boot.kwb make: Entering directory `/home/mw/repo/u-boot' make: *** No rule to make target `u-boot.kwb'. Stop. make: Leaving directory `/home/mw/repo/u-boot' - i'm only interested in the u-boot.kwb, why shouldn't it be generated by default? AFAIK, any target apart from u-boot.bin are optional, can be generated if needed - i can't build it with a sinlge make call. Eg. atm i'm doing make -j3 -C ../u-boot O=`pwd` CROSS_COMPILE=arm-linux-gnueabi- lschlv2 otherwise i have to do make -j3 -C ../u-boot O=`pwd` CROSS_COMPILE=arm-linux-gnueabi- lschlv2 make -j3 -C ../u-boot O=`pwd` CROSS_COMPILE=arm-linux-gnueabi- \ `pwd`/u-boot.kwb make u-boot.kwb CROSS_COMPILE=arm-linux-gnueabi- generates u-boot.kwb, this should be valid with other use case too. if not, it makes sense to add an additional line in script that a file in code :-) Mh, i don't understands what is wrong with a config.mk with only an additional make target? There are other boards too, which handles image generating this way (grep for ALL-y in boards/). Shouldn't be building an uboot image as simple as possible? I understand and know this, I greped for the same but all of them have some more configuration. Anyway I am not interested to argue on this. My intention here is, this in not the only board that needs this functionaltiy. Why not to add it in generic way? If we add .PHONY: u-boot.kwb u-boot.kwb: $(obj)u-boot.kwb to the main Makefile, i would say we should add all other image targets, too. I would greatly appreciate is something like this can be implemented. I'd say one could add the target to the kirkwood config.mk (if there is one per platform) but i doubt every kirkwood based board will need one (and provides a kwbimage.cfg). FYI: all kirkwood boards as of now needs u-boot.kwb, but this is optional to any future board. I can think of adding arch/arm/cpu/arm926ejs/kirkwood/config.mk if above proposed method is not acceptable. Regards.. Prafulla . . . ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] lsxl: add support for lschlv2 and lsxhl
-Original Message- From: Michael Walle [mailto:mich...@walle.cc] Sent: 29 March 2012 20:09 To: Prafulla Wadaskar Cc: u-boot@lists.denx.de Subject: Re: [PATCH v2] lsxl: add support for lschlv2 and lsxhl Am Donnerstag 29 März 2012, 16:24:23 schrieb Prafulla Wadaskar: -Original Message- From: Michael Walle [mailto:mich...@walle.cc] Sent: 29 March 2012 18:08 To: Prafulla Wadaskar Cc: u-boot@lists.denx.de Subject: Re: [PATCH v2] lsxl: add support for lschlv2 and lsxhl Am Dienstag 27 März 2012, 09:27:49 schrieb Prafulla Wadaskar: # diff --git a/board/buffalo/lsxl/config.mk b/board/buffalo/lsxl/config.mk new file mode 100644 index 000..062554b --- /dev/null +++ b/board/buffalo/lsxl/config.mk @@ -0,0 +1 @@ +ALL-y += $(obj)u-boot.kwb Pls remove this file Is there another way to build the u-boot.kwb binary by default? The main Makefile states: # Always append ALL so that arch config.mk's can add custom ones and theres a rule for $(obj)u-boot.kwb. Just pass u-boot.kwm to the make, will do the needful, if this satisfies the goal of generating u-boot.kwb, then why to add one file to the source code? - this won't work easily for out-of-tree builds, will it? because you have to pass $(obj)u-boot.kwb to make and $(obj) is $O which is specified by the user, so he has to specify it twice Dear Michael, AFAIK, you need to pass only u-boot.kwb to the make (no $(okj) needed) - i'm only interested in the u-boot.kwb, why shouldn't it be generated by default? - i can't build it with a sinlge make call. Eg. atm i'm doing make -j3 -C ../u-boot O=`pwd` CROSS_COMPILE=arm-linux-gnueabi- lschlv2 otherwise i have to do make -j3 -C ../u-boot O=`pwd` CROSS_COMPILE=arm-linux-gnueabi- lschlv2 make -j3 -C ../u-boot O=`pwd` CROSS_COMPILE=arm-linux-gnueabi- \ `pwd`/u-boot.kwb make u-boot.kwb CROSS_COMPILE=arm-linux-gnueabi- generates u-boot.kwb, this should be valid with other use case too. if not, it makes sense to add an additional line in script that a file in code :-) Regards.. Prafulla . .. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] lsxl: add support for lschlv2 and lsxhl
Hi Prafulla, [ I'm CCing Wolfgang on this, because i don't know who's responsible for the build/make infrastructure. ] AFAIK, you need to pass only u-boot.kwb to the make (no $(okj) needed) Sorry you're wrong here, that won't work for out-of-tree builds, see below. [mw@thanatos b-u-boot]$ LANG=C make -j3 -C ../u-boot O=`pwd` CROSS_COMPILE=arm-linux-gnueabi- u-boot.kwb make: Entering directory `/home/mw/repo/u-boot' make: *** No rule to make target `u-boot.kwb'. Stop. make: Leaving directory `/home/mw/repo/u-boot' - i'm only interested in the u-boot.kwb, why shouldn't it be generated by default? - i can't build it with a sinlge make call. Eg. atm i'm doing make -j3 -C ../u-boot O=`pwd` CROSS_COMPILE=arm-linux-gnueabi- lschlv2 otherwise i have to do make -j3 -C ../u-boot O=`pwd` CROSS_COMPILE=arm-linux-gnueabi- lschlv2 make -j3 -C ../u-boot O=`pwd` CROSS_COMPILE=arm-linux-gnueabi- \ `pwd`/u-boot.kwb make u-boot.kwb CROSS_COMPILE=arm-linux-gnueabi- generates u-boot.kwb, this should be valid with other use case too. if not, it makes sense to add an additional line in script that a file in code :-) Mh, i don't understands what is wrong with a config.mk with only an additional make target? There are other boards too, which handles image generating this way (grep for ALL-y in boards/). Shouldn't be building an uboot image as simple as possible? If we add .PHONY: u-boot.kwb u-boot.kwb: $(obj)u-boot.kwb to the main Makefile, i would say we should add all other image targets, too. I'd say one could add the target to the kirkwood config.mk (if there is one per platform) but i doubt every kirkwood based board will need one (and provides a kwbimage.cfg). -- Michael ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] lsxl: add support for lschlv2 and lsxhl
Hi Wolfgang, I still fail to understand why you would need fixed network settings. Evenin emergency cases, the only parameter you really need is a MAC address, all others can be fetched for example from a DHCP server. bootp/dhcp should work for getting the ip address. My initial thought was that you need to hardcode the ncip anyway, which means you need the ipaddr etc, too. Using DHCP and setting the ncip to the delivered serverip should be ok, i think. As for the MAC address, it is in such emergencies OK to use a random locally administered Ethernet address. Note the random - hard- coding the same address for all devices is definitely a No-Go. Is 02:00:00:RR:RR:RR, where RR is a random byte, ok? -- Michael ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] lsxl: add support for lschlv2 and lsxhl
Am Dienstag 27 März 2012, 09:27:49 schrieb Prafulla Wadaskar: # diff --git a/board/buffalo/lsxl/config.mk b/board/buffalo/lsxl/config.mk new file mode 100644 index 000..062554b --- /dev/null +++ b/board/buffalo/lsxl/config.mk @@ -0,0 +1 @@ +ALL-y += $(obj)u-boot.kwb Pls remove this file Is there another way to build the u-boot.kwb binary by default? The main Makefile states: # Always append ALL so that arch config.mk's can add custom ones and theres a rule for $(obj)u-boot.kwb. -- Michael ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] lsxl: add support for lschlv2 and lsxhl
-Original Message- From: Michael Walle [mailto:mich...@walle.cc] Sent: 29 March 2012 18:08 To: Prafulla Wadaskar Cc: u-boot@lists.denx.de Subject: Re: [PATCH v2] lsxl: add support for lschlv2 and lsxhl Am Dienstag 27 März 2012, 09:27:49 schrieb Prafulla Wadaskar: # diff --git a/board/buffalo/lsxl/config.mk b/board/buffalo/lsxl/config.mk new file mode 100644 index 000..062554b --- /dev/null +++ b/board/buffalo/lsxl/config.mk @@ -0,0 +1 @@ +ALL-y += $(obj)u-boot.kwb Pls remove this file Is there another way to build the u-boot.kwb binary by default? The main Makefile states: # Always append ALL so that arch config.mk's can add custom ones and theres a rule for $(obj)u-boot.kwb. Just pass u-boot.kwm to the make, will do the needful, if this satisfies the goal of generating u-boot.kwb, then why to add one file to the source code? If you have some more things to do then board specific config.mk can be considered. Regards.. Prafulla . . . ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] lsxl: add support for lschlv2 and lsxhl
Am Donnerstag 29 März 2012, 16:24:23 schrieb Prafulla Wadaskar: -Original Message- From: Michael Walle [mailto:mich...@walle.cc] Sent: 29 March 2012 18:08 To: Prafulla Wadaskar Cc: u-boot@lists.denx.de Subject: Re: [PATCH v2] lsxl: add support for lschlv2 and lsxhl Am Dienstag 27 März 2012, 09:27:49 schrieb Prafulla Wadaskar: # diff --git a/board/buffalo/lsxl/config.mk b/board/buffalo/lsxl/config.mk new file mode 100644 index 000..062554b --- /dev/null +++ b/board/buffalo/lsxl/config.mk @@ -0,0 +1 @@ +ALL-y += $(obj)u-boot.kwb Pls remove this file Is there another way to build the u-boot.kwb binary by default? The main Makefile states: # Always append ALL so that arch config.mk's can add custom ones and theres a rule for $(obj)u-boot.kwb. Just pass u-boot.kwm to the make, will do the needful, if this satisfies the goal of generating u-boot.kwb, then why to add one file to the source code? - this won't work easily for out-of-tree builds, will it? because you have to pass $(obj)u-boot.kwb to make and $(obj) is $O which is specified by the user, so he has to specify it twice - i'm only interested in the u-boot.kwb, why shouldn't it be generated by default? - i can't build it with a sinlge make call. Eg. atm i'm doing make -j3 -C ../u-boot O=`pwd` CROSS_COMPILE=arm-linux-gnueabi- lschlv2 otherwise i have to do make -j3 -C ../u-boot O=`pwd` CROSS_COMPILE=arm-linux-gnueabi- lschlv2 make -j3 -C ../u-boot O=`pwd` CROSS_COMPILE=arm-linux-gnueabi- \ `pwd`/u-boot.kwb Overall, it will greatly simplify thinks :) -- Michael ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] lsxl: add support for lschlv2 and lsxhl
Please use Kirkwood: add xxx board support as a patch heading to identify the patch for kirkwood This patchset adds support for both the Linkstation Live (LS-CHLv2) and Linkstation Pro (LS-XHL) by Buffalo. Signed-off-by: Michael Walle michael at walle.cc Cc: Prafulla Wadaskar prafulla at marvell.com Cc: Wolfgang Denk wd at denx.de --- v2: - add to buffalo vendor directory instead of Marvell - add both boards to MAINTAINERS - don't define values for feature macros - use tab for vertical alignment - remove static network configuration, instead introduce a rescue mode - add some convenience scripts - small cleanups MAINTAINERS |5 + board/buffalo/lsxl/Makefile | 50 ++ board/buffalo/lsxl/config.mk |1 + board/buffalo/lsxl/kwbimage-lschl.cfg | 66 board/buffalo/lsxl/kwbimage-lsxhl.cfg | 66 board/buffalo/lsxl/lsxl.c | 294 + board/buffalo/lsxl/lsxl.h | 75 + boards.cfg|3 + include/configs/lsxl.h| 171 +++ 9 files changed, 731 insertions(+), 0 deletions(-) create mode 100644 board/buffalo/lsxl/Makefile create mode 100644 board/buffalo/lsxl/config.mk create mode 100644 board/buffalo/lsxl/kwbimage-lschl.cfg create mode 100644 board/buffalo/lsxl/kwbimage-lsxhl.cfg create mode 100644 board/buffalo/lsxl/lsxl.c create mode 100644 board/buffalo/lsxl/lsxl.h create mode 100644 include/configs/lsxl.h diff --git a/MAINTAINERS b/MAINTAINERS index 1e40af2..25a5a5d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -905,6 +905,11 @@ Prafulla Wadaskar prafulla at marvell.com rd6281a ARM926EJS (Kirkwood SoC) sheevaplug ARM926EJS (Kirkwood SoC) +Michael Walle michael at walle.cc + + lschlv2 ARM926EJS (Kirkwood SoC) + lsxhl ARM926EJS (Kirkwood SoC) + Tom Warren twarren at nvidia.com harmony Tegra2 (ARM7 A9 Dual Core) diff --git a/board/buffalo/lsxl/Makefile b/board/buffalo/lsxl/Makefile new file mode 100644 index 000..4c08079 --- /dev/null +++ b/board/buffalo/lsxl/Makefile @@ -0,0 +1,50 @@ +# +# Copyright (c) 2011 Michael Walle +# Michael Walle michael at walle.cc +# +# 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).o + +COBJS:= lsxl.o + +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS:= $(addprefix $(obj),$(SOBJS)) + +$(LIB): $(obj).depend $(OBJS) $(SOBJS) + $(call cmd_link_o_target, $(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/buffalo/lsxl/config.mk b/board/buffalo/lsxl/config.mk new file mode 100644 index 000..062554b --- /dev/null +++ b/board/buffalo/lsxl/config.mk @@ -0,0 +1 @@ +ALL-y += $(obj)u-boot.kwb Pls remove this file diff --git a/board/buffalo/lsxl/kwbimage-lschl.cfg b/board/buffalo/lsxl/kwbimage-lschl.cfg new file mode 100644 index 000..4d96c3f --- /dev/null +++ b/board/buffalo/lsxl/kwbimage-lschl.cfg @@ -0,0 +1,66 @@ +# +# Copyright (c) 2011 Michael Walle +# Michael Walle michael at walle.cc +# +# 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
Re: [U-Boot] [PATCH v2] lsxl: add support for lschlv2 and lsxhl
-Original Message- From: Michael Walle [mailto:mich...@walle.cc] Sent: 26 March 2012 15:46 To: u-boot@lists.denx.de Cc: Prafulla Wadaskar; Wolfgang Denk Subject: Re: [PATCH v2] lsxl: add support for lschlv2 and lsxhl On Fri, March 2, 2012 17:02, Michael Walle wrote: This patchset adds support for both the Linkstation Live (LS-CHLv2) and Linkstation Pro (LS-XHL) by Buffalo. Signed-off-by: Michael Walle mich...@walle.cc Cc: Prafulla Wadaskar prafu...@marvell.com Cc: Wolfgang Denk w...@denx.de --- v2: - add to buffalo vendor directory instead of Marvell - add both boards to MAINTAINERS - don't define values for feature macros - use tab for vertical alignment - remove static network configuration, instead introduce a rescue mode - add some convenience scripts - small cleanups Ping :) Sorry Michael, This is missed, may be because the subject don't have Kirkwood: Regards. Prafulla . . ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] lsxl: add support for lschlv2 and lsxhl
Hi Prafulla, thanks for the review. +++ b/board/buffalo/lsxl/kwbimage-lsxhl.cfg BTW: What is difference between them? if it is very small you can manage it through c file. mh? arent these the values which end up in the head of an SPI image, the SoC bootstrap rom will execute? how can these be changed with a c file? I extracted these values from the original vendor supplied uboot binary / SPI dump. +/* + * Rescue mode + * + * Selected by holding the push button for 3 seconds, while powering on + * the device. + * + * These linkstations don't have a (populated) serial port. There is no + * way to access an (unmodified) board other than using the netconsole. If + * you want to recover from a bad environment setting or an empty environment, + * you can do this only with a working network connection. Therefore, the + * following network configuration will be set when rescue mode is stared. + * Additionally, the bootsource is set to 'cli'. + */ +#define RESCUE_ETHADDR 02:00:01:00:00:00 +#define RESCUE_IPADDR192.168.11.150 +#define RESCUE_NETMASK 255.255.255.0 +#define RESCUE_SERVERIP 192.168.11.1 NAK, no hardcoding please. Unfortunately, this is not possible. As described in the comment above, you have to have a working network to use the netconsole. Also have a look at: http://lists.denx.de/pipermail/u-boot/2012-January/114547.html I removed the hardcoded values from the environment and put it into a special rescue mode, so it won't show up until the user is explicitly choosing that mode. I can understand, that hardcoded values are bad but in this case i cannot think of any other (easy and reliable) way to get access to a misconfigured linkstation. Do you have any other idea? again, the only interfaces you have are ethernet, one button, two (multiple color leds), one switch with three positions [and an usb port, only available on older linkstations]. +#define RESCUE_NCIP RESCUE_SERVERIP + +#ifndef CONFIG_ENV_OVERWRITE +# error You need to set CONFIG_ENV_OVERWRITE +#endif + +DECLARE_GLOBAL_DATA_PTR; + +int board_early_init_f(void) +{ + /* + * default gpio configuration + * There are maximum 64 gpios controlled through 2 sets of registers + * the below configuration configures mainly initial LED status + */ + kw_config_gpio(LSXL_OE_VAL_LOW, + LSXL_OE_VAL_HIGH, + LSXL_OE_LOW, LSXL_OE_HIGH); + + /* Multi-Purpose Pins Functionality configuration */ + u32 kwmpp_config[] = { + MPP0_SPI_SCn, + MPP1_SPI_MOSI, + MPP2_SPI_SCK, + MPP3_SPI_MISO, + MPP4_UART0_RXD, + MPP5_UART0_TXD, + MPP6_SYSRST_OUTn, + MPP7_GPO, + MPP8_GPIO, + MPP9_GPIO, + MPP10_GPO, + MPP11_GPIO, + MPP12_SD_CLK, + MPP13_SD_CMD, + MPP14_SD_D0, + MPP15_SD_D1, + MPP16_SD_D2, + MPP17_SD_D3, + MPP18_GPO, + MPP19_GPO, + MPP20_GE1_0, + MPP21_GE1_1, + MPP22_GE1_2, + MPP23_GE1_3, + MPP24_GE1_4, + MPP25_GE1_5, + MPP26_GE1_6, + MPP27_GE1_7, + MPP28_GPIO, + MPP29_GPIO, + MPP30_GE1_10, + MPP31_GE1_11, + MPP32_GE1_12, + MPP33_GE1_13, + MPP34_GPIO, + MPP35_GPIO, + MPP36_GPIO, + MPP37_GPIO, + MPP38_GPIO, + MPP39_GPIO, + MPP40_GPIO, + MPP41_GPIO, + MPP42_GPIO, + MPP43_GPIO, + MPP44_GPIO, + MPP45_GPIO, + MPP46_GPIO, + MPP47_GPIO, + MPP48_GPIO, + MPP49_GPIO, are you using all there MFPs on your board, it's better to comment about GPIOs for their usage i guess i can only describe a subset of these gpios, as it is a proprietary board by linksys i have no documenation about ;) but i'll add the ones i know. --- a/boards.cfg +++ b/boards.cfg @@ -137,6 +137,9 @@ hawkboard_uart arm arm926ejs da8xxevmdavinci enbw_cmc arm arm926ejs enbw_cmc enbw davinci calimain arm arm926ejs calimain omicrondavinci dns325 arm arm926ejs - d- link kirkwood +lschlv2 arm arm926ejs lsxl buffalokirkwoodlsxl:LSCHLV2 +lschlv2_ramboot arm arm926ejs lsxl buffalokirkwood lsxl:LSCHLV2,SYS_RAMBOOT,SYS_TEXT_BASE=0x0070 +lsxhlarm arm926ejs lsxl Again, if the board is boot from RAM, you dont need kwbimage.cfg for that particular board. mh? the
Re: [U-Boot] [PATCH v2] lsxl: add support for lschlv2 and lsxhl
-Original Message- From: Michael Walle [mailto:mich...@walle.cc] Sent: 27 March 2012 16:22 To: Prafulla Wadaskar Cc: Michael Walle; u-boot@lists.denx.de Subject: RE: [PATCH v2] lsxl: add support for lschlv2 and lsxhl Hi Prafulla, thanks for the review. +++ b/board/buffalo/lsxl/kwbimage-lsxhl.cfg BTW: What is difference between them? if it is very small you can manage it through c file. mh? arent these the values which end up in the head of an SPI image, the SoC bootstrap rom will execute? how can these be changed with a c file? I extracted these values from the original vendor supplied uboot binary / SPI dump. +/* + * Rescue mode + * + * Selected by holding the push button for 3 seconds, while powering on + * the device. + * + * These linkstations don't have a (populated) serial port. There is no + * way to access an (unmodified) board other than using the netconsole. If + * you want to recover from a bad environment setting or an empty environment, + * you can do this only with a working network connection. Therefore, the + * following network configuration will be set when rescue mode is stared. + * Additionally, the bootsource is set to 'cli'. + */ +#define RESCUE_ETHADDR 02:00:01:00:00:00 +#define RESCUE_IPADDR192.168.11.150 +#define RESCUE_NETMASK 255.255.255.0 +#define RESCUE_SERVERIP 192.168.11.1 NAK, no hardcoding please. Unfortunately, this is not possible. As described in the comment above, you have to have a working network to use the netconsole. Also have a look at: http://lists.denx.de/pipermail/u-boot/2012-January/114547.html I removed the hardcoded values from the environment and put it into a special rescue mode, so it won't show up until the user is explicitly choosing that mode. I can understand, that hardcoded values are bad but in this case i cannot think of any other (easy and reliable) way to get access to a misconfigured linkstation. Do you have any other idea? again, the only interfaces you have are ethernet, one button, two (multiple color leds), one switch with three positions [and an usb port, only available on older linkstations]. You need special environment variables by default, u-boot development policy does not allow this, so you can have clean code mainlined and keep this customization patch private to you. This is what I think the solution could be :-( +#define RESCUE_NCIP RESCUE_SERVERIP + +#ifndef CONFIG_ENV_OVERWRITE +# error You need to set CONFIG_ENV_OVERWRITE +#endif + +DECLARE_GLOBAL_DATA_PTR; + +int board_early_init_f(void) +{ + /* + * default gpio configuration + * There are maximum 64 gpios controlled through 2 sets of registers + * the below configuration configures mainly initial LED status + */ + kw_config_gpio(LSXL_OE_VAL_LOW, + LSXL_OE_VAL_HIGH, + LSXL_OE_LOW, LSXL_OE_HIGH); + + /* Multi-Purpose Pins Functionality configuration */ + u32 kwmpp_config[] = { + MPP0_SPI_SCn, + MPP1_SPI_MOSI, + MPP2_SPI_SCK, + MPP3_SPI_MISO, + MPP4_UART0_RXD, + MPP5_UART0_TXD, + MPP6_SYSRST_OUTn, + MPP7_GPO, + MPP8_GPIO, + MPP9_GPIO, + MPP10_GPO, + MPP11_GPIO, + MPP12_SD_CLK, + MPP13_SD_CMD, + MPP14_SD_D0, + MPP15_SD_D1, + MPP16_SD_D2, + MPP17_SD_D3, + MPP18_GPO, + MPP19_GPO, + MPP20_GE1_0, + MPP21_GE1_1, + MPP22_GE1_2, + MPP23_GE1_3, + MPP24_GE1_4, + MPP25_GE1_5, + MPP26_GE1_6, + MPP27_GE1_7, + MPP28_GPIO, + MPP29_GPIO, + MPP30_GE1_10, + MPP31_GE1_11, + MPP32_GE1_12, + MPP33_GE1_13, + MPP34_GPIO, + MPP35_GPIO, + MPP36_GPIO, + MPP37_GPIO, + MPP38_GPIO, + MPP39_GPIO, + MPP40_GPIO, + MPP41_GPIO, + MPP42_GPIO, + MPP43_GPIO, + MPP44_GPIO, + MPP45_GPIO, + MPP46_GPIO, + MPP47_GPIO, + MPP48_GPIO, + MPP49_GPIO, are you using all there MFPs on your board, it's better to comment about GPIOs for their usage i guess i can only describe a subset of these gpios, as it is a proprietary board by linksys i have no documenation about ;) but i'll add the ones i know. --- a/boards.cfg +++ b/boards.cfg @@ -137,6 +137,9 @@ hawkboard_uart arm arm926ejs da8xxevmdavinci enbw_cmc arm arm926ejs
Re: [U-Boot] [PATCH v2] lsxl: add support for lschlv2 and lsxhl
Am Dienstag 27 März 2012, 09:27:49 schrieb Prafulla Wadaskar: Is the chip 6281/6282 or 6192? It' a 88F6281-A1. -- Michael ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] lsxl: add support for lschlv2 and lsxhl
Hi, Am Dienstag 27 März 2012, 13:05:05 schrieb Prafulla Wadaskar: I removed the hardcoded values from the environment and put it into a special rescue mode, so it won't show up until the user is explicitly choosing that mode. I can understand, that hardcoded values are bad but in this case i cannot think of any other (easy and reliable) way to get access to a misconfigured linkstation. Do you have any other idea? again, the only interfaces you have are ethernet, one button, two (multiple color leds), one switch with three positions [and an usb port, only available on older linkstations]. You need special environment variables by default, u-boot development policy does not allow this, so you can have clean code mainlined and keep this customization patch private to you. This is what I think the solution could be :-( Wolfgang, what do you think about relaxing this policy a bit and allowing this class of devices (no service port/serial port available, no storage for the MAC address besides the environment) to use hardcoded values (maybe defined in a place common to all boards). Again, i don't think my device is the only one with this problem. mh? the lschlv2_ramboot is just for testing purposes. So you can try the bootloader without actually overwriting it in the boot flash. The actual images are the lschlv2 and lsxhl targets. I guess i should add a lsxhl_ramboot, too. There was no need for the latter because i have a jtag connector on my lsxhl (but not on the lschlv2). AFAIK, for ram boot you need u-boot ELF image, you can use u-boot.bin but u-boot.kwb image cannot be used for boot from RAM, kwbimage.cfg helps to create u-boot.kwb target which is useless for boot from RAM use case. So you need to remove it. The elf/bin is just for testing and the kwb image will be written into the spi flash, i need both (at least i need the kwb image). I could remove the ramboot target, but i think its really handy if someone likes to play with a self compiled uboot. -- Michael ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] lsxl: add support for lschlv2 and lsxhl
Dear Michael, In message 201203272255.59259.mich...@walle.cc you wrote: Wolfgang, what do you think about relaxing this policy a bit and allowing this class of devices (no service port/serial port available, no storage for the MAC address besides the environment) to use hardcoded values (maybe defined in a place common to all boards). Again, i don't think my device is the only one with this problem. Probably it is not the only device, but eventually all the others found other working solutions? I still fail to understand why you would need fixed network settings. Evenin emergency cases, the only parameter you really need is a MAC address, all others can be fetched for example from a DHCP server. As for the MAC address, it is in such emergencies OK to use a random locally administered Ethernet address. Note the random - hard- coding the same address for all devices is definitely a No-Go. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de Disc space - the final frontier! ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] lsxl: add support for lschlv2 and lsxhl
On Fri, March 2, 2012 17:02, Michael Walle wrote: This patchset adds support for both the Linkstation Live (LS-CHLv2) and Linkstation Pro (LS-XHL) by Buffalo. Signed-off-by: Michael Walle mich...@walle.cc Cc: Prafulla Wadaskar prafu...@marvell.com Cc: Wolfgang Denk w...@denx.de --- v2: - add to buffalo vendor directory instead of Marvell - add both boards to MAINTAINERS - don't define values for feature macros - use tab for vertical alignment - remove static network configuration, instead introduce a rescue mode - add some convenience scripts - small cleanups Ping :) -- michael ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2] lsxl: add support for lschlv2 and lsxhl
This patchset adds support for both the Linkstation Live (LS-CHLv2) and Linkstation Pro (LS-XHL) by Buffalo. Signed-off-by: Michael Walle mich...@walle.cc Cc: Prafulla Wadaskar prafu...@marvell.com Cc: Wolfgang Denk w...@denx.de --- v2: - add to buffalo vendor directory instead of Marvell - add both boards to MAINTAINERS - don't define values for feature macros - use tab for vertical alignment - remove static network configuration, instead introduce a rescue mode - add some convenience scripts - small cleanups MAINTAINERS |5 + board/buffalo/lsxl/Makefile | 50 ++ board/buffalo/lsxl/config.mk |1 + board/buffalo/lsxl/kwbimage-lschl.cfg | 66 board/buffalo/lsxl/kwbimage-lsxhl.cfg | 66 board/buffalo/lsxl/lsxl.c | 294 + board/buffalo/lsxl/lsxl.h | 75 + boards.cfg|3 + include/configs/lsxl.h| 171 +++ 9 files changed, 731 insertions(+), 0 deletions(-) create mode 100644 board/buffalo/lsxl/Makefile create mode 100644 board/buffalo/lsxl/config.mk create mode 100644 board/buffalo/lsxl/kwbimage-lschl.cfg create mode 100644 board/buffalo/lsxl/kwbimage-lsxhl.cfg create mode 100644 board/buffalo/lsxl/lsxl.c create mode 100644 board/buffalo/lsxl/lsxl.h create mode 100644 include/configs/lsxl.h diff --git a/MAINTAINERS b/MAINTAINERS index 1e40af2..25a5a5d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -905,6 +905,11 @@ Prafulla Wadaskar prafu...@marvell.com rd6281a ARM926EJS (Kirkwood SoC) sheevaplug ARM926EJS (Kirkwood SoC) +Michael Walle mich...@walle.cc + + lschlv2 ARM926EJS (Kirkwood SoC) + lsxhl ARM926EJS (Kirkwood SoC) + Tom Warren twar...@nvidia.com harmony Tegra2 (ARM7 A9 Dual Core) diff --git a/board/buffalo/lsxl/Makefile b/board/buffalo/lsxl/Makefile new file mode 100644 index 000..4c08079 --- /dev/null +++ b/board/buffalo/lsxl/Makefile @@ -0,0 +1,50 @@ +# +# Copyright (c) 2011 Michael Walle +# Michael Walle mich...@walle.cc +# +# 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).o + +COBJS := lsxl.o + +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + +$(LIB):$(obj).depend $(OBJS) $(SOBJS) + $(call cmd_link_o_target, $(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/buffalo/lsxl/config.mk b/board/buffalo/lsxl/config.mk new file mode 100644 index 000..062554b --- /dev/null +++ b/board/buffalo/lsxl/config.mk @@ -0,0 +1 @@ +ALL-y += $(obj)u-boot.kwb diff --git a/board/buffalo/lsxl/kwbimage-lschl.cfg b/board/buffalo/lsxl/kwbimage-lschl.cfg new file mode 100644 index 000..4d96c3f --- /dev/null +++ b/board/buffalo/lsxl/kwbimage-lschl.cfg @@ -0,0 +1,66 @@ +# +# Copyright (c) 2011 Michael Walle +# Michael Walle mich...@walle.cc +# +# 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 +# +# Refer docs/README.kwimage for more details about how-to configure +#