Arch Linux ARM on beagleboard xM howto

This forum is for supported devices using an ARMv7 Texas Instruments (TI) SoC.

Arch Linux ARM on beagleboard xM howto

Postby cfritschn » Wed Apr 06, 2011 3:29 pm

Hi i ´m new here,

Here is a little Howto to get Arch Linux ARM on a Beagleboard xM over serial console with the 2.6.38.2 kernel running.

1.prepare your SDcard as per in this Manual http://www.labbookpages.co.uk/electronics/beagleBoard/custom.html#sdCard
you can use mkfs.ext3 or mkfs.ext4 mke2fs is not required.

2. Download MLO and u-boot.bin and store it in your fat Partition
$this->bbcode_second_pass_code('', 'cd /media/boot/
wget http://www.angstrom-distribution.org/demo/beagleboard/MLO
wget http://www.angstrom-distribution.org/demo/beagleboard/u-boot.bin')
Create a new file named bootScript
$this->bbcode_second_pass_code('', 'nano bootScript')
with the following content
$this->bbcode_second_pass_code('', 'mmc init
setenv console tty0 console=ttyO2,115200n8
setenv ramroot /dev/ram0 rw ramdisk_size=131072 initrd=0x88000000,128M
setenv optargs mem=80M@0x80000000 mem=384M@0x88000000
setenv bootargs console=${console} ${optargs} mpurate=800 root=/dev/mmcblk0p2 rootfstype=ext4 rw rootwait
fatload mmc 0 0x82000000 uImage
bootm 0x82000000
')
do not forget to change the rootfstype if you don´t use ext4...

and run now
$this->bbcode_second_pass_code('', 'mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n 'Boot script' -d bootScript boot.scr
')

2. Dowload latest Arch Linux ARM from here http://Arch Linux ARM.com/index.php5/Portal:PlugApps_Linux and extract it to the 2nd partition from your SDcard
$this->bbcode_second_pass_code('', 'sudo tar -C /media/files/ -xzf PlugApps-Linux-2011.02-rootfs.tar.gz')
and do that like this Howto http://Arch Linux ARM.com/index.php5/Developers:_Cross_Compiling

change in the /etc/initab the line from
$this->bbcode_second_pass_code('', 's0:12345:respawn:/sbin/agetty -8 115200 ttyS0 linux')
to
$this->bbcode_second_pass_code('', 's0:12345:respawn:/sbin/agetty -8 115200 ttyO2 linux')
and add in /etc/securetty
$this->bbcode_second_pass_code('', 'ttyO2')

3. Here is my PKGBUILD for the beagle kernel, it is not perfect but it works for the moment.
$this->bbcode_second_pass_code('', '# Maintainer: Christian Fritsch <fritschn@gmx.de>



pkgname=('kernel2.6-beagle' 'kernel2.6-beagle-headers')

pkgver=2.6.38.2

pkgrel=x1

pkgdesc="The Beaglboard Kernel with all needed Patches"

arch=('arm')

url="https://launchpad.net/~beagleboard-kernel"

license=('GPL')

makedepends=('ccache' 'bzr')

source=(system.sh)

md5sums=(297a467e025b3736003025cd4ad1f3c7)



#run bzr from the host system if it fails on the target.

bzr branch lp:~beagleboard-kernel/+junk/2.6-stable



cp ${startdir}/system.sh ${startdir}/2.6-stable

cd ${startdir}/2.6-stable

./build_kernel.sh || return 1



package_kernel2.6-beagle() {

pkgdesc="The Beagleboard Kernel"

groups=('beagleboard')

replaces=('kernel26')



mkdir $pkgdir/boot



cd ${startdir}/2.6-stable/deploy

cp *uImage $pkgdir/boot/uImage

tar -C $pkgdir/ -xzf *modules.tar.gz

}



package_kernel2.6-beagle-headers() {

pkgdesc="The Beagleboard Kernel headers"

groups=('beagleboard')

replaces=('kernel26-headers')



cd ${startdir}/2.6-stable/deploy

tar -C $pkgdir/ -xzf *headers.tar.gz

}

')

and the system.sh

$this->bbcode_second_pass_code('', '#!/bin/bash
ARCH=$(uname -m)
if test "-$ARCH-" = "-armv7l-"
then
echo "Using: Native armv7l Compiler"
CC=
else
echo "Using: Cross Compiler"
fi


')
remove the installed and install the new kernel
$this->bbcode_second_pass_code('', 'pacman -Rd kernel26
pacman -U kernel2.6-beagle-2.6.38.2-x1-arm.pkg.tar.xz')
exit with
$this->bbcode_second_pass_code('', 'ctrl+d')
unmount dev from /media/files
$this->bbcode_second_pass_code('', 'umount /media/files/dev')
and copy the uImage to your boot (fat) patition.
$this->bbcode_second_pass_code('', 'cp /media/files/boot/uImage /media/boot/')

thats it, i hope it is understandable..

br chris
Last edited by cfritschn on Wed Apr 06, 2011 5:30 pm, edited 1 time in total.
cfritschn
 
Posts: 3
Joined: Mon Apr 04, 2011 5:38 pm

Re: Arch Linux ARM on beagleboard xM howto

Postby kmihelich » Wed Apr 06, 2011 4:31 pm

Good work. I have a kernel that sticks with Arch available for the beagle original and xM, and compatible with all other OMAP3/4 devices supported in the kernel. I'm sticking with mainline because things get sticky branching off into other branches.

I also have a new repo branch compiling from the ground up at the moment, compiled specifically for armv7-a, which supports all Cortex-A series architectures. I decided to limit to Cortex-A since that is what the beagle and pandaboard run, it's the most popular implementation of ARMv7, and it's where future devices are heading. This also means I can enable usage of NEON without any fallout.

As of now, I have about 350 packages built so far in the new repo. You'll need to edit /etc/pacman.conf to change "Architecture=armv7", edit /etc/pacman.d/mirrorlist and replace "arm" with "armv7". The compiler is available, and some random packages. It will be a few more days to get through the majority of base packages. Once things stabilize in that repo (within a week or two) I'll create a proper rootfs tarball. There are still issues to work out with the beagleboards for startup network initialization. Original boards have a normal eth0 that gets initialized right away, the xM's ethernet is on the USB controller chip, comes up as usb0, and its initialization delayed about 3-5 seconds past typical ethernet init. I still haven't found a way to reliably differentiate between the boards once booted, but right now building the repo has priority above init stuff.
Arch Linux ARM exists and continues to grow through community support, please donate today!
kmihelich
Developer
 
Posts: 1133
Joined: Tue Jul 20, 2010 6:55 am
Location: aka leming #archlinuxarm

Re: Arch Linux ARM on beagleboard xM howto

Postby cfritschn » Thu Apr 07, 2011 4:51 am

hi kmihelich,

wow that's sounds more then good ;)
Here goes what, not like that time with archmobile :!:
I wait like 2 weeks if we get a armv7 optimized Arch Linux ARM,
if there is something that i perhaps can help let me know.

chris
cfritschn
 
Posts: 3
Joined: Mon Apr 04, 2011 5:38 pm

Re: Arch Linux ARM on beagleboard xM howto

Postby kmihelich » Thu Apr 07, 2011 5:08 am

You can join us on irc.freenode.net in #Arch Linux ARM to keep up with the latest. By the end of the week I should have some testing images to play with, and most of that activity happens in IRC. Forums just aren't as efficient or real-time ;)
Arch Linux ARM exists and continues to grow through community support, please donate today!
kmihelich
Developer
 
Posts: 1133
Joined: Tue Jul 20, 2010 6:55 am
Location: aka leming #archlinuxarm

Re: Arch Linux ARM on beagleboard xM howto

Postby cfritschn » Fri Apr 29, 2011 2:55 pm

Hi Guys,

how is the status atm.??

I can´t wait :?

Here is a pic with running Arch Linux ARM on my BB-xM..

Image

br cfritschn
cfritschn
 
Posts: 3
Joined: Mon Apr 04, 2011 5:38 pm

Re: Arch Linux ARM on beagleboard xM howto

Postby kmihelich » Sat Apr 30, 2011 1:25 am

We're at 2600+ packages in the ARMv7 repo right now, and I'm working out the last kinks for releasing the rootfs tarball. I'd rather make sure everything works correctly out of the box than spend a few pages here in the forum fixing things I didn't catch. I'm shooting for finishing it up this weekend, with the rootfs either on the sd card or a usb drive. You still need some stuff on the sd card to boot initially however, there isn't a way around that.

I'm also trying to work out a combined OMAP3 and OMAP4 SMP kernel so we don't have to split up kernels and rootfs tarballs for BeagleBoards and PandaBoards.

In short, things are coming along well for both boards. The mass of GUI applications hasn't been tackled, specifically of the Gnome and KDE variety, but that is just a matter of a couple more weeks.
Arch Linux ARM exists and continues to grow through community support, please donate today!
kmihelich
Developer
 
Posts: 1133
Joined: Tue Jul 20, 2010 6:55 am
Location: aka leming #archlinuxarm


Return to Texas Instruments (TI)

Who is online

Users browsing this forum: No registered users and 13 guests