Hi,
I had the same problem and solved it using the builtin python.
<code>
#!/mnt/ext/usr/bin/python
import socket, sys
def createmagicpacket(mac):
packet = "\xFF\xFF\xFF\xFF\xFF\xFF"
i = 16;
while (i):
packet+=mac
i-=1
return packet
host = '' # Bind to all interfaces
port = 51423
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
s.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
s.bind((host, port))
s.connect(('192.168.178.255',10000))
wakeupmac=sys.argv[1]
s.send(createmagicpacket(wakeupmac))
s.close()
</code>
The MAC address has to be passed in this form
"\x01\x23\x45\x67\x89\xab".
In a php webpage it can be used like this
<code>
function wakeWithPython($host) {
exec('/path/to/your/pythonscript/wol.py '.$host,$output,$retval);
if ($retval == 0) {
echo $host. " is waking up";
} else {
echo $host. " not waken up";
}
}
</code>
Works well for me.
Greetings,
Endo
--- In OpenTurbostation@yahoogroups.com, "Ewald Muessig" <ewald@...>
wrote:
>
> Hi,
>
> I have a TS-101 and want to use it to wake my PC's via the web
browser.
>
> I found a php script using the "socket_create()" function but the
php
> from the TS-101 doesn't support that function.
>
> So I would like to know if any from has a command line tool for the
TS-
> 101 to send a WOL packet.
>
> Or, if any of you know how to enable the "socket_create()" function
on
> the built-in PHP.
>
>
> thanks!
> Ewald
>
Hi,
I have a TS-101 and want to use it to wake my PC's via the web browser.
I found a php script using the "socket_create()" function but the php
from the TS-101 doesn't support that function.
So I would like to know if any from has a command line tool for the TS-
101 to send a WOL packet.
Or, if any of you know how to enable the "socket_create()" function on
the built-in PHP.
thanks!
Ewald
Great stuff Øyvind!
Lots of TS-201 owners would love to install debian. Looks like we're going to be
left out in
the cold by the current Debian efforts for the TS-209/409 efforts, so it's nice
to hear
someone is working on the TS-201.
--- In OpenTurbostation@yahoogroups.com, Øyvind Repvik <repvik@...> wrote:
>
> Another quick status update:
>
> 1. Networking now works 100%
> 2. Selecting boot mode now works, with a failover
>
> Øyvind
>
> Øyvind Repvik wrote:
> > sp4wnito wrote:
> >> Realy good job Øyvind !!!
> > Thanks :D
> >> If you can keep me informed, I realy thank you.
> > Will do ;-)
> > I've been avoiding this project for a few days now, needed to do other
> > things.
> >
> >> If you need help, say me if I can do somethings.
> > If you can help with either of the problems I have described in the
> > attached messages, feel free to shout out.
> >
> > Øyvind
> >> Kind regards.
> >>
> >>
> >>
> >>
> >>
> >> Yahoo! Groups Links
> >>
> >>
> >>
> >>
> >
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> > ------------------------------------------------------------------
------
> >
> > Subject:
> > [U-Boot-Users] RTL-8169/8167 issues
> > From:
> > Øyvind Repvik <repvik@...>
> > Date:
> > Wed, 05 Mar 2008 15:52:54 +0100
> > To:
> > u-boot-users@...
> >
> > To:
> > u-boot-users@...
> > CC:
> > mkomiya@...
> >
> >
> > Hi,
> > I'm trying to get a recent u-boot running properly on a QNAP
> > TurboStation TS-101/TS-201, and I'm having problems with the network
> > driver. When powered on, the device refuses to send anything to the
> > network on the first attempt (eg. first ping fails). The second and
> > subsequent attempts however, works perfectly.
> >
> > With debugging switched on, the driver outputs the expected init output,
> > but on the first attempt appears to loop on "rtl_recv", outputting this
> > hundreds of times. (I don't have a debug log handy right now, but the
> > only difference is that instead of *one* rtl_recv, there are hundreds)
> > On the second attempt, there's only one rtl_recv.
> >
> > Anyone got a clue as to what is going on?
> > I'm using the attached patch to correct endianness issues and add device
> > IDs.
> >
> > Regards,
> > Øyvind Repvik
> >
> >
> > ------------------------------------------------------------------
------
> >
> > ------------------------------------------------------------------
-------
> > 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/
> >
> >
> > ------------------------------------------------------------------
------
> >
> > _______________________________________________
> > U-Boot-Users mailing list
> > U-Boot-Users@...
> > https://lists.sourceforge.net/lists/listinfo/u-boot-users
> >
> >
> > ------------------------------------------------------------------
------
> >
> > Subject:
> > [LinkStation_General] Turbostation TS-101/201 U-boot patches (Buttons
> > and Leds support)
> > From:
> > Øyvind Repvik <repvik@...>
> > Date:
> > Wed, 05 Mar 2008 15:53:01 +0100
> > To:
> > LinkStation_General@yahoogroups.com
> >
> > To:
> > LinkStation_General@yahoogroups.com
> > CC:
> > Guennadi Liakhovetski <g.liakhovetski@...>
> >
> >
> >
> > Hi,
> >
> > I'm trying to achieve something like LNI's u-boot button-support on the
> > Turbostation devices. So far I've gotten to the point where I can press
> > a button to abort the boot countdown, and be dropped to a prompt.
> > But I can't figure out how to keep polling for keypresses while still
> > having a boot countdown.
> >
> > What I want is something like this:
> >
> > The device powers on and loads u-boot. (done, duh..)
> > The blue led is switched on, signalling that button presses are
> > possible. (done)
> > Pressing the USB-Copy button stops the default timeout (done), and
> > starts a new timeout that is reset every time a button is pressed. (need
> > help)
> > The user can then use the USB-Copy button to select mode, and use the
> > powerbutton (must be held two seconds) to execute, or wait for the
> > timeout for the chosen mode to be executed automatically. (need help)
> >
> > The u-boot patch against 1.3.1 is attached. Most (all?) of the relevant
> > code is in common/
> >
> > Regards,
> > Øyvind Repvik
> >
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
>
Mike C wrote:
> I have a TS-100 I bought as a toy recently. The uPnP server software
> in it is pretty weak, and I was wondering if anyone knows what the
> effect might be of trying to install the new TS-101 firmware with
> Twonkyserver on it. I'd hate to brick my new toy.
It won't work. The TS-100 doesn't have enough flash to store the TS-101
firmware, and the webinterface will most likely reject the firmware file
anyway.
Øyvind
I have a TS-100 I bought as a toy recently. The uPnP server software
in it is pretty weak, and I was wondering if anyone knows what the
effect might be of trying to install the new TS-101 firmware with
Twonkyserver on it. I'd hate to brick my new toy.
Mike
linuxrulez007 wrote:
> Hi guys,
>
[snip]
>
> So, my question is: does TS-109 run Debian, Redhat, Suse, Ubuntu,
> anything like that? Has anybody successfully installed it? Thanks for
> the information.
Short answer, no. There is work being done on getting "proper" linux on
the TS-109 and TS-209. foonas-em will hopefully be released soon, and
afaik Martin Michlmayr is working on getting the devices supported by
Debian.
Hang in there, your TS should be a lot more versatile sometime "soon" ;)
Regards,
Øyvind Repvik
>
> Cheers, G.
>
Hi guys,
I have a NSLU2 at home, and it runs really great with Debian! I have a
uniformous file system across several machines with NFS/NIS/autofs,
and it's great that NSLU2 runs a full linux, where I can install new
pacakges and compile software with GCC.
It's only a little slow. Particularly, it has to little main memory.
It would be great to do the same with a TS-109. Appears to have 128MB
memory, while NSLU2 has only 32MB.
I'm not a Windows person, and I don't like to mess with samba, no
ACLs, and I'd like to maintain my proven structure with NFS/NIS.
That's why, I think these embedded Linux distributions with web
interface and centered around Samba are not the right thing for me.
Please let me know if I'm wrong.
So, my question is: does TS-109 run Debian, Redhat, Suse, Ubuntu,
anything like that? Has anybody successfully installed it? Thanks for
the information.
Cheers, G.
I believe the kernel on the TS-109 does not include the Keyspan USB to
serial driver. Is my only recourse to build a compatible kernel on my
own that includes this driver and then do something similar to Tim's
approach to install them?
http://f1.grp.yahoofs.com/v1/MI75R4KEcDQTFVrev2G7LyZDh1di1mrKPEdAlXT5enjSxpTZGZ8\
ufEB4L0cJRYF8OqiuFLR2DhzI49hyhh6MZ5WgPo7W/TS-109_tools_and_modules.tar.bz2
My overall aim is to hook up an X-10 CM11 device to allow me to
control some home devices from the QNAP (rather than running a
separate PC server to do so).
Looks like this is the kernel option I'll need to tackle:
CONFIG_USB_SERIAL_KEYSPAN
Thanks in advance for any advice,
Chris
Brian: Many thanks for a quick and helpful response. I hadn't thought about upgrading libtorrent separately - I had assumed that ipkg would check dependency versions. Anyway - I did an ipkg upgrade and everything's fine now.
Thanks again, Mike
rtorrent and libtorrent work in pair. So if you upgraded rtorrent, you
better upgrade libtorrent too. In the future, we might enforce the
dependency with a minimum libtorrent version.
It's not easy downgrade with ipkg, especially we don't keep old
version in the feed anymore. You'll need to build old version yourself.
-Brian Zhou
--- In OpenTurbostation@yahoogroups.com, "mikesendrove"
<mike.sendrove@...> wrote:
>
> I've recently upgraded rtorrent to the latest version and now can't
> seem to get it to work. I've done (what I think) is the chroot i.e.:
> move rtorrent executable to rtorrent0 and then create a script
> rtorrent which contains:
> chroot /share/HDA_DATA/optware/ rtorrent0
> but still I get
> "rtorrent0: error while loading shared libraries: libtorrent.so.11:
> cannot open shared object file: No such file or directory"
>
> a find for libtorrent.so* shows
>
> ./share/HDA_DATA/optware/opt/lib/libtorrent.so.10.0.8
> ./share/HDA_DATA/optware/opt/lib/libtorrent.so.10
>
> So I'd like to downgrade ipkg if possible - is this necessary or have
> I missed a step out here?
> If so, how on earth do I downgrade rtorrent?
> Thanks for any advice,
> Mike
>
>
>
>
> --- In OpenTurbostation@yahoogroups.com, "Brian Zhou" <b88zhou@> wrote:
> >
> > --- In OpenTurbostation@yahoogroups.com, "faulpelz2006"
> > <faulpelz2006@> wrote:
> > >
> > > there is obviously some problem with this lib on the ts-101.
> > > several packages just don't work like rtorrent.
> > > the buildin torrent client is really painfull, any chance to get
> > > rtorrent running or should i dump my ts-101?
> > > strace of rtorrent is below.
> > >
> >
> > I've been thinking about this problem a bit more. Especially having
> > read http://forum.qnap.com/viewtopic.php?f=85&t=1085
> >
> > On qnap ts109/209, there are also problems with libstdc++ programs.
> > And the current workaround involves running libstdc++ apps in chroot.
> >
> > Optware binaries supposely have rpath all set to /opt/lib. This makes
> > /opt/lib the first directory to be searched for the dynamic linker.
> > But /opt/lib/libstdc++.so is an exception, they are copied from
> > pre-built toolchain, and does not have rpath at all.
> >
> > C++ apps like /opt/bin/rtorrent will load /opt/lib/libstdc++.so, but
> > /opt/lib/libstdc++.so does not necessarily load its dependent shared
> > libs from /opt/lib. If libstdc++.so depends on (libm, libgcc_s, libc),
> > and the version of (libm, libgcc_s, libc) in /usr/lib or /lib are not
> > compatible, this definitely will cause serious problem.
> >
> > For the time being, you can try the chroot workaround.
> >
> > On the optware side, I'll look at
> >
> > 1. A way to inject /opt/bin rpath into the existing
> > /opt/lib/libstdc++.so.6.0.*
> > 2. Or, if we can rebuild that part of the toolchain to set rpath
> > correctly.
> >
> > But don't expect a quick solution.
> >
> > -Brian Zhou
> >
>
I've recently upgraded rtorrent to the latest version and now can't
seem to get it to work. I've done (what I think) is the chroot i.e.:
move rtorrent executable to rtorrent0 and then create a script
rtorrent which contains:
chroot /share/HDA_DATA/optware/ rtorrent0
but still I get
"rtorrent0: error while loading shared libraries: libtorrent.so.11:
cannot open shared object file: No such file or directory"
a find for libtorrent.so* shows
./share/HDA_DATA/optware/opt/lib/libtorrent.so.10.0.8
./share/HDA_DATA/optware/opt/lib/libtorrent.so.10
So I'd like to downgrade ipkg if possible - is this necessary or have
I missed a step out here?
If so, how on earth do I downgrade rtorrent?
Thanks for any advice,
Mike
--- In OpenTurbostation@yahoogroups.com, "Brian Zhou" <b88zhou@...> wrote:
>
> --- In OpenTurbostation@yahoogroups.com, "faulpelz2006"
> <faulpelz2006@> wrote:
> >
> > there is obviously some problem with this lib on the ts-101.
> > several packages just don't work like rtorrent.
> > the buildin torrent client is really painfull, any chance to get
> > rtorrent running or should i dump my ts-101?
> > strace of rtorrent is below.
> >
>
> I've been thinking about this problem a bit more. Especially having
> read http://forum.qnap.com/viewtopic.php?f=85&t=1085
>
> On qnap ts109/209, there are also problems with libstdc++ programs.
> And the current workaround involves running libstdc++ apps in chroot.
>
> Optware binaries supposely have rpath all set to /opt/lib. This makes
> /opt/lib the first directory to be searched for the dynamic linker.
> But /opt/lib/libstdc++.so is an exception, they are copied from
> pre-built toolchain, and does not have rpath at all.
>
> C++ apps like /opt/bin/rtorrent will load /opt/lib/libstdc++.so, but
> /opt/lib/libstdc++.so does not necessarily load its dependent shared
> libs from /opt/lib. If libstdc++.so depends on (libm, libgcc_s, libc),
> and the version of (libm, libgcc_s, libc) in /usr/lib or /lib are not
> compatible, this definitely will cause serious problem.
>
> For the time being, you can try the chroot workaround.
>
> On the optware side, I'll look at
>
> 1. A way to inject /opt/bin rpath into the existing
> /opt/lib/libstdc++.so.6.0.*
> 2. Or, if we can rebuild that part of the toolchain to set rpath
> correctly.
>
> But don't expect a quick solution.
>
> -Brian Zhou
>
Another quick status update:
1. Networking now works 100%
2. Selecting boot mode now works, with a failover
Øyvind
Øyvind Repvik wrote:
> sp4wnito wrote:
>> Realy good job Øyvind !!!
> Thanks :D
>> If you can keep me informed, I realy thank you.
> Will do ;-)
> I've been avoiding this project for a few days now, needed to do other
> things.
>
>> If you need help, say me if I can do somethings.
> If you can help with either of the problems I have described in the
> attached messages, feel free to shout out.
>
> Øyvind
>> Kind regards.
>>
>>
>>
>>
>>
>> Yahoo! Groups Links
>>
>>
>>
>>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
> ------------------------------------------------------------------------
>
> Subject:
> [U-Boot-Users] RTL-8169/8167 issues
> From:
> Øyvind Repvik <repvik@...>
> Date:
> Wed, 05 Mar 2008 15:52:54 +0100
> To:
> u-boot-users@...
>
> To:
> u-boot-users@...
> CC:
> mkomiya@...
>
>
> Hi,
> I'm trying to get a recent u-boot running properly on a QNAP
> TurboStation TS-101/TS-201, and I'm having problems with the network
> driver. When powered on, the device refuses to send anything to the
> network on the first attempt (eg. first ping fails). The second and
> subsequent attempts however, works perfectly.
>
> With debugging switched on, the driver outputs the expected init output,
> but on the first attempt appears to loop on "rtl_recv", outputting this
> hundreds of times. (I don't have a debug log handy right now, but the
> only difference is that instead of *one* rtl_recv, there are hundreds)
> On the second attempt, there's only one rtl_recv.
>
> Anyone got a clue as to what is going on?
> I'm using the attached patch to correct endianness issues and add device
> IDs.
>
> Regards,
> Øyvind Repvik
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> 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/
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> U-Boot-Users mailing list
> U-Boot-Users@...
> https://lists.sourceforge.net/lists/listinfo/u-boot-users
>
>
> ------------------------------------------------------------------------
>
> Subject:
> [LinkStation_General] Turbostation TS-101/201 U-boot patches (Buttons
> and Leds support)
> From:
> Øyvind Repvik <repvik@...>
> Date:
> Wed, 05 Mar 2008 15:53:01 +0100
> To:
> LinkStation_General@yahoogroups.com
>
> To:
> LinkStation_General@yahoogroups.com
> CC:
> Guennadi Liakhovetski <g.liakhovetski@...>
>
>
>
> Hi,
>
> I'm trying to achieve something like LNI's u-boot button-support on the
> Turbostation devices. So far I've gotten to the point where I can press
> a button to abort the boot countdown, and be dropped to a prompt.
> But I can't figure out how to keep polling for keypresses while still
> having a boot countdown.
>
> What I want is something like this:
>
> The device powers on and loads u-boot. (done, duh..)
> The blue led is switched on, signalling that button presses are
> possible. (done)
> Pressing the USB-Copy button stops the default timeout (done), and
> starts a new timeout that is reset every time a button is pressed. (need
> help)
> The user can then use the USB-Copy button to select mode, and use the
> powerbutton (must be held two seconds) to execute, or wait for the
> timeout for the chosen mode to be executed automatically. (need help)
>
> The u-boot patch against 1.3.1 is attached. Most (all?) of the relevant
> code is in common/
>
> Regards,
> Øyvind Repvik
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
Øyvind Repvik wrote:
> sp4wnito wrote:
>> Realy good job Øyvind !!!
> Thanks :D
>> If you can keep me informed, I realy thank you.
> Will do ;-)
First status-update :)
U-boot can now discern between the three buttons. I'm writing functions
to do the following:
USB-Copy-button, pause boot countdown and enter button-controlled
command mode.
After that, the usbcopybutton is used to select boot mode
(The reason is that the usbcopybutton is the only "instant" button, the
other two must be held down two seconds to generate a character).
Available bootmodes can be boot from flash (foonas-em), boot from hdd
(any distro you'd like, gentoo/debian/foonas/etc), boot from tftp.
The powerbutton is used to switch between serial and netconsole output
The reset button is used to reset the environment to default.
I hope to finish this project tonight (although networking is still broken)
You had serial access, right? Could you do a "printenv" in u-boot and
give me the factory u-boot environment?
(Need this to write a guide)
Regards,
Øyvind Repvik
sp4wnito wrote:
> Realy good job Øyvind !!!
Thanks :D
>
> If you can keep me informed, I realy thank you.
Will do ;-)
I've been avoiding this project for a few days now, needed to do other
things.
> If you need help, say me if I can do somethings.
If you can help with either of the problems I have described in the
attached messages, feel free to shout out.
Øyvind
>
> Kind regards.
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
Hi,
I'm trying to get a recent u-boot running properly on a QNAP
TurboStation TS-101/TS-201, and I'm having problems with the network
driver. When powered on, the device refuses to send anything to the
network on the first attempt (eg. first ping fails). The second and
subsequent attempts however, works perfectly.
With debugging switched on, the driver outputs the expected init output,
but on the first attempt appears to loop on "rtl_recv", outputting this
hundreds of times. (I don't have a debug log handy right now, but the
only difference is that instead of *one* rtl_recv, there are hundreds)
On the second attempt, there's only one rtl_recv.
Anyone got a clue as to what is going on?
I'm using the attached patch to correct endianness issues and add device
IDs.
Regards,
Øyvind Repvik
-------------------------------------------------------------------------
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/
Hi,
I'm trying to achieve something like LNI's u-boot button-support on the
Turbostation devices. So far I've gotten to the point where I can press
a button to abort the boot countdown, and be dropped to a prompt.
But I can't figure out how to keep polling for keypresses while still
having a boot countdown.
What I want is something like this:
The device powers on and loads u-boot. (done, duh..)
The blue led is switched on, signalling that button presses are
possible. (done)
Pressing the USB-Copy button stops the default timeout (done), and
starts a new timeout that is reset every time a button is pressed. (need
help)
The user can then use the USB-Copy button to select mode, and use the
powerbutton (must be held two seconds) to execute, or wait for the
timeout for the chosen mode to be executed automatically. (need help)
The u-boot patch against 1.3.1 is attached. Most (all?) of the relevant
code is in common/
Regards,
Øyvind Repvik
Yahoo! Groups Links
diff -Nru u-boot-1.3.1.orig/Makefile u-boot-1.3.1.ts/Makefile
--- u-boot-1.3.1.orig/Makefile 2007-12-06 10:21:19.000000000 +0100
+++ u-boot-1.3.1.ts/Makefile 2008-02-26 11:18:46.000000000 +0100
@@ -1432,6 +1432,9 @@
PN62_config: unconfig
@$(MKCONFIG) $(@:_config=) ppc mpc824x pn62
+tsppc_config: unconfig
+ @$(MKCONFIG) $(@:_config=) ppc mpc824x tsppc
+
Sandpoint8240_config: unconfig
@$(MKCONFIG) $(@:_config=) ppc mpc824x sandpoint
diff -Nru u-boot-1.3.1.orig/board/tsppc/Makefile
u-boot-1.3.1.ts/board/tsppc/Makefile
--- u-boot-1.3.1.orig/board/tsppc/Makefile 1970-01-01 01:00:00.000000000 +0100
+++ u-boot-1.3.1.ts/board/tsppc/Makefile 2008-02-25 22:59:54.000000000 +0100
@@ -0,0 +1,40 @@
+#
+# (C) Copyright 2000
+# Wolfgang Denk, DENX Software Engineering, wd@....
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+
+include $(TOPDIR)/config.mk
+
+LIB = lib$(BOARD).a
+
+OBJS = $(BOARD).o ide.o
+
+$(LIB): .depend $(OBJS)
+ $(AR) crv $@ $(OBJS)
+
+#########################################################################
+
+.depend: Makefile $(OBJS:.o=.c)
+ $(CC) -M $(CFLAGS) $(OBJS:.o=.c) > $@
+
+sinclude .depend
+
+#########################################################################
diff -Nru u-boot-1.3.1.orig/board/tsppc/README
u-boot-1.3.1.ts/board/tsppc/README
--- u-boot-1.3.1.orig/board/tsppc/README 1970-01-01 01:00:00.000000000 +0100
+++ u-boot-1.3.1.ts/board/tsppc/README 2008-02-23 03:42:00.000000000 +0100
@@ -0,0 +1,10 @@
+*This port of U-Boot will run on a QNAP TS-101/TS-201 NAS*
+Andrew Luyten (u-boot@...)
+
+Adapted from a Linkstation port by Mihai Georgian
+http://http://www.linuxnotincluded.org.uk/
+
+Adapted from Motorola Sandpoint 3 development system equipped with
+a Unity X4 PPMC card (MPC8240 CPU) only. It is a snapshot of work
+in progress and far from being completed.
+Thomas Koeller
diff -Nru u-boot-1.3.1.orig/board/tsppc/config.mk
u-boot-1.3.1.ts/board/tsppc/config.mk
--- u-boot-1.3.1.orig/board/tsppc/config.mk 1970-01-01 01:00:00.000000000 +0100
+++ u-boot-1.3.1.ts/board/tsppc/config.mk 2008-02-26 00:00:00.000000000 +0100
@@ -0,0 +1,34 @@
+#
+# (C) Copyright 2000, 2001
+# Wolfgang Denk, DENX Software Engineering, wd@....
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+# Valid values for TEXT_BASE are:
+#
+# Standard configuration
+# 0xFFF60000 chain boot from flash
+#
+# Memory configuration
+# 0x00100000
+
+
+TEXT_BASE = 0xFFF60000
+
+PLATFORM_CPPFLAGS += -DTEXT_BASE=$(TEXT_BASE)
diff -Nru u-boot-1.3.1.orig/board/tsppc/ide.c u-boot-1.3.1.ts/board/tsppc/ide.c
--- u-boot-1.3.1.orig/board/tsppc/ide.c 1970-01-01 01:00:00.000000000 +0100
+++ u-boot-1.3.1.ts/board/tsppc/ide.c 2008-02-25 17:44:01.000000000 +0100
@@ -0,0 +1,67 @@
+/*
+ * (C) Copyright 2000
+ * Wolfgang Denk, DENX Software Engineering, wd@....
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+ #include <common.h>
+
+#ifdef CONFIG_CMD_IDE
+#include <ata.h>
+#include <ide.h>
+#include <pci.h>
+
+extern ulong ide_bus_offset[CFG_IDE_MAXBUS];
+extern struct pci_controller hose;
+
+int ide_preinit (void)
+{
+ int status;
+ pci_dev_t devbusfn;
+ int l;
+
+ status = 1;
+ for (l = 0; l < CFG_IDE_MAXBUS; l++) {
+ ide_bus_offset[l] = -ATA_STATUS;
+ }
+ devbusfn = pci_find_device (0x1095, 0x3512, 0);
+
+ if (devbusfn != -1) {
+
+ status = 0;
+
+ pci_read_config_dword (devbusfn, PCI_BASE_ADDRESS_0,
+ (u32 *) &ide_bus_offset[0]);
+ ide_bus_offset[0] &= 0xfffffffe;
+ ide_bus_offset[0] = pci_hose_bus_to_phys(&hose,
+ ide_bus_offset[0] & 0xfffffffe,
+ PCI_REGION_IO);
+
+ pci_read_config_dword (devbusfn, PCI_BASE_ADDRESS_2,
+ (u32 *) &ide_bus_offset[1]);
+ ide_bus_offset[1] &= 0xfffffffe;
+ ide_bus_offset[1] = pci_hose_bus_to_phys(&hose,
+ ide_bus_offset[1] & 0xfffffffe,
+ PCI_REGION_IO);
+ }
+ return (status);
+}
+
+#endif /* of CONFIG_CMDS_IDE */
diff -Nru u-boot-1.3.1.orig/board/tsppc/tsppc.c
u-boot-1.3.1.ts/board/tsppc/tsppc.c
--- u-boot-1.3.1.orig/board/tsppc/tsppc.c 1970-01-01 01:00:00.000000000 +0100
+++ u-boot-1.3.1.ts/board/tsppc/tsppc.c 2008-02-27 06:06:35.000000000 +0100
@@ -0,0 +1,139 @@
+/*
+ * Copyright (C) 2006 Andrew Luyten <u-boot@...>
+ *
+ * Copyright (C) 2000
+ * Rob Taylor, Flying Pig Systems. robt@....
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ */
+
+#include <common.h>
+#include <mpc824x.h>
+#include <pci.h>
+#include <asm/io.h>
+#include <tsppcpic.h>
+
+extern void tsppc_init_PIC (void);
+extern void tsppc_sendchar (unsigned char data);
+
+int checkboard (void)
+{
+ ulong busfreq = get_bus_freq(0);
+ char buf[32];
+ printf("Board: QNAP TS-101/TS-201 local bus at %s MHz\n", strmhz(buf,
busfreq));
+ return 0;
+}
+
+long int initdram (int board_type)
+{
+ long size;
+ long new_bank0_end;
+ long mear1;
+ long emear1;
+
+ size = get_ram_size(CFG_SDRAM_BASE, CFG_MAX_RAM_SIZE);
+
+ new_bank0_end = size - 1;
+ mear1 = mpc824x_mpc107_getreg(MEAR1);
+ emear1 = mpc824x_mpc107_getreg(EMEAR1);
+ mear1 = (mear1 & 0xFFFFFF00) |
+ ((new_bank0_end & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT);
+ emear1 = (emear1 & 0xFFFFFF00) |
+ ((new_bank0_end & MICR_ADDR_MASK) >> MICR_EADDR_SHIFT);
+ mpc824x_mpc107_setreg(MEAR1, mear1);
+ mpc824x_mpc107_setreg(EMEAR1, emear1);
+
+ return (size);
+}
+
+/*
+ * Initialize PCI Devices, report devices found.
+ */
+#ifndef CONFIG_PCI_PNP
+
+static struct pci_config_table pci_qnap_config_table[] = {
+ /* vendor, device, class */
+ /* bus, dev, func */
+
+ { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
+ PCI_ANY_ID, 0x0f, 0, /* RTL8110SC or Intel 82540EM */
+ /* Gigabit ethernet controller */
+ pci_cfgfunc_config_device, { PCI_ETH_IOADDR,
+ PCI_ETH_MEMADDR,
+ PCI_COMMAND_IO |
+ PCI_COMMAND_MEMORY |
+ PCI_COMMAND_MASTER }},
+
+ { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
+ PCI_ANY_ID, 0x0d, 0, /* SII3512 */
+ /* SATA controller */
+ pci_cfgfunc_config_device, { PCI_IDE_IOADDR,
+ PCI_IDE_MEMADDR,
+ PCI_COMMAND_IO |
+ PCI_COMMAND_MEMORY |
+ PCI_COMMAND_MASTER }},
+
+ { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
+ PCI_ANY_ID, 0x0e, 0, /* D720101 USB controller, 1st USB 1.1 */
+ pci_cfgfunc_config_device, { PCI_USB0_IOADDR,
+ PCI_USB0_MEMADDR,
+ PCI_COMMAND_MEMORY |
+ PCI_COMMAND_MASTER }},
+ { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
+ PCI_ANY_ID, 0x0e, 1, /* D720101 USB controller, 2nd USB 1.1 */
+ pci_cfgfunc_config_device, { PCI_USB1_IOADDR,
+ PCI_USB1_MEMADDR,
+ PCI_COMMAND_MEMORY |
+ PCI_COMMAND_MASTER }},
+ { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
+ PCI_ANY_ID, 0x0e, 2, /* D720101 USB controller, USB 2.0 */
+ pci_cfgfunc_config_device, { PCI_USB2_IOADDR,
+ PCI_USB2_MEMADDR,
+ PCI_COMMAND_MEMORY |
+ PCI_COMMAND_MASTER }},
+ { }
+};
+#endif
+
+struct pci_controller hose = {
+#ifndef CONFIG_PCI_PNP
+ config_table: pci_qnap_config_table,
+#endif
+};
+
+void pci_init_board(void)
+{
+ pci_mpc824x_init(&hose);
+}
+
+int board_early_init_f(void)
+{
+ *(volatile u8*)(0xfc004511) = 1;
+ NS16550_init(CFG_NS16550_COM2, CFG_NS16550_CLK / 16 / 19200);
+ tsppc_sendchar(USBON);
+ tsppc_sendchar(STATUSOFF);
+ return 0;
+}
+
+int board_late_init(void)
+{
+ NS16550_reinit(CFG_NS16550_COM2, CFG_NS16550_CLK / 16 / 19200);
+ return 0;
+}
\ No newline at end of file
diff -Nru u-boot-1.3.1.orig/board/tsppc/u-boot.lds
u-boot-1.3.1.ts/board/tsppc/u-boot.lds
--- u-boot-1.3.1.orig/board/tsppc/u-boot.lds 1970-01-01 01:00:00.000000000 +0100
+++ u-boot-1.3.1.ts/board/tsppc/u-boot.lds 2008-02-23 03:42:01.000000000 +0100
@@ -0,0 +1,136 @@
+/*
+ * (C) Copyright 2001
+ * Wolfgang Denk, DENX Software Engineering, wd@....
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+OUTPUT_ARCH(powerpc)
+SEARCH_DIR(/lib); SEARCH_DIR(/usr/lib); SEARCH_DIR(/usr/local/lib);
SEARCH_DIR(/usr/local/powerpc-any-elf/lib);
+/* Do we need any of these for elf?
+ __DYNAMIC = 0; */
+SECTIONS
+{
+ /* Read-only sections, merged into text segment: */
+ . = + SIZEOF_HEADERS;
+ .interp : { *(.interp) }
+ .hash : { *(.hash) }
+ .dynsym : { *(.dynsym) }
+ .dynstr : { *(.dynstr) }
+ .rel.text : { *(.rel.text) }
+ .rela.text : { *(.rela.text) }
+ .rel.data : { *(.rel.data) }
+ .rela.data : { *(.rela.data) }
+ .rel.rodata : { *(.rel.rodata) }
+ .rela.rodata : { *(.rela.rodata) }
+ .rel.got : { *(.rel.got) }
+ .rela.got : { *(.rela.got) }
+ .rel.ctors : { *(.rel.ctors) }
+ .rela.ctors : { *(.rela.ctors) }
+ .rel.dtors : { *(.rel.dtors) }
+ .rela.dtors : { *(.rela.dtors) }
+ .rel.bss : { *(.rel.bss) }
+ .rela.bss : { *(.rela.bss) }
+ .rel.plt : { *(.rel.plt) }
+ .rela.plt : { *(.rela.plt) }
+ .init : { *(.init) }
+ .plt : { *(.plt) }
+ .text :
+ {
+ cpu/mpc824x/start.o (.text)
+ lib_ppc/board.o (.text)
+ lib_ppc/ppcstring.o (.text)
+ lib_generic/vsprintf.o (.text)
+ lib_generic/crc32.o (.text)
+ lib_generic/zlib.o (.text)
+
+ . = DEFINED(env_offset) ? env_offset : .;
+ common/environment.o (.text)
+
+ *(.text)
+
+ *(.fixup)
+ *(.got1)
+ . = ALIGN(16);
+ *(.rodata)
+ *(.rodata1)
+ *(.rodata.str1.4)
+ *(.eh_frame)
+ }
+ .fini : { *(.fini) } =0
+ .ctors : { *(.ctors) }
+ .dtors : { *(.dtors) }
+
+ /* Read-write section, merged into data segment: */
+ . = (. + 0x0FFF) & 0xFFFFF000;
+ _erotext = .;
+ PROVIDE (erotext = .);
+ .reloc :
+ {
+ *(.got)
+ _GOT2_TABLE_ = .;
+ *(.got2)
+ _FIXUP_TABLE_ = .;
+ *(.fixup)
+ }
+ __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >> 2;
+ __fixup_entries = (. - _FIXUP_TABLE_) >> 2;
+
+ .data :
+ {
+ *(.data)
+ *(.data1)
+ *(.sdata)
+ *(.sdata2)
+ *(.dynamic)
+ CONSTRUCTORS
+ }
+ _edata = .;
+ PROVIDE (edata = .);
+
+ . = .;
+ __u_boot_cmd_start = .;
+ .u_boot_cmd : { *(.u_boot_cmd) }
+ __u_boot_cmd_end = .;
+
+
+ . = .;
+ __start___ex_table = .;
+ __ex_table : { *(__ex_table) }
+ __stop___ex_table = .;
+
+ . = ALIGN(4096);
+ __init_begin = .;
+ .text.init : { *(.text.init) }
+ .data.init : { *(.data.init) }
+ . = ALIGN(4096);
+ __init_end = .;
+
+ __bss_start = .;
+ .bss :
+ {
+ *(.sbss) *(.scommon)
+ *(.dynbss)
+ *(.bss)
+ *(COMMON)
+ }
+
+ _end = . ;
+ PROVIDE (end = .);
+}
diff -Nru u-boot-1.3.1.orig/common/Makefile u-boot-1.3.1.ts/common/Makefile
--- u-boot-1.3.1.orig/common/Makefile 2007-12-06 10:21:19.000000000 +0100
+++ u-boot-1.3.1.ts/common/Makefile 2008-02-26 20:48:52.000000000 +0100
@@ -86,6 +86,9 @@
COBJS-y += cmd_sata.o
COBJS-$(CONFIG_CMD_SCSI) += cmd_scsi.o
COBJS-$(CONFIG_CMD_SPI) += cmd_spi.o
+ifeq ($(BOARD),tsppc)
+COBJS-y += cmd_tsppc.o
+endif
COBJS-$(CONFIG_CMD_UNIVERSE) += cmd_universe.o
COBJS-$(CONFIG_CMD_USB) += cmd_usb.o
COBJS-y += cmd_vfd.o
@@ -123,6 +126,9 @@
COBJS-y += soft_spi.o
COBJS-y += spartan2.o
COBJS-y += spartan3.o
+ifeq ($(BOARD),tsppc)
+COBJS-y += tsppcpic.o
+endif
COBJS-y += usb.o
COBJS-y += usb_kbd.o
COBJS-y += usb_storage.o
diff -Nru u-boot-1.3.1.orig/common/cmd_tsppc.c
u-boot-1.3.1.ts/common/cmd_tsppc.c
--- u-boot-1.3.1.orig/common/cmd_tsppc.c 1970-01-01 01:00:00.000000000 +0100
+++ u-boot-1.3.1.ts/common/cmd_tsppc.c 2008-02-26 20:44:49.000000000 +0100
@@ -0,0 +1,180 @@
+/*
+ * (C) Copyright 2008
+ * Øyvind Repvik <nail@...>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+/*
+ * Boot support
+ */
+#include <common.h>
+#include <command.h>
+#include <devices.h>
+#include <tsppcpic.h>
+#include <asm/io.h>
+
+extern void tsppc_sendchar(char data);
+
+extern void _do_tsppc_buzzer (void);
+extern void _do_tsppc_leds (void);
+
+int do_tsppc_buzzer (cmd_tbl_t * cmd, int flag, int argc, char *argv[])
+{
+ if (!(argc == 2)) {
+ printf("Usage:\n%s\n",cmd->usage);
+ return 1;
+ }
+ if (strcmp(argv[1], "short") == 0) {
+ tsppc_sendchar(BUZZER_SHORT);
+ return 0;
+ }
+ if (strcmp(argv[1], "long") == 0) {
+ tsppc_sendchar(BUZZER_LONG);
+ return 0;
+ }
+ printf("Usage\n%s\n",cmd->usage);
+ return 1;
+}
+
+int do_tsppc_leds (cmd_tbl_t * cmd, int flag, int argc, char *argv[])
+{
+ int type = 0;
+ int color = 0;
+ if ((argc < 3) || (argc > 4))
+ {
+ printf("Usage:\n%s\n",cmd->usage);
+ return 1;
+ }
+ if (strcmp(argv[2], "off") == 0)
+ type = 1;
+ if (strcmp(argv[2], "on") == 0)
+ type = 2;
+ if (strcmp(argv[2], "blink") == 0)
+ type = 4;
+ if (strcmp(argv[2], "alt") == 0)
+ type = 8;
+ if (type == 0)
+ {
+ printf("Usage:\n%s\n",cmd->usage);
+ return 1;
+ }
+ if (strcmp(argv[1], "usb") == 0)
+ {
+ switch (type)
+ {
+ case 1:
+ tsppc_sendchar(USBOFF);
+ break;
+ case 2:
+ tsppc_sendchar(USBON);
+ break;
+ case 4:
+ tsppc_sendchar(USBBLINK);
+ break;
+ default:
+ break;
+ }
+ return 0;
+ }
+ if (strcmp(argv[1], "status") == 0)
+ {
+ if (type == 8)
+ {
+ tsppc_sendchar(STATUSALT);
+ return 0;
+ }
+ if (strcmp(argv[3],"red") == 0)
+ color = 1;
+ if (strcmp(argv[3],"green") == 0)
+ color = 2;
+ if (color == 0)
+ {
+ printf("Usage:\n%s\n",cmd->usage);
+ return 1;
+ }
+ if (color == 1)
+ {
+ switch (type)
+ {
+ case 1:
+ tsppc_sendchar(STATUSOFF);
+ break;
+ case 2:
+ tsppc_sendchar(STATUSRD);
+ break;
+ case 4:
+ tsppc_sendchar(STATUSRDBLINK);
+ break;
+ default:
+ break;
+ }
+ return 0;
+ }
+ if (color == 2)
+ {
+ switch (type)
+ {
+ case 1:
+ tsppc_sendchar(STATUSOFF);
+ break;
+ case 2:
+ tsppc_sendchar(STATUSGRN);
+ break;
+ case 4:
+ tsppc_sendchar(STATUSGRNBLINK);
+ break;
+ default:
+ break;
+ }
+ return 0;
+ }
+ }
+ if (strcmp(argv[1], "power") == 0)
+ {
+ switch (type)
+ {
+ case 1:
+ tsppc_sendchar(PWROFF);
+ break;
+ case 2:
+ tsppc_sendchar(PWRON);
+ break;
+ case 4:
+ tsppc_sendchar(PWRBLINK);
+ break;
+ default:
+ break;
+ }
+ return 0;
+ }
+ printf("Usage:\n%s\n",cmd->usage);
+ return 1;
+}
+
+/***************************************************/
+
+U_BOOT_CMD(
+ buzzer, 2, 1, do_tsppc_buzzer,
+ "buzzer - output sound on the tsppc buzzer\n",
+ "Usage: buzzer [short|long]"
+);
+
+U_BOOT_CMD(
+ leds, 4, 1, do_tsppc_leds,
+ "leds - change led status\n",
+ "Usage: leds [usb|power|status] [on|off|blink] <red|green>\nred/green only
applicable for status led"
+);
diff -Nru u-boot-1.3.1.orig/common/main.c u-boot-1.3.1.ts/common/main.c
--- u-boot-1.3.1.orig/common/main.c 2007-12-06 10:21:19.000000000 +0100
+++ u-boot-1.3.1.ts/common/main.c 2008-02-27 13:34:14.000000000 +0100
@@ -55,7 +55,8 @@
#endif
extern int do_bootd (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
-
+extern int tsppc_uartpoll(void);
+extern int tsppc_cmdpoll(void);
#define MAX_DELAY_STOP_STR 32
@@ -159,6 +160,7 @@
* when catch up.
*/
while (!abort && get_ticks() <= etime) {
+ abort = tsppc_uartpoll();
for (i = 0; i < sizeof(delaykey) / sizeof(delaykey[0]); i ++) {
if (delaykey[i].len > 0 &&
presskey_len >= delaykey[i].len &&
@@ -458,7 +460,10 @@
# endif
}
#endif
-
+ if (tsppc_cmdpoll() >= 0)
+ {
+ printf("Debug: Commands finalized, time to boot\n");
+ }
if (len == -1)
puts ("<INTERRUPT>\n");
else
diff -Nru u-boot-1.3.1.orig/common/tsppcpic.c u-boot-1.3.1.ts/common/tsppcpic.c
--- u-boot-1.3.1.orig/common/tsppcpic.c 1970-01-01 01:00:00.000000000 +0100
+++ u-boot-1.3.1.ts/common/tsppcpic.c 2008-02-27 23:30:10.000000000 +0100
@@ -0,0 +1,35 @@
+#include <asm/io.h>
+#include <common.h>
+#include <tsppcpic.h>
+
+int tsppc_testchar(void)
+{
+ return (NS16550_tstc((NS16550_t)CFG_NS16550_COM2));
+}
+
+char tsppc_getchar(void)
+{
+ return (NS16550_getc((NS16550_t)CFG_NS16550_COM2));
+}
+
+void tsppc_sendchar(unsigned char data)
+{
+ out_8((volatile u8*)CFG_NS16550_COM2, data);
+}
+
+void tsppc_buttonloop();
+{
+
+}
+
+int tsppc_uartpoll(void)
+{
+ if (tsppc_testchar() && ((int)tsppc_getchar() == 104))
+ {
+ printf("\nReset button pressed.\n");
+ tsppc_sendchar(USBBLINK);
+ tsppc_buttonloop();
+ return 1;
+ }
+ return 0;
+}
diff -Nru u-boot-1.3.1.orig/cpu/mpc824x/cpu.c u-boot-1.3.1.ts/cpu/mpc824x/cpu.c
--- u-boot-1.3.1.orig/cpu/mpc824x/cpu.c 2007-12-06 10:21:19.000000000 +0100
+++ u-boot-1.3.1.ts/cpu/mpc824x/cpu.c 2008-02-23 03:42:00.000000000 +0100
@@ -44,7 +44,11 @@
break;
case CPU_TYPE_8245:
+#ifdef CONFIG_MPC8241
+ puts ("MPC8241"); /* impossible to distinguish using chip registers */
+#else
puts ("MPC8245");
+#endif
break;
default:
diff -Nru u-boot-1.3.1.orig/drivers/net/rtl8169.c
u-boot-1.3.1.ts/drivers/net/rtl8169.c
--- u-boot-1.3.1.orig/drivers/net/rtl8169.c 2007-12-06 10:21:19.000000000 +0100
+++ u-boot-1.3.1.ts/drivers/net/rtl8169.c 2008-02-24 17:48:40.000000000 +0100
@@ -48,7 +48,10 @@
*
* Indent Options: indent -kr -i8
***************************************************************************/
-
+/*
+ * 26 August 2006 Mihai Georgian <u-boot@...>
+ * Modified to use le32_to_cpu and cpu_to_le32 properly
+ */
#include <common.h>
#include <malloc.h>
#include <net.h>
@@ -68,12 +71,7 @@
static u32 ioaddr;
/* Condensed operations for readability. */
-#define virt_to_le32desc(addr) cpu_to_le32(virt_to_bus(addr))
-#define le32desc_to_virt(addr) bus_to_virt(le32_to_cpu(addr))
-
#define currticks() get_timer(0)
-#define bus_to_phys(a) pci_mem_to_phys((pci_dev_t)dev->priv, a)
-#define phys_to_bus(a) pci_phys_to_mem((pci_dev_t)dev->priv, a)
/* media options */
#define MAX_UNITS 8
@@ -102,7 +100,7 @@
#define RTL_MIN_IO_SIZE 0x80
#define TX_TIMEOUT (6*HZ)
-/* write/read MMIO register */
+/* write/read MMIO register. Notice: {read,write}[wl] do the necessary swapping
*/
#define RTL_W8(reg, val8) writeb ((val8), ioaddr + (reg))
#define RTL_W16(reg, val16) writew ((val16), ioaddr + (reg))
#define RTL_W32(reg, val32) writel ((val32), ioaddr + (reg))
@@ -218,7 +216,7 @@
PHY_Enable_Auto_Nego = 0x1000,
/* PHY_STAT_REG = 1; */
- PHY_Auto_Neco_Comp = 0x0020,
+ PHY_Auto_Nego_Comp = 0x0020,
/* PHY_AUTO_NEGO_REG = 4; */
PHY_Cap_10_Half = 0x0020,
@@ -249,6 +247,16 @@
} rtl_chip_info[] = {
{"RTL-8169", 0x00, 0xff7e1880,},
{"RTL-8169", 0x04, 0xff7e1880,},
+ {"RTL8169", 0x00, 0xff7e1880,},
+ {"RTL8169s/8110s", 0x02, 0xff7e1880,},
+ {"RTL8169s/8110s", 0x04, 0xff7e1880,},
+ {"RTL8169sb/8110sb", 0x10, 0xff7e1880,},
+ {"RTL8169sc/8110sc", 0x18, 0xff7e1880,},
+ {"RTL8168b/8111sb", 0x30, 0xff7e1880,},
+ {"RTL8168b/8111sb", 0x38, 0xff7e1880,},
+ {"RTL8101e", 0x34, 0xff7e1880,},
+ {"RTL8100e", 0x32, 0xff7e1880,},
+
};
enum _DescStatusBit {
@@ -315,7 +323,7 @@
static struct pci_device_id supported[] = {
{PCI_VENDOR_ID_REALTEK, 0x8169},
- {}
+ {PCI_VENDOR_ID_REALTEK, 0x8167}
};
void mdio_write(int RegAddr, int value)
@@ -413,23 +421,23 @@
ioaddr = dev->iobase;
cur_rx = tpc->cur_rx;
- if ((tpc->RxDescArray[cur_rx].status & OWNbit) == 0) {
- if (!(tpc->RxDescArray[cur_rx].status & RxRES)) {
+ if ((le32_to_cpu(tpc->RxDescArray[cur_rx].status) & OWNbit) == 0) {
+ if (!(le32_to_cpu(tpc->RxDescArray[cur_rx].status) & RxRES)) {
unsigned char rxdata[RX_BUF_LEN];
- length = (int) (tpc->RxDescArray[cur_rx].
- status & 0x00001FFF) - 4;
+ length = (int) (le32_to_cpu(tpc->RxDescArray[cur_rx].
+ status) & 0x00001FFF) - 4;
memcpy(rxdata, tpc->RxBufferRing[cur_rx], length);
NetReceive(rxdata, length);
if (cur_rx == NUM_RX_DESC - 1)
tpc->RxDescArray[cur_rx].status =
- (OWNbit | EORbit) + RX_BUF_SIZE;
+ cpu_to_le32((OWNbit | EORbit) + RX_BUF_SIZE);
else
tpc->RxDescArray[cur_rx].status =
- OWNbit + RX_BUF_SIZE;
+ cpu_to_le32(OWNbit + RX_BUF_SIZE);
tpc->RxDescArray[cur_rx].buf_addr =
- virt_to_bus(tpc->RxBufferRing[cur_rx]);
+ cpu_to_le32(tpc->RxBufferRing[cur_rx]);
} else {
puts("Error Rx");
}
@@ -454,6 +462,7 @@
u8 *ptxb;
int entry = tpc->cur_tx % NUM_TX_DESC;
u32 len = length;
+ int ret;
#ifdef DEBUG_RTL8169_TX
int stime = currticks();
@@ -470,34 +479,38 @@
while (len < ETH_ZLEN)
ptxb[len++] = '\0';
- tpc->TxDescArray[entry].buf_addr = virt_to_bus(ptxb);
+ tpc->TxDescArray[entry].buf_addr = cpu_to_le32(ptxb);
if (entry != (NUM_TX_DESC - 1)) {
tpc->TxDescArray[entry].status =
- (OWNbit | FSbit | LSbit) | ((len > ETH_ZLEN) ?
- len : ETH_ZLEN);
+ cpu_to_le32((OWNbit | FSbit | LSbit) |
+ ((len > ETH_ZLEN) ? len : ETH_ZLEN));
} else {
tpc->TxDescArray[entry].status =
- (OWNbit | EORbit | FSbit | LSbit) |
- ((len > ETH_ZLEN) ? length : ETH_ZLEN);
+ cpu_to_le32((OWNbit | EORbit | FSbit | LSbit) |
+ ((len > ETH_ZLEN) ? len : ETH_ZLEN));
}
RTL_W8(TxPoll, 0x40); /* set polling bit */
tpc->cur_tx++;
to = currticks() + TX_TIMEOUT;
- while ((tpc->TxDescArray[entry].status & OWNbit) && (currticks() < to)); /*
wait */
+ while ((le32_to_cpu(tpc->TxDescArray[entry].status) & OWNbit)
+ && (currticks() < to)); /* wait */
if (currticks() >= to) {
#ifdef DEBUG_RTL8169_TX
puts ("tx timeout/error\n");
printf ("%s elapsed time : %d\n", __FUNCTION__, currticks()-stime);
#endif
- return 0;
+ ret = 0;
} else {
#ifdef DEBUG_RTL8169_TX
puts("tx done\n");
#endif
- return length;
+ ret = length;
}
+ /* Delay to make net console (nc) work properly */
+ udelay(20);
+ return ret;
}
static void rtl8169_set_rx_mode(struct eth_device *dev)
@@ -564,8 +577,8 @@
tpc->cur_rx = 0;
- RTL_W32(TxDescStartAddr, virt_to_le32desc(tpc->TxDescArray));
- RTL_W32(RxDescStartAddr, virt_to_le32desc(tpc->RxDescArray));
+ RTL_W32(TxDescStartAddr, tpc->TxDescArray);
+ RTL_W32(RxDescStartAddr, tpc->RxDescArray);
RTL_W8(Cfg9346, Cfg9346_Lock);
udelay(10);
@@ -603,13 +616,14 @@
for (i = 0; i < NUM_RX_DESC; i++) {
if (i == (NUM_RX_DESC - 1))
tpc->RxDescArray[i].status =
- (OWNbit | EORbit) + RX_BUF_SIZE;
+ cpu_to_le32((OWNbit | EORbit) + RX_BUF_SIZE);
else
- tpc->RxDescArray[i].status = OWNbit + RX_BUF_SIZE;
+ tpc->RxDescArray[i].status =
+ cpu_to_le32(OWNbit + RX_BUF_SIZE);
tpc->RxBufferRing[i] = &rxb[i * RX_BUF_SIZE];
tpc->RxDescArray[i].buf_addr =
- virt_to_bus(tpc->RxBufferRing[i]);
+ cpu_to_le32(tpc->RxBufferRing[i]);
}
#ifdef DEBUG_RTL8169
@@ -623,8 +637,6 @@
static void rtl_reset(struct eth_device *dev, bd_t *bis)
{
int i;
- u8 diff;
- u32 TxPhyAddr, RxPhyAddr;
#ifdef DEBUG_RTL8169
int stime = currticks();
@@ -632,25 +644,14 @@
#endif
tpc->TxDescArrays = tx_ring;
- if (tpc->TxDescArrays == 0)
- puts("Allot Error");
/* Tx Desscriptor needs 256 bytes alignment; */
- TxPhyAddr = virt_to_bus(tpc->TxDescArrays);
- diff = 256 - (TxPhyAddr - ((TxPhyAddr >> 8) << 8));
- TxPhyAddr += diff;
- tpc->TxDescArray = (struct TxDesc *) (tpc->TxDescArrays + diff);
+ tpc->TxDescArray = (struct TxDesc *) ((unsigned long)(tpc->TxDescArrays +
+ 255) & ~255);
tpc->RxDescArrays = rx_ring;
/* Rx Desscriptor needs 256 bytes alignment; */
- RxPhyAddr = virt_to_bus(tpc->RxDescArrays);
- diff = 256 - (RxPhyAddr - ((RxPhyAddr >> 8) << 8));
- RxPhyAddr += diff;
- tpc->RxDescArray = (struct RxDesc *) (tpc->RxDescArrays + diff);
-
- if (tpc->TxDescArrays == NULL || tpc->RxDescArrays == NULL) {
- puts("Allocate RxDescArray or TxDescArray failed\n");
- return;
- }
+ tpc->RxDescArray = (struct RxDesc *) ((unsigned long)(tpc->RxDescArrays +
+ 255) & ~255);
rtl8169_init_ring(dev);
rtl8169_hw_start(dev);
@@ -733,7 +734,7 @@
/* Get MAC address. FIXME: read EEPROM */
for (i = 0; i < MAC_ADDR_LEN; i++)
- dev->enetaddr[i] = RTL_R8(MAC0 + i);
+ bis->bi_enetaddr[i] = dev->enetaddr[i] = RTL_R8(MAC0 + i);
#ifdef DEBUG_RTL8169
printf("MAC Address");
@@ -808,7 +809,7 @@
/* wait for auto-negotiation process */
for (i = 10000; i > 0; i--) {
/* check if auto-negotiation complete */
- if (mdio_read(PHY_STAT_REG) & PHY_Auto_Neco_Comp) {
+ if (mdio_read(PHY_STAT_REG) & PHY_Auto_Nego_Comp) {
udelay(100);
option = RTL_R8(PHYstatus);
if (option & _1000bpsF) {
@@ -818,13 +819,12 @@
#endif
} else {
#ifdef DEBUG_RTL8169
- printf
- ("%s: %sMbps %s-duplex operation.\n",
- dev->name,
- (option & _100bps) ? "100" :
- "10",
- (option & FullDup) ? "Full" :
- "Half");
+ printf("%s: %sMbps %s-duplex operation.\n",
+ dev->name,
+ (option & _100bps) ? "100" :
+ "10",
+ (option & FullDup) ? "Full" :
+ "Half");
#endif
}
break;
@@ -869,7 +869,7 @@
sprintf (dev->name, "RTL8169#%d", card_number);
dev->priv = (void *) devno;
- dev->iobase = (int)bus_to_phys(iobase);
+ dev->iobase = (int)pci_mem_to_phys(devno, iobase);
dev->init = rtl_reset;
dev->halt = rtl_halt;
diff -Nru u-boot-1.3.1.orig/include/configs/tsppc.h
u-boot-1.3.1.ts/include/configs/tsppc.h
--- u-boot-1.3.1.orig/include/configs/tsppc.h 1970-01-01 01:00:00.000000000
+0100
+++ u-boot-1.3.1.ts/include/configs/tsppc.h 2008-02-27 05:11:10.000000000 +0100
@@ -0,0 +1,354 @@
+/*
+ * Copyright (C) 2006 Andrew Luyten <u-boot@...>
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+/* ------------------------------------------------------------------------- */
+
+/*
+ * board/config.h - configuration options, board specific
+ */
+
+#ifndef __CONFIG_H
+#define __CONFIG_H
+
+/*
+ * High Level Configuration Options
+ * (easy to change)
+ */
+
+#define CONFIG_MPC824X 1
+#define CONFIG_MPC8245 1
+#define CONFIG_MPC8241 1
+
+#define CONFIG_IDENT_STRING " foonas"
+#define CONFIG_TIMESTAMP
+#define CFG_HUSH_PARSER 1
+#define CFG_PROMPT_HUSH_PS2 "turbostation> "
+#define CONFIG_BOOTDELAY 1
+#define CONFIG_ZERO_BOOTDELAY_CHECK
+#define CONFIG_AUTOBOOT_KEYED
+#define CONFIG_AUTOBOOT_PROMPT "Booting in %02d seconds (Press 's' to
stop)...\n"
+#define CONFIG_AUTOBOOT_STOP_STR "s"
+
+/*----------------------------------------------------------------------
+ * Define supported commands
+ */
+
+#define CONFIG_CMD_IDE
+#define CONFIG_CMD_PING
+#define CONFIG_CMD_EXT2
+#define CONFIG_CMD_DATE
+#define CONFIG_CMD_PCI
+#define CONFIG_CMD_ELF
+#define CONFIG_CMD_I2C
+#define CONFIG_CMD_DHCP
+#define CONFIG_CMD_NET
+#define CONFIG_CMD_RUN
+
+
+#include <config_cmd_default.h>
+
+/*-----------------------------------------------------------------------
+ * Miscellaneous configurable options
+ */
+
+#define CFG_LONGHELP 1 /* undef to save memory */
+#define CFG_PROMPT "=> " /* Monitor Command Prompt*/
+#define CFG_CBSIZE 256 /* Console I/O Buffer Size*/
+#define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size*/
+#define CFG_MAXARGS 16 /* max number of command args*/
+#define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size*/
+#define CFG_LOAD_ADDR 0x00100000 /* default load address */
+#define CFG_HZ 1000 /* decrementer freq:1 ms ticks*/
+
+
+/*-----------------------------------------------------------------------
+ * PCI
+ *
+ */
+
+#define CONFIG_PCI
+#undef CONFIG_PCI_PNP
+
+#define PCI_ETH_IOADDR 0xbffe00
+#define PCI_ETH_MEMADDR 0xbfffce00
+
+#define PCI_IDE_IOADDR 0xbfffd0
+#define PCI_IDE_MEMADDR 0xbffffe00
+
+#define PCI_USB0_IOADDR 0
+#define PCI_USB0_MEMADDR 0xbfffe000
+#define PCI_USB1_IOADDR 0
+#define PCI_USB1_MEMADDR 0xbfffd000
+#define PCI_USB2_IOADDR 0
+#define PCI_USB2_MEMADDR 0xbfffcf00
+
+
+/*-----------------------------------------------------------------------
+ * Start addresses for the final memory configuration
+ * (Set up by the startup code)
+ */
+
+#define CFG_SDRAM_BASE 0x00000000
+#define CFG_MONITOR_BASE TEXT_BASE
+#undef CFG_RAMBOOT
+
+#define CFG_PCI_MEM_ADDR 0xB0000000
+#define CFG_EUMB_ADDR 0xFC000000
+#define CFG_FLASH_BASE 0xFF000000
+
+#define CFG_RESET_ADDRESS 0xFFF00100
+
+#define CFG_MONITOR_LEN (256 << 10)
+#define CFG_MALLOC_LEN (512 << 10)
+
+#define CFG_MEMTEST_START 0x00000000 /* memtest works on */
+#define CFG_MEMTEST_END 0x04000000 /* 0 ... 32 MB in DRAM */
+#define CFG_MAX_RAM_SIZE 0x10000000 /* up to 256M of SDRAM */
+
+
+/*-----------------------------------------------------------------------
+ * Definitions for initial stack pointer and data area
+ */
+
+#define CFG_INIT_RAM_ADDR 0x40000000
+#define CFG_INIT_RAM_END 0x1000
+#define CFG_GBL_DATA_SIZE 128
+#define CFG_GBL_DATA_OFFSET (CFG_INIT_RAM_END - CFG_GBL_DATA_SIZE)
+
+/*-----------------------------------------------------------------------
+ * FLASH organization
+ */
+
+#define CFG_FLASH_CFI 1
+#define CFG_FLASH_CFI_DRIVER 1 /* Use the common driver */
+#define CFG_MAX_FLASH_BANKS 1 /* max number of memory banks */
+#define CFG_MAX_FLASH_SECT 128 /* max number of sectors on one chip*/
+#define CFG_FLASH_EMPTY_INFO /* print 'E' for empty sector on flinfo */
+#define CFG_FLASH_USE_BUFFER_WRITE /* faster writes */
+
+#define CFG_ENV_IS_IN_FLASH 1
+#define CFG_ENV_ADDR (CFG_FLASH_BASE + 0x00FA0000)
+#define CFG_ENV_SECT_SIZE 0x00020000 /* Total Size of Environment Sector*/
+
+
+/*-----------------------------------------------------------------------
+ * Gigabit Ethernet
+ */
+
+#define CONFIG_NET_MULTI
+#define CONFIG_RTL8169
+#define CONFIG_NET_RETRY_COUNT 5
+#define CONFIG_NETCONSOLE
+
+/*-----------------------------------------------------------------------
+ * Filesystems
+ */
+
+#define CONFIG_DOS_PARTITION
+
+/*-----------------------------------------------------------------------
+ * IDE/ATA
+ */
+
+#undef CONFIG_IDE_8xx_DIRECT /* no pcmcia interface required */
+#undef CONFIG_IDE_LED /* no led for ide supported */
+#undef CONFIG_IDE_RESET /* no reset for ide supported */
+#undef CONFIG_ATAPI /* no ATAPI support */
+
+#define CONFIG_IDE_PREINIT /* To set up MMIO adresses */
+#define CONFIG_LBA48 /* Large disk support */
+
+#define CFG_IDE_MAXBUS 2 /* Two channels x 1 device each */
+#define CFG_IDE_MAXDEVICE (CFG_IDE_MAXBUS*1)
+
+#define CFG_ATA_BASE_ADDR 0x0000 /* Set up in board specific code */
+#define CFG_ATA_DATA_OFFSET 0x0000 /* Offset for data I/O */
+#define CFG_ATA_REG_OFFSET 0x0000 /* Offset for normal register accesses */
+#define CFG_ATA_ALT_OFFSET 0x0000 /* Offset for alternate registers */
+
+#define CONFIG_BOARD_EARLY_INIT_F 1
+#define BOARD_LATE_INIT 1
+/*----------------------------------------------------------------------
+ * On Chip Serial configuration
+ */
+
+#define CONFIG_CONS_INDEX 1
+#define CONFIG_BAUDRATE 115200
+#define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
+
+#define CFG_NS16550
+#define CFG_NS16550_SERIAL
+
+#define CFG_NS16550_REG_SIZE 1
+#define CFG_NS16550_CLK get_bus_freq(0)
+
+#define CFG_NS16550_COM1 (CFG_EUMB_ADDR + 0x4500) /* Console port */
+#define CFG_NS16550_COM2 (CFG_EUMB_ADDR + 0x4600) /* PIC ? */
+
+
+/*----------------------------------------------------------------------
+ * i2c support configuration
+ */
+
+#define CONFIG_HARD_I2C 1 /* To enable I2C support */
+#undef CONFIG_SOFT_I2C /* I2C bit-banged */
+#define CFG_I2C_SPEED 400000 /* I2C speed and slave address */
+#define CFG_I2C_SLAVE 0x7F
+
+#define CONFIG_RTC_RS5C372A /* Real-time clock chip */
+
+
+/*----------------------------------------------------------------------
+ * Low Level Configuration Settings
+ * (address mappings, register initial values, etc.)
+ * You should know what you are doing if you make changes here.
+ */
+
+#define CONFIG_SYS_CLK_FREQ 33333333 /* external frequency to pll */
+
+#define CFG_ROMNAL 7 /*rom/flash next access time */
+#define CFG_ROMFAL 11 /*rom/flash access time */
+
+#define CFG_REFINT 430 /* no of clock cycles between CBR refresh cycles */
+
+/* the following are for SDRAM only*/
+#define CFG_BSTOPRE 121 /* Burst To Precharge, sets open page interval */
+#define CFG_REFREC 8 /* Refresh to activate interval */
+#define CFG_RDLAT 4 /* data latency from read command */
+#define CFG_PRETOACT 3 /* Precharge to activate interval */
+#define CFG_ACTTOPRE 5 /* Activate to Precharge interval */
+#define CFG_ACTORW 3 /* Activate to R/W */
+#define CFG_SDMODE_CAS_LAT 3 /* SDMODE CAS latency */
+#define CFG_SDMODE_WRAP 0 /* SDMODE wrap type */
+
+#define CFG_REGISTERD_TYPE_BUFFER 1
+#define CFG_EXTROM 1
+#define CFG_REGDIMM 0
+
+
+/*----------------------------------------------------------------------
+ * memory bank settings
+ *
+ * only bits 20-29 are actually used from these vales to set the
+ * start/end address the upper two bits will be 0, and the lower 20
+ * bits will be set to 0x00000 for a start address, or 0xfffff for an
+ * end address
+ */
+
+#define CFG_BANK0_START 0x00000000
+#define CFG_BANK0_END (CFG_MAX_RAM_SIZE - 1)
+#define CFG_BANK0_ENABLE 1
+#define CFG_BANK1_START 0x3ff00000
+#define CFG_BANK1_END 0x3fffffff
+#define CFG_BANK1_ENABLE 0
+#define CFG_BANK2_START 0x3ff00000
+#define CFG_BANK2_END 0x3fffffff
+#define CFG_BANK2_ENABLE 0
+#define CFG_BANK3_START 0x3ff00000
+#define CFG_BANK3_END 0x3fffffff
+#define CFG_BANK3_ENABLE 0
+#define CFG_BANK4_START 0x00000000
+#define CFG_BANK4_END 0x00000000
+#define CFG_BANK4_ENABLE 0
+#define CFG_BANK5_START 0x00000000
+#define CFG_BANK5_END 0x00000000
+#define CFG_BANK5_ENABLE 0
+#define CFG_BANK6_START 0x00000000
+#define CFG_BANK6_END 0x00000000
+#define CFG_BANK6_ENABLE 0
+#define CFG_BANK7_START 0x00000000
+#define CFG_BANK7_END 0x00000000
+#define CFG_BANK7_ENABLE 0
+
+
+/*
+ * Memory bank enable bitmask, specifying which of the banks defined above
+ are actually present. MSB is for bank #7, LSB is for bank #0.
+ */
+#define CFG_BANK_ENABLE 0x01
+
+#define CFG_ODCR 0xff /* configures line driver impedances, */
+ /* see 8240 book for bit definitions */
+#define CFG_PGMAX 0x32 /* how long the 8240 retains the */
+ /* currently accessed page in memory */
+ /* see 8240 book for details */
+#define CFG_DBUS_SIZE2 1
+#define CFG_BANK0_ROW 2
+
+
+/*----------------------------------------------------------------------
+ * Initial BAT mappings
+ */
+
+/* SDRAM 0 - 256MB */
+#define CFG_IBAT0L (CFG_SDRAM_BASE | BATL_PP_10 | BATL_MEMCOHERENCE)
+#define CFG_IBAT0U (CFG_SDRAM_BASE | BATU_BL_256M | BATU_VS | BATU_VP)
+
+/* stack in DCACHE @ 1GB (no backing mem) */
+#define CFG_IBAT1L (CFG_INIT_RAM_ADDR | BATL_PP_10 | BATL_MEMCOHERENCE)
+#define CFG_IBAT1U (CFG_INIT_RAM_ADDR | BATU_BL_128K | BATU_VS | BATU_VP)
+
+/* PCI memory */
+#define CFG_IBAT2L (CFG_PCI_MEM_ADDR | BATL_PP_10 | BATL_CACHEINHIBIT)
+#define CFG_IBAT2U (CFG_PCI_MEM_ADDR | BATU_BL_256M | BATU_VS | BATU_VP)
+
+/* Flash, config addrs, etc */
+#define CFG_IBAT3L (0xF0000000 | BATL_PP_10 | BATL_CACHEINHIBIT)
+#define CFG_IBAT3U (0xF0000000 | BATU_BL_256M | BATU_VS | BATU_VP)
+
+#define CFG_DBAT0L CFG_IBAT0L
+#define CFG_DBAT0U CFG_IBAT0U
+#define CFG_DBAT1L CFG_IBAT1L
+#define CFG_DBAT1U CFG_IBAT1U
+#define CFG_DBAT2L CFG_IBAT2L
+#define CFG_DBAT2U CFG_IBAT2U
+#define CFG_DBAT3L CFG_IBAT3L
+#define CFG_DBAT3U CFG_IBAT3U
+
+/*
+ * For booting Linux, the board info and command line data
+ * have to be in the first 8 MB of memory, since this is
+ * the maximum mapped by the Linux kernel during initialization.
+ */
+#define CFG_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */
+
+
+/*-----------------------------------------------------------------------
+ * Cache Configuration
+ */
+
+#define CFG_CACHELINE_SIZE 32 /* For MPC8240 CPU */
+#if (CONFIG_COMMANDS & CFG_CMD_KGDB)
+# define CFG_CACHELINE_SHIFT 5 /* log base 2 of the above value */
+#endif
+
+
+/*-----------------------------------------------------------------------
+ * Internal Definitions
+ *
+ * Boot Flags
+ */
+#define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */
+#define BOOTFLAG_WARM 0x02 /* Software reboot */
+
+
+#endif /* __CONFIG_H */
diff -Nru u-boot-1.3.1.orig/include/pci_ids.h u-boot-1.3.1.ts/include/pci_ids.h
--- u-boot-1.3.1.orig/include/pci_ids.h 2007-12-06 10:21:19.000000000 +0100
+++ u-boot-1.3.1.ts/include/pci_ids.h 2008-02-23 03:00:57.000000000 +0100
@@ -1043,6 +1043,7 @@
#define PCI_DEVICE_ID_REALTEK_8029 0x8029
#define PCI_DEVICE_ID_REALTEK_8129 0x8129
#define PCI_DEVICE_ID_REALTEK_8139 0x8139
+#define PCI_DEVICE_ID_REALTEK_8167 0x8167
#define PCI_DEVICE_ID_REALTEK_8169 0x8169
#define PCI_VENDOR_ID_DLINK 0x1186
diff -Nru u-boot-1.3.1.orig/include/tsppcpic.h
u-boot-1.3.1.ts/include/tsppcpic.h
--- u-boot-1.3.1.orig/include/tsppcpic.h 1970-01-01 01:00:00.000000000 +0100
+++ u-boot-1.3.1.ts/include/tsppcpic.h 2008-02-25 22:28:10.000000000 +0100
@@ -0,0 +1,31 @@
+#ifndef _TSPPC_H
+
+#define _TSPPC_H
+#include <ns16550.h>
+#include <common.h>
+#include <asm/io.h>
+
+/* Button definitions */
+#define POWERBTN 0x40
+#define USBCOPYBTN 0x68
+#define RESETBTN 0x6A
+
+/* LED definitions */
+#define PWROFF 0x4B
+#define PWRON 0x4D
+#define PWRBLINK 0x4C
+#define STATUSOFF 0x59
+#define STATUSGRN 0x56
+#define STATUSRD 0x57
+#define STATUSALT 0x58
+#define STATUSRDBLINK 0x54
+#define STATUSGRNBLINK 0x55
+#define USBON 0x60
+#define USBOFF 0x62
+#define USBBLINK 0x61
+
+/* Buzzer definitions */
+#define BUZZER_SHORT 0x50
+#define BUZZER_LONG 0x51
+
+#endif
diff -Nru u-boot-1.3.1.orig/lib_ppc/board.c u-boot-1.3.1.ts/lib_ppc/board.c
--- u-boot-1.3.1.orig/lib_ppc/board.c 2007-12-06 10:21:19.000000000 +0100
+++ u-boot-1.3.1.ts/lib_ppc/board.c 2008-02-27 05:58:12.000000000 +0100
@@ -335,6 +335,9 @@
#ifdef CONFIG_POST
post_init_f,
#endif
+#ifdef BOARD_LATE_INIT
+ board_late_init,
+#endif
INIT_FUNC_WATCHDOG_RESET
init_func_ram,
#if defined(CFG_DRAM_TEST)
sp4wnito wrote:
> Hi everybody !
>
> It's my first post on this group, so first I whould like to thank you
> all for your intersting discution.
Welcome :)
> I own a TS-201 since 1 year and it's a wonderfull Nas, but I'm boring
> about the qnap distrib, i need a real apache/mysql, iptables, etc...
> Then, I whant to install a Debian-ppc on the SATA disk.
This is mostly the same as I want.
> I already add a serial and now I would like to upgrade U-boot to get
> the HDD support.
>
> So, I have 2 question :
>
> 1) If someone had try to upgrade the TS-201 whith U-boot 1.3 (I got
> some diff for 1.1.6 and 1.2 but not for this newest release)
YES! :)
U-Boot 1.3.1 (Feb 27 2008 - 12:48:31) foonas
CPU: MPC8241 Revision 1.4 at 266.666 MHz: 16 kB I-Cache 16 kB D-Cache
Board: QNAP TS-101/TS-201 local bus at 133.333 MHz
I2C: ready
DRAM: 64 MB
FLASH: 16 MB
In: serial
Out: serial
Err: serial
Net: RTL8169#0
IDE: Bus 0: OK Bus 1: not available
Device 0: Model: SAMSUNG SP2504C Firm: VT100-41 Ser#: S09QJ1GL709404
Type: Hard Disk
Supports 48-bit addressing
Capacity: 238475.1 MB = 232.8 GB (488397168 x 512)
Device 1: not available
Booting in 06 seconds (Press 's' to stop)...
Reset button pressed.
I'm working on implementing some control over the boot process using the
buttons. I've so far implemented LED control and I'm able to abort the
boot process by pressing the reset button at the right time.
ETA on a working, fully-featured, monster-uboot is hopefully this weekend.
>
> 2) If someone already did it with a debian4.0 and if he had some matters.
When I'm finished with the U-Boot project, I'd like to get a recent
kernel booting again. After that, getting debian-installer support in
foonas-em is my next priority. At that point, the only thing lacking
would be official Debian support for the kernel and the PIC-control daemon.
Regards,
Øyvind Repvik
Hi everybody !
It's my first post on this group, so first I whould like to thank you
all for your intersting discution.
I own a TS-201 since 1 year and it's a wonderfull Nas, but I'm boring
about the qnap distrib, i need a real apache/mysql, iptables, etc...
Then, I whant to install a Debian-ppc on the SATA disk.
I already add a serial and now I would like to upgrade U-boot to get
the HDD support.
So, I have 2 question :
1) If someone had try to upgrade the TS-201 whith U-boot 1.3 (I got
some diff for 1.1.6 and 1.2 but not for this newest release)
2) If someone already did it with a debian4.0 and if he had some matters.
Thanks all !
I have been using TS-101.
If I plug-in an USB Disk, it will become "USB Disk 1" as its SAMBA
share name.
I am unable to change this share name, but the SPACE within the name
is causing lots of trouble if I am trying to mount/umount from my
linux machines as a non-root user. I want to change it to a name
without SPACEs.
I knew that I can manually change /etc/smb.conf each time after
plugging in this USB drive. However, if I eject the disk, I have to do
it again next time.
I am wondering how can I change the default setting?
Many thanks
Just a quick question; does the x09 devices have space for a mini-pci
connector? My old TS101 has one (SMD component) which does work -
allowing it to connect to a WLAN card. However it seems to have been
removed on the TS201 series... and I have no idea for the x09'.s
Any ideas?
Thanks,
RS
Just like LTO-2 the LTO-3 is a magnetic tape data storage technology
developed as an open alternative to the proprietary Digital Linear
Tape (DLT). The technology was developed and initiated by Seagate,
Hewlett-Packard, and IBM. The standard form-factor of LTO technology
goes by the name "Ultrium" or LTO 3 Ultrium tapes.
As per the LTO roadmap, LTO 3 Ultrium has 400 GB capacity and an 80
MB/s transfer rate. LTO-3 Ultrium was also the first Ultrium tape to
feature WORM (Write Once Read Many) capability. The number of write
elements was also doubled in LTO 3 from 8 to16. Ultrium takes
advantage of LTO Technology's proven error compression and data
compression techniques. Data Integrity features include two levels of
error correction that can provide recovery from longitudinal media
scratches. Read-While-Write (RWW) capability allows real-time
verification of written data. LTO tapes are best suited for
high-capacity backup, restore and archive operations. Related products
available at Tape4Backup are: LTO 1, LTO 2, LTO 4, LTO Cleaning
Cartridge, LTO Barcode Labels, LTO Empty Cases and LTO Cartridge
Memory Reader.
New for LTO-3 is Write Once Read Many (WORM) capability. This is
normally only useful for legal record keeping. An LTO-3 drive will not
erase or overwrite data on a WORM cartridge, but will read it. An
LTO-3 WORM Cartridge is identical to a normal LTO-3 tape cartridge
except its LTO-CM chip identifies it to the drive as WORM. There is
nothing different about the tape medium in a WORM cartridge. Typically
the WORM cartridges have a different color packaging.LTO-1 In the 2000
availability was fairly limited. IBM, HP and Seagate sought to counter
this by introducing a more open format. www.tape4backup.com
Hi Øyvind, Thanks for your answer. What are the openturbostation OE-sources you refer to? I've spoken to some qnap people about releasing their sources but they only said it's a good idea and they will do that soon. I've seen somewhere on the qnap forum that someone there was working on bringing it all together and releasing a proper devkit, but no word on progress yet. Thanks again, Michael
----- Original Message ---- From: Øyvind Repvik <repvik@...> To: OpenTurbostation@yahoogroups.com Sent: Thursday, January
24, 2008 4:42:54 PM Subject: Re: [OpenTurbostation] Re: Cross toolchain / missing kernel modules for TS-109
Michael wrote:
> Hello,
>
> Tim, I was wondering did you get anywhere with crypto stuff on TS-109?
> I was actually trying to accomplish the same thing with cryptoloop and
> dm-crypt but none of the approaches worked. I got the cross-compiler
> from CodeSourcery (2005q3-2) and kernel sources from QNAP (the
> TS-ARM-1.1.0 package) but without the kernel config they used to
> compile the kernel it seems everything I try is a dead end.
>
> I've learned that most likely you can't compile a feature as a module
> for a running kernel if that kernel was originally compiled with that
> feature disabled. The default configuration for mv88f5181 has most of
> the crypto related stuff (apart from the core CryptoAPI) disabled, so
> if this is what they used, I'm afraid recompiling the kernel is the
> only option.
>
> However I'm somewhat hesitant to do this without knowing the original
> kernel config as I wouldn't know how to configure it manually for that
> system.
>
> Do you, or anyone else has any ideas?
It's probably not quite what you're looking for, but I believe that
support for the Orion crypto hardware will be supported in the
mainstream kernel in the not too distant future.
You can take a look at the openturbostation OE-sources. There's a kernel
config that works there (I don't know if it'll work with the original
firmware though...). That's atleast a place to start.
Regards,
Øyvind Repvik
>
> --- In OpenTurbostation@ yahoogroups. com, "tim_der_thaler"
> <TimThaler@. ..> wrote:
>> Hi there,
>>
>> I'm trying to make the cryptoloop work on my TS-109.
>> Unfortunately QNAP hasn't released the GPL sources for the TS-109 yet
>> (I mailed them today, maybe it would help if more people would beg ;-).
>> But I've found out, that the Buffalo Linkstation ProII
>>
> (http://linkstationw iki.net/index. php/HowTo_ Build_Your_ Own_Custom_ Kernel)
>> has the exact same kernel version and processor as the TS-109
>> So I've built my own kernel modules today (loop, cryptoloop plus all
>> crypto modules). I used the LinkstationPro kernel sources.
>> I've also found missing util-linux progs (losetup)
>> (http://downloads. linkstationwiki. net/TSProII_ ARM9/GPL/ UNPACKED/).
>> But still having issues. Maybe it's me and not the programs ;-)
>> Here is what I did:
>>
>> mknod -m 600 /dev/loop0 b 7 0
>> insmod /path_to_modules/ loop.ko
>> insmod /path_to_modules/ cryptoloop. ko
>> insmod /path_to_modules/ aes.ko
>> lsmod shows that they are loaded correctly.
>> Then I've created a container:
>> dd if=/dev/zero of=./container bs=1024 count=10240
>> /path_to_losetup/ losetup -e aes-128 /dev/loop0 ./container
>> Now I'll either get a segmentation fault or the process dies (even
>> kill -9 pid doesn't work for that one).
>>
>> The other progs from the util-linux package work well...
>>
>> Any ideas ?
>>
>> Tim
>>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
--- In OpenTurbostation@yahoogroups.com, "faulpelz2006"
<faulpelz2006@...> wrote:
>
> there is obviously some problem with this lib on the ts-101.
> several packages just don't work like rtorrent.
> the buildin torrent client is really painfull, any chance to get
> rtorrent running or should i dump my ts-101?
> strace of rtorrent is below.
>
I've been thinking about this problem a bit more. Especially having
read http://forum.qnap.com/viewtopic.php?f=85&t=1085
On qnap ts109/209, there are also problems with libstdc++ programs.
And the current workaround involves running libstdc++ apps in chroot.
Optware binaries supposely have rpath all set to /opt/lib. This makes
/opt/lib the first directory to be searched for the dynamic linker.
But /opt/lib/libstdc++.so is an exception, they are copied from
pre-built toolchain, and does not have rpath at all.
C++ apps like /opt/bin/rtorrent will load /opt/lib/libstdc++.so, but
/opt/lib/libstdc++.so does not necessarily load its dependent shared
libs from /opt/lib. If libstdc++.so depends on (libm, libgcc_s, libc),
and the version of (libm, libgcc_s, libc) in /usr/lib or /lib are not
compatible, this definitely will cause serious problem.
For the time being, you can try the chroot workaround.
On the optware side, I'll look at
1. A way to inject /opt/bin rpath into the existing
/opt/lib/libstdc++.so.6.0.*
2. Or, if we can rebuild that part of the toolchain to set rpath
correctly.
But don't expect a quick solution.
-Brian Zhou
Michael wrote:
> Hello,
>
> Tim, I was wondering did you get anywhere with crypto stuff on TS-109?
> I was actually trying to accomplish the same thing with cryptoloop and
> dm-crypt but none of the approaches worked. I got the cross-compiler
> from CodeSourcery (2005q3-2) and kernel sources from QNAP (the
> TS-ARM-1.1.0 package) but without the kernel config they used to
> compile the kernel it seems everything I try is a dead end.
>
> I've learned that most likely you can't compile a feature as a module
> for a running kernel if that kernel was originally compiled with that
> feature disabled. The default configuration for mv88f5181 has most of
> the crypto related stuff (apart from the core CryptoAPI) disabled, so
> if this is what they used, I'm afraid recompiling the kernel is the
> only option.
>
> However I'm somewhat hesitant to do this without knowing the original
> kernel config as I wouldn't know how to configure it manually for that
> system.
>
> Do you, or anyone else has any ideas?
It's probably not quite what you're looking for, but I believe that
support for the Orion crypto hardware will be supported in the
mainstream kernel in the not too distant future.
You can take a look at the openturbostation OE-sources. There's a kernel
config that works there (I don't know if it'll work with the original
firmware though...). That's atleast a place to start.
Regards,
Øyvind Repvik
>
> --- In OpenTurbostation@yahoogroups.com, "tim_der_thaler"
> <TimThaler@...> wrote:
>> Hi there,
>>
>> I'm trying to make the cryptoloop work on my TS-109.
>> Unfortunately QNAP hasn't released the GPL sources for the TS-109 yet
>> (I mailed them today, maybe it would help if more people would beg ;-).
>> But I've found out, that the Buffalo Linkstation ProII
>>
> (http://linkstationwiki.net/index.php/HowTo_Build_Your_Own_Custom_Kernel)
>> has the exact same kernel version and processor as the TS-109
>> So I've built my own kernel modules today (loop, cryptoloop plus all
>> crypto modules). I used the LinkstationPro kernel sources.
>> I've also found missing util-linux progs (losetup)
>> (http://downloads.linkstationwiki.net/TSProII_ARM9/GPL/UNPACKED/).
>> But still having issues. Maybe it's me and not the programs ;-)
>> Here is what I did:
>>
>> mknod -m 600 /dev/loop0 b 7 0
>> insmod /path_to_modules/loop.ko
>> insmod /path_to_modules/cryptoloop.ko
>> insmod /path_to_modules/aes.ko
>> lsmod shows that they are loaded correctly.
>> Then I've created a container:
>> dd if=/dev/zero of=./container bs=1024 count=10240
>> /path_to_losetup/losetup -e aes-128 /dev/loop0 ./container
>> Now I'll either get a segmentation fault or the process dies (even
>> kill -9 pid doesn't work for that one).
>>
>> The other progs from the util-linux package work well...
>>
>> Any ideas ?
>>
>> Tim
>>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
Hello,
Tim, I was wondering did you get anywhere with crypto stuff on TS-109?
I was actually trying to accomplish the same thing with cryptoloop and
dm-crypt but none of the approaches worked. I got the cross-compiler
from CodeSourcery (2005q3-2) and kernel sources from QNAP (the
TS-ARM-1.1.0 package) but without the kernel config they used to
compile the kernel it seems everything I try is a dead end.
I've learned that most likely you can't compile a feature as a module
for a running kernel if that kernel was originally compiled with that
feature disabled. The default configuration for mv88f5181 has most of
the crypto related stuff (apart from the core CryptoAPI) disabled, so
if this is what they used, I'm afraid recompiling the kernel is the
only option.
However I'm somewhat hesitant to do this without knowing the original
kernel config as I wouldn't know how to configure it manually for that
system.
Do you, or anyone else has any ideas?
--- In OpenTurbostation@yahoogroups.com, "tim_der_thaler"
<TimThaler@...> wrote:
>
> Hi there,
>
> I'm trying to make the cryptoloop work on my TS-109.
> Unfortunately QNAP hasn't released the GPL sources for the TS-109 yet
> (I mailed them today, maybe it would help if more people would beg ;-).
> But I've found out, that the Buffalo Linkstation ProII
>
(http://linkstationwiki.net/index.php/HowTo_Build_Your_Own_Custom_Kernel)
> has the exact same kernel version and processor as the TS-109
> So I've built my own kernel modules today (loop, cryptoloop plus all
> crypto modules). I used the LinkstationPro kernel sources.
> I've also found missing util-linux progs (losetup)
> (http://downloads.linkstationwiki.net/TSProII_ARM9/GPL/UNPACKED/).
> But still having issues. Maybe it's me and not the programs ;-)
> Here is what I did:
>
> mknod -m 600 /dev/loop0 b 7 0
> insmod /path_to_modules/loop.ko
> insmod /path_to_modules/cryptoloop.ko
> insmod /path_to_modules/aes.ko
> lsmod shows that they are loaded correctly.
> Then I've created a container:
> dd if=/dev/zero of=./container bs=1024 count=10240
> /path_to_losetup/losetup -e aes-128 /dev/loop0 ./container
> Now I'll either get a segmentation fault or the process dies (even
> kill -9 pid doesn't work for that one).
>
> The other progs from the util-linux package work well...
>
> Any ideas ?
>
> Tim
>
Hi,
If you want to add your guide to the Wiki or just add a link to your
blog the go to http://scratchpad.wikia.com/wiki/Qnap_Turbostation and
click "Log in / create account" in the top right hand corner. From
there there's a link to create an account.
While unfs works with little effort it's not recommeded. It's been a
while since I've looked at NFS but I remember that it doesn't support
locking or NFSv4.
Instead you should use nfs-utils, the kernel supplied already has the
required modules / filesystem support. You just need to compile the nfs-
utils package. I've got a set of binaries that you can extract to
your /opt directory along with an init.d system for Optware to start
the daemons.
Rgrds,
-Lenny
yes, I did use the CodeSourcery 2005q3 compiler. I've installed scratchbox and the toolchain from the Ubuntu repositories. I think it's a lot easier to cross compile with scratchbox than cross compiling 'by hand'.
Although I've managed to compile all needed kernel modules for loop mount, it hasn't worked out. So I gave up.
Qnap also 'forgot' to include basic netfilter settings in the kernel, so you can not use any netfilter / iptables related software even though you have all modules compiled.
Right now I'm waiting for foonas to support the TS-109. When they do, loop presumeably will be supported.
Then I will report.
Tim
> -----Original Message----- > From: OpenTurbostation-owner@yahoogroups.com > [mailto:OpenTurbostation-owner@yahoogroups.com] On Behalf Of Michael > Sent: 14 January 2008 23:13 > To: OpenTurbostation-owner@yahoogroups.com > Subject: Re: TS-109 kernel modules problem > > Hello, > > Tim, I was wondering, did you try cross-compiling with the > CodeSourcery 2005q3 compiler? It seems most of the stuff on TS-109 was > build using that compiler. > > I am having the same problem with loop module from optware mssii feed > but I recon the kernels were probably compiled with different options > so this might be the cause. > > Generally I'm trying to compile dm-crypt ocf and loop to be able to > use encrypted filesystems, so I set out to set up the CS compiler but > I'm obviously missing something but can't quite grasp what. When I set > the path to include the CS compiler and modify the makefile to use > CROSS_COMPILE=arm-linux-eabi- and try to compile anything I'm getting > things like 'sys/mman.h: No such file...' which seems like missing > libc devel headers but since I'm cross compiling I'm not sure where to > take them from and where to put them. > > Regarding the config QNAP used to compile the kernel I think you're > right. The provided kernel.cfg is definitely not the one, I'm guessing > they used the default one which you get when you do 'make > db88f5181_defconfig' (if you compare it with the one in > binaries/db88f5181.tgz you'll notice they're almost the same). Also > there is a script in scripts/extract-ikconfig which can be used to > extract config from the running kernel but I haven't had a chance to > test it yet as I can't compile scripts/binoffset (the above reason). > > Let me know, I'd be interested in getting loop and crypto going on > ts-109. Thanks. > Michael. > > --- In OpenTurbostation@yahoogroups.com, "tim_der_thaler" > TimThaler@ wrote: > > > > J.F. > > > > thanks for the reply. I couldn't find different kernel trees in my > > source package (TS_ARM-1.1.0.tar.gz). All I have is > > NasARM/Kernel/linux-2.6.12.6-p-1.10.3 > > In the binaries subdir are some *.tgz files with prebuilt kernels and > > their respective kernel config files. But they look like comming from > > Marvel directly and not from QNAP. > > So the only kernel config file would be kernel.cfg in kernel source > > directory. > > > > I'm a little bit confused right now. I've had a look into the debian > > EABI howto (see here <http://wiki.debian.org/ArmEabiHowto> ). There is > > a link to a discussion thread > > <http://lists.debian.org/debian-arm/2007/01/msg00034.html> which states > > that you need at least kernel 2.6.16 and gcc 4.1 to compile an EABI > > kernel. > > The TS-109 has an EABI kernel with kernel version 2.6.12 compiled with > > gcc 3.4... > > > > Regarding the loopmount problem: How else could one create the loop > > devices ? How can I examine whats wrong ? > > Any ideas ? > > > > I've made some other modules (like vfat/ntfs) which come with the > > TS-109 already and tried them. They work, so I guess my loop module > > shouldn't be blamed. > > > > I've compiled some modules and tools for the TS-109. I've posted them > > to the files directory. > > Maybe somebody wants to help figuring out whats wrong with loop. > > > > J.F. have you figured out the cable settings for the USB to serial cable > > yet ? Could you post it ? I'd also like to see whats going on while > > booting... > > > > Tim > > > > --- In OpenTurbostation@yahoogroups.com, "jf_doyon" <jfdoyon@> wrote: > > > > > > The source code from QNAP has several Kernel source trees, which one > > > did you use? > > > > > > I'm guessing you want the kernel folder that has 1.10.3 in the name > > > (Sorry don't have it right here with me). 1.10.3 is the version of > > > the board for the 109, so I'm guessing that's the one used ... > > > > > > Otherwise, I'm no kernel hacker, but it looks like it's really not > > > liking your /dev/loop0 ... losetup dies when trying to open it, both > > > through strace: > > > > > > > open("/dev/loop0", O_RDONLY|O_LARGEFILE <unfinished ...> > > > > +++ killed by SIGSEGV +++ > > > > > > and in the dmesg output: > > > > > > PC is at lo_open+0x14/0x78 [loop] > > > > > > Process losetup (pid: 1306, stack limit = 0xc666a1a0) > > > > > > And the backtrace shows a bunch of "open" calls that seem to fail. > > > > > > That being said, if you figure it out, please post instructions on the > > > Wiki, this would come in handy! > > > > > > I'm working from the top down, U-Boot, then kernel, and finally a > > > custom busybox/software. > > > > > > J.F. > > > > > > > > > --- In OpenTurbostation@yahoogroups.com, "tim_der_thaler" > > > TimThaler@ wrote: > > > > > > > > Hi group, > > > > > > > > I was trying to make loop devices going in my TS-109 box (and after > > > > that I'd like to use dm-crypt). > > > > I did try several different tool-chains without any luck yet. > > > > I set up scratchbox 1.0.8 in my Ubuntu 6.0.6 box and configured a > > > > target with the Code Sourcery cs2005q3.2-glibc2.5-arm toolchain. > > > > All userland applications I build inside scratchbox run without any > > > > problems on TS-109. > > > > So I've tried to build the missing kernel modules. > > > > I've downloaded the Sources from QNAP website and used the cs > > > > toolchain to compile the modules (no, I did not try to do that > > inside > > > > scratchbox). > > > > > > > > First weird thing is that I don't think that the provided kernel.cfg > > > > file is the one QNAP used to compile the kernel (e.g. it says that > > > > dm-crypt and dm-mod are compiled into the kernel; they are not). > > > > I've selected all modules I'd like to use to compile as modules. > > > > Make modules run without problems. > > > > I've also compiled losetup from the QNAP sources (util-linux-2.12q). > > > > > > > > On the TS-109 box I've put the modules under > > > > /mnt/HDA_ROOT/lib/modules/... and copied the existing modules from > > > > /lib/modules there. After <mount -o bind /mnt/HDA_ROOT/lib/modules > > > > /lib/modules> I ran depmod (which I've compiled first) and could > > load > > > > any modules with modprobe. > > > > I've also created the loop device knots <for x in 0 1 2 3 4 5 6 7; > > do > > > > mknod -m 660 /dev/loop${x} b 7 ${x}; done>. > > > > > > > > Even losetup -f crashes: > > > > > > > > [/] # modinfo loop > > > > filename: > > /lib/modules/2.6.12.6-arm1/kernel/drivers/block/loop.ko > > > > alias: block-major-7-* > > > > license: GPL > > > > depends: > > > > vermagic: 2.6.12.6-arm1 ARMv5 gcc-3.4 > > > > parm: max_loop:Maximum number of loop devices (1-256) > > (int) > > > > [/] # modprobe loop > > > > [/] # modinfo dm-mod > > > > filename: > > /lib/modules/2.6.12.6-arm1/kernel/drivers/md/dm-mod.ko > > > > license: GPL > > > > author: Joe Thornber dm-devel@ > > > > description: device-mapper driver > > > > depends: > > > > vermagic: 2.6.12.6-arm1 ARMv5 gcc-3.4 > > > > parm: major:The major number of the device mapper (uint) > > > > [/] # modprobe dm-mod > > > > [/] # lsmod > > > > Module Size Used by Not tainted > > > > dm_mod 53876 0 - Live 0xbf05f000 > > > > loop 13544 0 - Live 0xbf05a000 > > > > ntfs 189184 0 - Live 0xbf02a000 > > > > vfat 11360 1 - Live 0xbf026000 > > > > msdos 8384 0 - Live 0xbf022000 > > > > fat 49756 2 vfat,msdos, Live 0xbf014000 > > > > usb_storage 68756 1 - Live 0xbf002000 > > > > sysinfo 1668 0 - Live 0xbf000000 > > > > [/] # /mnt/HDA_ROOT/bin/devmap_mknod.sh > > > > Creating /dev/mapper/control character device with major:10 > > minor:62. > > > > [/] # ls -l /dev/loop* > > > > brw-rw---- 1 admin administ 7, 0 Aug 31 14:03 /dev/loop0 > > > > brw-rw---- 1 admin administ 7, 1 Aug 31 14:03 /dev/loop1 > > > > brw-rw---- 1 admin administ 7, 2 Aug 31 14:03 /dev/loop2 > > > > brw-rw---- 1 admin administ 7, 3 Aug 31 14:03 /dev/loop3 > > > > brw-rw---- 1 admin administ 7, 4 Aug 31 14:03 /dev/loop4 > > > > brw-rw---- 1 admin administ 7, 5 Aug 31 14:03 /dev/loop5 > > > > brw-rw---- 1 admin administ 7, 6 Aug 31 14:03 /dev/loop6 > > > > brw-rw---- 1 admin administ 7, 7 Aug 31 14:03 /dev/loop7 > > > > [/] # file /mnt/HDA_ROOT/bin/losetup > > > > /mnt/HDA_ROOT/bin/losetup: ELF 32-bit LSB executable, ARM, version 1 > > > > (SYSV), for GNU/Linux 2.6.14, dynamically linked (uses shared libs), > > > > stripped > > > > [/] # ldd /mnt/HDA_ROOT/bin/losetup > > > > libc.so.6 => /lib/libc.so.6 (0x4001e000) > > > > /lib/ld-linux.so.3 (0x40000000) > > > > [/] # strace losetup -f > > > > execve("/mnt/HDA_ROOT/bin/losetup", ["losetup", "-f"], [/* 20 vars > > > > */]) = 0 > > > > uname({sys="Linux", node="bollo", ...}) = 0 > > > > brk(0) = 0x13000 > > > > access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or > > > > directory) > > > > open("/etc/ld.so.cache", O_RDONLY) = 3 > > > > fstat64(3, {st_mode=S_IFREG|0644, st_size=17592186044416, ...}) = 0 > > > > mmap2(NULL, 8415, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40015000 > > > > close(3) = 0 > > > > open("/lib/libc.so.6", O_RDONLY) = 3 > > > > read(3, > > > > "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0d:\1\0004\0\0\0"..., > > > > 512) = 512 > > > > fstat64(3, {st_mode=S_IFREG|0755, st_size=17592186044416, ...}) = 0 > > > > mmap2(NULL, 1071092, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, > > > > 3, 0) = 0x4001e000 > > > > mmap2(0x4011e000, 16384, PROT_READ|PROT_WRITE, > > > > MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x100) = 0x4011e000 > > > > mmap2(0x40122000, 6132, PROT_READ|PROT_WRITE, > > > > MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40122000 > > > > mprotect(0xbea04000, 4096, > > > > PROT_READ|PROT_WRITE|PROT_EXEC|PROT_GROWSDOWN) = 0 > > > > close(3) = 0 > > > > mprotect(0x4011e000, 8192, PROT_READ) = 0 > > > > mprotect(0x4001c000, 4096, PROT_READ) = 0 > > > > munmap(0x40015000, 8415) = 0 > > > > brk(0) = 0x13000 > > > > brk(0x34000) = 0x34000 > > > > stat64("/dev/loop0", {st_mode=S_IFBLK|0660, st_rdev=makedev(7, 0), > > > > ...}) = 0 > > > > open("/dev/loop0", O_RDONLY|O_LARGEFILE <unfinished ...> > > > > +++ killed by SIGSEGV +++ > > > > [/] # > > > > > > > > Dmesg shows: > > > > loop: loaded (max 8 devices) > > > > device-mapper: 4.4.0-ioctl (2005-01-12) initialised: dm-devel@ > > > > Unable to handle kernel NULL pointer dereference at virtual address > > > > 00000038 > > > > pgd = c4de4000 > > > > [00000038] *pgd=04cc1031, *pte=00000000, *ppte=00000000 > > > > Internal error: Oops: 17 [#1] > > > > Modules linked in: dm_mod loop ntfs vfat msdos fat usb_storage > > sysinfo > > > > CPU: 0 > > > > PC is at lo_open+0x14/0x78 [loop] > > > > LR is at do_open+0xac/0x424 > > > > pc : [<bf05bc14>] lr : [<c01124a8>] Not tainted > > > > sp : c666be98 ip : c666bea8 fp : c666bea4 > > > > r10: bf05d3a0 r9 : c04e4acc r8 : c7068540 > > > > r7 : c765c1c0 r6 : c04e4ac0 r5 : fffffffa r4 : c7068540 > > > > r3 : 00000000 r2 : c765c1c0 r1 : c7068540 r0 : c04e4b28 > > > > Flags: NzCv IRQs on FIQs on Mode SVC_32 Segment user > > > > Control: A005317F Table: 04DE4000 DAC: 00000015 > > > > Process losetup (pid: 1306, stack limit = 0xc666a1a0) > > > > Stack: (0xc666be98 to 0xc666c000) > > > > be80: c666bedc > > > > c666bea8 > > > > bea0: c01124a8 bf05bc10 c666bed4 00000000 c11e6e70 c7068540 c7068540 > > > > c04e4ac0 > > > > bec0: ffffffe9 c0e65778 c666a000 c04f0000 c666befc c666bee0 c0112910 > > > > c011240c > > > > bee0: c666bf84 c7068540 c11e6e70 c04d5240 c666bf24 c666bf00 c010ab34 > > > > c01128f0 > > > > bf00: 00000000 00020000 00000000 00000003 00000005 c0045fec c666bf7c > > > > c666bf28 > > > > bf20: c010acbc c010aa38 c0e65778 c04d5240 00000000 00000003 c7673580 > > > > 00000101 > > > > bf40: 00000001 00000000 c666a000 c04f0000 c666bf7c c666bf60 c010ad18 > > > > c0124cb0 > > > > bf60: 00020001 00000000 c04f0000 00020000 c666bfa4 c666bf80 c010ae80 > > > > c010ac84 > > > > bf80: 00000000 00000000 bea04afc 00000005 c0045fec 00900005 00000000 > > > > c666bfa8 > > > > bfa0: c00459b0 c010ae48 00000000 c00ad71c bea04afc 00020000 00000000 > > > > 00000000 > > > > bfc0: 00000000 00000000 bea04afc 00000000 0000a08c bea04a90 40120000 > > > > 00000000 > > > > bfe0: 400c4120 bea049c8 000092e8 400c4164 60000010 bea04afc 00000000 > > > > 00000000 > > > > Backtrace: > > > > [<bf05bc00>] (lo_open+0x0/0x78 [loop]) from [<c01124a8>] > > > > (do_open+0xac/0x424) > > > > [<c01123fc>] (do_open+0x0/0x424) from [<c0112910>] > > > (blkdev_open+0x30/0x80) > > > > [<c01128e0>] (blkdev_open+0x0/0x80) from [<c010ab34>] > > > > (dentry_open+0x10c/0x24c) > > > > r6 = C04D5240 r5 = C11E6E70 r4 = C7068540 > > > > [<c010aa28>] (dentry_open+0x0/0x24c) from [<c010acbc>] > > > > (filp_open+0x48/0x50) > > > > r8 = C0045FEC r7 = 00000005 r6 = 00000003 r5 = 00000000 > > > > r4 = 00020000 > > > > [<c010ac74>] (filp_open+0x0/0x50) from [<c010ae80>] > > (sys_open+0x48/0xd8) > > > > r4 = 00020000 > > > > [<c010ae38>] (sys_open+0x0/0xd8) from [<c00459b0>] > > > > (__sys_trace_return+0x0/0x30) > > > > Code: e92dd800 e24cb004 e59030f8 e5933050 (e5931038) > > > > > > > > I'm not an expert, so it's veryhard for me to figure out what's > > wrong > > > > and if I'm having trouble with my modules/toolchain or the bsybox > > > > system or what else... > > > > > > > > Any expert there who could help me out here ? > > > > > > > > Thanks, Tim > > > > > > > > > >
Sent to list owner by mistake.
-----Original Message-----
From: OpenTurbostation-owner@yahoogroups.com
[mailto:OpenTurbostation-owner@yahoogroups.com] On Behalf Of Michael
Sent: 14 January 2008 23:13
To: OpenTurbostation-owner@yahoogroups.com
Subject: Re: TS-109 kernel modules problem
Hello,
Tim, I was wondering, did you try cross-compiling with the
CodeSourcery 2005q3 compiler? It seems most of the stuff on TS-109 was
build using that compiler.
I am having the same problem with loop module from optware mssii feed
but I recon the kernels were probably compiled with different options
so this might be the cause.
Generally I'm trying to compile dm-crypt ocf and loop to be able to
use encrypted filesystems, so I set out to set up the CS compiler but
I'm obviously missing something but can't quite grasp what. When I set
the path to include the CS compiler and modify the makefile to use
CROSS_COMPILE=arm-linux-eabi- and try to compile anything I'm getting
things like 'sys/mman.h: No such file...' which seems like missing
libc devel headers but since I'm cross compiling I'm not sure where to
take them from and where to put them.
Regarding the config QNAP used to compile the kernel I think you're
right. The provided kernel.cfg is definitely not the one, I'm guessing
they used the default one which you get when you do 'make
db88f5181_defconfig' (if you compare it with the one in
binaries/db88f5181.tgz you'll notice they're almost the same). Also
there is a script in scripts/extract-ikconfig which can be used to
extract config from the running kernel but I haven't had a chance to
test it yet as I can't compile scripts/binoffset (the above reason).
Let me know, I'd be interested in getting loop and crypto going on
ts-109. Thanks.
Michael.
--- In OpenTurbostation@yahoogroups.com, "tim_der_thaler"
<TimThaler@...> wrote:
>
> J.F.
>
> thanks for the reply. I couldn't find different kernel trees in my
> source package (TS_ARM-1.1.0.tar.gz). All I have is
> NasARM/Kernel/linux-2.6.12.6-p-1.10.3
> In the binaries subdir are some *.tgz files with prebuilt kernels and
> their respective kernel config files. But they look like comming from
> Marvel directly and not from QNAP.
> So the only kernel config file would be kernel.cfg in kernel source
> directory.
>
> I'm a little bit confused right now. I've had a look into the debian
> EABI howto (see here <http://wiki.debian.org/ArmEabiHowto> ). There is
> a link to a discussion thread
> <http://lists.debian.org/debian-arm/2007/01/msg00034.html> which states
> that you need at least kernel 2.6.16 and gcc 4.1 to compile an EABI
> kernel.
> The TS-109 has an EABI kernel with kernel version 2.6.12 compiled with
> gcc 3.4...
>
> Regarding the loopmount problem: How else could one create the loop
> devices ? How can I examine whats wrong ?
> Any ideas ?
>
> I've made some other modules (like vfat/ntfs) which come with the
> TS-109 already and tried them. They work, so I guess my loop module
> shouldn't be blamed.
>
> I've compiled some modules and tools for the TS-109. I've posted them
> to the files directory.
> Maybe somebody wants to help figuring out whats wrong with loop.
>
> J.F. have you figured out the cable settings for the USB to serial cable
> yet ? Could you post it ? I'd also like to see whats going on while
> booting...
>
> Tim
>
> --- In OpenTurbostation@yahoogroups.com, "jf_doyon" <jfdoyon@> wrote:
> >
> > The source code from QNAP has several Kernel source trees, which one
> > did you use?
> >
> > I'm guessing you want the kernel folder that has 1.10.3 in the name
> > (Sorry don't have it right here with me). 1.10.3 is the version of
> > the board for the 109, so I'm guessing that's the one used ...
> >
> > Otherwise, I'm no kernel hacker, but it looks like it's really not
> > liking your /dev/loop0 ... losetup dies when trying to open it, both
> > through strace:
> >
> > > open("/dev/loop0", O_RDONLY|O_LARGEFILE <unfinished ...>
> > > +++ killed by SIGSEGV +++
> >
> > and in the dmesg output:
> >
> > PC is at lo_open+0x14/0x78 [loop]
> >
> > Process losetup (pid: 1306, stack limit = 0xc666a1a0)
> >
> > And the backtrace shows a bunch of "open" calls that seem to fail.
> >
> > That being said, if you figure it out, please post instructions on the
> > Wiki, this would come in handy!
> >
> > I'm working from the top down, U-Boot, then kernel, and finally a
> > custom busybox/software.
> >
> > J.F.
> >
> >
> > --- In OpenTurbostation@yahoogroups.com, "tim_der_thaler"
> > TimThaler@ wrote:
> > >
> > > Hi group,
> > >
> > > I was trying to make loop devices going in my TS-109 box (and after
> > > that I'd like to use dm-crypt).
> > > I did try several different tool-chains without any luck yet.
> > > I set up scratchbox 1.0.8 in my Ubuntu 6.0.6 box and configured a
> > > target with the Code Sourcery cs2005q3.2-glibc2.5-arm toolchain.
> > > All userland applications I build inside scratchbox run without any
> > > problems on TS-109.
> > > So I've tried to build the missing kernel modules.
> > > I've downloaded the Sources from QNAP website and used the cs
> > > toolchain to compile the modules (no, I did not try to do that
> inside
> > > scratchbox).
> > >
> > > First weird thing is that I don't think that the provided kernel.cfg
> > > file is the one QNAP used to compile the kernel (e.g. it says that
> > > dm-crypt and dm-mod are compiled into the kernel; they are not).
> > > I've selected all modules I'd like to use to compile as modules.
> > > Make modules run without problems.
> > > I've also compiled losetup from the QNAP sources (util-linux-2.12q).
> > >
> > > On the TS-109 box I've put the modules under
> > > /mnt/HDA_ROOT/lib/modules/... and copied the existing modules from
> > > /lib/modules there. After <mount -o bind /mnt/HDA_ROOT/lib/modules
> > > /lib/modules> I ran depmod (which I've compiled first) and could
> load
> > > any modules with modprobe.
> > > I've also created the loop device knots <for x in 0 1 2 3 4 5 6 7;
> do
> > > mknod -m 660 /dev/loop${x} b 7 ${x}; done>.
> > >
> > > Even losetup -f crashes:
> > >
> > > [/] # modinfo loop
> > > filename:
> /lib/modules/2.6.12.6-arm1/kernel/drivers/block/loop.ko
> > > alias: block-major-7-*
> > > license: GPL
> > > depends:
> > > vermagic: 2.6.12.6-arm1 ARMv5 gcc-3.4
> > > parm: max_loop:Maximum number of loop devices (1-256)
> (int)
> > > [/] # modprobe loop
> > > [/] # modinfo dm-mod
> > > filename:
> /lib/modules/2.6.12.6-arm1/kernel/drivers/md/dm-mod.ko
> > > license: GPL
> > > author: Joe Thornber dm-devel@
> > > description: device-mapper driver
> > > depends:
> > > vermagic: 2.6.12.6-arm1 ARMv5 gcc-3.4
> > > parm: major:The major number of the device mapper (uint)
> > > [/] # modprobe dm-mod
> > > [/] # lsmod
> > > Module Size Used by Not tainted
> > > dm_mod 53876 0 - Live 0xbf05f000
> > > loop 13544 0 - Live 0xbf05a000
> > > ntfs 189184 0 - Live 0xbf02a000
> > > vfat 11360 1 - Live 0xbf026000
> > > msdos 8384 0 - Live 0xbf022000
> > > fat 49756 2 vfat,msdos, Live 0xbf014000
> > > usb_storage 68756 1 - Live 0xbf002000
> > > sysinfo 1668 0 - Live 0xbf000000
> > > [/] # /mnt/HDA_ROOT/bin/devmap_mknod.sh
> > > Creating /dev/mapper/control character device with major:10
> minor:62.
> > > [/] # ls -l /dev/loop*
> > > brw-rw---- 1 admin administ 7, 0 Aug 31 14:03 /dev/loop0
> > > brw-rw---- 1 admin administ 7, 1 Aug 31 14:03 /dev/loop1
> > > brw-rw---- 1 admin administ 7, 2 Aug 31 14:03 /dev/loop2
> > > brw-rw---- 1 admin administ 7, 3 Aug 31 14:03 /dev/loop3
> > > brw-rw---- 1 admin administ 7, 4 Aug 31 14:03 /dev/loop4
> > > brw-rw---- 1 admin administ 7, 5 Aug 31 14:03 /dev/loop5
> > > brw-rw---- 1 admin administ 7, 6 Aug 31 14:03 /dev/loop6
> > > brw-rw---- 1 admin administ 7, 7 Aug 31 14:03 /dev/loop7
> > > [/] # file /mnt/HDA_ROOT/bin/losetup
> > > /mnt/HDA_ROOT/bin/losetup: ELF 32-bit LSB executable, ARM, version 1
> > > (SYSV), for GNU/Linux 2.6.14, dynamically linked (uses shared libs),
> > > stripped
> > > [/] # ldd /mnt/HDA_ROOT/bin/losetup
> > > libc.so.6 => /lib/libc.so.6 (0x4001e000)
> > > /lib/ld-linux.so.3 (0x40000000)
> > > [/] # strace losetup -f
> > > execve("/mnt/HDA_ROOT/bin/losetup", ["losetup", "-f"], [/* 20 vars
> > > */]) = 0
> > > uname({sys="Linux", node="bollo", ...}) = 0
> > > brk(0) = 0x13000
> > > access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or
> > > directory)
> > > open("/etc/ld.so.cache", O_RDONLY) = 3
> > > fstat64(3, {st_mode=S_IFREG|0644, st_size=17592186044416, ...}) = 0
> > > mmap2(NULL, 8415, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40015000
> > > close(3) = 0
> > > open("/lib/libc.so.6", O_RDONLY) = 3
> > > read(3,
> > > "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0d:\1\0004\0\0\0"...,
> > > 512) = 512
> > > fstat64(3, {st_mode=S_IFREG|0755, st_size=17592186044416, ...}) = 0
> > > mmap2(NULL, 1071092, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE,
> > > 3, 0) = 0x4001e000
> > > mmap2(0x4011e000, 16384, PROT_READ|PROT_WRITE,
> > > MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x100) = 0x4011e000
> > > mmap2(0x40122000, 6132, PROT_READ|PROT_WRITE,
> > > MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40122000
> > > mprotect(0xbea04000, 4096,
> > > PROT_READ|PROT_WRITE|PROT_EXEC|PROT_GROWSDOWN) = 0
> > > close(3) = 0
> > > mprotect(0x4011e000, 8192, PROT_READ) = 0
> > > mprotect(0x4001c000, 4096, PROT_READ) = 0
> > > munmap(0x40015000, 8415) = 0
> > > brk(0) = 0x13000
> > > brk(0x34000) = 0x34000
> > > stat64("/dev/loop0", {st_mode=S_IFBLK|0660, st_rdev=makedev(7, 0),
> > > ...}) = 0
> > > open("/dev/loop0", O_RDONLY|O_LARGEFILE <unfinished ...>
> > > +++ killed by SIGSEGV +++
> > > [/] #
> > >
> > > Dmesg shows:
> > > loop: loaded (max 8 devices)
> > > device-mapper: 4.4.0-ioctl (2005-01-12) initialised: dm-devel@
> > > Unable to handle kernel NULL pointer dereference at virtual address
> > > 00000038
> > > pgd = c4de4000
> > > [00000038] *pgd=04cc1031, *pte=00000000, *ppte=00000000
> > > Internal error: Oops: 17 [#1]
> > > Modules linked in: dm_mod loop ntfs vfat msdos fat usb_storage
> sysinfo
> > > CPU: 0
> > > PC is at lo_open+0x14/0x78 [loop]
> > > LR is at do_open+0xac/0x424
> > > pc : [<bf05bc14>] lr : [<c01124a8>] Not tainted
> > > sp : c666be98 ip : c666bea8 fp : c666bea4
> > > r10: bf05d3a0 r9 : c04e4acc r8 : c7068540
> > > r7 : c765c1c0 r6 : c04e4ac0 r5 : fffffffa r4 : c7068540
> > > r3 : 00000000 r2 : c765c1c0 r1 : c7068540 r0 : c04e4b28
> > > Flags: NzCv IRQs on FIQs on Mode SVC_32 Segment user
> > > Control: A005317F Table: 04DE4000 DAC: 00000015
> > > Process losetup (pid: 1306, stack limit = 0xc666a1a0)
> > > Stack: (0xc666be98 to 0xc666c000)
> > > be80: c666bedc
> > > c666bea8
> > > bea0: c01124a8 bf05bc10 c666bed4 00000000 c11e6e70 c7068540 c7068540
> > > c04e4ac0
> > > bec0: ffffffe9 c0e65778 c666a000 c04f0000 c666befc c666bee0 c0112910
> > > c011240c
> > > bee0: c666bf84 c7068540 c11e6e70 c04d5240 c666bf24 c666bf00 c010ab34
> > > c01128f0
> > > bf00: 00000000 00020000 00000000 00000003 00000005 c0045fec c666bf7c
> > > c666bf28
> > > bf20: c010acbc c010aa38 c0e65778 c04d5240 00000000 00000003 c7673580
> > > 00000101
> > > bf40: 00000001 00000000 c666a000 c04f0000 c666bf7c c666bf60 c010ad18
> > > c0124cb0
> > > bf60: 00020001 00000000 c04f0000 00020000 c666bfa4 c666bf80 c010ae80
> > > c010ac84
> > > bf80: 00000000 00000000 bea04afc 00000005 c0045fec 00900005 00000000
> > > c666bfa8
> > > bfa0: c00459b0 c010ae48 00000000 c00ad71c bea04afc 00020000 00000000
> > > 00000000
> > > bfc0: 00000000 00000000 bea04afc 00000000 0000a08c bea04a90 40120000
> > > 00000000
> > > bfe0: 400c4120 bea049c8 000092e8 400c4164 60000010 bea04afc 00000000
> > > 00000000
> > > Backtrace:
> > > [<bf05bc00>] (lo_open+0x0/0x78 [loop]) from [<c01124a8>]
> > > (do_open+0xac/0x424)
> > > [<c01123fc>] (do_open+0x0/0x424) from [<c0112910>]
> > (blkdev_open+0x30/0x80)
> > > [<c01128e0>] (blkdev_open+0x0/0x80) from [<c010ab34>]
> > > (dentry_open+0x10c/0x24c)
> > > r6 = C04D5240 r5 = C11E6E70 r4 = C7068540
> > > [<c010aa28>] (dentry_open+0x0/0x24c) from [<c010acbc>]
> > > (filp_open+0x48/0x50)
> > > r8 = C0045FEC r7 = 00000005 r6 = 00000003 r5 = 00000000
> > > r4 = 00020000
> > > [<c010ac74>] (filp_open+0x0/0x50) from [<c010ae80>]
> (sys_open+0x48/0xd8)
> > > r4 = 00020000
> > > [<c010ae38>] (sys_open+0x0/0xd8) from [<c00459b0>]
> > > (__sys_trace_return+0x0/0x30)
> > > Code: e92dd800 e24cb004 e59030f8 e5933050 (e5931038)
> > >
> > > I'm not an expert, so it's veryhard for me to figure out what's
> wrong
> > > and if I'm having trouble with my modules/toolchain or the bsybox
> > > system or what else...
> > >
> > > Any expert there who could help me out here ?
> > >
> > > Thanks, Tim
> > >
> >
>
Do not know.
BR.
/T
--- mr_xeqt <mr_xeqt@...> wrote:
> Is it possible to use optware on a TS-100 ??
> Or do they only support 101 and up ??
>
> // XEQT
>
>
________________________________________________________________________________\
____
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now.
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
Hi,
thanks for all the good info in this group.
I bought at TS-201 and from the info in this group I managed
to add NFS and optware. I have written down what I did step
by step (really only tagen from messages in this group).
But it might help somebody. It can be found at:
http://glomde.blogspot.com/2008/01/installing-optware-and-nfs-on-qnap-ts.html
I tried to add this to the wiki but didnt now how to register.
Feel free to put it there.
Best Regards,
/T