You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
(12) |
May
(82) |
Jun
(72) |
Jul
(39) |
Aug
(104) |
Sep
(61) |
Oct
(55) |
Nov
(101) |
Dec
(48) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(52) |
Feb
(67) |
Mar
(18) |
Apr
(16) |
May
(33) |
Jun
(12) |
Jul
(102) |
Aug
(168) |
Sep
(65) |
Oct
(60) |
Nov
(43) |
Dec
(121) |
2002 |
Jan
(69) |
Feb
(32) |
Mar
(90) |
Apr
(59) |
May
(45) |
Jun
(43) |
Jul
(33) |
Aug
(21) |
Sep
(11) |
Oct
(20) |
Nov
(26) |
Dec
(3) |
2003 |
Jan
(12) |
Feb
(18) |
Mar
(11) |
Apr
(11) |
May
(41) |
Jun
(76) |
Jul
(77) |
Aug
(15) |
Sep
(38) |
Oct
(56) |
Nov
(19) |
Dec
(39) |
2004 |
Jan
(17) |
Feb
(52) |
Mar
(36) |
Apr
(34) |
May
(48) |
Jun
(85) |
Jul
(38) |
Aug
(42) |
Sep
(41) |
Oct
(77) |
Nov
(27) |
Dec
(19) |
2005 |
Jan
(32) |
Feb
(35) |
Mar
(29) |
Apr
(8) |
May
(7) |
Jun
(31) |
Jul
(46) |
Aug
(93) |
Sep
(65) |
Oct
(85) |
Nov
(219) |
Dec
(47) |
2006 |
Jan
(170) |
Feb
(103) |
Mar
(49) |
Apr
(43) |
May
(45) |
Jun
(29) |
Jul
(77) |
Aug
(82) |
Sep
(43) |
Oct
(45) |
Nov
(26) |
Dec
(85) |
2007 |
Jan
(42) |
Feb
(48) |
Mar
(64) |
Apr
(31) |
May
(88) |
Jun
(53) |
Jul
(175) |
Aug
(212) |
Sep
(91) |
Oct
(103) |
Nov
(110) |
Dec
(5) |
2008 |
Jan
(20) |
Feb
(11) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(5) |
Sep
(3) |
Oct
(12) |
Nov
|
Dec
|
From: Grzegorz H. <grz...@gm...> - 2008-10-07 11:18:16
|
Hello everybody ! I built rt73 module for usb wireless card under sh4 linux. This module have firmware thats need to be loaded during device initialization. I put this firmware into /lib/firmware (as in my host computer, on which this module works perfectly). everything looks fine when I insmod this module: <1>module rt73 is loaded. code address is 0xc025b000 <6>rt73: init <6>usbcore: registered new driver rt73 Unfortunately when I insert this card into usb port I get theses messages <6>usb 1-1.2: new high speed USB device using ST40-ehci and address 6 <6>usb 1-1.2: configuration #1 chosen from 1 choice <6>rt73: idVendor = 0x13b1, idProduct = 0x20 <3>rt73: Failed to request_firmware. Check your firmware file location <2>rt73: Failed to load Firmware. <4>rt73: probe of 1-1.2:1.0 failed with error -2 # So I assume kernel cannot find firmware file. Where I should put firmware file ? Currently I have it in # ls -l /lib/firmware/ -rwxr--r-- 1 501 501 2048 Oct 6 2008 rt73.bin -rwxrwxr-x 1 501 501 496 Oct 6 2008 rt73sta.dat # The same path works great for my host, is this path configurable somewhere ? thanks in andvance Greg. -- Please consider the environment before printing this email. |
From: Ramesh R. <Ram...@st...> - 2008-10-07 10:18:26
|
Yes! All device entries are treated as a file in Linux. Send me your .config file. Regards, Ramesh ________________________________ From: Khaled Ben Amor [mailto:kha...@gm...] Sent: Tuesday, October 07, 2008 3:31 PM To: Ramesh Ramaswamy Cc: lin...@li... Subject: Re: error while inserting stgfb module I boot STLinux kernell using NFS. Has the root filesystem an influence on the framebuffer module? 2008/10/7 Ramesh Ramaswamy <Ram...@st...> Hi, What is your filesystem type JFFS, NFS or ? Regards, Ramesh ________________________________ From: Khaled Ben Amor [mailto:kha...@gm...] Sent: Tuesday, October 07, 2008 2:47 PM To: lin...@li... Subject: Re: error while inserting stgfb module BTW, this error comes because you don't have /dev/fbv device. I try to identify the framebuffer node and I found the fbX devices in /dev/ : #ls -l /dev/ (...) crwxrwxrwx 1 root root 29, 0 Apr 5 2008 fb0 crw-r----- 1 root root 29, 1 Apr 5 2008 fb1 crw-r----- 1 root root 29, 2 Apr 5 2008 fb2 crw-r----- 1 root root 29, 3 Apr 5 2008 fb3 crw-r----- 1 root root 29, 4 Apr 5 2008 fb4 crw-r----- 1 root root 29, 5 Apr 5 2008 fb5 crw-r----- 1 root root 29, 6 Apr 5 2008 fb6 crw-r----- 1 root root 29, 7 Apr 5 2008 fb7 (...) then I try to cat all these devices and the result is the same as the following # cat /dev/fb0 cat: /dev/fb0: No such device # cat /dev/fb1 cat: /dev/fb1: No such device .............. # cat /dev/fb7 cat: /dev/fb7: No such device I also tried to use fbset : # fbset -s fbset: /dev/fb0: No such device I don't know if I must recreate them ? and if this is what caused "insmod stmfb_stb7100.ko " to crash? -- amicalement khaled -- amicalement khaled |
From: Khaled B. A. <kha...@gm...> - 2008-10-07 10:05:50
|
I boot STLinux kernell using NFS. Has the root filesystem an influence on the framebuffer module? 2008/10/7 Ramesh Ramaswamy <Ram...@st...> > Hi, > > > > What is your filesystem type JFFS, NFS or ? > > > > Regards, > > > > Ramesh > > > ------------------------------ > > *From:* Khaled Ben Amor [mailto:kha...@gm...] > *Sent:* Tuesday, October 07, 2008 2:47 PM > *To:* lin...@li... > *Subject:* Re: error while inserting stgfb module > > > > > > > > > BTW, this error comes because you don't have /dev/fbv device. > > > > I try to identify the framebuffer node and I found the fbX devices in /dev/ > : > > #ls -l /dev/ > (...) > crwxrwxrwx 1 root root 29, 0 Apr 5 2008 fb0 > > crw-r----- 1 root root 29, 1 Apr 5 2008 fb1 > crw-r----- 1 root root 29, 2 Apr 5 2008 fb2 > crw-r----- 1 root root 29, 3 Apr 5 2008 fb3 > crw-r----- 1 root root 29, 4 Apr 5 2008 fb4 > crw-r----- 1 root root 29, 5 Apr 5 2008 fb5 > crw-r----- 1 root root 29, 6 Apr 5 2008 fb6 > crw-r----- 1 root root 29, 7 Apr 5 2008 fb7 > (...) > > then I try to cat all these devices and the result is the same as the > following > # cat /dev/fb0 > cat: /dev/fb0: No such device > > # cat /dev/fb1 > cat: /dev/fb1: No such device > .............. > > > # cat /dev/fb7 > cat: /dev/fb7: No such device > > > I also tried to use fbset : > > # fbset -s > fbset: /dev/fb0: No such device > > I don't know if I must recreate them ? and if this is what caused "insmod > stmfb_stb7100.ko " to crash? > -- > amicalement > khaled > > > -- amicalement khaled |
From: Ramesh R. <Ram...@st...> - 2008-10-07 09:36:07
|
Hi, What is your filesystem type JFFS, NFS or ? Regards, Ramesh ________________________________ From: Khaled Ben Amor [mailto:kha...@gm...] Sent: Tuesday, October 07, 2008 2:47 PM To: lin...@li... Subject: Re: error while inserting stgfb module BTW, this error comes because you don't have /dev/fbv device. I try to identify the framebuffer node and I found the fbX devices in /dev/ : #ls -l /dev/ (...) crwxrwxrwx 1 root root 29, 0 Apr 5 2008 fb0 crw-r----- 1 root root 29, 1 Apr 5 2008 fb1 crw-r----- 1 root root 29, 2 Apr 5 2008 fb2 crw-r----- 1 root root 29, 3 Apr 5 2008 fb3 crw-r----- 1 root root 29, 4 Apr 5 2008 fb4 crw-r----- 1 root root 29, 5 Apr 5 2008 fb5 crw-r----- 1 root root 29, 6 Apr 5 2008 fb6 crw-r----- 1 root root 29, 7 Apr 5 2008 fb7 (...) then I try to cat all these devices and the result is the same as the following # cat /dev/fb0 cat: /dev/fb0: No such device # cat /dev/fb1 cat: /dev/fb1: No such device .............. # cat /dev/fb7 cat: /dev/fb7: No such device I also tried to use fbset : # fbset -s fbset: /dev/fb0: No such device I don't know if I must recreate them ? and if this is what caused "insmod stmfb_stb7100.ko " to crash? -- amicalement khaled |
From: Khaled B. A. <kha...@gm...> - 2008-10-07 09:28:48
|
> > > > BTW, this error comes because you don't have /dev/fbv device. > I try to identify the framebuffer node and I found the fbX devices in /dev/ : #ls -l /dev/ (...) crwxrwxrwx 1 root root 29, 0 Apr 5 2008 fb0 crw-r----- 1 root root 29, 1 Apr 5 2008 fb1 crw-r----- 1 root root 29, 2 Apr 5 2008 fb2 crw-r----- 1 root root 29, 3 Apr 5 2008 fb3 crw-r----- 1 root root 29, 4 Apr 5 2008 fb4 crw-r----- 1 root root 29, 5 Apr 5 2008 fb5 crw-r----- 1 root root 29, 6 Apr 5 2008 fb6 crw-r----- 1 root root 29, 7 Apr 5 2008 fb7 (...) then I try to cat all these devices and the result is the same as the following # cat /dev/fb0 cat: /dev/fb0: No such device # cat /dev/fb1 cat: /dev/fb1: No such device .............. # cat /dev/fb7 cat: /dev/fb7: No such device I also tried to use fbset : # fbset -s fbset: /dev/fb0: No such device I don't know if I must recreate them ? and if this is what caused "insmod stmfb_stb7100.ko " to crash? -- amicalement khaled |
From: Tiago M. <tia...@gm...> - 2008-10-05 00:50:10
|
> Hi every body! > I am working on a set top box reference design based on the chip st7109 and I use STLinux 2.2. > I want to insert the framebuffer module (named stmfb_stb7100). For this I did like the official web site of STLinux indicates for me (http://www.stlinux.com/docs/release-note-2.0ear/framebuffer.php). First I activates the kernel framebuffer options, rebuild it and then I built the framebuffer module and install them. > All the necessary modules are inserted perfectly (cfbcopyarea.ko , cfbfillrect.ko, cfbimgblt.ko) but an error occurs during inserting the framebuffer module (stmfb_stb7100) : > > > # insmod stmfb-stb7100.ko > insmod: error inserting 'stmfb-stb7100.ko': -1 No such device > > > same thing using modprobe : > > # modprobe stmfb-stb7100.ko > FATAL: Module stmfb_stb7100.ko not found. > any suggestion to overcome this problem? Hi, If you post your doubt on ST Bugzilla database on https://bugzilla.stlinux.com/ you can get better support and search for similar problems. BTW, this error comes because you don't have /dev/fbv device. I never used 2.0 version of STLinux, but if version 2.2 I need to insert another module called stmcore-display-stxXXXX.ko. I suggest you update do a newer version and try these new modules. ftp://ftp.stlinux.com/pub/stlinux/2.3/updates/RPMS/host/stlinux23-host-stmfb-source-3.0_stm23_0018-33.noarch.rpm Best regards, Tiago Maluta |
From: Khaled B. A. <kha...@gm...> - 2008-10-03 13:25:00
|
Hi every body! I am working on a set top box reference design based on the chip st7109 and I use STLinux 2.2. I want to insert the framebuffer module (named stmfb_stb7100). For this I did like the official web site of STLinux indicates for me ( http://www.stlinux.com/docs/release-note-2.0ear/framebuffer.php). First I activates the kernel framebuffer options, rebuild it and then I built the framebuffer module and install them. All the necessary modules are inserted perfectly (cfbcopyarea.ko , cfbfillrect.ko, cfbimgblt.ko) but an error occurs during inserting the framebuffer module (stmfb_stb7100) : # insmod stmfb-stb7100.ko insmod: error inserting 'stmfb-stb7100.ko': -1 No such device same thing using modprobe : # modprobe stmfb-stb7100.ko FATAL: Module stmfb_stb7100.ko not found. any suggestion to overcome this problem? |
From: Ramesh R. <Ram...@st...> - 2008-10-03 07:01:03
|
Hi, Can you send me your sandapp.cpp file? There is no problem with your library as mareksk mentioned. We really don't know! how your application got crashed in your target. Reason to think over 0x29739dd6 is a valid address where libc got loaded, where as 0x7b916ff8 is not. Do you have any pointers in your sandapp code? If you have, make sure all pointers (both function and data pointers) are initialized properly. Have a trace using stworkbench, before responding this mail. Regards, Ramesh Ramaswamy -----Original Message----- From: rdt...@gm... [mailto:rdt...@gm...] Sent: Thursday, October 02, 2008 12:05 AM To: Marek Skuczynski Cc: lin...@li... Subject: Re: CoreDump STLinux Hi all, Thanks for the replies. Before open a bug at https://bugzilla.stlinux.com. I've open this thread just to make sure that I'm not doing something wrong. answering the questions: @mareksk: - I think the libraries are loaded from the right place. See the gdb command bellow. gdb loads them from the right place. @Greg: - See the gdb command bellow - I've compiled my code with /opt/STM/STLinux-2.2/devkit/sh4/bin/sh4-linux-g++ -g -o mysand sandbox.cpp [rtorres@QSDES-RTORRES2 bin]$ /opt/STM/STLinux-2.2/devkit/sh4/bin/sh4-linux-gdb mysand core GNU gdb STMicroelectronics/Linux Base 6.4-12 [build Oct 15 2006] Copyright 2005 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "--host=i686-pc-linux-gnu --target=sh4-linux"... warning: exec file is newer than core file. Core was generated by `./mysand'. Program terminated with signal 6, Aborted. Reading symbols from /opt/7109/STM/STLinux-2.2/devkit/sh4/target/usr/lib/libstdc++.so.6...don e. Loaded symbols for /opt/7109/STM/STLinux-2.2/devkit/sh4/bin/../target/usr/lib/libstdc++.so. 6 Reading symbols from /opt/7109/STM/STLinux-2.2/devkit/sh4/target/lib/libm.so.6...done. Loaded symbols for /opt/7109/STM/STLinux-2.2/devkit/sh4/bin/../target/lib/libm.so.6 Reading symbols from /opt/7109/STM/STLinux-2.2/devkit/sh4/target/lib/libgcc_s.so.1...done. Loaded symbols for /opt/7109/STM/STLinux-2.2/devkit/sh4/bin/../target/lib/libgcc_s.so.1 Reading symbols from /opt/7109/STM/STLinux-2.2/devkit/sh4/target/lib/libc.so.6...done. Loaded symbols for /opt/7109/STM/STLinux-2.2/devkit/sh4/bin/../target/lib/libc.so.6 Reading symbols from /opt/7109/STM/STLinux-2.2/devkit/sh4/target/lib/ld-linux.so.2...done. Loaded symbols for /opt/7109/STM/STLinux-2.2/devkit/sh4/bin/../target/lib/ld-linux.so.2 #0 0x297382d4 in raise () from /opt/7109/STM/STLinux-2.2/devkit/sh4/bin/../target/lib/libc.so.6 (gdb) bt full #0 0x297382d4 in raise () from /opt/7109/STM/STLinux-2.2/devkit/sh4/bin/../target/lib/libc.so.6 No symbol table info available. #1 0x29739dd6 in abort () from /opt/7109/STM/STLinux-2.2/devkit/sh4/bin/../target/lib/libc.so.6 No symbol table info available. Cannot access memory at address 0x7b916ff8 Thanks in advance, Rafael Torres On Wed, Oct 1, 2008 at 7:38 AM, Marek Skuczynski <ma...@ea...> wrote: > Hi, > > rdt...@gm... wrote: >> Hi all, >> >> First of all sorry to send an email to linuxsh-dev list directly, I >> doing it because my attempt to use lin...@m1... fail (its site is >> down). > > All issues regarding ST Linux distro you should report via > https://bugzilla.stlinux.com (ignore the certificate warning if appears). > > You can also find a manual for STLinux distro at > http://www.stlinux.com/docs/manual > >> >> My problem: >> I trying to analyse a core-dump of "Hello-world" like app that is >> running on SH4-STLinux, but it fails. >> >> gdb gives me : >> >> (gdb) bt full >> #0 0x297382d4 in raise () from >> /opt/7109/STM/STLinux-2.2/devkit/sh4/bin/../target/lib/libc.so.6 >> No symbol table info available. >> #1 0x29739dd6 in abort () from >> /opt/7109/STM/STLinux-2.2/devkit/sh4/bin/../target/lib/libc.so.6 >> No symbol table info available. >> Cannot access memory at address 0x7b916ff8 > > Make sure that shared libraries (so files) are located as shown > above. > > You may also set the shared library search path using a gdb command > given below (default location): > > set solib-search-path /opt/STM/STLinux-2.2/devkit/sh4/target/lib > > > Make sure that symbols were not stripped out. > >> >> >> My program code: >> >> #include <stdlib.h> >> >> extern void m1(); >> >> static int count = 0; >> >> void m3(){ >> if (count++ > 2) >> abort(); >> m1(); >> } >> >> void m2(){ >> m3(); >> } >> >> void m1 (){ >> m2(); >> } >> >> int >> main (int argc, char* argv[]) { >> m1(); >> return 0; >> } >> >> I compiled it with /opt/STM/STLinux-2.2/devkit/sh4/bin/sh4-linux-g++ >> -g -o mysand sandbox.cpp >> >> I've tried -fstack-protector-all option without success too. >> >> Before running it on STLinux I'm running: ulimited -c unlimited. >> >> >> Do you have any idea why the stack of my core-dump is broken ? >> >> >> Thanks in advance, >> Rafael Torres > > regards, > mareksk > ------------------------------------------------------------------------ - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ linuxsh-dev mailing list lin...@li... https://lists.sourceforge.net/lists/listinfo/linuxsh-dev |
From: <rdt...@gm...> - 2008-10-01 18:35:00
|
Hi all, Thanks for the replies. Before open a bug at https://bugzilla.stlinux.com. I've open this thread just to make sure that I'm not doing something wrong. answering the questions: @mareksk: - I think the libraries are loaded from the right place. See the gdb command bellow. gdb loads them from the right place. @Greg: - See the gdb command bellow - I've compiled my code with /opt/STM/STLinux-2.2/devkit/sh4/bin/sh4-linux-g++ -g -o mysand sandbox.cpp [rtorres@QSDES-RTORRES2 bin]$ /opt/STM/STLinux-2.2/devkit/sh4/bin/sh4-linux-gdb mysand core GNU gdb STMicroelectronics/Linux Base 6.4-12 [build Oct 15 2006] Copyright 2005 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "--host=i686-pc-linux-gnu --target=sh4-linux"... warning: exec file is newer than core file. Core was generated by `./mysand'. Program terminated with signal 6, Aborted. Reading symbols from /opt/7109/STM/STLinux-2.2/devkit/sh4/target/usr/lib/libstdc++.so.6...done. Loaded symbols for /opt/7109/STM/STLinux-2.2/devkit/sh4/bin/../target/usr/lib/libstdc++.so.6 Reading symbols from /opt/7109/STM/STLinux-2.2/devkit/sh4/target/lib/libm.so.6...done. Loaded symbols for /opt/7109/STM/STLinux-2.2/devkit/sh4/bin/../target/lib/libm.so.6 Reading symbols from /opt/7109/STM/STLinux-2.2/devkit/sh4/target/lib/libgcc_s.so.1...done. Loaded symbols for /opt/7109/STM/STLinux-2.2/devkit/sh4/bin/../target/lib/libgcc_s.so.1 Reading symbols from /opt/7109/STM/STLinux-2.2/devkit/sh4/target/lib/libc.so.6...done. Loaded symbols for /opt/7109/STM/STLinux-2.2/devkit/sh4/bin/../target/lib/libc.so.6 Reading symbols from /opt/7109/STM/STLinux-2.2/devkit/sh4/target/lib/ld-linux.so.2...done. Loaded symbols for /opt/7109/STM/STLinux-2.2/devkit/sh4/bin/../target/lib/ld-linux.so.2 #0 0x297382d4 in raise () from /opt/7109/STM/STLinux-2.2/devkit/sh4/bin/../target/lib/libc.so.6 (gdb) bt full #0 0x297382d4 in raise () from /opt/7109/STM/STLinux-2.2/devkit/sh4/bin/../target/lib/libc.so.6 No symbol table info available. #1 0x29739dd6 in abort () from /opt/7109/STM/STLinux-2.2/devkit/sh4/bin/../target/lib/libc.so.6 No symbol table info available. Cannot access memory at address 0x7b916ff8 Thanks in advance, Rafael Torres On Wed, Oct 1, 2008 at 7:38 AM, Marek Skuczynski <ma...@ea...> wrote: > Hi, > > rdt...@gm... wrote: >> Hi all, >> >> First of all sorry to send an email to linuxsh-dev list directly, I >> doing it because my attempt to use lin...@m1... fail (its site is >> down). > > All issues regarding ST Linux distro you should report via > https://bugzilla.stlinux.com (ignore the certificate warning if appears). > > You can also find a manual for STLinux distro at > http://www.stlinux.com/docs/manual > >> >> My problem: >> I trying to analyse a core-dump of "Hello-world" like app that is >> running on SH4-STLinux, but it fails. >> >> gdb gives me : >> >> (gdb) bt full >> #0 0x297382d4 in raise () from >> /opt/7109/STM/STLinux-2.2/devkit/sh4/bin/../target/lib/libc.so.6 >> No symbol table info available. >> #1 0x29739dd6 in abort () from >> /opt/7109/STM/STLinux-2.2/devkit/sh4/bin/../target/lib/libc.so.6 >> No symbol table info available. >> Cannot access memory at address 0x7b916ff8 > > Make sure that shared libraries (so files) are located as shown > above. > > You may also set the shared library search path using a gdb command > given below (default location): > > set solib-search-path /opt/STM/STLinux-2.2/devkit/sh4/target/lib > > > Make sure that symbols were not stripped out. > >> >> >> My program code: >> >> #include <stdlib.h> >> >> extern void m1(); >> >> static int count = 0; >> >> void m3(){ >> if (count++ > 2) >> abort(); >> m1(); >> } >> >> void m2(){ >> m3(); >> } >> >> void m1 (){ >> m2(); >> } >> >> int >> main (int argc, char* argv[]) { >> m1(); >> return 0; >> } >> >> I compiled it with /opt/STM/STLinux-2.2/devkit/sh4/bin/sh4-linux-g++ >> -g -o mysand sandbox.cpp >> >> I've tried -fstack-protector-all option without success too. >> >> Before running it on STLinux I'm running: ulimited -c unlimited. >> >> >> Do you have any idea why the stack of my core-dump is broken ? >> >> >> Thanks in advance, >> Rafael Torres > > regards, > mareksk > |
From: Marek S. <ma...@ea...> - 2008-10-01 11:05:49
|
Hi, rdt...@gm... wrote: > Hi all, > > First of all sorry to send an email to linuxsh-dev list directly, I > doing it because my attempt to use lin...@m1... fail (its site is > down). All issues regarding ST Linux distro you should report via https://bugzilla.stlinux.com (ignore the certificate warning if appears). You can also find a manual for STLinux distro at http://www.stlinux.com/docs/manual > > My problem: > I trying to analyse a core-dump of "Hello-world" like app that is > running on SH4-STLinux, but it fails. > > gdb gives me : > > (gdb) bt full > #0 0x297382d4 in raise () from > /opt/7109/STM/STLinux-2.2/devkit/sh4/bin/../target/lib/libc.so.6 > No symbol table info available. > #1 0x29739dd6 in abort () from > /opt/7109/STM/STLinux-2.2/devkit/sh4/bin/../target/lib/libc.so.6 > No symbol table info available. > Cannot access memory at address 0x7b916ff8 Make sure that shared libraries (so files) are located as shown above. You may also set the shared library search path using a gdb command given below (default location): set solib-search-path /opt/STM/STLinux-2.2/devkit/sh4/target/lib Make sure that symbols were not stripped out. > > > My program code: > > #include <stdlib.h> > > extern void m1(); > > static int count = 0; > > void m3(){ > if (count++ > 2) > abort(); > m1(); > } > > void m2(){ > m3(); > } > > void m1 (){ > m2(); > } > > int > main (int argc, char* argv[]) { > m1(); > return 0; > } > > I compiled it with /opt/STM/STLinux-2.2/devkit/sh4/bin/sh4-linux-g++ > -g -o mysand sandbox.cpp > > I've tried -fstack-protector-all option without success too. > > Before running it on STLinux I'm running: ulimited -c unlimited. > > > Do you have any idea why the stack of my core-dump is broken ? > > > Thanks in advance, > Rafael Torres regards, mareksk |
From: Grzegorz H. <grz...@gm...> - 2008-10-01 07:43:13
|
Hello ! Show me how you invoke gdb. It should be something like that: sh4-linux-gdb --core=CORE HELLOWORLD where CORE is your core file and HELLOWORLD is you app. Also make sure you HELLOWORLD app is build in debug mode. Cheers Greg. 2008/10/1 <rdt...@gm...>: > Hi all, > > First of all sorry to send an email to linuxsh-dev list directly, I > doing it because my attempt to use lin...@m1... fail (its site is > down). > > My problem: > I trying to analyse a core-dump of "Hello-world" like app that is > running on SH4-STLinux, but it fails. > > gdb gives me : > > (gdb) bt full > #0 0x297382d4 in raise () from > /opt/7109/STM/STLinux-2.2/devkit/sh4/bin/../target/lib/libc.so.6 > No symbol table info available. > #1 0x29739dd6 in abort () from > /opt/7109/STM/STLinux-2.2/devkit/sh4/bin/../target/lib/libc.so.6 > No symbol table info available. > Cannot access memory at address 0x7b916ff8 > > > My program code: > > #include <stdlib.h> > > extern void m1(); > > static int count = 0; > > void m3(){ > if (count++ > 2) > abort(); > m1(); > } > > void m2(){ > m3(); > } > > void m1 (){ > m2(); > } > > int > main (int argc, char* argv[]) { > m1(); > return 0; > } > > I compiled it with /opt/STM/STLinux-2.2/devkit/sh4/bin/sh4-linux-g++ > -g -o mysand sandbox.cpp > > I've tried -fstack-protector-all option without success too. > > Before running it on STLinux I'm running: ulimited -c unlimited. > > > Do you have any idea why the stack of my core-dump is broken ? > > > Thanks in advance, > Rafael Torres > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > linuxsh-dev mailing list > lin...@li... > https://lists.sourceforge.net/lists/listinfo/linuxsh-dev > |
From: <rdt...@gm...> - 2008-09-30 22:12:01
|
Hi all, First of all sorry to send an email to linuxsh-dev list directly, I doing it because my attempt to use lin...@m1... fail (its site is down). My problem: I trying to analyse a core-dump of "Hello-world" like app that is running on SH4-STLinux, but it fails. gdb gives me : (gdb) bt full #0 0x297382d4 in raise () from /opt/7109/STM/STLinux-2.2/devkit/sh4/bin/../target/lib/libc.so.6 No symbol table info available. #1 0x29739dd6 in abort () from /opt/7109/STM/STLinux-2.2/devkit/sh4/bin/../target/lib/libc.so.6 No symbol table info available. Cannot access memory at address 0x7b916ff8 My program code: #include <stdlib.h> extern void m1(); static int count = 0; void m3(){ if (count++ > 2) abort(); m1(); } void m2(){ m3(); } void m1 (){ m2(); } int main (int argc, char* argv[]) { m1(); return 0; } I compiled it with /opt/STM/STLinux-2.2/devkit/sh4/bin/sh4-linux-g++ -g -o mysand sandbox.cpp I've tried -fstack-protector-all option without success too. Before running it on STLinux I'm running: ulimited -c unlimited. Do you have any idea why the stack of my core-dump is broken ? Thanks in advance, Rafael Torres |
From: Giuseppe C. <pep...@gm...> - 2008-09-21 07:08:57
|
Hello the best channel to get support on STLinux is https://bugzilla.stlinux.com/ Regards, Peppe Kurumbudel, Prashanth wrote: > > Hello, > > Myself Prashanth, I am trying to boot STLinux-2.3 kernel on STb7109 > board(mb442). I am using Linux Fedora 7 on the host machine, and I am > using STLinux-2.3 distribution. > > I have done the following procedures > I have installed Fedora 7 on the host machine > Disabled firewall, by deleting iptables > Disabled SELinux > Installed compat-libstdc++-33-3.2.3-61.i386.rpm > Then, I got the STLinux-2.3 distribution > And I am trying to boot STLinux on the target board, using st40load_gdb > I have STMC in between target and the host. I have created > /exports/rootfs/<user>/target/ for nfs > Now, when I try to boot the precompiled image of linux, that I got > with STLinux distribution, I get the target I/O console, but the > console is empty and there is no interface to the board through that. > I am pasting the messages I get when I boot linux on the board using > st40load_gdb. > > [root@localhost boot]# st40load_gdb -t 169.254.163.238 -b > vmlinux-2.6.23.1_stm23_0102-mb442 -c / > mb442stb7109bypass -- console=ttyS0,9600d8 root=/dev/nfs/ nfsroot/ > =169.254.163.239:/exports/rootfs/rshinde/target/ > ip=169.254.163.238::0.0.0.0:255.255.0.0:lear::off mem=32m > The target is assumed to be little endian > The target architecture is assumed to be sh4 > 0xa0000000 in ?? () > Loading section .note.gnu.build-id, size 0x24 lma 0x0 > Loading section .empty_zero_page, size 0x1000 lma 0x84001000 > Loading section .text, size 0x30c5f8 lma 0x84002000 > Loading section __ex_table, size 0x14a0 lma 0x8430e600 > Loading section .rodata, size 0x6a51c lma 0x84310000 > Loading section .eh_frame, size 0x54 lma 0x8437a51c > Loading section __ksymtab, size 0x4978 lma 0x8437a570 > Loading section __ksymtab_gpl, size 0x1650 lma 0x8437eee8 > Loading section __ksymtab_gpl_future, size 0x18 lma 0x84380538 > Loading section __ksymtab_strings, size 0xddc0 lma 0x84380550 > Loading section __param, size 0x668 lma 0x8438e310 > Loading section __bug_table, size 0x35d0 lma 0x8438f000 > Loading section .uncached.text, size 0x3e0 lma 0x84393000 > Loading section .data, size 0x2d000 lma 0x84394000 > Loading section .got, size 0x4 lma 0x843c1000 > Loading section .got.plt, size 0xc lma 0x843c1004 > Loading section .data.cacheline_aligned, size 0x120 lma 0x843c2000 > Loading section .data.init_task, size 0x2000 lma 0x843c4000 > Loading section .init.text, size 0x1b4c0 lma 0x843c6000 > Loading section .init.data, size 0x2e1c lma 0x843e14c0 > Loading section .init.setup, size 0x324 lma 0x843e42e0 > Loading section .initcall.init, size 0x27c lma 0x843e4604 > Loading section .con_initcall.init, size 0x8 lma 0x843e4880 > Loading section .exit.text, size 0x14a0 lma 0x843e48a0 > Loading section .init.ramfs, size 0x85 lma 0x843e6000 > Loading section .machvec.init, size 0x88 lma 0x843e6088 > Start address 0x84002000, load size 4062533 > Transfer rate: 193939 bits/sec, 150464 bytes/write. > Breakpoint 1 at 0x84003a04 > Breakpoint 2 at 0x840039e0 > Breakpoint 3 at 0x84003a2e > Program received signal SIGINT, Interrupt. > 0x84004630 in default_idle () > (gdb) set linux-awareness enabled on > You're loading the linux-awareness layer on a kernel with missing debug > information. Your kernel seems to be supported, thus basic functionality > (info tasks, info modules) should work anyway. You will be notified > that the > debugger will use untrusted default values for more advanced uses. > It is safer to use a kernel built with debug information if possible. > Enabling Linux kernel awareness layer [Build Nov 3 2007]. > warning: No debug information found for field 'tgid' of 'struct > task_struct'. Using default values (offset 216, size 4). See 'set > linux-awareness field_offset_task_struct_tgid' and 'set > linux-awareness field_size_task_struct_tgid' > > (gdb) console on > warning: You seem to be trying to debug a Linux Kernel, but your > binary is missing > debug information. The linux awareness layer didn't load itself. You can > force the load by issuing: 'set linux-awareness enabled on'. > (gdb) Warning: Tried to connect to session manager, Authentication > Rejected, > reason : None of the authentication protocols specified are supported > and host-based authentication failed > > And in another shell I keep kermit open, I don’t get any interface > through kermit also, I am pasting what ever seen in kermit here : > > [root@localhost boot]# kermit > C-Kermit 8.0.211, 10 Apr 2004, for Linux > Copyright (C) 1985, 2004, > Trustees of Columbia University in the City of New York. > Type ? or HELP for help. > (/opt/STM/STLinux-2.3/devkit/sh4/target/boot/) C-Kermit>set > carrier-watch off > (/opt/STM/STLinux-2.3/devkit/sh4/target/boot/) C-Kermit>set line > /dev/ttyS0 > (/opt/STM/STLinux-2.3/devkit/sh4/target/boot/) C-Kermit>set speed 9600 > /dev/ttyS0, 9600 bps > (/opt/STM/STLinux-2.3/devkit/sh4/target/boot/) C-Kermit>set flow none > (/opt/STM/STLinux-2.3/devkit/sh4/target/boot/) C-Kermit>set parity none > (/opt/STM/STLinux-2.3/devkit/sh4/target/boot/) C-Kermit>connect > Connecting to /dev/ttyS0, speed 9600 > Escape character: Ctrl-\ (ASCII 28, FS): enabled > Type the escape character followed by C to get back, > or followed by ? to see other options. > ---------------------------------------------------- > > > Looking forward for the kind reply, > > Best Regards, > Prashanth > ___________________________________ > Prashanth Ram Kurumbudel > Dipl in EEE & BE in EEE > Software Development, Video Group > Lear Corporation, India Engineering Centre > > Phone +91-22-2586-7163 > Fax +91-22-2586-7080 > > ********************** > ** LEGAL DISCLAIMER ** > ********************** > > This E-mail message and any attachments may contain > legally privileged, confidential or proprietary > information. If you are not the intended recipient(s), > or the employee or agent responsible for delivery of > this message to the intended recipient(s), you are > hereby notified that any dissemination, distribution > or copying of this E-mail message is strictly > prohibited. If you have received this message in > error, please immediately notify the sender and > delete this E-mail message from your computer. > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > ------------------------------------------------------------------------ > > _______________________________________________ > linuxsh-dev mailing list > lin...@li... > https://lists.sourceforge.net/lists/listinfo/linuxsh-dev > |
From: Kurumbudel, P. <PKu...@le...> - 2008-09-21 07:00:04
|
Hello, Myself Prashanth, I am trying to boot STLinux-2.3 kernel on STb7109 board(mb442). I am using Linux Fedora 7 on the host machine, and I am using STLinux-2.3 distribution. I have done the following procedures I have installed Fedora 7 on the host machine Disabled firewall, by deleting iptables Disabled SELinux Installed compat-libstdc++-33-3.2.3-61.i386.rpm Then, I got the STLinux-2.3 distribution And I am trying to boot STLinux on the target board, using st40load_gdb I have STMC in between target and the host. I have created /exports/rootfs/<user>/target/ for nfs Now, when I try to boot the precompiled image of linux, that I got with STLinux distribution, I get the target I/O console, but the console is empty and there is no interface to the board through that. I am pasting the messages I get when I boot linux on the board using st40load_gdb. [root@localhost boot]# st40load_gdb -t 169.254.163.238 -b vmlinux-2.6.23.1_stm23_0102-mb442 -c / mb442stb7109bypass -- console=ttyS0,9600d8 root=/dev/nfs/ nfsroot/ =169.254.163.239:/exports/rootfs/rshinde/target/ ip=169.254.163.238::0.0.0.0:255.255.0.0:lear::off mem=32m The target is assumed to be little endian The target architecture is assumed to be sh4 0xa0000000 in ?? () Loading section .note.gnu.build-id, size 0x24 lma 0x0 Loading section .empty_zero_page, size 0x1000 lma 0x84001000 Loading section .text, size 0x30c5f8 lma 0x84002000 Loading section __ex_table, size 0x14a0 lma 0x8430e600 Loading section .rodata, size 0x6a51c lma 0x84310000 Loading section .eh_frame, size 0x54 lma 0x8437a51c Loading section __ksymtab, size 0x4978 lma 0x8437a570 Loading section __ksymtab_gpl, size 0x1650 lma 0x8437eee8 Loading section __ksymtab_gpl_future, size 0x18 lma 0x84380538 Loading section __ksymtab_strings, size 0xddc0 lma 0x84380550 Loading section __param, size 0x668 lma 0x8438e310 Loading section __bug_table, size 0x35d0 lma 0x8438f000 Loading section .uncached.text, size 0x3e0 lma 0x84393000 Loading section .data, size 0x2d000 lma 0x84394000 Loading section .got, size 0x4 lma 0x843c1000 Loading section .got.plt, size 0xc lma 0x843c1004 Loading section .data.cacheline_aligned, size 0x120 lma 0x843c2000 Loading section .data.init_task, size 0x2000 lma 0x843c4000 Loading section .init.text, size 0x1b4c0 lma 0x843c6000 Loading section .init.data, size 0x2e1c lma 0x843e14c0 Loading section .init.setup, size 0x324 lma 0x843e42e0 Loading section .initcall.init, size 0x27c lma 0x843e4604 Loading section .con_initcall.init, size 0x8 lma 0x843e4880 Loading section .exit.text, size 0x14a0 lma 0x843e48a0 Loading section .init.ramfs, size 0x85 lma 0x843e6000 Loading section .machvec.init, size 0x88 lma 0x843e6088 Start address 0x84002000, load size 4062533 Transfer rate: 193939 bits/sec, 150464 bytes/write. Breakpoint 1 at 0x84003a04 Breakpoint 2 at 0x840039e0 Breakpoint 3 at 0x84003a2e Program received signal SIGINT, Interrupt. 0x84004630 in default_idle () (gdb) set linux-awareness enabled on You're loading the linux-awareness layer on a kernel with missing debug information. Your kernel seems to be supported, thus basic functionality (info tasks, info modules) should work anyway. You will be notified that the debugger will use untrusted default values for more advanced uses. It is safer to use a kernel built with debug information if possible. Enabling Linux kernel awareness layer [Build Nov 3 2007]. warning: No debug information found for field 'tgid' of 'struct task_struct'. Using default values (offset 216, size 4). See 'set linux-awareness field_offset_task_struct_tgid' and 'set linux-awareness field_size_task_struct_tgid' (gdb) console on warning: You seem to be trying to debug a Linux Kernel, but your binary is missing debug information. The linux awareness layer didn't load itself. You can force the load by issuing: 'set linux-awareness enabled on'. (gdb) Warning: Tried to connect to session manager, Authentication Rejected, reason : None of the authentication protocols specified are supported and host-based authentication failed And in another shell I keep kermit open, I don't get any interface through kermit also, I am pasting what ever seen in kermit here : [root@localhost boot]# kermit C-Kermit 8.0.211, 10 Apr 2004, for Linux Copyright (C) 1985, 2004, Trustees of Columbia University in the City of New York. Type ? or HELP for help. (/opt/STM/STLinux-2.3/devkit/sh4/target/boot/) C-Kermit>set carrier-watch off (/opt/STM/STLinux-2.3/devkit/sh4/target/boot/) C-Kermit>set line /dev/ttyS0 (/opt/STM/STLinux-2.3/devkit/sh4/target/boot/) C-Kermit>set speed 9600 /dev/ttyS0, 9600 bps (/opt/STM/STLinux-2.3/devkit/sh4/target/boot/) C-Kermit>set flow none (/opt/STM/STLinux-2.3/devkit/sh4/target/boot/) C-Kermit>set parity none (/opt/STM/STLinux-2.3/devkit/sh4/target/boot/) C-Kermit>connect Connecting to /dev/ttyS0, speed 9600 Escape character: Ctrl-\ (ASCII 28, FS): enabled Type the escape character followed by C to get back, or followed by ? to see other options. ---------------------------------------------------- Looking forward for the kind reply, Best Regards, Prashanth ___________________________________ Prashanth Ram Kurumbudel Dipl in EEE & BE in EEE Software Development, Video Group Lear Corporation, India Engineering Centre Phone +91-22-2586-7163 Fax +91-22-2586-7080 ********************** ** LEGAL DISCLAIMER ** ********************** This E-mail message and any attachments may contain legally privileged, confidential or proprietary information. If you are not the intended recipient(s), or the employee or agent responsible for delivery of this message to the intended recipient(s), you are hereby notified that any dissemination, distribution or copying of this E-mail message is strictly prohibited. If you have received this message in error, please immediately notify the sender and delete this E-mail message from your computer. |
From: Stuart M. <stu...@st...> - 2008-08-13 14:14:15
|
Bill Traynor wrote: >> For problems which are specific to the STLinux distribution you are >> probably >> better off putting in query into bugzilla at bugzilla.stlinux.com. > > Bugzilla returns: > Secure Connection Failed > > bugzilla.stlinux.com uses an invalid security certificate. > > The certificate is not trusted because it is self signed. > > (Error code: sec_error_ca_cert_invalid) > > * This could be a problem with the server's configuration, or it could > be someone trying to impersonate the server. > > * If you have connected to this server successfully in the past, the > error may be temporary, and you can try again later. It is indeed a self signed certificate. However most browsers can be configured to accept this. Stuart |
From: Bill T. <wm...@na...> - 2008-08-13 13:34:51
|
> Hi there > > Sheshadri Musturi wrote: >> I am trying to build STLinux on my Ubuntu Hardy. >> But I am facing errors like >> >> [: 72: ==: unexpected operator >> Unrecognised option: >> >> Could someone help me out, the reason behind it and how can I overcome >> this. > > For problems which are specific to the STLinux distribution you are > probably > better off putting in query into bugzilla at bugzilla.stlinux.com. Bugzilla returns: Secure Connection Failed bugzilla.stlinux.com uses an invalid security certificate. The certificate is not trusted because it is self signed. (Error code: sec_error_ca_cert_invalid) * This could be a problem with the server's configuration, or it could be someone trying to impersonate the server. * If you have connected to this server successfully in the past, the error may be temporary, and you can try again later. > > However in this case I think the problem is that Ubuntu usually sets > /bin/sh > to ash, which doesn't support the test == operator (which is a bash > extension). > Try running the script under bash explicitly. > > Stuart > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the > world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > linuxsh-dev mailing list > lin...@li... > https://lists.sourceforge.net/lists/listinfo/linuxsh-dev > |
From: Carmelo A. <car...@gm...> - 2008-08-13 13:24:51
|
Sheshadri Musturi wrote: > Hi, > > > > I am trying to build STLinux on my Ubuntu Hardy. > > But I am facing errors like > > > > [: 72: ==: unexpected operator > > Unrecognised option: > > > > Could someone help me out, the reason behind it and how can I overcome this. > > what is your default shell ? is it dash ? if so, try using bash instead. Anyway, I suggest you to post questions about STLinux through bugzilla at https://bugzilla.stlinux.com/ Regards, Carmelo > > Thanks > > musturi > > > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > > > ------------------------------------------------------------------------ > > _______________________________________________ > linuxsh-dev mailing list > lin...@li... > https://lists.sourceforge.net/lists/listinfo/linuxsh-dev |
From: Stuart M. <stu...@st...> - 2008-08-13 13:23:42
|
Hi there Sheshadri Musturi wrote: > I am trying to build STLinux on my Ubuntu Hardy. > But I am facing errors like > > [: 72: ==: unexpected operator > Unrecognised option: > > Could someone help me out, the reason behind it and how can I overcome this. For problems which are specific to the STLinux distribution you are probably better off putting in query into bugzilla at bugzilla.stlinux.com. However in this case I think the problem is that Ubuntu usually sets /bin/sh to ash, which doesn't support the test == operator (which is a bash extension). Try running the script under bash explicitly. Stuart |
From: Sheshadri M. <she...@ta...> - 2008-08-13 11:51:29
|
Hi, I am trying to build STLinux on my Ubuntu Hardy. But I am facing errors like [: 72: ==: unexpected operator Unrecognised option: Could someone help me out, the reason behind it and how can I overcome this. Thanks musturi |
From: Adrian M. <ad...@ne...> - 2008-07-14 21:08:49
|
Is there a guide anywhere to how I can install gentoo on my Dreamcast? I have got a stage 3 tarball and installed the latest portage snapshot, but it seems like madness to me to try to compile packages natively and I have read fragmentary emails suggesting that I can get some sort of x-compile system up and running. But I cannot find anything coherent that explains how to do it? Any clues/experience? |
From: Giuseppe C. <pep...@gm...> - 2008-03-05 15:17:11
|
Angelo, I'm using periodic without any problems. Cheers, Peppe On 05/03/2008, Angelo CASTELLO <ang...@st...> wrote: > > Hi Paul, > this patch adds missing features in rtc-sh driver (e.g Periodic IRQs). > Code tested at user level using the classic example provided within > Documentation/rtc.txt on sh4 core. > > Let me know. > Regards. > Angelo > > Giuseppe Cavallaro wrote: > > > ---------- Forwarded message ---------- > From: Paul Mundt <pau...@re...> > Date: 20 Feb 2008 03:20 > Subject: Re: SH4 RTC periodic mode > To: Giuseppe Cavallaro <pep...@gm...> > Cc: lin...@vg... > > On Mon, Feb 18, 2008 at 04:21:08PM +0100, Giuseppe Cavallaro wrote: > > I wonder why the sh4 rtc driver (drivers/rtc/rtc-sh.c) doesn't implement > the > > periodic ioctls (RTC_IRQP_SET...) currently implemented in other > drivers. > > Is there a specific reason? > > > These are trivially added. There is no particular reason why they are > unimplemented in the current driver, I just havent gotten around to > adding them. Feel free to submit a patch. > > > Mainly its contains the Periodic IRQs support, both Alarm routine > fixes and Kernel/User level interface updating. > > Signed-off-by: Angelo Castello <ang...@st...> > Signed-off-by: Giuseppe Cavallaro <pep...@st...> > > diff -Naur linux-2.6.23.16/drivers/rtc/rtc-sh.c linux-2.6.23.16-rtc-sh > /drivers/rtc/rtc-sh.c > --- linux-2.6.23.16/drivers/rtc/rtc-sh.c 2008-03-05 15:10: > 51.551251064 +0100 > +++ linux-2.6.23.16-rtc-sh/drivers/rtc/rtc-sh.c 2008-03-05 14:48: > 06.727735776 +0100 > @@ -1,6 +1,14 @@ > /* > * SuperH On-Chip RTC Support > * > + * Copyright (C) 2008 Angelo Castello <ang...@st...> > + * Changes from 0.1.3 to 0.1.4 are: > + * Added Periodic IRQs support emulating 8,32,128Hz yet. > + * Fixed Alarm routine. > + * Added Kernel/user level support. > + * > + * Updating from latest released by: > + * > * Copyright (C) 2006, 2007 Paul Mundt > * Copyright (C) 2006 Jamie Lenehan > * > @@ -26,7 +34,7 @@ > #include <asm/rtc.h> > > #define DRV_NAME "sh-rtc" > -#define DRV_VERSION "0.1.3" > +#define DRV_VERSION "0.1.4" > > #ifdef CONFIG_CPU_SH3 > #define rtc_reg_size sizeof(u16) > @@ -61,6 +69,13 @@ > /* ALARM Bits - or with BCD encoded value */ > #define AR_ENB 0x80 /* Enable for alarm cmp */ > > +/* Period Bits */ > +#define PF_HP 0x100 /* Enable Half Period to support > 8,32,128Hz */ > +#define PF_COUNT 0x200 /* Half periodic counter */ > +#define PF_OXS 0x400 /* Periodic One x Second */ > +#define PF_KOU 0x800 /* Kernel or User periodic request > 1=kernel */ > +#define PF_MASK 0xf00 > + > /* RCR1 Bits */ > #define RCR1_CF 0x80 /* Carry Flag */ > #define RCR1_CIE 0x10 /* Carry Interrupt Enable */ > @@ -82,33 +97,24 @@ > unsigned int alarm_irq, periodic_irq, carry_irq; > struct rtc_device *rtc_dev; > spinlock_t lock; > - int rearm_aie; > unsigned long capabilities; /* See asm-sh/rtc.h for cap bits */ > + unsigned short periodic_freq; > }; > > static irqreturn_t sh_rtc_interrupt(int irq, void *dev_id) > { > - struct platform_device *pdev = to_platform_device(dev_id); > - struct sh_rtc *rtc = platform_get_drvdata(pdev); > - unsigned int tmp, events = 0; > + struct sh_rtc *rtc = (struct sh_rtc *)dev_id; > + unsigned int tmp; > > spin_lock(&rtc->lock); > > tmp = readb(rtc->regbase + RCR1); > tmp &= ~RCR1_CF; > - > - if (rtc->rearm_aie) { > - if (tmp & RCR1_AF) > - tmp &= ~RCR1_AF; /* try to clear AF again > */ > - else { > - tmp |= RCR1_AIE; /* AF has cleared, rearm > IRQ */ > - rtc->rearm_aie = 0; > - } > - } > - > writeb(tmp, rtc->regbase + RCR1); > > - rtc_update_irq(rtc->rtc_dev, 1, events); > + /* Users have requested One x Second IRQ */ > + if (rtc->periodic_freq & PF_OXS) > + rtc_update_irq(rtc->rtc_dev, 1, RTC_UF | RTC_IRQF); > > spin_unlock(&rtc->lock); > > @@ -117,47 +123,49 @@ > > static irqreturn_t sh_rtc_alarm(int irq, void *dev_id) > { > - struct platform_device *pdev = to_platform_device(dev_id); > - struct sh_rtc *rtc = platform_get_drvdata(pdev); > - unsigned int tmp, events = 0; > + struct sh_rtc *rtc = (struct sh_rtc *)dev_id; > + unsigned int tmp; > > spin_lock(&rtc->lock); > > tmp = readb(rtc->regbase + RCR1); > + tmp &= ~(RCR1_AF | RCR1_AIE); > + writeb(tmp, rtc->regbase + RCR1); > > - /* > - * If AF is set then the alarm has triggered. If we clear AF while > - * the alarm time still matches the RTC time then AF will > - * immediately be set again, and if AIE is enabled then the alarm > - * interrupt will immediately be retrigger. So we clear AIE here > - * and use rtc->rearm_aie so that the carry interrupt will keep > - * trying to clear AF and once it stays cleared it'll re-enable > - * AIE. > - */ > - if (tmp & RCR1_AF) { > - events |= RTC_AF | RTC_IRQF; > - > - tmp &= ~(RCR1_AF|RCR1_AIE); > - > - writeb(tmp, rtc->regbase + RCR1); > - > - rtc->rearm_aie = 1; > - > - rtc_update_irq(rtc->rtc_dev, 1, events); > - } > + rtc_update_irq(rtc->rtc_dev, 1, RTC_AF | RTC_IRQF); > > spin_unlock(&rtc->lock); > + > return IRQ_HANDLED; > } > > static irqreturn_t sh_rtc_periodic(int irq, void *dev_id) > { > - struct platform_device *pdev = to_platform_device(dev_id); > - struct sh_rtc *rtc = platform_get_drvdata(pdev); > + struct sh_rtc *rtc = (struct sh_rtc *)dev_id; > + struct rtc_device *rtc_dev = rtc->rtc_dev; > + unsigned int tmp; > > spin_lock(&rtc->lock); > > - rtc_update_irq(rtc->rtc_dev, 1, RTC_PF | RTC_IRQF); > + tmp = readb(rtc->regbase + RCR2); > + tmp &= ~RCR2_PEF; > + writeb(tmp, rtc->regbase + RCR2); > + > + /* Half period enabled than one skipped and the next notified */ > + if ((rtc->periodic_freq & PF_HP) && (rtc->periodic_freq & > PF_COUNT)) > + rtc->periodic_freq &= ~PF_COUNT; > + else { > + if (rtc->periodic_freq & PF_HP) > + rtc->periodic_freq |= PF_COUNT; > + if (rtc->periodic_freq & PF_KOU) { > + spin_lock(&rtc_dev->irq_task_lock); > + if (rtc_dev->irq_task) > + > rtc_dev->irq_task->func(rtc_dev->irq_task-> > + private_data); > + spin_unlock(&rtc_dev->irq_task_lock); > + } else > + rtc_update_irq(rtc->rtc_dev, 1, RTC_PF | > RTC_IRQF); > + } > > spin_unlock(&rtc->lock); > > @@ -174,8 +182,8 @@ > tmp = readb(rtc->regbase + RCR2); > > if (enable) { > - tmp &= ~RCR2_PESMASK; > - tmp |= RCR2_PEF | (2 << 4); > + tmp &= ~RCR2_PEF; /* Clear PES bit */ > + tmp |= (rtc->periodic_freq & ~PF_HP); /* Set PES2-0 */ > } else > tmp &= ~(RCR2_PESMASK | RCR2_PEF); > > @@ -184,82 +192,90 @@ > spin_unlock_irq(&rtc->lock); > } > > -static inline void sh_rtc_setaie(struct device *dev, unsigned int enable) > +static inline int sh_rtc_setfreq(struct device *dev, unsigned int freq) > { > struct sh_rtc *rtc = dev_get_drvdata(dev); > - unsigned int tmp; > + int tmp, ret = 0; > > spin_lock_irq(&rtc->lock); > + tmp = rtc->periodic_freq & PF_MASK; > > - tmp = readb(rtc->regbase + RCR1); > - > - if (!enable) { > - tmp &= ~RCR1_AIE; > - rtc->rearm_aie = 0; > - } else if (rtc->rearm_aie == 0) > - tmp |= RCR1_AIE; > + switch (freq) { > + case 0: > + rtc->periodic_freq = 0x00; > + break; > + case 1: > + rtc->periodic_freq = 0x60; > + break; > + case 2: > + rtc->periodic_freq = 0x50; > + break; > + case 4: > + rtc->periodic_freq = 0x40; > + break; > + case 8: > + rtc->periodic_freq = 0x30 | PF_HP; > + break; > + case 16: > + rtc->periodic_freq = 0x30; > + break; > + case 32: > + rtc->periodic_freq = 0x20 | PF_HP; > + break; > + case 64: > + rtc->periodic_freq = 0x20; > + break; > + case 128: > + rtc->periodic_freq = 0x10 | PF_HP; > + break; > + case 256: > + rtc->periodic_freq = 0x10; > + break; > + default: > + ret = -ENOTSUPP; > + } > > - writeb(tmp, rtc->regbase + RCR1); > + if (ret == 0) { > + rtc->periodic_freq |= tmp; > + rtc->rtc_dev->irq_freq = freq; > + } > > spin_unlock_irq(&rtc->lock); > + return ret; > } > > -static int sh_rtc_open(struct device *dev) > +static inline void sh_rtc_setaie(struct device *dev, unsigned int enable) > { > struct sh_rtc *rtc = dev_get_drvdata(dev); > unsigned int tmp; > - int ret; > + > + spin_lock_irq(&rtc->lock); > > tmp = readb(rtc->regbase + RCR1); > - tmp &= ~RCR1_CF; > - tmp |= RCR1_CIE; > - writeb(tmp, rtc->regbase + RCR1); > > - ret = request_irq(rtc->periodic_irq, sh_rtc_periodic, > IRQF_DISABLED, > - "sh-rtc period", dev); > - if (unlikely(ret)) { > - dev_err(dev, "request period IRQ failed with %d, IRQ > %d\n", > - ret, rtc->periodic_irq); > - return ret; > - } > + if (!enable) > + tmp &= ~RCR1_AIE; > + else > + tmp |= RCR1_AIE; > > - ret = request_irq(rtc->carry_irq, sh_rtc_interrupt, IRQF_DISABLED, > - "sh-rtc carry", dev); > - if (unlikely(ret)) { > - dev_err(dev, "request carry IRQ failed with %d, IRQ %d\n", > - ret, rtc->carry_irq); > - free_irq(rtc->periodic_irq, dev); > - goto err_bad_carry; > - } > + writeb(tmp, rtc->regbase + RCR1); > > - ret = request_irq(rtc->alarm_irq, sh_rtc_alarm, IRQF_DISABLED, > - "sh-rtc alarm", dev); > - if (unlikely(ret)) { > - dev_err(dev, "request alarm IRQ failed with %d, IRQ %d\n", > - ret, rtc->alarm_irq); > - goto err_bad_alarm; > - } > + spin_unlock_irq(&rtc->lock); > +} > > +static int sh_rtc_open(struct device *dev) > +{ > + /* the rtc-dev interface keeps the lock as long as the device > + * is in use and return immediately if busy. That means only one > + * RTC instance can be avilable. > + */ > return 0; > - > -err_bad_alarm: > - free_irq(rtc->carry_irq, dev); > -err_bad_carry: > - free_irq(rtc->periodic_irq, dev); > - > - return ret; > } > > static void sh_rtc_release(struct device *dev) > { > - struct sh_rtc *rtc = dev_get_drvdata(dev); > - > sh_rtc_setpie(dev, 0); > sh_rtc_setaie(dev, 0); > - > - free_irq(rtc->periodic_irq, dev); > - free_irq(rtc->carry_irq, dev); > - free_irq(rtc->alarm_irq, dev); > } > > static int sh_rtc_proc(struct device *dev, struct seq_file *seq) > @@ -268,31 +284,44 @@ > unsigned int tmp; > > tmp = readb(rtc->regbase + RCR1); > - seq_printf(seq, "carry_IRQ\t: %s\n", > - (tmp & RCR1_CIE) ? "yes" : "no"); > + seq_printf(seq, "carry_IRQ\t: %s\n", (tmp & RCR1_CIE) ? "yes" : > "no"); > > tmp = readb(rtc->regbase + RCR2); > seq_printf(seq, "periodic_IRQ\t: %s\n", > - (tmp & RCR2_PEF) ? "yes" : "no"); > + (tmp & RCR2_PESMASK) ? "yes" : "no"); > > return 0; > } > > static int sh_rtc_ioctl(struct device *dev, unsigned int cmd, unsigned > long arg) > { > - unsigned int ret = -ENOIOCTLCMD; > + struct sh_rtc *rtc = dev_get_drvdata(dev); > + unsigned int ret = 0; > > switch (cmd) { > case RTC_PIE_OFF: > case RTC_PIE_ON: > sh_rtc_setpie(dev, cmd == RTC_PIE_ON); > - ret = 0; > break; > case RTC_AIE_OFF: > case RTC_AIE_ON: > sh_rtc_setaie(dev, cmd == RTC_AIE_ON); > - ret = 0; > break; > + case RTC_UIE_OFF: > + rtc->periodic_freq &= ~PF_OXS; > + break; > + case RTC_UIE_ON: > + rtc->periodic_freq |= PF_OXS; > + break; > + case RTC_IRQP_READ: > + ret = put_user(rtc->rtc_dev->irq_freq, > + (unsigned long __user *)arg); > + break; > + case RTC_IRQP_SET: > + ret = sh_rtc_setfreq(dev, arg); > + break; > + default: > + ret = -ENOIOCTLCMD; > } > > return ret; > @@ -310,25 +339,25 @@ > spin_lock_irq(&rtc->lock); > > tmp = readb(rtc->regbase + RCR1); > - tmp &= ~RCR1_CF; /* Clear CF-bit */ > + tmp &= ~RCR1_CF; /* Clear CF-bit */ > tmp |= RCR1_CIE; > writeb(tmp, rtc->regbase + RCR1); > > sec128 = readb(rtc->regbase + R64CNT); > > - tm->tm_sec = BCD2BIN(readb(rtc->regbase + RSECCNT)); > - tm->tm_min = BCD2BIN(readb(rtc->regbase + RMINCNT)); > - tm->tm_hour = BCD2BIN(readb(rtc->regbase + RHRCNT)); > - tm->tm_wday = BCD2BIN(readb(rtc->regbase + RWKCNT)); > - tm->tm_mday = BCD2BIN(readb(rtc->regbase + RDAYCNT)); > - tm->tm_mon = BCD2BIN(readb(rtc->regbase + RMONCNT)) - > 1; > + tm->tm_sec = BCD2BIN(readb(rtc->regbase + RSECCNT)); > + tm->tm_min = BCD2BIN(readb(rtc->regbase + RMINCNT)); > + tm->tm_hour = BCD2BIN(readb(rtc->regbase + RHRCNT)); > + tm->tm_wday = BCD2BIN(readb(rtc->regbase + RWKCNT)); > + tm->tm_mday = BCD2BIN(readb(rtc->regbase + RDAYCNT)); > + tm->tm_mon = BCD2BIN(readb(rtc->regbase + RMONCNT)) - 1; > > if (rtc->capabilities & RTC_CAP_4_DIGIT_YEAR) { > - yr = readw(rtc->regbase + RYRCNT); > + yr = readw(rtc->regbase + RYRCNT); > yr100 = BCD2BIN(yr >> 8); > yr &= 0xff; > } else { > - yr = readb(rtc->regbase + RYRCNT); > + yr = readb(rtc->regbase + RYRCNT); > yr100 = BCD2BIN((yr == 0x99) ? 0x19 : 0x20); > } > > @@ -372,8 +401,8 @@ > tmp &= ~RCR2_START; > writeb(tmp, rtc->regbase + RCR2); > > - writeb(BIN2BCD(tm->tm_sec), rtc->regbase + RSECCNT); > - writeb(BIN2BCD(tm->tm_min), rtc->regbase + RMINCNT); > + writeb(BIN2BCD(tm->tm_sec), rtc->regbase + RSECCNT); > + writeb(BIN2BCD(tm->tm_min), rtc->regbase + RMINCNT); > writeb(BIN2BCD(tm->tm_hour), rtc->regbase + RHRCNT); > writeb(BIN2BCD(tm->tm_wday), rtc->regbase + RWKCNT); > writeb(BIN2BCD(tm->tm_mday), rtc->regbase + RDAYCNT); > @@ -381,7 +410,7 @@ > > if (rtc->capabilities & RTC_CAP_4_DIGIT_YEAR) { > year = (BIN2BCD((tm->tm_year + 1900) / 100) << 8) | > - BIN2BCD(tm->tm_year % 100); > + BIN2BCD(tm->tm_year % 100); > writew(year, rtc->regbase + RYRCNT); > } else { > year = tm->tm_year % 100; > @@ -417,19 +446,19 @@ > { > struct platform_device *pdev = to_platform_device(dev); > struct sh_rtc *rtc = platform_get_drvdata(pdev); > - struct rtc_time* tm = &wkalrm->time; > + struct rtc_time *tm = &wkalrm->time; > > spin_lock_irq(&rtc->lock); > > - tm->tm_sec = sh_rtc_read_alarm_value(rtc, RSECAR); > - tm->tm_min = sh_rtc_read_alarm_value(rtc, RMINAR); > - tm->tm_hour = sh_rtc_read_alarm_value(rtc, RHRAR); > - tm->tm_wday = sh_rtc_read_alarm_value(rtc, RWKAR); > - tm->tm_mday = sh_rtc_read_alarm_value(rtc, RDAYAR); > - tm->tm_mon = sh_rtc_read_alarm_value(rtc, RMONAR); > + tm->tm_sec = sh_rtc_read_alarm_value(rtc, RSECAR); > + tm->tm_min = sh_rtc_read_alarm_value(rtc, RMINAR); > + tm->tm_hour = sh_rtc_read_alarm_value(rtc, RHRAR); > + tm->tm_wday = sh_rtc_read_alarm_value(rtc, RWKAR); > + tm->tm_mday = sh_rtc_read_alarm_value(rtc, RDAYAR); > + tm->tm_mon = sh_rtc_read_alarm_value(rtc, RMONAR); > if (tm->tm_mon > 0) > - tm->tm_mon -= 1; /* RTC is 1-12, tm_mon is 0-11 */ > - tm->tm_year = 0xffff; > + tm->tm_mon -= 1; /* RTC is 1-12, tm_mon is 0-11 */ > + tm->tm_year = 0xffff; > > wkalrm->enabled = (readb(rtc->regbase + RCR1) & RCR1_AIE) ? 1 : 0; > > @@ -445,10 +474,10 @@ > if (value < 0) > writeb(0, rtc->regbase + reg_off); > else > - writeb(BIN2BCD(value) | AR_ENB, rtc->regbase + reg_off); > + writeb(BIN2BCD(value) | AR_ENB, rtc->regbase + reg_off); > } > > -static int sh_rtc_check_alarm(struct rtc_time* tm) > +static int sh_rtc_check_alarm(struct rtc_time *tm) > { > /* > * The original rtc says anything > 0xc0 is "don't care" or "match > @@ -472,12 +501,10 @@ > tm->tm_sec = -1; > > if (tm->tm_year > 9999 || > - tm->tm_mon >= 12 || > - tm->tm_mday == 0 || tm->tm_mday >= 32 || > - tm->tm_wday >= 7 || > - tm->tm_hour >= 24 || > - tm->tm_min >= 60 || > - tm->tm_sec >= 60) > + tm->tm_mon >= 12 || > + tm->tm_mday == 0 || tm->tm_mday >= 32 || > + tm->tm_wday >= 7 || > + tm->tm_hour >= 24 || tm->tm_min >= 60 || tm->tm_sec >= 60) > return -EINVAL; > > return 0; > @@ -499,14 +526,12 @@ > > /* disable alarm interrupt and clear the alarm flag */ > rcr1 = readb(rtc->regbase + RCR1); > - rcr1 &= ~(RCR1_AF|RCR1_AIE); > + rcr1 &= ~(RCR1_AF | RCR1_AIE); > writeb(rcr1, rtc->regbase + RCR1); > > - rtc->rearm_aie = 0; > - > /* set alarm time */ > - sh_rtc_write_alarm_value(rtc, tm->tm_sec, RSECAR); > - sh_rtc_write_alarm_value(rtc, tm->tm_min, RMINAR); > + sh_rtc_write_alarm_value(rtc, tm->tm_sec, RSECAR); > + sh_rtc_write_alarm_value(rtc, tm->tm_min, RMINAR); > sh_rtc_write_alarm_value(rtc, tm->tm_hour, RHRAR); > sh_rtc_write_alarm_value(rtc, tm->tm_wday, RWKAR); > sh_rtc_write_alarm_value(rtc, tm->tm_mday, RDAYAR); > @@ -525,15 +550,36 @@ > return 0; > } > > +static int sh_rtc_irq_set_state(struct device *dev, int enabled) > +{ > + struct platform_device *pdev = to_platform_device(dev); > + struct sh_rtc *rtc = platform_get_drvdata(pdev); > + > + if (enabled) { > + rtc->periodic_freq |= PF_KOU; > + return sh_rtc_ioctl(dev, RTC_PIE_ON, 0); > + } else { > + rtc->periodic_freq &= ~PF_KOU; > + return sh_rtc_ioctl(dev, RTC_PIE_OFF, 0); > + } > +} > + > +static int sh_rtc_irq_set_freq(struct device *dev, int freq) > +{ > + return sh_rtc_ioctl(dev, RTC_IRQP_SET, freq); > +} > + > static struct rtc_class_ops sh_rtc_ops = { > - .open = sh_rtc_open, > - .release = sh_rtc_release, > - .ioctl = sh_rtc_ioctl, > - .read_time = sh_rtc_read_time, > - .set_time = sh_rtc_set_time, > - .read_alarm = sh_rtc_read_alarm, > - .set_alarm = sh_rtc_set_alarm, > - .proc = sh_rtc_proc, > + .open = sh_rtc_open, > + .release = sh_rtc_release, > + .ioctl = sh_rtc_ioctl, > + .read_time = sh_rtc_read_time, > + .set_time = sh_rtc_set_time, > + .read_alarm = sh_rtc_read_alarm, > + .set_alarm = sh_rtc_set_alarm, > + .irq_set_state = sh_rtc_irq_set_state, > + .irq_set_freq = sh_rtc_irq_set_freq, > + .proc = sh_rtc_proc, > }; > > static int __devinit sh_rtc_probe(struct platform_device *pdev) > @@ -541,6 +587,7 @@ > struct sh_rtc *rtc; > struct resource *res; > int ret = -ENOENT; > + unsigned int tmp; > > rtc = kzalloc(sizeof(struct sh_rtc), GFP_KERNEL); > if (unlikely(!rtc)) > @@ -548,6 +595,7 @@ > > spin_lock_init(&rtc->lock); > > + /* get periodic/carry/alarm irqs */ > rtc->periodic_irq = platform_get_irq(pdev, 0); > if (unlikely(rtc->periodic_irq < 0)) { > dev_err(&pdev->dev, "No IRQ for period\n"); > @@ -604,15 +652,54 @@ > rtc->capabilities |= pinfo->capabilities; > } > > + rtc->rtc_dev->max_user_freq = 256; > + rtc->rtc_dev->irq_freq = 1; > + rtc->periodic_freq = 0x60; > + > platform_set_drvdata(pdev, rtc); > > + /* register periodic/carry/alarm irqs */ > + ret = request_irq(rtc->periodic_irq, sh_rtc_periodic, > IRQF_DISABLED, > + "sh-rtc period", rtc); > + if (unlikely(ret)) { > + dev_err(&pdev->dev, > + "request period IRQ failed with %d, IRQ %d\n", > ret, > + rtc->periodic_irq); > + goto err_badmap; > + } > + > + ret = request_irq(rtc->carry_irq, sh_rtc_interrupt, IRQF_DISABLED, > + "sh-rtc carry", rtc); > + if (unlikely(ret)) { > + dev_err(&pdev->dev, > + "request carry IRQ failed with %d, IRQ %d\n", ret, > + rtc->carry_irq); > + free_irq(rtc->periodic_irq, rtc); > + goto err_badmap; > + } > + > + ret = request_irq(rtc->alarm_irq, sh_rtc_alarm, IRQF_DISABLED, > + "sh-rtc alarm", rtc); > + if (unlikely(ret)) { > + dev_err(&pdev->dev, > + "request alarm IRQ failed with %d, IRQ %d\n", ret, > + rtc->alarm_irq); > + free_irq(rtc->carry_irq, rtc); > + free_irq(rtc->periodic_irq, rtc); > + goto err_badmap; > + } > + > + tmp = readb(rtc->regbase + RCR1); > + tmp &= ~RCR1_CF; > + tmp |= RCR1_CIE; > + writeb(tmp, rtc->regbase + RCR1); > + > return 0; > > -err_badmap: > + err_badmap: > release_resource(rtc->res); > -err_badres: > + err_badres: > kfree(rtc); > - > return ret; > } > > @@ -626,6 +713,9 @@ > sh_rtc_setpie(&pdev->dev, 0); > sh_rtc_setaie(&pdev->dev, 0); > > + free_irq(rtc->carry_irq, rtc); > + free_irq(rtc->periodic_irq, rtc); > + free_irq(rtc->alarm_irq, rtc); > release_resource(rtc->res); > > platform_set_drvdata(pdev, NULL); > @@ -635,12 +725,12 @@ > return 0; > } > static struct platform_driver sh_rtc_platform_driver = { > - .driver = { > - .name = DRV_NAME, > - .owner = THIS_MODULE, > - }, > - .probe = sh_rtc_probe, > - .remove = __devexit_p(sh_rtc_remove), > + .driver = { > + .name = DRV_NAME, > + .owner = THIS_MODULE, > + }, > + .probe = sh_rtc_probe, > + .remove = __devexit_p(sh_rtc_remove), > }; > > static int __init sh_rtc_init(void) > @@ -659,4 +749,5 @@ > MODULE_DESCRIPTION("SuperH on-chip RTC driver"); > MODULE_VERSION(DRV_VERSION); > MODULE_AUTHOR("Paul Mundt <le...@li...>, Jamie Lenehan < > le...@tw...>"); > +MODULE_AUTHOR("Angelo Castello <ang...@st...>"); > MODULE_LICENSE("GPL"); > > |
From: KRISHNAN SUDHAKAR-N. <sud...@mo...> - 2008-02-27 10:55:58
|
Hi Stuart, Thanks for the reply. Find the attached logs which has the board boot sequence from U-Boot. Further please see my comments below. I am entirely new to these things so I am taking more time to reply. Thanks Sudhakar -----Original Message----- From: Stuart MENEFY [mailto:stu...@st...] Sent: Tuesday, February 26, 2008 9:55 PM To: KRISHNAN SUDHAKAR-NRD743 Cc: lin...@li... Subject: Re: Un protecting flash error Hi Sudhakar KRISHNAN SUDHAKAR-NRD743 wrote: > This is the first time I am trying to write in this board. > > But unprotect and write is possible in uboot prompt. Do you mean this is the first time you have tried to use Flash when running the kernel, but it works OK from U-Boot? <sudhakar>Yes this is the first time we are tring from kernel. But it works fine in U-Boot prompt So is it possible somebody has added code to U-Boot to enable VPP, but that same modification hasn't been made to the kernel? <sudhakar> yes we got U-Boot from other persons only exattly I don't know how to find out in kernel side. > In the same board flash info is working. <sudhakar>Yes info is working in both Uboot ans linux Do you mean the U-Boot flinfo command? <sudhakar> No flash_info command in Linux terminal It might be worth building the kernel with MTD debug to set level 3, see if that tell us anything useful. <sudhakar> I will try and let you know. Are you booting the kernel from a micro connect or from U-Boot? <sduhakar> I am booting kernel from U-boot Can you try both, and see if it makes a difference. <sudhakar> I doing now from ST micro connect Is this your own board, or a reference board? <sudhakar>Its our own board not reference board Which Flash device are you using, and which kernel? <sudhakar> We are using Spansion flash 32MB and kernel is Linux-2.6.17.14 Stuart > > Thanks > -----Original Message----- > From: Stuart MENEFY [mailto:stu...@st...] > Sent: Tuesday, February 26, 2008 8:02 PM > To: KRISHNAN SUDHAKAR-NRD743 > Cc: lin...@li... > Subject: Re: Un protecting flash error > > Hi Sudhakar > > KRISHNAN SUDHAKAR-NRD743 wrote: >> I am facing few flash file accessing problems ST Linux based systems. >> I have modified the code in stboards.c file for creating partitions > ... >> Partition looks like the following >> >> /tmp # cat /proc/mtd >> dev: size erasesize name >> mtd0: 00500000 00020000 "VIP800 Boot" >> mtd1: 00100000 00020000 "FFS0" >> mtd2: 01a00000 00020000 "FFS1" >> >> if I do a flash info its working fine >> >> / # flash_info /dev/mtd2 >> Device /dev/mtd2 has 0 erase regions >> >> if i try to unlock the partion its not happeniing >> >> / # flash_unlock /dev/mtd2 >> Could not unlock MTD device: /dev/mtd2 / # >> >> It will be very helpful if some one give some solutions > > The implication is that changing the partition table has broken this, > is this correct or has it never worked? > > If its never worked I'd be suspicious that your board has a write > protect signal, VPP enable or something similar which you need to > enable. > > Stuart > > ---------------------------------------------------------------------- > --- This SF.net email is sponsored by: Microsoft Defy all challenges. > Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > linuxsh-dev mailing list > lin...@li... > https://lists.sourceforge.net/lists/listinfo/linuxsh-dev |
From: Stuart M. <stu...@st...> - 2008-02-26 19:18:41
|
Hi Sudhakar KRISHNAN SUDHAKAR-NRD743 wrote: > This is the first time I am trying to write in this board. > > But unprotect and write is possible in uboot prompt. Do you mean this is the first time you have tried to use Flash when running the kernel, but it works OK from U-Boot? So is it possible somebody has added code to U-Boot to enable VPP, but that same modification hasn't been made to the kernel? > In the same board flash info is working. Do you mean the U-Boot flinfo command? It might be worth building the kernel with MTD debug to set level 3, see if that tell us anything useful. Are you booting the kernel from a micro connect or from U-Boot? Can you try both, and see if it makes a difference. Is this your own board, or a reference board? Which Flash device are you using, and which kernel? Stuart > > Thanks > -----Original Message----- > From: Stuart MENEFY [mailto:stu...@st...] > Sent: Tuesday, February 26, 2008 8:02 PM > To: KRISHNAN SUDHAKAR-NRD743 > Cc: lin...@li... > Subject: Re: Un protecting flash error > > Hi Sudhakar > > KRISHNAN SUDHAKAR-NRD743 wrote: >> I am facing few flash file accessing problems ST Linux based systems. >> I have modified the code in stboards.c file for creating partitions > ... >> Partition looks like the following >> >> /tmp # cat /proc/mtd >> dev: size erasesize name >> mtd0: 00500000 00020000 "VIP800 Boot" >> mtd1: 00100000 00020000 "FFS0" >> mtd2: 01a00000 00020000 "FFS1" >> >> if I do a flash info its working fine >> >> / # flash_info /dev/mtd2 >> Device /dev/mtd2 has 0 erase regions >> >> if i try to unlock the partion its not happeniing >> >> / # flash_unlock /dev/mtd2 >> Could not unlock MTD device: /dev/mtd2 / # >> >> It will be very helpful if some one give some solutions > > The implication is that changing the partition table has broken this, is > this correct or has it never worked? > > If its never worked I'd be suspicious that your board has a write > protect signal, VPP enable or something similar which you need to > enable. > > Stuart > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > linuxsh-dev mailing list > lin...@li... > https://lists.sourceforge.net/lists/listinfo/linuxsh-dev |
From: KRISHNAN SUDHAKAR-N. <sud...@mo...> - 2008-02-26 14:42:14
|
Hi Stuart, Thanks for the reply. This is the first time I am trying to write in this board. But unprotect and write is possible in uboot prompt. In the same board flash info is working. Thanks -----Original Message----- From: Stuart MENEFY [mailto:stu...@st...] Sent: Tuesday, February 26, 2008 8:02 PM To: KRISHNAN SUDHAKAR-NRD743 Cc: lin...@li... Subject: Re: Un protecting flash error Hi Sudhakar KRISHNAN SUDHAKAR-NRD743 wrote: > I am facing few flash file accessing problems ST Linux based systems. > I have modified the code in stboards.c file for creating partitions ... > > Partition looks like the following > > /tmp # cat /proc/mtd > dev: size erasesize name > mtd0: 00500000 00020000 "VIP800 Boot" > mtd1: 00100000 00020000 "FFS0" > mtd2: 01a00000 00020000 "FFS1" > > if I do a flash info its working fine > > / # flash_info /dev/mtd2 > Device /dev/mtd2 has 0 erase regions > > if i try to unlock the partion its not happeniing > > / # flash_unlock /dev/mtd2 > Could not unlock MTD device: /dev/mtd2 / # > > It will be very helpful if some one give some solutions The implication is that changing the partition table has broken this, is this correct or has it never worked? If its never worked I'd be suspicious that your board has a write protect signal, VPP enable or something similar which you need to enable. Stuart |
From: Stuart M. <stu...@st...> - 2008-02-26 14:32:01
|
Hi Sudhakar KRISHNAN SUDHAKAR-NRD743 wrote: > I am facing few flash file accessing problems ST Linux based systems. > I have modified the code in stboards.c file for creating partitions ... > > Partition looks like the following > > /tmp # cat /proc/mtd > dev: size erasesize name > mtd0: 00500000 00020000 "VIP800 Boot" > mtd1: 00100000 00020000 "FFS0" > mtd2: 01a00000 00020000 "FFS1" > > if I do a flash info its working fine > > / # flash_info /dev/mtd2 > Device /dev/mtd2 has 0 erase regions > > if i try to unlock the partion its not happeniing > > / # flash_unlock /dev/mtd2 > Could not unlock MTD device: /dev/mtd2 > / # > > It will be very helpful if some one give some solutions The implication is that changing the partition table has broken this, is this correct or has it never worked? If its never worked I'd be suspicious that your board has a write protect signal, VPP enable or something similar which you need to enable. Stuart |