BeagleBoard running arm debian etch from sd card

142 views
Skip to first unread message

RobertCNelson

unread,
Aug 15, 2008, 2:45:42 PM8/15/08
to Beagle Board, robert...@digikey.com
Hello,

Attached is a quick guide i put together for getting debian on the
beagleboard. I'm still in the process of building a native debian arm
kernel*, so this guide will build a debian root file system, but you
will still have to use one of the available uImage's.. (I'm currently
using uImage_OTG from the beagle board google code site..)

* Status: native compiling on beagle hardlocks at 'calibrate.o', i'm
currently attempting to build an image thru qemu.

Regards,

cat howto-mmc-uboot-ext3issue.txt
#GOAL boot debian linux with single sd card..
#Problem: ext2load doesn't work correctly, in current git u-boot /
test/
#Status:
#Debian boots, console on hdmi-dvi, usb keyboard, etc
#Issues:
#swap partition disabled, (change /dev/hda5 -> /dev/mmcblock0p5 in /
etc/fstab) artifact of qemu install /dev/hdaX
#Building kernel, gcc runs, but hard locks 10-15 files into make
uImage.. ;) (swap/ram issue..)
#RTC/time hasn't really ever worked, add ntpdate to default install or
issue date MMDDHHMMSSYYYY
#Unknown/can't test:
#ethernet
#With the uImage_OTG image none of my usb-ethernet/usb-wifi adapters
work..

****2GB mmc/sd card***
fat 50MB
ext3 2GB-50MB
*******************
uboot commands...
setenv bootcmd 'mmcinit; fatload mmc 0:1 0x80300000 uImage_OTG; bootm
0x80300000'
setenv bootargs 'console=ttyS2,115200n8 noinitrd root=/dev/mmcblk0p2
rootfstype=ext3 rw rootdelay=5 nohz=off'
saveenv
boot

**********DESTKOP PC***************************************
#partition mmc card (debian will format rest ext3)
## use largest continuous space
##debian partition:
#1 primary 49.4MB fat16
#2 primary 1.8GB B f ext3 /
#5 logical 156.2MB f swap swap

Disk /dev/sde: 2032 MB, 2032664576 bytes
255 heads, 63 sectors/track, 247 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000ab123

Device Boot Start End Blocks Id System
/dev/sde1 1 6 48163+ 6 FAT16

#using qemu with real mmc card.. (qemu is having issues with image
files on my build machine..)

##QEMU, arm, debian reference: http://www.aurel32.net/info/debian_arm_qemu.php
#packages we need to run qemu on arm..
wget http://people.debian.org/~aurel32/arm-versatile/vmlinuz-2.6.18-6-versatile
wget http://people.debian.org/~aurel32/arm-versatile/initrd.img-2.6.18-6-versatile
wget http://ftp.de.debian.org/debian/dists/etch/main/installer-arm/current/images/rpc/netboot/initrd.gz

##sudo - accesing '/dev/sde' directly
sudo qemu-system-arm -M versatilepb -kernel vmlinuz-2.6.18-6-versatile
-initrd initrd.gz -hda /dev/sde -append "root=/dev/ram"
#install debian, [yes] continue install when asked about the kernel
modules.. (we will add the actual kernel at a later date)
##run debian..
sudo qemu-system-arm -M versatilepb -kernel vmlinuz-2.6.18-6-versatile
-initrd initrd.img-2.6.18-6-versatile -hda /dev/sde -append "root=/dev/
sda2"
#notes, time's messed up, so only log in as root (password requires
change) till ntpdate is installed...
#login as root, change password
#apt-get install ntpdate
#ntpdate pool.ntp.org
#reboot.. relogin change password...

##Done with qemu, shutdown machine and remount sd card.

copy uImage to fat partition.
cd /media/disk-1/
wget http://beagleboard.googlecode.com/files/uImage_OTG
sync

**********BEAGLE BOARD***************************************

setenv bootcmd 'mmcinit; fatload mmc 0:1 0x80300000 uImage_OTG; bootm
0x80300000'
setenv bootargs 'console=ttyS2,115200n8 noinitrd root=/dev/mmcblk0p2
rootfstype=ext3 rw rootdelay=5 nohz=off'
saveenv
boot

#Note: the beagle board will auto reboot on all future powerup's.

--
Robert Nelson
robert...@digikey.com
Digi-Key FAE

Dirk Behme

unread,
Aug 15, 2008, 2:52:12 PM8/15/08
to robert...@digikey.com, beagl...@googlegroups.com
RobertCNelson wrote:
> Hello,
>
> Attached is a quick guide i put together for getting debian on the
> beagleboard. I'm still in the process of building a native debian arm
> kernel*, so this guide will build a debian root file system, but you
> will still have to use one of the available uImage's.. (I'm currently
> using uImage_OTG from the beagle board google code site..)
>
> * Status: native compiling on beagle hardlocks at 'calibrate.o', i'm
> currently attempting to build an image thru qemu.

Great!

Do you like to create a wiki page for this at

http://elinux.org/

e.g.

http://elinux.org/BeagleBoardDebian

?

Then we can add the link to

http://elinux.org/BeagleBoard

Thanks

Dirk

RobertCNelson

unread,
Aug 15, 2008, 3:01:25 PM8/15/08
to Beagle Board
On Aug 15, 1:52 pm, Dirk Behme <dirk.be...@googlemail.com> wrote:
>
> Great!
>
> Do you like to create a wiki page for this at
>
> http://elinux.org/
>
> e.g.
>
> http://elinux.org/BeagleBoardDebian

Will do! Should be up shortly for a quick review, then publish...

>
> ?

Jason Kridner

unread,
Aug 15, 2008, 3:23:25 PM8/15/08
to beagl...@googlegroups.com
On Fri, Aug 15, 2008 at 2:01 PM, RobertCNelson <Robert...@gmail.com> wrote:

On Aug 15, 1:52 pm, Dirk Behme <dirk.be...@googlemail.com> wrote:
>
> Great!
>
> Do you like to create a wiki page for this at
>
> http://elinux.org/
>
> e.g.
>
> http://elinux.org/BeagleBoardDebian

Will do!  Should be up shortly for a quick review, then publish...

I'd also suggest creating a project entry on http://beagleboard.org/project and having it point to the wiki page.

RobertCNelson

unread,
Aug 15, 2008, 4:37:10 PM8/15/08
to Beagle Board
Dirk Behme:

Wiki page is up and ready for first review: http://elinux.org/BeagleBoardDebian

Jason Kridner

Submitted a project, the wording will need a little work, but it's
enough to get the idea..

Regards,

nhi...@gmail.com

unread,
Aug 17, 2008, 4:07:33 PM8/17/08
to Beagle Board, Robert...@gmail.com
On Aug 15, 9:45 pm, RobertCNelson <Robert...@gmail.com> wrote:
> Attached is a quick guide i put together for getting debian on the
> beagleboard.

Thanks!

> ##QEMU, arm, debian reference:http://www.aurel32.net/info/debian_arm_qemu.php
> #packages we need to run qemu on arm..
> wgethttp://people.debian.org/~aurel32/arm-versatile/vmlinuz-2.6.18-6-vers...
> wgethttp://people.debian.org/~aurel32/arm-versatile/initrd.img-2.6.18-6-v...
> wgethttp://ftp.de.debian.org/debian/dists/etch/main/installer-arm/current...

Can you try with images from:

http://ftp.de.debian.org/debian/dists/lenny/main/installer-armel/current/images/versatile/netboot/

etch/arm is quite obsolete at this point, for the next release, lenny
Debian is going for armel.

Also, if you could report any issues you have with the lenny
installer:

http://d-i.alioth.debian.org/manual/en.arm/ch05s03.html#submit-bug

Robert Nelson

unread,
Aug 17, 2008, 5:04:09 PM8/17/08
to nhi...@gmail.com, Beagle Board
On Sun, Aug 17, 2008 at 3:07 PM, nhi...@gmail.com <nhi...@gmail.com> wrote:
> On Aug 15, 9:45 pm, RobertCNelson <Robert...@gmail.com> wrote:
>> Attached is a quick guide i put together for getting debian on the
>> beagleboard.
>
> Thanks!
>
>> ##QEMU, arm, debian reference:http://www.aurel32.net/info/debian_arm_qemu.php
>> #packages we need to run qemu on arm..
>> wgethttp://people.debian.org/~aurel32/arm-versatile/vmlinuz-2.6.18-6-vers...
>> wgethttp://people.debian.org/~aurel32/arm-versatile/initrd.img-2.6.18-6-v...
>> wgethttp://ftp.de.debian.org/debian/dists/etch/main/installer-arm/current...
>
> Can you try with images from:
>
> http://ftp.de.debian.org/debian/dists/lenny/main/installer-armel/current/images/versatile/netboot/
>
> etch/arm is quite obsolete at this point, for the next release, lenny
> Debian is going for armel.

I agree!!! ;)

At this point, i'm kinda stuck in the old non-eabi world. You
wouldn't happen to know where the current arm eabi patches for qemu
are hosted? (tried qemu trunk last night, with the lenny 'armel'
versatile netboot and the image wasn't able to detect the flash drive
(/dev/sdx, or hda.img)) and qemubuilder also failed.

At this point, I've got a method to build a native kernel non-eabi,
but I'm still tweaking the .config (framebuffer comes up corrupted, so
i don't have a console.. (rebuilding another native image as i
type..)).. Technique is listed here:
http://elinux.org/BeagleBoardDebian

I'm thinking once, we have a good working non-eabi kernel, (with
builtin usb-ethernet/wifi support). I want to load both the kernel
and the initrd.gz installer in ram, and do a standard netboot install.
Once that's successful, have a existing armel platform (i don't have
access to one of these at the moment) build a kernel with the same
.config, and completely bypass the qemu install method.. ;)

>
> Also, if you could report any issues you have with the lenny
> installer:
>
> http://d-i.alioth.debian.org/manual/en.arm/ch05s03.html#submit-bug
>
>


--
Robert Nelson
http://www.rcn-ee.com/

"Black holes are where God divided by zero."
- Steven Wright

Robert Nelson

unread,
Aug 17, 2008, 5:22:56 PM8/17/08
to nhi...@gmail.com, Beagle Board
Thank again!

Talk about one of those sundays. ;)

I'm going to retract my previous statement, since qemu trunk decided
to detect my hda.img today. So i'm going to run with this, and get
lenny eabi guide setup..

Dirk Behme

unread,
Aug 18, 2008, 11:31:17 AM8/18/08
to beagl...@googlegroups.com
Robert Nelson wrote:
> Thank again!
>
> Talk about one of those sundays. ;)
>
> I'm going to retract my previous statement, since qemu trunk decided
> to detect my hda.img today. So i'm going to run with this, and get
> lenny eabi guide setup..

Not being an expert of ARM Debian, I'm slightly confused looking at
recent version of

http://elinux.org/BeagleBoardDebian

Is the note

"Note: This guide still uses the old etch arm 'non-eabi'. I'm
currently modifying it for lenny armel eabi."

still correct? If yes, what is still missing for lenny armel eabi?
Most sections seem to have a lenny 'armel' part. If no, should the
etch 'arm' parts be removed? If both parts are still relevant, we
should give the reader of the page a hint which configuration to use when.

And same with Native Built Debian Kernel section: We should give the
reader a hint when to use the precompiled binaries and when to use
build it your own section:

"You can use precompiled lenny armel eabi binaries if you want to ...
or you can build everything at your own .... Building on your own has
the advantage ..."

Sorry if I missed anything,

Dirk

Robert Nelson

unread,
Aug 18, 2008, 6:49:28 PM8/18/08
to beagl...@googlegroups.com
>
> Not being an expert of ARM Debian, I'm slightly confused looking at
> recent version of
>
> http://elinux.org/BeagleBoardDebian
>
> Is the note
>
> "Note: This guide still uses the old etch arm 'non-eabi'. I'm
> currently modifying it for lenny armel eabi."
>
> still correct? If yes, what is still missing for lenny armel eabi?
> Most sections seem to have a lenny 'armel' part. If no, should the
> etch 'arm' parts be removed? If both parts are still relevant, we
> should give the reader of the page a hint which configuration to use when.

Hi Dirk,
The page is messy at the moment, i'd like to remove all 'etch-arm'
material and only list 'lenny-armel'.. (armel, is slated to be an
official debian release to replace 'arm' for devices that support
it..) Except, I've been unable to finish building a native kernel in
'lenny-armel', i'm thinking it's a binutils issue, I'm rebuilding it
again at the moment, will post a full log shortly..

Reference: In the debian world there are two abi's for arm.. 'arm' =
original, 'armel' = arm eabi.
http://wiki.debian.org/ArmEabiPort

>
> And same with Native Built Debian Kernel section: We should give the
> reader a hint when to use the precompiled binaries and when to use
> build it your own section:
>
> "You can use precompiled lenny armel eabi binaries if you want to ...
> or you can build everything at your own .... Building on your own has
> the advantage ..."

I agree..

I'm thinking this document needs to be in two sections.

[1] Default install: partition your mmc card, run qemu and install
debian, reboot qemu and download these recompiled kernel deb's..
(basically a script based install)

[2] How to: Building a native Kernel (including build directions uboot
to get mkimage).

>
> Sorry if I missed anything,
>
> Dirk
>
>
>

Kernel log just finished, here's my current issue: (i'm thinking
CROSS_COMPILE snuck thru..)


/bin/sh: arm-linux-gnueabi-objdump: command not found
HOSTCC scripts/mod/mk_elfconfig
MKELF scripts/mod/elfconfig.h
HOSTCC scripts/mod/file2alias.o
HOSTCC scripts/mod/modpost.o
HOSTCC scripts/mod/sumversion.o
HOSTLD scripts/mod/modpost
HOSTCC scripts/kallsyms
HOSTCC scripts/pnmtologo
HOSTCC scripts/conmakehash
CC init/main.o
/tmp/ccHH14Zc.s: Assembler messages:
/tmp/ccHH14Zc.s:882: Error: selected processor does not support `cpsie i'
/tmp/ccHH14Zc.s:1357: Error: selected processor does not support `cpsid i'
/tmp/ccHH14Zc.s:1374: Error: selected processor does not support `cpsid i'
/tmp/ccHH14Zc.s:1401: Error: selected processor does not support `cpsid i'
/tmp/ccHH14Zc.s:1428: Error: selected processor does not support `cpsid i'
/tmp/ccHH14Zc.s:1540: Error: selected processor does not support `cpsid i'
/tmp/ccHH14Zc.s:1585: Error: selected processor does not support `cpsie i'

Thanks!

Reply all
Reply to author
Forward
0 new messages