Adicionando suporte a M5282Lite no U-Boot

Consegui rodar o U-Boot 1.0.2 na placa M5282Lite, ela e’ praticamente igual a M8252EVB.

So precisei adicionar as definicoes nos arquivos abaixo para os valores aqui exibidos:

Em board/m5282evb/config.mk
TEXT_BASE = 0×10000

Em include/configs/M5282EVB.h
#define CFG_LOAD_ADDR 0×10000
#define CFG_MONITOR_BASE 0×10000

Depois disso e’ so compilar normalmente:
$ make M5282EVB_config
$ make

Usei o toolchain antigo (m68k-elf-tools-20030314), pois o mais novo estava gerando muitos erros. Quando compilava o executavel continha instrucoes invalidas.

Usei o dBug para carregar a imagem gerada (u-boot.bin):

dBUG> dn u-boot.bin                                                             
Offset:  0x00000000                                                             
Ethernet Address is 01:02:03:04:05:06                                           
Downloading Image 'u-boot.bin' from 192.168.1.113                               
TFTP download successful                                                        
Read 64360 bytes (126 blocks)                                                   
dBUG> go 10000                                                                  
                                                                                
                                                                                
U-Boot 1.0.2 (Nov 16 2008 - 18:08:00)                                           
                                                                                
CPU:   MOTOROLA Coldfire MCF5282                                                
MOTOROLA M5272EVB Evaluation Board                                              
DRAM:  16 MB                                                                    
FLASH:  2 MB                                                                    
*** Warning - bad CRC, using default environment                                
                                                                                
In:    serial                                                                   
Out:   serial                                                                   
Err:   serial                                                                   
-> 

Erro instalando uclinux toolchain m68k-elf-tools-20030314.sh

alan@armagedon:~/workspace$ sudo -s
root@armagedon:~/workspace# ./m68k-elf-tools-20030314.sh
tail: cannot open `+43′ for reading: No such file or directory

gzip: stdin: not in gzip format
tar: This does not look like a tar archive
tar: Error exit delayed from previous errors
root@armagedon:~/workspace#

Solucao:

altere a linha 39 de:

tail +${SKIP} ${SCRIPT} | gunzip | tar xvf –

para:

tail -n+${SKIP} ${SCRIPT} | gunzip | tar xvf –