New IT forum
13 August 2022, 11:21:29 am *
Welcome, %1$s. Please login or register.

: CubieBoard 2 and Cubietruck both now in stock.
 
Pages: [1] 2

Author Topic: Debian on the dreamplug  (Read 27939 times)

ghat

  • Newbie
  • *
  • Posts: 22
Debian on the dreamplug
« on: 18 March 2011, 08:55:36 am »

hi guys,

thanks for the good work, I now have my dreamplug, and want to install the OS from the external SD card, instead of the internal micro-sd. My OS of choice is debian stable... How do I go about installing that ?

I do have the jtag module, so I can get to the uboot.

G  ???

Quote
Looks like I will have to wait for you guys to develop a custom uboot for the dreamplug which can support booting from the SD card, and also will work with debian stable..

The current u-boot seems to be
arvell>> version

U-Boot 2011.06-02334-g8f495d9-dirty (Mar 01 2011 - 06:57:05)
Marvell-DreamPlug
Marvell>>

which is apparently some version customized for the dreamplug....

Quote
Can you guys provide some note/instructions on switching this to WLAN client mode instead of AP...

I am a linux expert, but new to the plug, (except my nslu2), I really hate when people load stuff from
rc.local and /root/ at boot up, it seems to show that the OS is handicapped.. Can't they just do it in a more
modular way through init or something...


Quote
Here is what I have tried so far,
1. purchased a 8GB micro-SD and instaled it  in a USB reader, and put it on one of the USB slots
2. installed a std SD card in the SD slot...
3. the micro-sd of 1, has 3 partitions,
   part 1 => fat32 => contains uImage from the globalscale download site (250MB)
   part 2 => ext3  => untar-gzipped the rootfs from the globalscale download site (2GB)
   part 3 => ext3 => empty but formatted partition (rest of the sd)

I updated tthe /etc/fstab to add a line to mount the part 3 using UUID under /home/

4. at the (default) uboot prompt I give..
Code: [Select]
setenv x_bootcmd_kernel fatload usb 1 0x6400000 uImage
setenv x_bootargs_root root=/dev/sdc2 rootdelay=10
and then a printenv tells me...
Code: [Select]
Marvell>> printenv
bootcmd=setenv ethact egiga0; ${x_bootcmd_ethernet}; setenv ethact egiga1; ${x_bootcmd_ethernet}; ${x_bootcmd_usb}; ${x_bootcmd_kernel}; setenv bootargs ${x_bootargs} ${x_bootargs_root}; bootm 0x6400000;
bootdelay=3
baudrate=115200
x_bootcmd_ethernet=ping 192.168.2.1
x_bootcmd_usb=usb start
x_bootargs=console=ttyS0,115200
ethact=egiga0
ethaddr=F0:AD:4E:00:XX:YY
eth1addr=F0:AD:4E:00:XX:ZZ
stdin=serial
stdout=serial
stderr=serial
x_bootcmd_kernel=fatload usb 1 0x6400000 uImage
x_bootargs_root=root=/dev/sdc2 rootdelay=10

Environment size: 524/4092 bytes
Marvell>>

next I run
Code: [Select]
run bootcmd

The system boots from the uImage from the fat partition on the USB drive, and then loads the rootfs from the partition on the USB drive, the fstab also automounts the /home/ based off the UUID...

The SD card (in the provided slot) shows up as /dev/sdb* however the default uboot does not have support for that slot, so it does not show up in uboot, (there is no mmc option in the factory uboot), so it is not possible to load the uImage from the sd card. However it seems possible to load the rootfs from the sd card (not tried it yet)
by giving the option

Code: [Select]
x_bootargs_root=root=/dev/sdb1 rootdelay=10

Next I am going to try and use
one of... the uImage, uInitrd's from

ftp://ftp.debian.org/debian/dists/stable/main/installer-armel/current/images/kirkwood/netboot/marvell

there is no dreamplug there, but I guess, the guruplug one will probably work... not sure...


« Last Edit: 20 April 2011, 06:45:33 am by ghat »
Logged

sigterm9

  • Newbie
  • *
  • Posts: 4
Re: Debian on the dreamplug
« Reply #1 on: 04 April 2011, 10:55:26 pm »

I'll do a writeup later on it but for now....
seem's to work...

http://blog.bofh.it/debian/id_265
Logged

ghat

  • Newbie
  • *
  • Posts: 22
Re: Debian on the dreamplug
« Reply #2 on: 05 April 2011, 10:22:38 pm »

Update...

I was one of the 400Mhz nightmare-plug guys, now waiting for replacement....

G

Logged

mdawkins

  • Newbie
  • *
  • Posts: 4
Re: Debian on the dreamplug
« Reply #3 on: 07 April 2011, 03:28:56 am »

How did you know you were a 400MHz problem?

I've had nothing but problems with mine so far. Seg faults make it literally impossible to do anything with it.
Logged

ghat

  • Newbie
  • *
  • Posts: 22
Re: Debian on the dreamplug
« Reply #4 on: 07 April 2011, 05:08:49 am »

hi

do a

cat /proc/cpuinfo

Bogomips should be close to 1200 (Mhz), mine was 396...

G
[ you should also somehow test your memory and sd card for errors ]
Logged

ghat

  • Newbie
  • *
  • Posts: 22
Re: Debian on the dreamplug
« Reply #5 on: 15 April 2011, 03:02:00 pm »

Update..

- Got the new dream plug,
- booted back from USB with the initial image I had developed.
- formated the internal microsd to get a bigger boot partition, and
  reformated the factory-rootfs
- installed the factory-uImage on the boot partition
- installed the factory-debian-rootfs (some old version) from the download site
- updated that root-fs to current debian stable, and it works...(still not
   truely debian, as it does not yet run the debian kernel)

Code: [Select]
Debian GNU/Linux 6.0 guruplug-debian ttyS0                                      
                                                                                
guruplug-debian login: root                                                    
Password:                                    
guruplug-debian:~# uname -a                                                    
Linux guruplug-debian 2.6.33.6 #1 PREEMPT Tue Feb 8 03:18:41 EST 2011 armv5tel x
guruplug-debian:~# cat /etc/debian_version                                      
6.0.1                                                                          
guruplug-debian:~# cat /etc/issue                                              
Debian GNU/Linux 6.0 \n \l                                                      
                                                                                
guruplug-debian:~#


« Last Edit: 15 April 2011, 09:34:24 pm by ghat »
Logged

ghat

  • Newbie
  • *
  • Posts: 22
Re: Debian on the dreamplug
« Reply #6 on: 21 April 2011, 04:31:47 pm »

hi

OK, now I have the new uBoot, and am trying to boot from the "external" SD card.
I have a card with 2 partitions, FAT16 for 1st and ext3 for 2nd.

I have downloaded

http://ftp.us.debian.org/debian/dists/squeeze/main/installer-armel/current/images/kirkwood/netboot/marvell/guruplug/

into the 1st partition.

I get to uBoot and do the usual

Code: [Select]
mainlineLinux=yes
arcNumber=2659

(the arc number is the decimal version of the arch from the bdinfo output)

I am able to load the uImage and uInitrd at 0x00800000 and 0x01100000 respectively,
set the bootargs as
Code: [Select]
bootargs=console=ttyS0,115200 base-installer/initramfs-tools/driver-policy=most

however if I then execute
Code: [Select]
Marvell>> help bootm
bootm - boot application image from memory

Marvell>> bootm 0x00800000 0x01100000
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Debian kernel
   Created:      2011-03-15   3:04:25 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1433576 Bytes = 1.4 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   debian-installer ramdisk
   Created:      2011-03-15   3:04:26 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    3167658 Bytes = 3 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Linux version 2.6.32-5-kirkwood (Debian 2.6.32-31) ([email protected]) (gcc version 4.3.5 (Debian 4.3.5-4) ) #1 Tue Mar 8 10:56:14 UTC 2011
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053977
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] Machine: Marvell GuruPlug Reference Board
[    0.000000] Memory policy: ECC disabled, Data cache writeback
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048
[    0.000000] Kernel command line: console=ttyS0,115200 base-installer/initramfs-tools/driver-policy=most
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 256MB 256MB = 512MB total
[    0.000000] Memory: 512000KB available (3516K code, 583K data, 124K init, 0K highmem)
[    0.000000] SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000] NR_IRQS:114
[    0.000000] Console: colour dummy device 80x30
[    0.000115] Calibrating delay loop... 1192.75 BogoMIPS (lpj=5963776)
[    0.240074] Security Framework initialized
[    0.240092] SELinux:  Disabled at boot.
[    0.240111] Mount-cache hash table entries: 512
[    0.240345] Initializing cgroup subsys ns
[    0.240357] Initializing cgroup subsys cpuacct
[    0.240365] Initializing cgroup subsys devices
[    0.240373] Initializing cgroup subsys freezer
[    0.240381] Initializing cgroup subsys net_cls
[    0.240419] CPU: Testing write buffer coherency: ok
[    0.240921] devtmpfs: initialized
[    0.242318] regulator: core version 0.5
[    0.242478] NET: Registered protocol family 16
[    0.242844] Kirkwood: MV88F6281-A1, TCLK=200000000.
[    0.242856] Feroceon L2: Cache support initialised.
[    0.244740] bio: create slab <bio-0> at 0
[    0.245016] vgaarb: loaded
[    0.245459] Switching to clocksource orion_clocksource
[    0.249115] NET: Registered protocol family 2
[    0.249345] IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.250151] TCP established hash table entries: 16384 (order: 5, 131072 bytes)
[    0.250503] TCP bind hash table entries: 16384 (order: 4, 65536 bytes)
[    0.250682] TCP: Hash tables configured (established 16384 bind 16384)
[    0.250691] TCP reno registered
[    0.250840] NET: Registered protocol family 1
[    0.251005] Unpacking initramfs...
[    0.473159] Freeing initrd memory: 3092K
[    0.473250] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.473487] audit: initializing netlink socket (disabled)
[    0.473518] type=2000 audit(0.460:1): initialized
[    0.479917] VFS: Disk quotas dquot_6.5.2
[    0.480175] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.480270] JFFS2 version 2.2. (NAND) (SUMMARY)  ?? 2001-2006 Red Hat, Inc.
[    0.480899] msgmni has been set to 1006
[    0.482473] alg: No test for stdrng (krng)
[    0.482589] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
[    0.482601] io scheduler noop registered
[    0.482608] io scheduler anticipatory registered
[    0.482616] io scheduler deadline registered
[    0.482799] io scheduler cfq registered (default)
[    0.488827] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.489273] serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 33) is a 16550A
[    0.827660] console [ttyS0] enabled

and thats it the system is all hung...

Any hints on how to proceed ?

Ghat
Logged

NewIT_Marcus

  • Hero Member
  • *****
  • Posts: 960
Re: Debian on the dreamplug
« Reply #7 on: 21 April 2011, 04:37:37 pm »

At a guess there is an issue with the tty device. You may find that sshd is running; if you can ssh in you should be able to poke around (if necessary create the tty device). Can you ssh in?
Logged

ghat

  • Newbie
  • *
  • Posts: 22
Re: Debian on the dreamplug
« Reply #8 on: 21 April 2011, 04:56:35 pm »

At a guess there is an issue with the tty device. You may find that sshd is running; if you can ssh in you should be able to poke around (if necessary create the tty device). Can you ssh in?

I tried that, scanned my whole intranet for any open ssh port, nothing...
tried the (older) sid image also, but it does not even boot.

any other uImage/uInitrd I should try ?

is the arcNumber=2659
 correct ?


Is there any bootarg which I should try to force a ssh server install ?

currently I am doing this
Code: [Select]
printenv
setenv ipaddr 192.168.2.95
setenv serverip 192.169.2.5
setenv bootargs console=ttyS0,115200n8 base-installer/initramfs-tools/driver-policy=most rootdelay=10 root=/dev/sdb2
tftpboot 0x01100000 uInitrd.squeeze
tftpboot 0x00800000 uImage.squeeze
printenv

bootm 0x00800000 0x01100000

same result..

Quote
update:
even tried
Code: [Select]
tftpboot 0x6600000 uInitrd.squeeze
tftpboot 0x6400000 uImage.squeeze
bootm 0x6400000 0x6600000

same result... nothing...



G
« Last Edit: 21 April 2011, 05:16:05 pm by ghat »
Logged

NewIT_Marcus

  • Hero Member
  • *****
  • Posts: 960
Re: Debian on the dreamplug
« Reply #9 on: 21 April 2011, 06:04:44 pm »

arcNumber is a switch that is used to enable (or disable) features within kernel code. The only people who can advise on a suitable arcNumber are those who compiled the kernel in question. The Guruplug arcNumber is 2659, but has anyone said that this kernel is usable in the Dreamplug?

It's my understanding that there may be problems with NAND initialisation on the Dreamplug (because there isn't NAND); I believe that James may have a suitable kernel. See here
Logged

ghat

  • Newbie
  • *
  • Posts: 22
Re: Debian on the dreamplug
« Reply #10 on: 21 April 2011, 07:49:00 pm »

hi

There is something missing in the default debian kernel perhaps...

I was able to bootstrap the installation, into the external sd card create a uboot image and try to boot from there...

Code: [Select]
Marvell>> bootm 0x6400000 0x6600000
## Booting kernel from Legacy Image at 06400000 ...
   Image Name:   Linux-2.6.32-5-kirkwood
   Created:      2011-04-21  19:24:12 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1433576 Bytes = 1.4 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 06600000 ...
   Image Name:   initramfs
   Created:      2011-04-21  19:24:13 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    4750295 Bytes = 4.5 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...
Uncompressing Linux... done, booting the kernel.
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Linux version 2.6.32-5-kirkwood (Debian 2.6.32-31) ([email protected]) (gcc version 4.3.5 (Debian 4.3.5-4) ) #1 Tue Mar 8 10:56:14 UTC 2011
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053977
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] Machine: Marvell GuruPlug Reference Board
[    0.000000] Memory policy: ECC disabled, Data cache writeback
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048
[    0.000000] Kernel command line: root=/dev/sdb2 rootdelay=10 console=ttyS0,115200
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 256MB 256MB = 512MB total
[    0.000000] Memory: 510464KB available (3516K code, 583K data, 124K init, 0K highmem)
[    0.000000] SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000] NR_IRQS:114
[    0.000000] Console: colour dummy device 80x30
[   21.474951] Calibrating delay loop... 1192.75 BogoMIPS (lpj=5963776)
[   21.714911] Security Framework initialized
[   21.714928] SELinux:  Disabled at boot.
[   21.714948] Mount-cache hash table entries: 512
[   21.715181] Initializing cgroup subsys ns
[   21.715194] Initializing cgroup subsys cpuacct
[   21.715202] Initializing cgroup subsys devices
[   21.715210] Initializing cgroup subsys freezer
[   21.715218] Initializing cgroup subsys net_cls
[   21.715257] CPU: Testing write buffer coherency: ok
[   21.715759] devtmpfs: initialized
[   21.717156] regulator: core version 0.5
[   21.717317] NET: Registered protocol family 16
[   21.717683] Kirkwood: MV88F6281-A1, TCLK=200000000.
[   21.717694] Feroceon L2: Cache support initialised.
[   21.719576] bio: create slab <bio-0> at 0
[   21.719855] vgaarb: loaded
[   21.720300] Switching to clocksource orion_clocksource
[   21.723959] NET: Registered protocol family 2
[   21.724189] IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
[   21.724991] TCP established hash table entries: 16384 (order: 5, 131072 bytes)
[   21.725343] TCP bind hash table entries: 16384 (order: 4, 65536 bytes)
[   21.725522] TCP: Hash tables configured (established 16384 bind 16384)
[   21.725531] TCP reno registered
[   21.725678] NET: Registered protocol family 1
[   21.725840] Unpacking initramfs...
[   22.043073] Freeing initrd memory: 4636K
[   22.043181] NetWinder Floating Point Emulator V0.97 (double precision)
[   22.043421] audit: initializing netlink socket (disabled)
[   22.043453] type=2000 audit(0.560:1): initialized
[   22.049811] VFS: Disk quotas dquot_6.5.2
[   22.050073] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[   22.050169] JFFS2 version 2.2. (NAND) (SUMMARY)  ?? 2001-2006 Red Hat, Inc.
[   22.050830] msgmni has been set to 1006
[   22.052412] alg: No test for stdrng (krng)
[   22.052529] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
[   22.052541] io scheduler noop registered
[   22.052548] io scheduler anticipatory registered
[   22.052556] io scheduler deadline registered
[   22.052738] io scheduler cfq registered (default)
[   22.058567] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[   22.059010] serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 33) is a 16550A
[   22.376913] console [ttyS0] enabled



and it is hung again, I have ssh-server and the network configured on the rootfs, (works with the factory uImage)
however this one does not come up...

Logged

NewIT_Marcus

  • Hero Member
  • *****
  • Posts: 960
Re: Debian on the dreamplug
« Reply #11 on: 23 April 2011, 08:33:02 am »

There's a new document available from Globalscale, "Set Up A Debian File System In DreamPlug-20110423":

http://code.google.com/p/dreamplug/downloads/list

My guess is that there is something (missing?) in your rootfs (you said "bootstrap", can I infer that you used debootstrap?) that is the source of the problem. When we build a Sheevaplug Debian rootfs we use a variation of Mark Gillespie's script. In particular, the script must add a tty device, which is why I mentioned in it my earlier post. But maybe there's something else we haven't considered.

I don't know when I'll have a chance to try the new GST / Debian procedure, but you should be able to use the rootfs they supply, if that sounds like a reasonable next step?
Logged

Fletch

  • Guest
Re: Debian on the dreamplug
« Reply #12 on: 23 April 2011, 04:11:45 pm »

arcNumber is a switch that is used to enable (or disable) features within kernel code. The only people who can advise on a suitable arcNumber are those who compiled the kernel in question. The Guruplug arcNumber is 2659, but has anyone said that this kernel is usable in the Dreamplug?

I am now running the latest sheeva.with-linux kernel using the guruplug arcNumber.  OS is squeeze.  Seems stable so far.
Logged

ghat

  • Newbie
  • *
  • Posts: 22
Re: Debian on the dreamplug
« Reply #13 on: 23 April 2011, 08:06:44 pm »

There's a new document available from Globalscale, "Set Up A Debian File System In DreamPlug-20110423":

http://code.google.com/p/dreamplug/downloads/list

My guess is that there is something (missing?) in your rootfs (you said "bootstrap", can I infer that you used debootstrap?) that is the source of the problem. When we build a Sheevaplug Debian rootfs we use a variation of Mark Gillespie's script. In particular, the script must add a tty device, which is why I mentioned in it my earlier post. But maybe there's something else we haven't considered.

I don't know when I'll have a chance to try the new GST / Debian procedure, but you should be able to use the rootfs they supply, if that sounds like a reasonable next step?
elementry my dear mr Marcus (watson)...

Well, I guess I already mentioned that I reformatted the micro-sd and installed the gst debian on it and upgraded it to the latest squeeze with no issues.

I was hoping that a "default" or "vanilla" debian (incl kernel) would run on the device, but looks like it does not. I lso got the new Uboot in s I can now use the external-sd, and am experimenting with it. I first booted to the working micro-sd, and then mounted the external-sd and installed debootstrap on to it and later booted to th external-sd and completed the debian install. The debian installed fine, and also installed the vanilla debian kernel, but it hangs.... If I use the GST uImage, I can boot to this new debian-rootfs and that also works... no issues.

I just have to now figure how to compile my own kernel on the system.

I just got the sheeva-with-linux kernel to boot...
Code: [Select]
## Booting kernel from Legacy Image at 06400000 ...
   Image Name:   Linux-2.6.38.4
   Created:      2011-04-22   7:24:37 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2586308 Bytes = 2.5 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

any of how to avoid this error...

Code: [Select]
modprobe: FATAL: Could not load /lib/modules/2.6.38.4/modules.dep: No such file or directory

the kernel was not compiled on the system so it does not have the /lib/modules for that version...

G
Logged

Fletch

  • Guest
Re: Debian on the dreamplug
« Reply #14 on: 23 April 2011, 09:55:36 pm »

Were there any errors when you ran the README?
Logged
Pages: [1] 2
 
 

Powered by MySQL Powered by PHP SMF 2.0.10 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!