[U-Boot-Users] Custom Board configuration

Hello,
i´m working with a ppc440 gx custom board and want to use u-boot for booting Linux. First i tried to use the ocotea board files as reference for my board and changed it for my environment. But my board is too different so i think it´s the wrong way to get u-boot functioning. Now i´m searching for informations what i have to do to get u-boot work for my board.
Specifications of my Board:
PPC 440 GX 2 * 256 MB DIMM Modules - actually not using EEPROM because of stability problems 2 * 8 MB Intel Strata Flash 32-Bit Databus width on CS0 beginning on address 0xff000000 CPLD on CS1 RTC on CS2
I actually have access to DDRAM, Flash and RTC over BDM Interface. So now i need a minimal configuration for booting with u-boot. Is there anywhere a guide or some information what i have to do?!
Any help is welcome.
Greets,
David

In message 000101c56c28$4af32eb0$f201a8c0@SN7606 you wrote:
need a minimal configuration for booting with u-boot. Is there anywhere a guide or some information what i have to do?!
I recommend you start with the README, probably section "Porting Guide" or so...
Best regards,
Wolfgang Denk

Wolfgang Denk wrote:
In message 000101c56c28$4af32eb0$f201a8c0@SN7606 you wrote:
need a minimal configuration for booting with u-boot. Is there anywhere a guide or some information what i have to do?!
I recommend you start with the README, probably section "Porting Guide" or so...
cute porting guide - read it anyway.
Here's how I approached our port of a custom PPC440gx board.
- first of all, try to understand the general initialization of U-Boot - get and install PPC4xx compiler and tools - setup/use ctags or cscope with a compatible editor - find and choose an existing U-Boot port that resembles your target - if target has a JTAG interface, acquire a JTAG debugger - modify the memory settings of the baseline port you've chosen - I used OCOTEA port - edit the config file for your target (OCOTEA.h). see the README for additional entries - adjust Makefile to pickup your compiler properly - build it: make mrproper make OCOTEA_config make dep make - if build works, verify the .map output fits your target memory layout - install u-boot.bin and single step via JTAG, see how far you get - get GDB/DDD hooked up to your BDM JTAG pod - convert/copy the OCOTEA build target to your own; create a board/your_target directory and include/configs/YOUR_TARGET.h - rebuild as before but with YOUR_TARGET_config - replace/remove any OCOTEA specific (FPGA) init functions - get the console I/O, RTC... working - turn on DEBUG statements to see what is running - get the rest of the U-Boot commands working thru a combination of JTAG and printfs - document the initialization that you see happening - see my attached logfile. it has lot of extra info that may not apply to your target. I'm not responsible for any inaccuracies ;) - don't forget to dig thru the READMEs and source code. It is helpful to some degree.
Best regards,
Wolfgang Denk
================================================================================= # logfile general boot sequence for PPC440GX target # # 2005-03-28 Andrew Wozniak, initial draft
_start_440() cpu/ppc4xx/start.S _start_440 ...Initialize debug registers ...CCR0 init ...Setup interrupt vectors at 0x0000_0000 ...config cache regions ...clear and setup TLBs ...SDRAM fast refresh ...jump to _start ...setup ISRAM ...setup stack within ISRAM ...ready to run "C" level init code ...jump to board_init_f jump to "C" level code
board_init_f() lib_ppc/board.c
init_sequence[] board_early_init_f() board/ocotea/ocotea.c ...init OCOTEA FPGA network ops ...setup CSO for Flash setup Flash chip select ...setup UIC setup interrupt controller get_clocks, get CPU clock info from GD init_timebase, env_init, validate CRC, point to env space or hard coded dflt init_baudrate, serial_init, console_init_f, display_options, display U-Boot name and version info checkcpu, update CPU rev info checkboard, display CPU clock details get_sys_info(&sysinfo) printf(...)
init_func_i2c, init_func_ram, init_dram() fixed_sdram() ocotea.c - memory controller setup/timimg end of init[]
...init gd (global data) values ...allocate stack memory ...reserve memory for data, BSS ...reserve memory for malloc ...allocate/copy global data structure ...setup stack ...save board info structure ...run optional post
relocate_code() cpu/ppc4xx/start.S ...copy self to RAM
board_init_r() lib_ppc/board.c trap_init() setup trap handlers cpu/ppc4xx/start.S flash_init() setup structures, protect monitor & envars cpu_init_r() initialize high-level parts of CPU; time base and timers env_relocate() s = get_env("ethaddr") MAC address ( lib_ppc/board.c) getenv_IPaddr ("ipaddr") pci_init() devices_init() console_init_r() misc_init_r() platform specific reset_phy () interrupt_init() Enable Interrupts lib_ppc/interrupts.c interrupt_init_cpu() cpu/ppc4xx/interrupts.c
eth_initialize() net/eth.c ppc_440x_eth_initialize() cpu/ppc4xx/440gx_enet.c ppc_440x_eth_init() also read SROM for MAC values
compare SROM and envar MAC values print if diff
for (;;) main_loop() u-boot monitor common/main.c ... ... getenv ("bootdelay") run_command(getenv ("bootcmd")) for(;;) readline() run_command()

In message 42A700D8.2060102@mc.com you wrote:
cute porting guide - read it anyway.
Indeed. Read it. It may look like a joke, but it ain't one.
- edit the config file for your target (OCOTEA.h). see the README for
NO!!!! Create your own board directory, and your own config file. Add only the stuff you really understand. Read the documentation and the code where necessary.
- adjust Makefile to pickup your compiler properly
NO! This is not necessary. All that needs to be done is setting CROSS_COMPILE as needed.
Best regards,
Wolfgang Denk

Thx for help.
I created my own board directory and now i´m configuring it. But i found some unknown options like CONFIG_OCOTEA or CONFIG_EBONY. I searched over all Files in the distribution, but i only found the definitions in files like OCOTEA.h. Can someone explain me what these Configuration Options do?
Thx,
David
-----Ursprüngliche Nachricht----- Von: u-boot-users-admin@lists.sourceforge.net [mailto:u-boot-users-admin@lists.sourceforge.net]Im Auftrag von Wolfgang Denk Gesendet: Mittwoch, 8. Juni 2005 22:13 An: Andrew Wozniak Cc: u-boot-users@lists.sourceforge.net Betreff: Re: [U-Boot-Users] Custom Board configuration
In message 42A700D8.2060102@mc.com you wrote:
cute porting guide - read it anyway.
Indeed. Read it. It may look like a joke, but it ain't one.
- edit the config file for your target (OCOTEA.h). see the README for
NO!!!! Create your own board directory, and your own config file. Add only the stuff you really understand. Read the documentation and the code where necessary.
- adjust Makefile to pickup your compiler properly
NO! This is not necessary. All that needs to be done is setting CROSS_COMPILE as needed.
Best regards,
Wolfgang Denk
--
The connection between the language in which we think/program and the problems and solutions we can imagine is very close. For this reason restricting language features with the intent of eliminating pro- grammer errors is at best dangerous. - Bjarne Stroustrup in "The C++ Programming Language"
------------------------------------------------------- This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput a projector? How fast can you ride your desk chair down the office luge track? If you want to score the big prize, get to know the little guy. Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20 _______________________________________________ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users

In message 000401c56cff$06b654c0$f201a8c0@SN7606 you wrote:
I created my own board directory and now i´m configuring it. But i found some unknown options like CONFIG_OCOTEA or CONFIG_EBONY. I searched over all Files in the distribution, but i only found the definitions in files like OCOTEA.h. Can someone explain me what these Configuration Options do?
Search again, epecially in board/ebony/flash.c and board/ocotea/flash.c
Best regards,
Wolfgang Denk
participants (3)
-
Andrew Wozniak
-
David Grab
-
Wolfgang Denk