- make some small changes to colilo
- create a combined image
- flash using dBug
1. Some Changes to colilo
First some changes small to the vendors/Motorola/M527C3-16MB directory that makes colilo run in the second part of flash (at 0xfff00000 instead of 0xffe00000) and load the compressed linux image from 0xfff08000 instead of 0xffe40000
-------------------- diff -r M5272C3-16MB/Makefile M5272C3-16MB/Makefile 2c2 < $(OBJCOPY) --input-target=binary --output-target=srec --adjust-vma 0xffe00000 \ --- > $(OBJCOPY) --input-target=binary --output-target=srec --adjust-vma 0xfff00000 \ diff -r M5272C3-16MB/board.c M5272C3-16MB/board.c 33,34c33,34 < source_addr = (unsigned char *)0xffe40000; < down_addr = (unsigned char *)0xffe40000; --- > source_addr = (unsigned char *)0xfff08000; > down_addr = (unsigned char *)0xfff08000; 62,63c62,63 < mbar_writeLong(MCFSIM_CSBR0, 0xFFE00201); < mbar_writeLong(MCFSIM_CSOR0, 0xFFE00014); --- > mbar_writeLong(MCFSIM_CSBR0, 0xFFF00201); > mbar_writeLong(MCFSIM_CSOR0, 0xFFF00014); diff -r M5272C3-16MB/flash.ld M5272C3-16MB/flash.ld 3c3 < flash : ORIGIN = 0xffe00000, LENGTH = 0x00004000 --- > flash : ORIGIN = 0xfff00000, LENGTH = 0x00008000 ------------------------
2. Making the combined image
This creates a image that consists of the zipped linux image and colilo. uclinux is appended at offset 0x8000 after colilo :
$ gzip -9 -c /tmp/image.gz $ dd if=../colilo-20030502/colilo.bin of=img $ dd if=/tmp/image.gz of=img bs=1024 seek=32 conv=sync $ m68k-elf-objcopy --input-target=binary --output-target=srec --adjust-vma 0xfff00000 img img.s19 $ cp img.s19 /tftpboot
3 . Flashing the image using dBug
Boot the board with the jumper in the normal position and download and flash the image
dBug> set filename img.s19 dBug> set filetype s19 dBug> dn -o -ffe20000 dBug> update
The 'upuser' command flashes data from 0x20000 to 0xffe40000, so by placing our data at 0xe0000 it is flashed to 0xfff00000. When the jumper is set to the other position, the board starts booting from here, instead from 0xffe00000. The "-o -ffe20000" parameter does the trick. The image is created for address 0xfff00000, but Dbug cannot download the image to that address directly, since it's flash. The "-o -ffe20000" tells dbug to download the image into RAM at offset -ffe20000 relative to the address in the S19 file.
|