FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Development

 
 
LinkBack Thread Tools
 
Old 08-22-2008, 12:14 PM
Rogério Brito
 
Default Help supporting Debian on a Kurobox

Dear people,

Thanks to Charles Plessy, I have now a new PowerPC based machine, which is
a Kuro Box[*], an embedded system/NAS with a Linux kernel and a kind of
stripped down RH-like system (no compilers, no chroot, no NFS server etc).

I obviously want to run Debian on it so that I downloaded the powerpc
basedebs.tar from woody, a statically linked busybox (for chroot), unpacked
and manually installed these packages, upgraded to sarge and now to etch.
This system image is already tarred and available for others to see, if
necessary.

Unfortunately, things are not that easy, since there are two main
obstacles:

* the kernel available on the firmware is a kernel 2.4.17 and the libc6
from lenny requires a 2.6 kernel for the NTPL support. It seems to be
possible to upgrade the kernel to 2.6, but not as trivial as with a
PowerMac (and I'm used to both OldWorld and NewWorld PowerMacs).

* There seems to be some daemons (heartbeat daemons) and utilities that
need special attention (read: packaging) and that are not yet available
in Debian (or outdated), together with corresponding initscripts.

Since this is my first incursion into the embedded arena, I would welcome
any help (and, BTW, learn and collaborate with the emdebian project with my
own packages).

It seems to me that a special kernel should be compiled, that special
devices should be created (apparently, the current udev/kernels don't
create the necessary devices needed so that the device doesn't shuts down
automatically) and that some daemons specific to the kurobox (and variants)
should be packaged.

Well, that's it. If someone can help here, it would be wonderful. I plan on
documenting what I do so that others can benefit from an easy/standard
Debian install.


Thanks in advance for any help, Rogério Brito.

P.S.: One of the necessary daemons seems to be at
<https://sourceforge.net/projects/ppc-evtd/>, with a GPL license.
P.S.2: I'm not currently subscribed to debian-devel. I would appreciate
being Cc'ed.
[*] http://penguinppc.org/embedded/kuro/
--
Rogério Brito : rbrito@{mackenzie,ime.usp}.br : GPG key 1024D/7C2CAEB8
http://www.ime.usp.br/~rbrito : http://meusite.mackenzie.com.br/rbrito
Projects: algorithms.berlios.de : lame.sf.net : vrms.alioth.debian.org


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 08-22-2008, 12:49 PM
Guennadi Liakhovetski
 
Default Help supporting Debian on a Kurobox

On Fri, 22 Aug 2008, Rogério Brito wrote:

> Dear people,
>
> Thanks to Charles Plessy, I have now a new PowerPC based machine, which is
> a Kuro Box[*], an embedded system/NAS with a Linux kernel and a kind of
> stripped down RH-like system (no compilers, no chroot, no NFS server etc).
>
> I obviously want to run Debian on it so that I downloaded the powerpc
> basedebs.tar from woody, a statically linked busybox (for chroot), unpacked
> and manually installed these packages, upgraded to sarge and now to etch.
> This system image is already tarred and available for others to see, if
> necessary.
>
> Unfortunately, things are not that easy, since there are two main
> obstacles:

Hi,

ask on #linkstationwiki on FreeNode, or talk on
http://www.nas-central.org/ forums, or post to
LinkStation_General@yahoogroups.com (might need to subscribe).

Good luck
Guennadi

>
> * the kernel available on the firmware is a kernel 2.4.17 and the libc6
> from lenny requires a 2.6 kernel for the NTPL support. It seems to be
> possible to upgrade the kernel to 2.6, but not as trivial as with a
> PowerMac (and I'm used to both OldWorld and NewWorld PowerMacs).
>
> * There seems to be some daemons (heartbeat daemons) and utilities that
> need special attention (read: packaging) and that are not yet available
> in Debian (or outdated), together with corresponding initscripts.
>
> Since this is my first incursion into the embedded arena, I would welcome
> any help (and, BTW, learn and collaborate with the emdebian project with my
> own packages).
>
> It seems to me that a special kernel should be compiled, that special
> devices should be created (apparently, the current udev/kernels don't
> create the necessary devices needed so that the device doesn't shuts down
> automatically) and that some daemons specific to the kurobox (and variants)
> should be packaged.
>
> Well, that's it. If someone can help here, it would be wonderful. I plan on
> documenting what I do so that others can benefit from an easy/standard
> Debian install.
>
>
> Thanks in advance for any help, Rogério Brito.
>
> P.S.: One of the necessary daemons seems to be at
> <https://sourceforge.net/projects/ppc-evtd/>, with a GPL license.
> P.S.2: I'm not currently subscribed to debian-devel. I would appreciate
> being Cc'ed.
>
>[*] http://penguinppc.org/embedded/kuro/
> --
> Rogério Brito : rbrito@{mackenzie,ime.usp}.br : GPG key 1024D/7C2CAEB8
> http://www.ime.usp.br/~rbrito : http://meusite.mackenzie.com.br/rbrito
> Projects: algorithms.berlios.de : lame.sf.net : vrms.alioth.debian.org
>
>
> --
> To UNSUBSCRIBE, email to debian-powerpc-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
>

---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 08-22-2008, 01:05 PM
Rogério Brito
 
Default Help supporting Debian on a Kurobox

Hi, Sven.

On Aug 22 2008, Sven Luther wrote:
> On Fri, Aug 22, 2008 at 09:14:04AM -0300, Rogério Brito wrote:
> > Since this is my first incursion into the embedded arena, I would welcome
> > any help (and, BTW, learn and collaborate with the emdebian project with my
> > own packages).
> >
> > It seems to me that a special kernel should be compiled, that special
> > devices should be created (apparently, the current udev/kernels don't
> > create the necessary devices needed so that the device doesn't shuts down
> > automatically) and that some daemons specific to the kurobox (and variants)
> > should be packaged.
>
> Can you get access to the dmesg output of this board, or otherwise can
> tell us what cpu is used inside ?

Sure, the dmesg is attached here.

> Also i suppose it uses uboot or another similar bootloader, debian
> currently has no support for this, but there is some basic uboot support
> for arm based devices, didn't follow this lately.

Yes, it seems to be able to boot with uboot, yes. But it needs some
packages specific to the kurobox (and other Linkstation boxes), like the
heartbeat daemon that I mentioned on the earlier message. Some init scripts
also seem to be needed.

> Please forward this mail to the list, since i am being censored and
> can't post directly.

No problems (you still can't post to the lists?). Anyway, even if you can't
post, please, keep the Cc'ies, please.


Regards, Rogério Brito.

--
Rogério Brito : rbrito@{mackenzie,ime.usp}.br : GPG key 1024D/7C2CAEB8
http://www.ime.usp.br/~rbrito : http://meusite.mackenzie.com.br/rbrito
Projects: algorithms.berlios.de : lame.sf.net : vrms.alioth.debian.org
Memory BAT mapping: BAT2=64Mb, BAT3=0Mb, residual: 0Mb
Linux version 2.4.17_kuro-box (root@toda_dev.melcoinc.co.jp) (gcc version 2.95.3 20010315 (release/MontaVista)) #2 2004ÇŻ 3·î 18Ćü ĚÚÍËĆü 11:39:47 JST
KURO-BOX (C) 2004 KUROUTO-SHIKOU.
On node 0 totalpages: 16384
zone(0): 16384 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/hda1
OpenPIC Version 1.2 (1 CPUs and 139 IRQ sources) at 80040000
decrementer frequency = 24.362848 MHz
rtc sec count 1219405372
Calibrating delay loop... 129.84 BogoMIPS
Memory: 60532k available (1124k kernel code, 520k data, 188k init, 0k highmem)
Dentry-cache hash table entries: 8192 (order: 4, 65536 bytes)
Inode-cache hash table entries: 4096 (order: 3, 32768 bytes)
Mount-cache hash table entries: 1024 (order: 1, 8192 bytes)
Buffer-cache hash table entries: 4096 (order: 2, 16384 bytes)
Page-cache hash table entries: 16384 (order: 4, 65536 bytes)
POSIX conformance testing by UNIFIX
PCI: Probing PCI hardware
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
Disabling the Out Of Memory Killer
Journalled Block Device driver loaded
pty: 256 Unix98 ptys configured
BUFFALO INC. RTC driver ver 1.00
Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI enabled
ttyS00 at 0x80004600 (irq = 138) is a 16550A
ttyS01 at 0x80004500 (irq = 137) is a 16550A
block: 128 slots per queue, batch=32
RAMDISK driver initialized: 16 RAM disks of 10000K size 1024 blocksize
Uniform Multi-Platform E-IDE driver Revision: 6.31
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
CMD680: IDE controller on PCI bus 00 dev 60
CMD680: chipset revision 2
CMD680: 100% native mode on irq 17
ide0: BM-DMA at 0xbffed0-0xbffed7, BIOS settings: hdaio, hdbio
ide1: BM-DMA at 0xbffed8-0xbffedf, BIOS settings: hdcio, hddio
hda: HDS722516VLAT20, ATA DISK drive
ide0 at 0xbffef8-0xbffeff,0xbffef6 on irq 17
hda: 321672960 sectors (164697 MB) w/1794KiB Cache, CHS=20023/255/63, UDMA(100)
Partition check:
hda: hda1 hda2 hda3
loop: loaded (max 8 devices)
FLASHDISK:Initialized [FUJITSU MBM29PL32TM]
Linux Tulip driver version 0.9.15-pre9 (Nov 6, 2001)
tulip0: MII transceiver #1 config 3100 status 7849 advertising 05e1.
eth0: ADMtek Comet rev 17 at 0xbfff00, 00:07:40:FB:207, IRQ 16.
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 4096 bind 4096)
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
NET4: AppleTalk 0.18a for Linux NET4.0
RAMDISK: Compressed image found at block 0
Freeing initrd memory: 2077k freed
Boot from /dev/hda1.
EXT2-fs warning: checktime reached, running e2fsck is recommended
VFS: Mounted root (ext2 filesystem).
Boot from /dev/hda1.
kjournald starting. Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
VFS: Mounted root (ext3 filesystem) readonly.
change_root: old root has d_count=2
Trying to unmount old root ... okay
Freeing unused kernel memory: 188k init
Adding Swap: 257032k swap-space (priority -1)
EXT3 FS 2.4-0.9.17, 10 Jan 2002 on ide0(3,1), internal journal
kjournald starting. Commit interval 5 seconds
EXT3 FS 2.4-0.9.17, 10 Jan 2002 on ide0(3,3), internal journal
EXT3-fs: mounted filesystem with ordered data mode.
usb.c: registered new driver usbdevfs
usb.c: registered new driver hub
usb-ohci.c: USB OHCI at membase 0xc503a000, IRQ 19
usb-ohci.c: usb-00:0e.0, NEC Corporation USB
usb.c: new USB bus registered, assigned bus number 1
hub.c: USB hub found
hub.c: 3 ports detected
usb-ohci.c: USB OHCI at membase 0xc503c000, IRQ 19
usb-ohci.c: usb-00:0e.1, NEC Corporation USB (#2)
usb.c: new USB bus registered, assigned bus number 2
hub.c: USB hub found
hub.c: 2 ports detected
hcd.c: ehci-hcd @ 00:0e.2, PCI device 1033:00e0 (NEC Corporation)
hcd.c: irq 19, pci mem c5044f00
usb.c: new USB bus registered, assigned bus number 3
ehci-hcd.c: USB 2.0 support enabled, EHCI rev 1. 0
hub.c: USB hub found
hub.c: 5 ports detected
SCSI subsystem driver Revision: 1.00
Initializing USB Mass Storage driver...
usb.c: registered new driver usb-storage
USB Mass Storage support registered.
usb.c: registered new driver usblp
printer.c: v0.11: USB Printer Device Class driver
 
Old 08-22-2008, 01:13 PM
Rogério Brito
 
Default Help supporting Debian on a Kurobox

Hi, Guennadi. Thanks for your answer.

On Aug 22 2008, Guennadi Liakhovetski wrote:
> Hi,
>
> ask on #linkstationwiki on FreeNode, or talk on
> http://www.nas-central.org/ forums, or post to
> LinkStation_General@yahoogroups.com (might need to subscribe).

Visiting the site, it seems that some people there seem to want some
homebrew solutions. I would like to integrate what I do to Debian, so that
we can support some extra systems.

I have mirrored what they offer there and on other sites, but having a
kernel suitably packaged would be a good thing.

Oh, one thing that I noticed is that most of the efforts there seem to be
geared towards newer versions of the Kurobox (like the Kurobox HG and Pro
versions).


Thanks, Rogério Brito.

--
Rogério Brito : rbrito@{mackenzie,ime.usp}.br : GPG key 1024D/7C2CAEB8
http://www.ime.usp.br/~rbrito : http://meusite.mackenzie.com.br/rbrito
Projects: algorithms.berlios.de : lame.sf.net : vrms.alioth.debian.org


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 08-22-2008, 01:43 PM
Rogério Brito
 
Default Help supporting Debian on a Kurobox

On Aug 22 2008, Sven Luther wrote:
> On Fri, Aug 22, 2008 at 10:05:33AM -0300, Rogério Brito wrote:
> > On Aug 22 2008, Sven Luther wrote:
> > > Can you get access to the dmesg output of this board, or otherwise can
> > > tell us what cpu is used inside ?
> >
> > Sure, the dmesg is attached here.
>
> Damn, i can't find easily the CPU model, can you give /proc/cpuinfo
> output ? I think it is a 82xx or so, not sure.

Here is the output:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cpu : 82xx
revision : 16.20 (pvr 8081 1014)
bogomips : 129.84
vendor : Motorola SPS
machine : Sandpoint
processor : PVID: 0x80811014, vendor: Motorola
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

> > Yes, it seems to be able to boot with uboot, yes. But it needs some
>
> Can you access to the uboot prompt ?

No, I can't (or I don't know). It only has an ethernet and an USB port.
Nothing else.

> > packages specific to the kurobox (and other Linkstation boxes), like
> > the heartbeat daemon that I mentioned on the earlier message. Some init
> > scripts also seem to be needed.
>
> Ok, but that is *AFTER* you have booted the kernel, right ? So, the
> first order of things is to add generation fo a uboot uImage out of the
> debian klernel, and maybe you need to enable

Right, but the current heartbeat daemon seems to be independent of the
kernel. Knowing how to generate a uboot image would help, though. Wouldn't
it be created in a usual way? Does it need extra steps?

> I had some early work for the MPC8349 some time back, which is i believe
> the successor cpu of the one used in the kurobox, but it has been some
> time since i looked at this.

Any information that you can supply would be helpful.


Regards, Rogério Brito.

--
Rogério Brito : rbrito@{mackenzie,ime.usp}.br : GPG key 1024D/7C2CAEB8
http://www.ime.usp.br/~rbrito : http://meusite.mackenzie.com.br/rbrito
Projects: algorithms.berlios.de : lame.sf.net : vrms.alioth.debian.org


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 08-22-2008, 03:11 PM
Rogério Brito
 
Default Help supporting Debian on a Kurobox

On Aug 22 2008, Sven Luther wrote:
> On Fri, Aug 22, 2008 at 10:43:40AM -0300, Rogério Brito wrote:
> > Here is the output:
> >
> > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> > cpu : 82xx
> > revision : 16.20 (pvr 8081 1014)
> > bogomips : 129.84
> > vendor : Motorola SPS
> > machine : Sandpoint
> > processor : PVID: 0x80811014, vendor: Motorola
> > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>
> It is indeed a 82xx,a powerquicc II cpu, a 8241 if i remember well.

I'm not that well informed about PowerPCs.

> Mmm, it doesn"t seem to be listed on the freescale product page anymore
> though.

It is probably not listed, as I would guess that it is an older CPU
(200MHz).

> Ok. It is possible that you could attach a serial console, but this
> involves some soldering on the board. Search the web for instructions on
> how to do this.

I don't even know if the kernel has serial support compiled in. I will
check this.

> > Right, but the current heartbeat daemon seems to be independent of the
> > kernel. Knowing how to generate a uboot image would help, though. Wouldn't
> > it be created in a usual way? Does it need extra steps?
>
> Well, i don't know the kurobox userland, but basically things go like
> this :

It's just a common ppc box, with some additional things to light up the
leds in case of a full HD and in case of shutting down the system. It seems
that using a custom kernel with uboot looses some functionality, though.
:-(

> 1) U-boot is able to boot a uimage.

Right, but how does one generate this uImage? Will it be side-by-side of a
normal kernel image?

> 2) This uimage can either be a standalone kernel, with a filesystem in
> flash (using jffs2 asfilesystem for example)

Right. I'm not sure the flash RAM has enough space for a 2.6 kernel, as
they are much bigger than 2.4 kernels with the same (or similar) configs.

> 3) or this uimage can be a a kernel with builtin ramdisk, containing
> the filesystem.

I think that this is what is the approach used by the factory default
firmware.

> 4) you could be booting the kernel with an NFS system easier for
> debugging, and before generating the flash.

Indeed.

> 5) the userland takes over, and runs various things. I ghuess that the
> heartbeat daemon is the one controlling the watchdog in the MPC8241,
> and if you don't run it, it will reset the board.

Yes, that's what I read: the watchdog will shudown the system in 30s
approximately.

> So, the first order of business is to get your kurobox modified so it
> has a serial console, and see if you can get the uboot prompt, once you
> have this, things become an order of magnitude easier.

There is one thing that the community has developed: a module called load.o
(or something like this) which basically does the job of a kexec, loading
another kernel.

> Also check if you have the 2x8 pin header for the JTAG interface
> somewhere.

I read that such interface would allow me to flash the device without fear
of it being bricked. Is that right? I would also like to have the
possibility of getting it back to the stock firmware in case that I make
some mistake.

> Maybe the kernel (or uboot) can be modified to disabled the cpu
> watchdog support, and thus not need the heartbeat daemon. Not sure
> though, because once enabled, you can't disable it.

The heartbeat daemon seems to be available, though. I hope that it
works. I'm willling to package it.

> From the debian side, you need a new kenrel flavour (it is not the
> generic MPC82xx), as well as support for generating a uImage that uboot
> can boot.

For now, I am happy to build my own image and learn things so that I can
feed things to the official Debian kernel in the future. I would be using
kernel-package for this task.

> This needs a packaged version of mkimage for powerpc, and
> probably some modifications of mkvmlinuz (or the kernel package
> directly).

Which utilities would generate an uImage?

> I have not much time today, but will help you as much as i can, altough
> i doubt i can contribute to the debian packaging directly,

I don't think that this would be a problem. We can cooperate and I can try
to submit patches, which I hope that are sensible.

> since the kernel team said that any patch, if it comes from me, is not
> acceptable, and anyway, it would be best to start trying to merge stuff
> once it is validated, and debian/lenny has been released.

No problems, I would just like to have newer tools to improve the
environment and generate images for the community. I'm not really worried
about lenny being released now or not. The way I see the development on
Debian is as a continuous process.

> I hope the above helps.

Thanks for the help so far.

> Please remove the mail followup to, so i can do a group reply without
> having only the lists in To, and thus my mail getting lost.

I think that I have fixed that.


Thanks, Rogério Brito.

--
Rogério Brito : rbrito@{mackenzie,ime.usp}.br : GPG key 1024D/7C2CAEB8
http://www.ime.usp.br/~rbrito : http://meusite.mackenzie.com.br/rbrito
Projects: algorithms.berlios.de : lame.sf.net : vrms.alioth.debian.org


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 08-22-2008, 03:31 PM
Luca Capello
 
Default Help supporting Debian on a Kurobox

Hi Rogério!

Please don't Cc: me, I read the debian-devel list.

On Fri, 22 Aug 2008 17:11:45 +0200, Rogério Brito wrote:
> On Aug 22 2008, Sven Luther wrote:
>> 1) U-boot is able to boot a uimage.
>
> Right, but how does one generate this uImage? Will it be side-by-side
> of a normal kernel image?

Not that I ever tried, but you should check uboot-mkimage:

======
luca@gismo:~$ apt-cache show uboot-mkimage
Package: uboot-mkimage
[...]
Description: generate kernel image for U-Boot
This package contains the mkimage utility, which encapsulates a compressed
"uImage" Linux kerel image with header information, CRC32 checksum, etc,
for use with the U-Boot bootloader.
.
mkimage can also be used to create ramdisk images for use
with U-Boot, either separated from the Linux kernel image, or
combined into one file. mkimage encapsulates the images with a 64
byte header containing information about target architecture,
operating system, image type, compression method, entry points, time
stamp, CRC32 checksums, etc.

luca@gismo:~$
=====

Thx, bye,
Gismo / Luca
 
Old 08-25-2008, 04:26 PM
RalfGesellensetter
 
Default Help supporting Debian on a Kurobox

Am Freitag 22 August 2008 schrieb =?iso-8859-1?Q?Rog=E9rio?= Brito:
> I obviously want to run Debian on it so that I downloaded the powerpc
> basedebs.tar from woody, a statically linked busybox (for chroot),
> unpacked and manually installed these packages, upgraded to sarge and
> now to etch. This system image is already tarred and available for
> others to see, if necessary.

Hi Brito,

interesting hardware.
Do you know
http://www.harunana.jp/apache2-default/index.php?Debian%EF%BC%9Awoody%E2%86%92sarge%E5%8C %96 ?

Maybe you can get help there.

Regards
Ralf


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 02:06 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org