From: Greg B. <gb...@po...> - 2000-08-23 12:04:23
|
"Studencki (external) Pawel" wrote: > > Hello, > > Greg, thanks for Your answer. > > > > what's more.. when I put some lines like "write(fd,"hello > > world",15);", than > > > I could not even see the output form "printf"... > > > > Sorry, I don't quite understand your statement. Are you calling > > printf() or write()? > > I've put "write" in init thread in init/main.c, before /sbin/init is > started. It seems like the "write" outputs have blocked printf... which > comes from RAM disk. > User programm is: > #include<stdio.h> > #include<sys/types.h> > #include<fcntl.h> > int main (void) > { > int i,fd; > > for(i=0;i<4;i++){ Can you try making this loop forever? It could be (I'm guessing here) that your usermode program is exiting before the kernel has finished writing its output to the serial port. Bad things happen when the first usermode process dies. > > printf("--- H E L L O W O R L D *** \n"); > > } > fflush(NULL); > > return 1; > } > ======================================================== > Greg, I've put put some printks to debug function sci_set_baud and > SCSMR = 0 > t = 26 > > I'm not sure, are these settings correct for my platform. That depends. What is your platform? > According to > hardware manual, I have to know "operating frequency for periphelar devices" > to set SCBRR correct. Is this value showed at booting of kernel? Yes, it's the one listed under `Module clock'. In the CVS kernel, the BPS_* numbers are expressions calculated from the module clock; in older versions (before Stuart's changes) they were constants conditionally defined. > I'm a little bit confused about all these problems, because I had allready > working RAM disk with init, bash ...I don't see any reason for these > troubles. So what did you change? > I've also tried to start with new kernel 2.4.0, I've modified in > arch/sh/kernel/setup.c line for > #define COMMAND_LINE "console=ttySC1,38400" and set correct baud rate. I > cannot see any boot messages. Can you please do this for me? cd your-kernel-directory grep CONFIG_SH_ .config grep CONFIG_CPU_SUBTYPE .config Greg. -- These are my opinions not PPIs. |