ppc44x: Unification of virtex5 pp440 boards v3
Subsystems (2)
PATCH 1/1 ppc44x: Unification of virtex5 pp440 boards v3
This patch provides an unificated way of handling xilinx v5 ppc440 boards.
It unificates 3 different things:
1) Source code
A new board called ppc440-generic has been created. This board includes a generic tlb initialization (Maps the whole memory into virtual) and defines board_pre_init, checkboard, initdram and get_sys_info weakly, so, they can be replaced by specific functions.
If a new board needs to redefine any of the previous functions (specific initialization) it can create a new directory with the specific initializations needed. (see the example ml507 board).
2) Configuration file
Common configurations are located under configs/xilinx-ppc440.h, this header file interpretes the xparameters file generated by EDK and configurates u-boot in correspondence. Example: if there is a Temac, allows CMD_CONFIG_NET
Specific configuration are located under specific configuration file. (see the example ml507 board)
3) Makefile
Some work has been done in order to not duplicate work in the Main Makefile. Please see the attached code.
In order to support new boards they can be implemented in the next way:
a) Simple Generic Board (90% of the time)
Using EDK generates a new xparameters.h file, replace ppc440-generic/xparameters.h and run make xilinx-ppc440-generic_config && make
b) Simple Boards with special u-boot parameters (9 % of the time) Create a new file under configs for it (use ml507.h as example) and change your paramaters. Create a new Makefile paragraph and compile
c) Complex boards (1% of the time)
Create a new folder for the board, like the ml507
Finally, it adds support for the Avnet FX30T Evaluation board, following the new generic structure:
Cheap board by Avnet for evaluating the Virtex5 FX technology.
This patch adds support for:
- UartLite
- 16MB Flash
- 64MB RAM
Prior using U-boot in this board, read carefully the ERRATA by Avnet to solve some memory initialization issues.
v2 diff:
- Code Styling (Michal Simek)
- Remove unnecesary xparameters lines (Michal Simek)
- Avnet board documentation in patch
v3 diff:
- Description changed (wdenx)
- Copyright issues
- RFC->Patch Propossal
--- CREDITS | 3 +- MAINTAINERS | 2 + MAKEALL | 4 + Makefile | 58 +++++++-- board/avnet/v5fx30teval/.gitignore | 3 + board/avnet/v5fx30teval/Makefile | 27 ++++ board/avnet/v5fx30teval/v5fx30teval.c | 28 ++++ board/avnet/v5fx30teval/xparameters.h | 33 +++++ board/xilinx/ml507/.gitignore | 3 + board/xilinx/ml507/Makefile | 41 +----- board/xilinx/ml507/config.mk | 27 ---- board/xilinx/ml507/init.S | 53 ------- board/xilinx/ml507/ml507.c | 21 +--- board/xilinx/ml507/u-boot-ram.lds | 134 ------------------ board/xilinx/ml507/u-boot-rom.lds | 144 -------------------- board/xilinx/ml507/xparameters.h | 17 +-- board/xilinx/ppc440-generic/.gitignore | 3 + board/xilinx/ppc440-generic/Makefile | 62 +++++++++ board/xilinx/ppc440-generic/init.S | 45 ++++++ board/xilinx/ppc440-generic/u-boot-ram.lds | 134 ++++++++++++++++++ board/xilinx/ppc440-generic/u-boot-rom.lds | 144 ++++++++++++++++++++ .../xilinx/ppc440-generic/xilinx_ppc440_generic.c | 52 +++++++ board/xilinx/ppc440-generic/xparameters.h | 34 +++++ include/configs/ml507.h | 91 ++----------- include/configs/v5fx30teval.h | 49 +++++++ include/configs/xilinx-ppc440-generic.h | 49 +++++++ include/configs/xilinx-ppc440.h | 106 ++++++++++++++ 27 files changed, 851 insertions(+), 516 deletions(-) create mode 100644 board/avnet/v5fx30teval/.gitignore create mode 100644 board/avnet/v5fx30teval/Makefile create mode 100644 board/avnet/v5fx30teval/v5fx30teval.c create mode 100644 board/avnet/v5fx30teval/xparameters.h create mode 100644 board/xilinx/ml507/.gitignore delete mode 100644 board/xilinx/ml507/config.mk delete mode 100644 board/xilinx/ml507/init.S delete mode 100644 board/xilinx/ml507/u-boot-ram.lds delete mode 100644 board/xilinx/ml507/u-boot-rom.lds create mode 100644 board/xilinx/ppc440-generic/.gitignore create mode 100644 board/xilinx/ppc440-generic/Makefile create mode 100644 board/xilinx/ppc440-generic/init.S create mode 100644 board/xilinx/ppc440-generic/u-boot-ram.lds create mode 100644 board/xilinx/ppc440-generic/u-boot-rom.lds create mode 100644 board/xilinx/ppc440-generic/xilinx_ppc440_generic.c create mode 100644 board/xilinx/ppc440-generic/xparameters.h create mode 100644 include/configs/v5fx30teval.h create mode 100644 include/configs/xilinx-ppc440-generic.h create mode 100644 include/configs/xilinx-ppc440.h
CREDITS +2 -1
@@ -405,7 +405,8 @@ D: Atmel AT91CAP9ADK support N: Ricardo Ribalda Delgado E: ricardo.ribalda at uam.es -D: PPC440x5 (Virtex5), ML507 Board, eeprom_simul, adt7460 +D: PPC440x5 (Virtex5), ML507 Board, eeprom_simul, adt7460, v5fx30teval +D: Virtex ppc440 generic architecture W: http://www.ii.uam.es/~rribalda N: Stefan Roese
MAINTAINERS +2 -0
@@ -318,6 +318,8 @@ Daniel Poirot <[email protected]> Ricardo Ribalda <[email protected]> ml507 PPC440x5 + v5fx30teval PPC440x5 + xilinx-pp440-generic PPC440x5 Stefan Roese <[email protected]>
MAKEALL +4 -0
@@ -231,12 +231,16 @@ LIST_4xx=" \ sequoia_nand \ taihu \ taishan \ + v5fx30teval \ + v5fx30teval_flash \ VOH405 \ VOM405 \ W7OLMC \ W7OLMG \ walnut \ WUH405 \ + xilinx-ppc440-generic \ + xilinx-ppc440-generic_flash \ XPEDITE1K \ yellowstone \ yosemite \
Makefile +48 -10
76 lines not on this page · raw message
board/avnet/v5fx30teval/.gitignore new file +3 -0
@@ -0,0 +1,3 @@ +/u-boot.lds +/config.tmp +/config.mk
board/avnet/v5fx30teval/Makefile new file +27 -0
@@ -0,0 +1,27 @@ +# +# (C) Copyright 2008 +# Ricardo Ribalda,Universidad Autonoma de Madrid, ricardo.ribalda at uam.es +# This work has been supported by: Qtechnology http://qtec.com/ +# +# 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., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# + +COBJS += $(BOARD).o + +include $(SRCTREE)/board/xilinx/ppc440-generic/Makefile
board/avnet/v5fx30teval/v5fx30teval.c new file +28 -0
@@ -0,0 +1,28 @@ +/* +* (C) Copyright 2008 +* Ricado Ribalda-Universidad Autonoma de Madrid-ricardo.ribalda at uam.es +* This work has been supported by: QTechnology http://qtec.com/ +* 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, see <http://www.gnu.org/licenses/>. +*/ + +#include <config.h> +#include <common.h> +#include <asm/processor.h> + + +int checkboard (void ) +{ +puts ("Avnet Virtex 5 FX30 Evaluation Board\n" ); +return 0 ; +}
board/avnet/v5fx30teval/xparameters.h new file +33 -0
@@ -0,0 +1,33 @@ +/* +* (C) Copyright 2008 +* Ricado Ribalda-Universidad Autonoma de Madrid-ricardo.ribalda at uam.es +* This work has been supported by: QTechnology http://qtec.com/ +* based on xparameters.h by Xilinx +* +* 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, see <http://www.gnu.org/licenses/>. +*/ + +#ifndef XPARAMETER_H +#define XPARAMETER_H + +#define XPAR_DDR2_SDRAM_MEM_BASEADDR 0x00000000 +#define XPAR_INTC_0_BASEADDR 0x81800000 +#define XPAR_UARTLITE_0_BASEADDR 0x84000000 +#define XPAR_FLASH_MEM0_BASEADDR 0xFF000000 +#define XPAR_PLB_CLOCK_FREQ_HZ 100000000 +#define XPAR_CORE_CLOCK_FREQ_HZ 400000000 +#define XPAR_INTC_MAX_NUM_INTR_INPUTS 13 +#define XPAR_UARTLITE_0_BAUDRATE 9600 + +#endif
board/xilinx/ml507/.gitignore new file +3 -0
@@ -0,0 +1,3 @@ +/u-boot.lds +/config.tmp +/config.mk
board/xilinx/ml507/Makefile +5 -36
49 lines not on this page · raw message
board/xilinx/ml507/config.mk deleted +0 -27
@@ -1,27 +0,0 @@ -# -# (C) Copyright 2000 -# Wolfgang Denk, DENX Software Engineering, wd at denx.de. -# -# 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., 59 Temple Place, Suite 330, Boston, -# MA 02111-1307 USA -# -sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp - -ifndef TEXT_BASE -TEXT_BASE = 0x04000000 -endif
board/xilinx/ml507/init.S deleted +0 -53
53 lines not on this page · raw message
board/xilinx/ml507/ml507.c +1 -20
@@ -20,28 +20,9 @@#include <common.h> #include <asm/processor.h> -int board_pre_init (void ) -{ -return 0 ; -}int checkboard (void ) { -puts ("ML507 Board\n" ); +puts ("Xilinx ML507 Board\n" );return 0 ; } - -phys_size_t initdram (int board_type) -{ -return get_ram_size (XPAR_DDR2_SDRAM_MEM_BASEADDR , -CFG_SDRAM_SIZE_MB *1024 *1024 ); -} - -void get_sys_info (sys_info_t * sysInfo) -{ - sysInfo->freqProcessor =XPAR_CORE_CLOCK_FREQ_HZ ; - sysInfo->freqPLB =XPAR_PLB_CLOCK_FREQ_HZ ; - sysInfo->freqPCI =0 ; - -return ; -}
board/xilinx/ml507/u-boot-ram.lds deleted +0 -134
134 lines not on this page · raw message
board/xilinx/ml507/u-boot-rom.lds deleted +0 -144
144 lines not on this page · raw message
board/xilinx/ml507/xparameters.h +8 -9
@@ -21,15 +21,14 @@#ifndef XPARAMETER_H #define XPARAMETER_H -#define XPAR_DDR2_SDRAM_MEM_BASEADDR 0x00000000 -#define XPAR_IIC_EEPROM_BASEADDR 0x81600000 -#define XPAR_INTC_0_BASEADDR 0x81800000 -#define XPAR_LLTEMAC_0_BASEADDR 0x81C00000 -#define XPAR_UARTLITE_0_BASEADDR 0x84000000 -#define XPAR_FLASH_MEM0_BASEADDR 0xFE000000 -#define XPAR_PLB_CLOCK_FREQ_HZ 100000000 -#define XPAR_CORE_CLOCK_FREQ_HZ 400000000 -#define XPAR_INTC_MAX_NUM_INTR_INPUTS 13 +#define XPAR_DDR2_SDRAM_MEM_BASEADDR 0x00000000 +#define XPAR_IIC_EEPROM_BASEADDR 0x81600000 +#define XPAR_INTC_0_BASEADDR 0x81800000 +#define XPAR_UARTLITE_0_BASEADDR 0x84000000 +#define XPAR_FLASH_MEM0_BASEADDR 0xFE000000 +#define XPAR_PLB_CLOCK_FREQ_HZ 100000000 +#define XPAR_CORE_CLOCK_FREQ_HZ 400000000 +#define XPAR_INTC_MAX_NUM_INTR_INPUTS 13#define XPAR_UARTLITE_0_BAUDRATE 9600#endif
board/xilinx/ppc440-generic/.gitignore new file +3 -0
@@ -0,0 +1,3 @@ +/u-boot.lds +/config.tmp +/config.mk
board/xilinx/ppc440-generic/Makefile new file +62 -0
62 lines not on this page · raw message
board/xilinx/ppc440-generic/init.S new file +45 -0
45 lines not on this page · raw message
board/xilinx/ppc440-generic/u-boot-ram.lds new file +134 -0
134 lines not on this page · raw message
board/xilinx/ppc440-generic/u-boot-rom.lds new file +144 -0
144 lines not on this page · raw message
board/xilinx/ppc440-generic/xilinx_ppc440_generic.c new file +52 -0
52 lines not on this page · raw message
board/xilinx/ppc440-generic/xparameters.h new file +34 -0
@@ -0,0 +1,34 @@ +/* +* (C) Copyright 2008 +* Ricado Ribalda-Universidad Autonoma de Madrid-ricardo.ribalda at uam.es +* This work has been supported by: QTechnology http://qtec.com/ +* based on xparameters-ml507.h by Xilinx +* +* 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, see <http://www.gnu.org/licenses/>. +*/ + +#ifndef XPARAMETER_H +#define XPARAMETER_H + +#define XPAR_DDR2_SDRAM_MEM_BASEADDR 0x00000000 +#define XPAR_IIC_EEPROM_BASEADDR 0x81600000 +#define XPAR_INTC_0_BASEADDR 0x81800000 +#define XPAR_UARTLITE_0_BASEADDR 0x84000000 +#define XPAR_FLASH_MEM0_BASEADDR 0xFE000000 +#define XPAR_PLB_CLOCK_FREQ_HZ 100000000 +#define XPAR_CORE_CLOCK_FREQ_HZ 400000000 +#define XPAR_INTC_MAX_NUM_INTR_INPUTS 13 +#define XPAR_UARTLITE_0_BAUDRATE 9600 + +#endif
include/configs/ml507.h +9 -82
115 lines not on this page · raw message
include/configs/v5fx30teval.h new file +49 -0
49 lines not on this page · raw message
include/configs/xilinx-ppc440-generic.h new file +49 -0
49 lines not on this page · raw message
include/configs/xilinx-ppc440.h new file +106 -0
106 lines not on this page · raw message
Signature · 1 line
1.5.6.5
PATCH 1/1 ppc44x: Unification of virtex5 pp440 boards v3
Ricardo,
sorry that the review took so long. Here we go:
Quoted 1 line · Ricardo Ribalda Delgado
This patch provides an unificated way of handling xilinx v5 ppc440 boards.
One thing I noticed after applying your patch is the output while running MAKEALL:
[stefan at kubuntu u-boot-ppc4xx (master)]$ ./MAKEALL ml507_flash
BOARD_DIR=board/xilinx/ml507 \
TEXT_BASE=0xFE360000 \
LINK_SCRIPT=board/xilinx/ppc440-generic/u-boot-rom.lds \
CONFIG_SCRIPT="ml507 ppc ppc4xx ml507 xilinx" \
make xilinx_ppc440make[1]: Entering directory `/home/stefan/git/u-boot/u-boot-ppc4xx' Configuring for ml507 board...
make[1]: Leaving directory `/home/stefan/git/u-boot/u-boot-ppc4xx'
text data bss dec hex filename
149144 7652 14892 171688 29ea8 ./u-boot
Could you please reduce this output to the "normal" output style:
[stefan at kubuntu u-boot-ppc4xx (master)]$ ./MAKEALL canyonlands Configuring for canyonlands board...
text data bss dec hex filename
331288 19348 332032 682668 a6aac ./u-boot
And did you check if your patch also has no problems with out-of-tree builds? I didn't check, just making sure.
Other than that look good. Please fix the issue mentioned above and resubmit. Thanks.
Best regards,
Stefan
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
PATCH 1/1 ppc44x: Unification of virtex5 pp440 boards v3
Hello Stefan
I did want to reduce the code replication in the Makefile. So I
created a common target called xilinx_ppc440 that uses three
variables: BOARD_DIR,TEXT_BASE (u-boot location), LINK_SCRIPT and CONFIG_SCRIPT (to setup board dir and config .h), every board just setup this variables and run the make command again.
The weird output is because I do not know how to setup Makefile's
variables and run another target without running make again. I can change the Makefile to the "normal" behaviour, but with a lot of code replication.
I attach you a Makefile codesnipset:
ml507_flash_config: unconfig
BOARD_DIR=$(obj)board/xilinx/ml507 \
TEXT_BASE=0xFE360000 \
LINK_SCRIPT=$(obj)board/xilinx/ppc440-generic/u-boot-rom.lds \
CONFIG_SCRIPT="ml507 ppc ppc4xx ml507 xilinx" \
$(MAKE) xilinx_ppc440xilinx_ppc440: unconfig
@mkdir -p $(obj)include $(BOARD_DIR)
@cp $(LINK_SCRIPT) $(BOARD_DIR)/u-boot.lds
@echo "TEXT_BASE = $(TEXT_BASE)" > $(BOARD_DIR)/config.mk
@$(MKCONFIG) $(CONFIG_SCRIPT)Any suggestions to improve it is more than welcome
Best regards
Quoted 45 lines · Stefan Roese
Ricardo,
sorry that the review took so long. Here we go:
Quoted 1 line · Ricardo Ribalda Delgado
This patch provides an unificated way of handling xilinx v5 ppc440 boards.
One thing I noticed after applying your patch is the output while running MAKEALL:
[stefan at kubuntu u-boot-ppc4xx (master)]$ ./MAKEALL
ml507_flashBOARD_DIR=board/xilinx/ml507 \ TEXT_BASE=0xFE360000 \ LINK_SCRIPT=board/xilinx/ppc440-generic/u-boot-rom.lds \ CONFIG_SCRIPT="ml507 ppc ppc4xx ml507 xilinx" \ make xilinx_ppc440make[1]: Entering directory `/home/stefan/git/u-boot/u-boot-ppc4xx' Configuring for ml507 board...
make[1]: Leaving directory `/home/stefan/git/u-boot/u-boot-ppc4xx'
text data bss dec hex filename
149144 7652 14892 171688 29ea8 ./u-bootCould you please reduce this output to the "normal" output style:
[stefan at kubuntu u-boot-ppc4xx (master)]$ ./MAKEALL canyonlands Configuring for canyonlands board...
text data bss dec hex filename
331288 19348 332032 682668 a6aac ./u-bootAnd did you check if your patch also has no problems with out-of-tree builds? I didn't check, just making sure.
Other than that look good. Please fix the issue mentioned above and resubmit. Thanks.
Best regards,
Stefan=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
Signature · 2 lines
Ricardo Ribalda http://www.eps.uam.es/~rribalda/
PATCH 1/1 ppc44x: Unification of virtex5 pp440 boards v3
Dear Ricardo,
Quoted 7 lines · in message <[email protected]> you…
ml507_flash_config: unconfigBOARD_DIR=$(obj)board/xilinx/ml507 \ TEXT_BASE=0xFE360000 \ LINK_SCRIPT=$(obj)board/xilinx/ppc440-generic/u-boot-rom.lds \ CONFIG_SCRIPT="ml507 ppc ppc4xx ml507 xilinx" \ $(MAKE) xilinx_ppc440
Quoted 5 lines
xilinx_ppc440: unconfig@mkdir -p $(obj)include $(BOARD_DIR) @cp $(LINK_SCRIPT) $(BOARD_DIR)/u-boot.lds @echo "TEXT_BASE = $(TEXT_BASE)" > $(BOARD_DIR)/config.mk @$(MKCONFIG) $(CONFIG_SCRIPT)
The Makefile is not the right place to provide configuration information. It shouls select a target board, and build it, nothing more.
All board specific configuration information should be kept in the board specific files only (please also keep in mind the next one who has to port Linux to a new board - config information should not be scattered over too many polaces, and especially no into common , central files).
Best regards,
Wolfgang Denk
Signature · 6 lines
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: wd at denx.de Change is the essential process of all existence. -- Spock, "Let That Be Your Last Battlefield", stardate 5730.2
PATCH 1/1 ppc44x: Unification of virtex5 pp440 boards v3
Dear Wolfgang:
I believe that it is not setting any configuration information. In
many boards the TEXT_BASE address is set up in the makefile depending if the user wants to compile u-boot for ram o for flash. Like the acadia (and many others)
@echo "TEXT_BASE = 0x01000000" > $(obj)board/amcc/acadia/config.tmp
I have no problem in setting the Makefile in the classic way, I just
wanted to create a new way with the less code replication possible.
Shall I continue with this idea or I move back to the old way?
Regards
Quoted 39 lines · Wolfgang Denk
Dear Ricardo,
Quoted 7 lines · in message <[email protected]> you…
ml507_flash_config: unconfigBOARD_DIR=$(obj)board/xilinx/ml507 \ TEXT_BASE=0xFE360000 \ LINK_SCRIPT=$(obj)board/xilinx/ppc440-generic/u-boot-rom.lds \ CONFIG_SCRIPT="ml507 ppc ppc4xx ml507 xilinx" \ $(MAKE) xilinx_ppc440Quoted 5 lines
xilinx_ppc440: unconfig@mkdir -p $(obj)include $(BOARD_DIR) @cp $(LINK_SCRIPT) $(BOARD_DIR)/u-boot.lds @echo "TEXT_BASE = $(TEXT_BASE)" > $(BOARD_DIR)/config.mk @$(MKCONFIG) $(CONFIG_SCRIPT)The
Makefileis not the right place to provide configuration information. It shouls select a target board, and build it, nothing more.All board specific configuration information should be kept in the board specific files only (please also keep in mind the next one who has to port Linux to a new board - config information should not be scattered over too many polaces, and especially no into common , central files).
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: wd at denx.de Change is the essential process of all existence.
-- Spock, "Let That Be Your Last Battlefield",
stardate 5730.2
Signature · 2 lines
Ricardo Ribalda http://www.eps.uam.es/~rribalda/
PATCH 1/1 ppc44x: Unification of virtex5 pp440 boards v3
Dear "Ricardo Ribalda Delgado",
Quoted 5 lines · In message <[email protected]> you…
I have no problem in setting the
Makefilein the classic way, I just
wanted to create a new way with the less code replication possible.Shall I continue with this idea or I move back to the old way?
I'm not sure if I really understand what the "old" and the "new" way is, but we must limit the growth of the Makefile; it is not a place to configura boards. Yes, this has been done in the past (when U-Boot supported only a fraction of the boards we have today), and maybe we even clean up the old boards one day, but at least don't let us add more of this stuff.
Best regards,
Wolfgang Denk
Signature · 5 lines
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: wd at denx.de "It takes all sorts of in & out-door schooling to get adapted to my kind of fooling" - R. Frost
PATCH 1/1 ppc44x: Unification of virtex5 pp440 boards v3
Hello Wolfgang
Before this "unification" patch I send another path that did treat
the avnet board as a new board (a lot of code replication). This is what I call the old way.
Let me be more clear. What do we want:
MODE A
=========
ml507_config: unconfig
BOARD_DIR=$(obj)board/xilinx/ml507 \
TEXT_BASE=0x3000000 \
LINK_SCRIPT=$(obj)board/xilinx/ppc440-generic/u-boot-ram.lds \
CONFIG_SCRIPT="ml507 ppc ppc4xx ml507 xilinx" \
$(MAKE) xilinx_ppc440ml507_flash_config: unconfig
BOARD_DIR=$(obj)board/xilinx/ml507 \
TEXT_BASE=0xFE360000 \
LINK_SCRIPT=$(obj)board/xilinx/ppc440-generic/u-boot-rom.lds \
CONFIG_SCRIPT="ml507 ppc ppc4xx ml507 xilinx" \
$(MAKE) xilinx_ppc440v5fx30teval:
LIKE BEFORE
v5fx30teval_flash:
LIKE BEFORE
xilinx_ppc440: unconfig
@mkdir -p $(obj)include $(BOARD_DIR)
@cp $(LINK_SCRIPT) $(BOARD_DIR)/u-boot.lds
@echo "TEXT_BASE = $(TEXT_BASE)" > $(BOARD_DIR)/config.mk
@$(MKCONFIG) $(CONFIG_SCRIPT)MODE B
==========
ml507: unconfig
@mkdir -p $(obj)include $(obj)board/xilinx/ml507
@cp $(obj)board/xilinx/ppc440-generic/u-boot-rom.lds
$(obj)board/xilinx/ml507/u-boot.lds
@echo "TEXT_BASE = 0x30000000" > $(obj)board/xilinx/ml507/config.mk
@$(MKCONFIG) ml507 ppc ppc4xx ml507 xilinxml507_flash: unconfig
@mkdir -p $(obj)include $(obj)board/xilinx/ml507
@cp $(obj)board/xilinx/ppc440-generic/u-boot-rom.lds
$(obj)board/xilinx/ml507/u-boot.lds
@echo "TEXT_BASE = 0x30000000" > $(obj)board/xilinx/ml507/config.mk
@$(MKCONFIG) ml507 ppc ppc4xx ml507 xilinxv5fx30teval:
LIKE BEFORE
v5fx30teval_flash:
LIKE BEFORE
MODE C
========
Please write your suggestion here.
My opinion:
Mode A is more "magical": it calls the make program again, but it
is easier to maintain and has less code duplication: There are 6 boards that have to be configured the same way. Nevertheless is your/Stefan choose.
Regards
Quoted 27 lines · Wolfgang Denk
Dear "Ricardo Ribalda Delgado",
Quoted 5 lines · In message <[email protected]> you…
I have no problem in setting the
Makefilein the classic way, I just
wanted to create a new way with the less code replication possible.Shall I continue with this idea or I move back to the old way?
I'm not sure if I really understand what the "old" and the "new" way is, but we must limit the growth of the
Makefile; it is not a place to configura boards. Yes, this has been done in the past (when U-Boot supported only a fraction of the boards we have today), and maybe we even clean up the old boards one day, but at least don't let us add more of this stuff.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: wd at denx.de "It takes all sorts of in & out-door schooling to get adapted to my
kind of fooling" - R. Frost
Signature · 2 lines
Ricardo Ribalda http://www.eps.uam.es/~rribalda/
PATCH 1/1 ppc44x: Unification of virtex5 pp440 boards v3
Dear "Ricardo Ribalda Delgado",
Quoted 10 lines · In message <[email protected]> you…
Before this "unification" patch I send another path that did treat
the avnet board as a new board (a lot of code replication). This is what I call the old way.Let me be more clear. What do we want:
MODE A
=========
Quoted 6 lines
ml507_config: unconfigBOARD_DIR=$(obj)board/xilinx/ml507 \ TEXT_BASE=0x3000000 \ LINK_SCRIPT=$(obj)board/xilinx/ppc440-generic/u-boot-ram.lds \ CONFIG_SCRIPT="ml507 ppc ppc4xx ml507 xilinx" \ $(MAKE) xilinx_ppc440
BOARD_DIR, TEXT_BASE, LINK_SCRIPT and CONFIG_SCRIPT have no place in the top level Makefile. Please move this to board specific directories.
The normal entry for a board should consist of not more than
<name>_config: unconfig
@$(MKCONFIG) <name> ppc4xx xilinx <name>
or similar.
Best regards,
Wolfgang Denk
Signature · 5 lines
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: wd at denx.de "Most people would like to be delivered from temptation but would like it to keep in touch." - Robert Orben
PATCH 1/1 ppc44x: Unification of virtex5 pp440 boards v3
Dear "Wolfgang Denk"
OK, just two questions.
All the boards I am using use the same link script, shall I copy
it to its specific directory? Do you really want this? It is not better to do it like the MODE B (cp common_script to board dir)?
I want to create two different targets: ml507 and ml507_flash.
Could you write an example of how to do this without writing the TEXT_BASE in the Makefile? I did it in this way because I didn't found any other method in the main Makefile
Thank you very much for your help
Regards
Quoted 42 lines · Wolfgang Denk
Dear "Ricardo Ribalda Delgado",
Quoted 10 lines · In message <[email protected]> you…
Before this "unification" patch I send another path that did treat
the avnet board as a new board (a lot of code replication). This is what I call the old way.Let me be more clear. What do we want:
MODE A
=========Quoted 6 lines
ml507_config: unconfigBOARD_DIR=$(obj)board/xilinx/ml507 \ TEXT_BASE=0x3000000 \ LINK_SCRIPT=$(obj)board/xilinx/ppc440-generic/u-boot-ram.lds \ CONFIG_SCRIPT="ml507 ppc ppc4xx ml507 xilinx" \ $(MAKE) xilinx_ppc440
BOARD_DIR,TEXT_BASE,LINK_SCRIPTandCONFIG_SCRIPThave no place in the top levelMakefile. Please move this to board specific directories.The normal entry for a board should consist of not more than
<name>_config: unconfig
@$(MKCONFIG) <name> ppc4xx xilinx <name>or similar.
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: wd at denx.de "Most people would like to be delivered from temptation but would
like it to keep in touch." - Robert Orben
Signature · 2 lines
Ricardo Ribalda http://www.eps.uam.es/~rribalda/
PATCH 1/1 ppc44x: Unification of virtex5 pp440 boards v3
Dear "Ricardo Ribalda Delgado",
Quoted 4 lines · In message <[email protected]> you…
All the boards I am using use the same link script, shall I copy
it to its specific directory? Do you really want this? It is not better to do it like the MODE B (cpcommon_scriptto board dir)?
If they use the same linker script you can handle this for example like it's being handled for many other systems which use a common linker script in the CPU directory:
-> find cpu -name '*.lds' cpu/arm926ejs/at91/u-boot.lds cpu/mpc5xx/u-boot.lds cpu/mpc5xxx/u-boot-customlayout.lds cpu/mpc5xxx/u-boot.lds cpu/mpc8220/u-boot.lds cpu/mpc824x/u-boot.lds cpu/mpc8260/u-boot.lds cpu/mpc83xx/u-boot.lds
Quoted 4 lines
I want to create two different targets: ml507 and
ml507_flash.
Could you write an example of how to do this without writing theTEXT_BASEin theMakefile? I did it in this way because I didn't found any other method in the mainMakefile
What exactly is the difference between these two targets?
Best regards,
Wolfgang Denk
Signature · 5 lines
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: wd at denx.de
You Don't Have To Be 'Damned' To Work Here, But It Helps!!!
- Terry Pratchett, _Eric_PATCH 1/1 ppc44x: Unification of virtex5 pp440 boards v3
Hello Again
Quoted 8 lines
Quoted 4 lines
All the boards I am using use the same link script, shall I copy
it to its specific directory? Do you really want this? It is not better to do it like the MODE B (cpcommon_scriptto board dir)?If they use the same linker script you can handle this for example like it's being handled for many other systems which use a common linker script in the CPU directory:
Ok, I will take a close look to it
Quoted 6 lines
Quoted 4 lines
I want to create two different targets: ml507 and
ml507_flash.
Could you write an example of how to do this without writing theTEXT_BASEin theMakefile? I did it in this way because I didn't found any other method in the mainMakefileWhat exactly is the difference between these two targets?
ml507 creates an image that runs in ram. This image is downloaded via jtag cable or a first stage loader: it is used for debugging and restore the system. ml507_flash generates an image that is stored in the flash of the system: It will be used on a normal base.
Thanks and Best Regards
Signature · 2 lines
Ricardo Ribalda http://www.eps.uam.es/~rribalda/