[uClinux-dev] Mac OS X hosted cross compiler for m68k-elf wanted

Guido Sohne guido at sohne.net
Fri Jan 6 11:27:53 EST 2006


On Jan 6, 2006, at 4:01 PM, Glenn Henshaw wrote:

>   Try:
>    make romfs
>    make image

Make image does the job. I now have my romfs.img ready. Trying to  
flash it brings me back to the bad news.

Here's the strace (abridged!) It appears the SIGALRM is raised before  
the romfs write is completed (has to be done within 30 seconds?) and  
that results in lots of retries until the retry limit is reached,  
then the flash program stops.

> pos at vitalstatistix:~/uClinux-dist/images$ sudo strace sudo ./flash - 
> r romfs.img
>
> [snip sudo straces and flash program init]
>
> open("romfs.img", O_RDONLY)             = 3
> fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 2), ...}) = 0
> mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,  
> -1, 0) = 0xb7fd9000
> write(1, "\n", 1
> )                       = 1
> fstat64(0, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 2), ...}) = 0
> mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,  
> -1, 0) = 0xb7fd8000
> write(1, "Select COMM port(1/2) =>", 24Select COMM port(1/2) =>) = 24
> read(0, 1
> "1\n", 1024)                    = 2
> open("/dev/ttyS0", O_RDWR)              = 4
> ioctl(4, SNDCTL_TMR_TEMPO or TCGETA, {B115200 -opost -isig -icanon - 
> echo ...}) = 0
> ioctl(4, SNDCTL_TMR_TEMPO or TCGETA, {B115200 -opost -isig -icanon - 
> echo ...}) = 0
> ioctl(4, TCFLSH, 0x2)                   = 0
> ioctl(4, SNDCTL_TMR_SOURCE or TCSETA, {B115200 -opost -isig -icanon  
> -echo ...}) = 0
> fstat64(3, {st_mode=S_IFREG|0644, st_size=949248, ...}) = 0
> mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,  
> -1, 0) = 0xb7fd7000
>
> [snip reading in romfs img]
>
> read(3, "", 4096)                       = 0
> write(4, "1", 1)                        = 1
> rt_sigaction(SIGALRM, {0x8049260, [ALRM], SA_RESTART}, {SIG_DFL},  
> 8) = 0
> alarm(30)                               = 0
> select(5, [4], NULL, NULL, {1, 0})      = 1 (in [4], left {0, 997000})
> read(4, "\252", 1)                      = 1
> alarm(0)                                = 30
> rt_sigaction(SIGALRM, {SIG_DFL}, {0x8049260, [ALRM], SA_RESTART},  
> 8) = 0
> _llseek(3, 0, [0], SEEK_SET)            = 0
> read(3, "-rom1fs-\0\16{\300p\351\325\344ROMdisk\0\0\0\0\0\0\0 
> \0"..., 4096) = 4096
> nanosleep({0, 10000}, NULL)             = 0
> write(4, "\1", 1)                       = 1
>
> [snip writing out romfs.img bytes to file handle 4 - write(4, XXX, 1)]
>
> write(4, "\263", 1)                     = 1
> rt_sigaction(SIGALRM, {0x8049260, [ALRM], SA_RESTART}, {SIG_DFL},  
> 8) = 0
> alarm(30)                               = 0
> select(5, [4], NULL, NULL, {1, 0})      = 1 (in [4], left {0, 646000})
> read(4, "\25", 1)                       = 1
> alarm(0)                                = 30
> rt_sigaction(SIGALRM, {SIG_DFL}, {0x8049260, [ALRM], SA_RESTART},  
> 8) = 0
> nanosleep({0, 10000}, NULL)             = 0
> write(4, "\1", 1)                       = 1
>
> [snip retries of writing out romfs.img bytes - write(4, XXX, 1)]
>
> write(4, "\263", 1)                     = 1
> rt_sigaction(SIGALRM, {0x8049260, [ALRM], SA_RESTART}, {SIG_DFL},  
> 8) = 0
> alarm(30)                               = 0
> select(5, [4], NULL, NULL, {1, 0})      = 1 (in [4], left {0, 597000})
> read(4, "\25", 1)                       = 1
> alarm(0)                                = 30
> rt_sigaction(SIGALRM, {SIG_DFL}, {0x8049260, [ALRM], SA_RESTART},  
> 8) = 0
> Download aborted!    ) = 22d!    ", 22
> write(2, "\nDownload terminated!   \n", 25
> Download terminated!
> ) = 25
> Download another(Y/N)?) = 23(Y/N)?", 23
> Download another(Y/N)?) = 23(Y/N)?", 23
> read(0,  <unfinished ...>
> pos at vitalstatistix:~/uClinux-dist/images$

It looks like a buggy flash program. Are there any other ones like it  
out there, with source?

-- G.



More information about the uClinux-dev mailing list