Atmel AT91SAM9G20-EK can't boot ArchLinuxARM-armv5te-latest

This forum is for topics dealing with problems with software specifically in the ARMv5 repo.

Atmel AT91SAM9G20-EK can't boot ArchLinuxARM-armv5te-latest

Postby larrybaker » Thu Jul 25, 2013 10:03 pm

I have a Glomation GESBC-9G20 (http://www.glomationinc.com), which is essentially an Atmel AT91SAM9G20-EK (it uses the AT91SAM9G20-EK default Kernel config and AT91SAM9G20-EK U-Boot). I have Glomation's Linux 3.2.6 kernel and the config file they used. Their kernel includes support for EABI. I have also updated to the latest Atmel AT91 bootloader and U-Boot 2013.07.

I am not able to boot using the Arch Linux ARM V5TE rootfs, ArchLinuxARM-armv5te-latest.tar.gz.

There was a thread with questions about a similar board titled "Atmel AT91SAM9G20 - Linux kernel 2.6.31 & Busybox 1.15", viewtopic.php?f=9&t=2491&p=13887&hilit=atmel#p13887. One of the responses made it sound like it should be relatively easy to run Arch Linux ARM with a vendor kernel:

$this->bbcode_second_pass_quote('', 'I')t looks like CPU in the SoC is an armv5 (ARM926EJ-S specifically) and there are sources for newer kernels out there. We ought to be able to run on it, if you bring your own kernel.


When I try to boot using the Arch Linux ARM V5TE rootfs from an ext2 USB stick (I am using a USB stick for the rootfs at the moment because the Arch Linux ARM V5TE rootfs is too large to fit in the onboard 256MB flash) it fails at the point where the kernel normally mounts the rootfs:

$this->bbcode_second_pass_code('', 'Freeing init memory: 128K
Failed to mount /dev: No such device')

I have previously had no problem using this rootfs and the Arch Linux ARM 3.1.10-16-ARCH kernel on a SheevaPlug.

I have verified that the kernel supports the file system on the USB stick by mounting it using the factory rootfs. I am able to boot using, e.g., the Debian squeeze rootfs on Glomation's web site, from the same USB stick.

When I compare the Glomation config file with the Linux config file for a V5TE SoC I've used before, e.g., Kirkwood, there are lots of differences.

Short of brute-force trial and error, do you have some guidance about what kernel config options Arch Linux ARM requires or expects? Or, do you have any advice about how to tell which device the Glomation kernel is missing?

Thank you.
larrybaker
 
Posts: 25
Joined: Thu Jan 17, 2013 7:38 pm

Re: Atmel AT91SAM9G20-EK can't boot ArchLinuxARM-armv5te-lat

Postby moonman » Thu Jul 25, 2013 10:06 pm

Check your kernel bootparams in U-Boot

$this->bbcode_second_pass_quote('', 'F')ailed to mount /dev


/dev is not a device, it needs to be something like /dev/sda1
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3387
Joined: Sat Jan 15, 2011 3:36 am

Re: Atmel AT91SAM9G20-EK can't boot ArchLinuxARM-armv5te-lat

Postby larrybaker » Fri Jul 26, 2013 12:33 am

moonman,

The kernel bootargs are exactly the same for any USB stick rootfs. I have no trouble with the vendor's Debian squeeze rootfs.

See, for example, my post #5 at http://glomation.net/smf/index.php/topic,1382.0.html. From what I posted there, I think the rootfs mount has already succeeded when the "Failed to mount /dev" message occurs. (I'll double check for you when I get home -- that is where I am doing this development. I didn't cut and paste very many lines when I posted there.)
larrybaker
 
Posts: 25
Joined: Thu Jan 17, 2013 7:38 pm

Re: Atmel AT91SAM9G20-EK can't boot ArchLinuxARM-armv5te-lat

Postby moonman » Fri Jul 26, 2013 2:47 am

well then it must be in the kernel config. ArchLinux uses systemd, not sys V init so it needs these enabled:

REQUIREMENTS:
Linux kernel >= 3.0
CONFIG_DEVTMPFS
CONFIG_CGROUPS (it's OK to disable all controllers)
CONFIG_INOTIFY_USER
CONFIG_SIGNALFD
CONFIG_TIMERFD
CONFIG_EPOLL
CONFIG_NET
CONFIG_SYSFS

Reference: http://cgit.freedesktop.org/systemd/systemd/tree/README
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3387
Joined: Sat Jan 15, 2011 3:36 am

Re: Atmel AT91SAM9G20-EK can't boot ArchLinuxARM-armv5te-lat

Postby larrybaker » Fri Jul 26, 2013 2:58 am

moonman,

That is precisely the sort of advice I'm looking for. I will see how the Glomation config file defines those.

Thank you.
larrybaker
 
Posts: 25
Joined: Thu Jan 17, 2013 7:38 pm

Re: Atmel AT91SAM9G20-EK can't boot ArchLinuxARM-armv5te-lat

Postby larrybaker » Fri Jul 26, 2013 6:54 pm

moonman,

Adding kernel support for systemd fixed the problem. Thank you for providing the README reference; they had more listed there, some of which I felt safe in ignoring by following what I found in the Arch Linux ARM Kirkwood kernel config file. I still have more experimenting to do with the kernel options as I compare what Arch Linux ARM uses to what I have.

My next problem is to build an Arch Linux ARM rootfs that will will fit in the 256MB flash on the GESBC-9G20. Are there tools to build a tailored rootfs for Arch Linux ARM? Anything like Red Hat's installer that lets me build a bare "Minimal" system? Or, like uClinux's pick-and-choose menus?

Thank you.
larrybaker
 
Posts: 25
Joined: Thu Jan 17, 2013 7:38 pm

Re: Atmel AT91SAM9G20-EK can't boot ArchLinuxARM-armv5te-lat

Postby moonman » Sat Jul 27, 2013 4:58 am

There isn't really an easy way afaik. I would start with removing what you don't need (like headers) disable logs or move them to tmpfs and limit their size.
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3387
Joined: Sat Jan 15, 2011 3:36 am

Re: Atmel AT91SAM9G20-EK can't boot ArchLinuxARM-armv5te-lat

Postby larrybaker » Fri Aug 02, 2013 2:52 am

It's likely I'll abandon my efforts to run Arch Linux ARM on my board. I am able to run the latest armv5te rootfs off a USB stick, but I had to add a swap file because the board only has 64 MB RAM. Using that, I set up a second USB stick using pacstrap base and just a couple other packages I need. It uses over 400 MB. My flash is only 256 MB. I could try to use compression with a UBIFS rootfs. But, realistically, that is not enough space for my application's data needs. Not to mention all the cycles it will take from my poor 400 MHz CPU (200 bogoMIPS) to read/write the flash. (There is really no good reason why Arch Linux should pile on so much stuff in the base group -- like reiserfs tools. I guess their target is not small systems.) I'll probably try something with BusyBox. I am open to other suggestions.

Thanks to all for your help.
larrybaker
 
Posts: 25
Joined: Thu Jan 17, 2013 7:38 pm

Re: Atmel AT91SAM9G20-EK can't boot ArchLinuxARM-armv5te-lat

Postby WarheadsSE » Fri Aug 02, 2013 5:28 pm

You could pacstrap base, then remove what you don't need. 'base' is just a package group.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm


Return to ARMv5

Who is online

Users browsing this forum: No registered users and 8 guests