Getting newer U-Boot code on the Dell Powerconnect 3324

In the last post I learned that the ‘board/bmw’ port was actually created a long time ago, and does not benefit from more recent advances in minimizing the board-specific code.

I already noticed before that the linkstation appears to be somewhat similiar CPU-wise to the BMW MPC8245 board. So my next step will be trying to get the linkstation port running on the Dell Powerconnect 3324. Structure-wise I have noticed the following in particular when comparing board/bmw and board/linkstation:

  • BMW carries a local version of the ns16550 driver in board/bmw/ns16550.c where Linkstation uses the generic ns16550 driver (#define CONFIG_SYS_NS16550)
  • BMW carries a very minimal flash implementation in board/bmw/flash.c where Linkstation uses the generic flash driver (#define CONFIG_FLASH_CFI_DRIVER)
  • BMW initializes the CPU and SDRAM through board-specific code in board/bmw/early_init.S and the common cpu_init() is disabled in the cpu/mpc824x/cpu_init.c:
/* MOUSSE board is initialized in asm */
#if !defined(CONFIG_MOUSSE) && !defined(CONFIG_BMW)
  • Linkstation uses the regular cpu_init() and has all the memory initialization done through #DEFINEs in include/configs/linkstation.h

I spotted two most relevant differences for the bootloader. The BMW has one UART for the serial console 0x800045000, the linkstation has something called an AVR on 0x80004500 and a serial console on 0x80004600:

#define OF_STDOUT_PATH          "/soc10x/serial@80004600"
#define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_EUMB_ADDR + 0x4600) /* Console port */
#define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_EUMB_ADDR + 0x4500) /* AVR port     */

So, I’ll flip these devices around and see if I’ll get some output:

U-Boot 2010.03 (May 16 2010 - 14:41:15) LinkStation HG / KuroBox HG

CPU:   MPC8245 Revision 1.4 at 245.760 MHz: 16 kB I-Cache 16 kB D-Cach������������������������������������������������������������������������������������

Ha, output! It seems to crash at the point where it detects the RAM. (In other logs you can see that the DRAM: line is the next one to be outputted).

It seems like this is hardcoded, just like on the BMW board:

phys_size_t initdram (int board_type)
{
 return (get_ram_size(CONFIG_SYS_SDRAM_BASE, CONFIG_SYS_MAX_RAM_SIZE));
}

and

#define CONFIG_SYS_MAX_RAM_SIZE 0x08000000      /* 128MB of SDRAM */

Let’s lower this to the correct amount (0x02000000 is 32MB RAM).

U-Boot 2010.03 (May 16 2010 - 15:09:56) LinkStation HG / KuroBox HG

CPU:   MPC8245 Revision 1.4 at 245.760 MHz: 16 kB I-Cache 16 kB D-Cache
DRAM:  32 MB
FLASH:  8 MB
*** Warning - bad CRC, using default environment

Bit further. The next step in this is initializing the PCI. I noticed in the linkstation.c that this is hardcoded because PCI_PNP doesn’t work on the linkstation. I defined this and the boot came a bit further. After a few tries I also ended up commenting out all the AVR parts, reconfiguring the flash configuration, disabling the network parts, etc. and then I had a working U-boot, yay:

U-Boot 2010.03 (May 16 2010 - 20:38:54) Dell Powerconnect 3324

CPU:   MPC8245 Revision 1.4 at 245.760 MHz: 16 kB I-Cache 16 kB D-Cache
DRAM:  32 MB
FLASH:  8 MB
 00  13  14e4  5615  0280  00
In:    serial
Out:   serial
Err:   serial
Net:   No ethernet found.
Boot in 05 seconds ('s' to stop)...=>

I’ll try to clean this up and commit this in the git when I have time.

And some fun for the next post:

=> imls
Legacy Image at FF800000:
 Image Name:   Linux-2.6.33.3
 Image Type:   PowerPC Linux Kernel Image (gzip compressed)
 Data Size:    1866768 Bytes =  1.8 MB
 Load Address: 00000000
 Entry Point:  00000000
 Verifying Checksum ... OK
Legacy Image at FFA00000:
 Image Name:
 Image Type:   PowerPC Linux RAMDisk Image (bzip2 compressed)
 Data Size:    3307139 Bytes =  3.2 MB
 Load Address: 00000000
 Entry Point:  00000000
 Verifying Checksum ... OK
=>
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: