How to build Arch Linux

12,067 views
Skip to first unread message

Maro

unread,
Feb 2, 2013, 5:50:53 PM2/2/13
to cubie...@googlegroups.com
Hi,

i'm new in linux but after a deep search and a lot of time i was able to build Arch Linux into my micro sd and i want to share the process:

some notes before starting
1)all command must be preceded by sudo
2)in my terminal the sdcard was in /dev/sdb and it's can be change for you, you can find by use command mount 
3)with command mount you can find the name and location of your sd partiion, for me it was /media/andrea/boot and /media/andrea/ALARM

Optional: open a new terminal and go to desktop
mkdir arc && cd arc

Now we build a bootable sd for Mele A100
wget http://archlinuxarm.org/os/sun4i/Mele-bootloader.tar.gz
wget
http://archlinuxarm.org/os/ArchLinuxARM-sun4i-latest.tar.gz
tar xzf
Mele-bootloader.tar.gz

./mkA10card.sh /dev/sdX
mkdir
/tmp/boot

mkdir
/tmp/arch
mount
/dev/sdb1 /tmp/boot
mount
/dev/sdb2 /tmp/arch
cp
/tmp/arch/boot/uImage /tmp/boot/uImage
cp script
.bin /tmp/boot/script.bin
cp uEnv
.txt /tmp/boot/uEnv.txt
sync

But since we have a cubiboard we need to change the hw package

the file in kernel and bootloader must go on the boot partion, for me it was on /media/andrea/boot
cd kernel
cp
* /media/andrea/boot
cd
..
cd bootloader
cp
* /media/andrea/boot


the file in rootfs must fgo on the other partition, for me it was on /media/andrea/ALAMR
cd rootfs
cp
-R * /media/andrea/ALAMR
cd
..


Now finaly we have a Arch Linux bootable, but if you have a monitor with 1280x1024 resolution you can edit the file called uEnv.txt in boot partiion:

boot_mmc=fatload mmc 0 0x43000000 ${fexfile}; fatload mmc 0 0x48000000 ${kernel}; bootm 0x48000000
extraargs
=rootwait disp.screen0_output_type=3 disp.screen0_output_mode=1280x1024p60
fexfile
=script.bin


The username and password is root, i suggest to do this command at first boot:
pacman -Syu
pacman
-S sunxi-tools


If you want to use arch linux with a desktop environment:
pacman -S xorg-server xorg-xinit xorg-server-utils
pacman
-S xf86-video-fbdev (driver video)
pacman
-S lxde (desktop environment  see the alternative https://wiki.archlinux.org/index.php/Desktop_Environment but i suggest lxde because for me cubiboard it's very fast with it)
pacman
-S lxdm (login manager see the alternative https://wiki.archlinux.org/index.php/Display_Manager but for me it's the only one that worked)
pacman
-S alsa-utils (for audio https://wiki.archlinux.org/index.php/Alsa)
systemctl enable lxdm
.service (to start the login manager at boot)


Now you have all you need to use linux on the cubiboard but if you want you can download this packages (https://wiki.archlinux.org/index.php/List_of_Applications)
pacman -S mplayer2 (media player)
pacman
-S atool unzip unrar (file archiver)
pacman
-S luakit (browser)
pacman
-S gedit (editor di testo)
pacman
-S gamin (file and directory monitoring)
pacman
-S gnash-gtk (flash player)


Open a terminal
nano
/etc/locale.gen
add your language
for me it was it_IT.UTF-8 UTF-8
locale
.gen
now you see
if the language that you add it's on the list and will generete the file
echo LANG=it_IT.UTF-8 > /etc/locale.conf
export LANG=it_IT.UTF-8

loadkeys YOURLANGUAGE for load the keyboard configuration, for me it  

setfont YOURFONT  you must serch the correct font
, for me Lat2-Terminus16
nano
/etc/vconsole.conf and change the  KEYMAP=YOURLANGUAGE and the FONT=YOURFONT for me: KEYMAP=it and the FONT=Lat2-Terminus16


Troubleshooting:

from terminal digit aplay -l now you can see the audio hardware of cubieboard, remember the card and device number of the hdmi
digit on the terminal aplay -D plughw:1,0 /usr/share/sounds/alsa/Front_Center.wav to test if you can hears the sound from hdmi
if it correct digit nano ~/.asoundrc and add:

pcm.!default {
   type hw
   card
1
   device
0
}


For now it all, i hope you can understand (my english is not so good)

Roman Mamedov

unread,
Feb 2, 2013, 5:56:15 PM2/2/13
to cubie...@googlegroups.com, andma...@gmail.com
On Sat, 2 Feb 2013 14:50:53 -0800 (PST)
Maro <andma...@gmail.com> wrote:

> Hi,
>
> i'm new in linux but after a deep search and a lot of time i was able to
> build Arch Linux into my micro sd and i want to share the process:

Couldn't you just share the SD-card image that you got in the end? Why make
every user wanting to run ArchLinux need to manually repeat the lengthy and
error-prone "process".

--
With respect,
Roman
signature.asc

Maro

unread,
Feb 2, 2013, 6:11:31 PM2/2/13
to cubie...@googlegroups.com, andma...@gmail.com
I would but now my linux is very customized and if i rebuild all i don't know how to make a image of my sd card (if i use dd command i will create an iso of 8gb) 

Simos Xenitellis

unread,
Feb 2, 2013, 6:14:49 PM2/2/13
to cubie...@googlegroups.com, andma...@gmail.com
I think it is good to have the process documented, for those who want
to build experience.
Do you think you can put those instructions on the Wiki?
I think a page at http://linux-sunxi.org/Cubieboard/ArchLinux would be ok.

Simos

Roman Mamedov

unread,
Feb 3, 2013, 3:29:00 AM2/3/13
to cubie...@googlegroups.com, simos...@googlemail.com, andma...@gmail.com
On Sun, 3 Feb 2013 01:14:49 +0200
Simos Xenitellis <simos...@googlemail.com> wrote:

> On Sun, Feb 3, 2013 at 12:56 AM, Roman Mamedov <r...@romanrm.ru> wrote:
> > On Sat, 2 Feb 2013 14:50:53 -0800 (PST)
> > Maro <andma...@gmail.com> wrote:
> >
> >> Hi,
> >>
> >> i'm new in linux but after a deep search and a lot of time i was able to
> >> build Arch Linux into my micro sd and i want to share the process:
> >
> > Couldn't you just share the SD-card image that you got in the end? Why make
> > every user wanting to run ArchLinux need to manually repeat the lengthy and
> > error-prone "process".
> >
>
> I think it is good to have the process documented, for those who want
> to build experience.

It is good to have it documented, but not good having it as the only option,
it's as if there were no GNU/Linux distros and everyone had to follow [1] just
to install anything at all on their computer.

[1] http://www.linuxfromscratch.org/lfs/view/stable/

> Do you think you can put those instructions on the Wiki?
> I think a page at http://linux-sunxi.org/Cubieboard/ArchLinux would be ok.

Why not http://linux-sunxi.org/ArchLinux ?

--
With respect,
Roman
signature.asc

Roman Mamedov

unread,
Feb 3, 2013, 3:30:48 AM2/3/13
to cubie...@googlegroups.com, andma...@gmail.com
On Sat, 2 Feb 2013 15:11:31 -0800 (PST)
Maro <andma...@gmail.com> wrote:

> I would but now my linux is very customized and if i rebuild all i don't
> know how to make a image of my sd card (if i use dd command i will create
> an iso of 8gb)

1) work with a 2GB SD card, or a 2GB partition on a 8GB card;

2) fill the free space with zeroes on the card,

dd if=/dev/zero bs=1M of=zerofile; rm zerofile

after both of these you will end up with a 2GB image (it's not proper to
call it ISO), which will compress really well, down to only the size of files
you have on your root FS, and probably 2x beyond that.

--
With respect,
Roman
signature.asc

George Ioakimedes

unread,
Feb 3, 2013, 10:55:25 AM2/3/13
to cubie...@googlegroups.com
Nicely written instructions, these should definitely go in the Wiki. How does Arch run compared to Linaro ALIP, do you see any improvements in "performance"?

Patrick Wood

unread,
Feb 3, 2013, 1:23:14 PM2/3/13
to cubie...@googlegroups.com
Use resize2fs to make the file system smaller before you dd it:

Assuming you've put the SD card on a linux system and it's at /dev/sdb:

e2fsck -f /dev/sdb2 # resize2fs requires you to check the file system first
resize2fs /dev/sdb2 2G

now mount the file system and zero out the free space as described previously.

Since the partition size hasn't changed, you'll have to set the bs and count options to dd properly to read the correct amount of data from /dev/sdb2.  I believe resize2fs reports the new file system size in 4K chunks, so the proper dd command looks like:

dd if=/dev/sdb2 of=my-distro.img bs=4K count=524288  # note: the count should be set to whatever resize2fs reports as the new file system

To check that you have the entire file system:

e2fsck -f my-distro.img

If this succeeds, compress the .img file and you're done.  You can expand your SD card's file system with resize2fs without any size setting:

resize2fs /dev/sdb2

Maro

unread,
Feb 3, 2013, 5:40:33 PM2/3/13
to cubie...@googlegroups.com
Hi,

thanks for the instruction i will post the image in the next few days.

I didn't use the linaro alip like arch but i think that arch linux is a bit much faster than linaro and with this build you start with nothing (in terms of app) so you can install whatever you want

I found some errors in my first post so here i rewrite with the correction:

Some notes before starting
1)all command must be preceded by sudo

2)in my terminal the sdcard was in /dev/sdb and it's can be change for you, you can find by use command mount 

3)with command mount you can find the name and location of your sd partiion, for me it was /media/andrea/boot and /media/andrea/ALARM

Optional: open a new terminal

cd desktop

mkdir arc && cd arc
Now we build a bootable sd for Mele A100

./mkA10card.sh /dev/sdb

mkdir
/tmp/boot
mkdir
/tmp/arch
tar -zxf ArchLinuxARM-sun4i-latest.tar.gz -C /tmp/arch

mount
/dev/sdb1 /tmp/boot
mount
/dev/sdb2 /tmp/arch

cp
/tmp/arch/boot/uImage /tmp/boot/uImage
cp script
.bin /tmp/boot/script.bin
cp uEnv
.txt /tmp/boot/uEnv.
txt

sync


But since we have a cubiboard we need to change the hw package

mkdir hwpack
cd hwpack

wget
http://dl.linux-sunxi.org/amery/sunxi-3.0/latest/cubieboard_hwpack.tar.xz (or http://dl.linux-sunxi.org/amery/sunxi-3.0/latest/cubieboard_512_hwpack.tar.xz if you have cubieboard with 512Mb Ram)

tar xz cubieboard_hwpack
.tar.xz

The file in kernel and bootloader must go on the boot partion, for me it was on /media/andrea/boot
you can found your partition with the command mount

cd kernel
cp * /media/andrea/boot
cd ..

cd bootloader
cp * /media/andrea/boot
cd ..


The file in rootfs must fgo on the other partition, for me it was on /media/andrea/ALAMR

cd rootfs
cd lib
cp -Rv * /media/andrea/ALARM/lib/
c
d ..

cd etc
cp -Rv * /media/andrea/ALARM/etc/
cd
..


Now finaly we have a Arch Linux bootable, but if you have a monitor with 1280x1024 resolution you can edit the file called uEnv.txt in boot partition:

boot_mmc=fatload mmc 0 0x43000000 ${fexfile}; fatload mmc 0 0x48000000 ${kernel}; bootm 0x48000000
extraargs
=rootwait disp.screen0_output_type=3 disp.screen0_output_mode=1280x1024p60
fexfile
=script.bin

The username and password is root

At the first boot i suggest to do this command at first boot:

pacman -Syu
pacman
-S sunxi-tools


If you want to use arch linux with a desktop environment:

pacman -S xorg-server xorg-xinit xorg-server-utils

pacman
-S xf86-video-fbdev (driver video)

pacman
-S lxde (desktop environment see the alternative https://wiki.archlinux.org/index.php/Desktop_Environment but i suggest lxde because for me cubiboard it's very fast with it)

pacman
-S lxdm (login manager see the alternative https://wiki.archlinux.org/index.php/Display_Manager but for me it's the only one that worked)

pacman
-S alsa-utils (for audio https://wiki.archlinux.org/index.php/Alsa)

systemctl enable lxdm
.service (to start the login manager at boot)


Now you have all you need to use linux on the cubiboard but if you want you can download this packages (https://wiki.archlinux.org/index.php/List_of_Applications)

pacman -S mplayer2 (command line media player)
pacman
-S atool unzip unrar (file archiver)
pacman
-S luakit (ultra fast and light browser) or midori (fast and light browser that support to play flash video)
pacman
-S gedit (text editor same of ubuntu)
pacman
-S gnash-gtk (flash player for arm)
pacman -S icedtea-web-java7

Open a terminal

nano
/etc/locale.
gen
add your language since i'm italian for me it was it_IT.UTF-8 UTF-8

locale
.gen
now you see if the language that you add it
's on the list and will generete the file


echo LANG=it_IT.UTF-8 > /etc/locale.conf
export LANG=it_IT.UTF-8

To set the keyboard layout (for me isn't work)

loadkeys YOURLANGUAGE for load the keyboard configuration, use only the first 2 letter like it or us


setfont YOURFONT you must serch the correct font, for me Lat2-Terminus16
nano /etc/vconsole.conf and change the KEYMAP=YOURLANGUAGE and the FONT=YOURFONT for me: KEYMAP=it and the FONT=Lat2-Terminus16
from terminal digit aplay -l now you can see the audio hardware of cubieboard, remember the card and device
number of the hdmi

digit
aplay -D plughw:1,0 /usr/share/sounds/alsa/Front_Center.wav to test if you can hears the sound from hdmi,
if not change the plughw in base of the table found with aplay -l

if it correct digit nano ~/.asoundrc and add with the correct number of the card and device:


pcm
.!default {
   type hw
   card
1
   device
0
}

I found that the script used to create the sd card make two partition with the same dimension and it's bad due to that the boot partition require less than 50 mb so for the solution i done this:

i use a usb pen like a bridge
dd
if=/dev/sdb (the micro sd) of=/dev/sdc (the usb pen)

sudo apt
-get install gparted

use gparted to create two partition of the sd card (if you find a key near the partition on terminal digit sudo umount /dev/sdb* or the dev location of your micro sd)

the first of 50mb called boot

the second of the remain space cal
led ALARM

on
terminal sudo eject /dev/sdb

reinsert the micro sd
and on terminal

cp -Rv /media/andrea/boot/* (the first partition of usb pen) /media/andrea/boot1 (my pc called boot1 the partition boot of the micro sd)

cp -Rv /media/
andrea/ALARM/* (the second partition of usb pen) /media/andrea/ALARM1

Bastiaan van den Berg

unread,
Feb 3, 2013, 7:17:49 PM2/3/13
to cubie...@googlegroups.com
On Sun, Feb 3, 2013 at 11:40 PM, Maro <andma...@gmail.com> wrote:
Hi,

thanks for the instruction i will post the image in the next few days.


Cool, this would be awesome on the wiki, please use http://linux-sunxi.org/ArchLinux as the link as this doc works for all A10 devices ;)

--
buZz

Maro

unread,
Feb 4, 2013, 10:52:53 AM2/4/13
to cubie...@googlegroups.com
Hi, 

thanks to Roman and Patrick i was able to create an image of arch linux, here the link download
The image is compressed with winrar and shoud work with an micro sd > 2gb

The image is come with lxde if you want to restore the basic arch linux:

on the login screen press ctrl + alt +F2

the username
and password are root

digit
this command in that order:

systemctl disable lxdm
.service

pacman
-Rs lxdm lxde xorg-server xorg-xinit xorg-server-utils xf86-video-fbdev alsa-utils

reboot

If you want to change the login:

on login screen press ctrl + alt + F2

username
and password are root

digit systemctl disable lxdm
.service

pacman
-Rs lxdm if you would to remove lxdm

download a
new login  and enable with this command:
 
system
ctl enable xxx.service

reboot

if you want to change desktop 
environment

on the login screen press ctrl + alt +F2

username and password are root

digit pacman -Rs lxde

download new desktop environment

reboot


If you have any problem write here.

Now the solution for some other troubleshooting

No internet connection with Ethernet cable 

on terminal:

ls
/sys/class/net  to show Network Interface Names result for me: eth0 lo tun10 

ip link
set eth0 up

 ip link show dev eht0 

dhcpcd eth0

for testing if you are now connected:

ping
-c 3 www.google.com


No boot

put your micro sd into the computer and open a terminal


cd /media/andrea/ALARM/etc

mv modules modules
-load.d/cubieboard.conf

cd
..

cd lib
/modules/

mv
* /media/andrea/usr/lib/modules

cd
..

rmdir modules

mv framebuffer
/ usr/lib/

mv x11 usr/lib/

mv libvecore
.so usr/lib/

mv libMali.so usr/lib/ 

mv libUMP.so usr/lib/



personal note: i thinks that google group is a bad place for a cubieboard forum 

Bastiaan van den Berg

unread,
Feb 4, 2013, 11:40:51 AM2/4/13
to cubie...@googlegroups.com
On Mon, Feb 4, 2013 at 4:52 PM, Maro <andma...@gmail.com> wrote:
If you want to change the login:

Cool, did you place these on the wiki? 

personal note: i thinks that google group is a bad place for a cubieboard forum 


Google groups is a mailinglist with a forum-alike interface.

--
buZz

Floris Bos

unread,
Feb 6, 2013, 6:13:41 AM2/6/13
to cubie...@googlegroups.com
On 02/04/2013 05:40 PM, Bastiaan van den Berg wrote:
On Mon, Feb 4, 2013 at 4:52 PM, Maro <andma...@gmail.com> wrote:

personal note: i thinks that google group is a bad place for a cubieboard forum


+1


Google groups is a mailinglist with a forum-alike interface.

And one of the problems with that forum interface being enabled, is that this encourages users to treat the mailing list as a forum with threads.
Several people are posting replies without quoting the message they are replying to.


Yours sincerely,

Floris Bos

Bastiaan van den Berg

unread,
Feb 6, 2013, 6:42:37 AM2/6/13
to cubie...@googlegroups.com
On Wed, Feb 6, 2013 at 12:13 PM, Floris Bos <b...@je-eigen-domein.nl> wrote:
Several people are posting replies without quoting the message they are replying to.

Sadly, we can't disable the forumlike view... We mainly need to educate users...

--
buZz

Floris Bos

unread,
Feb 6, 2013, 7:27:15 AM2/6/13
to cubie...@googlegroups.com
On 02/06/2013 12:42 PM, Bastiaan van den Berg wrote:
On Wed, Feb 6, 2013 at 12:13 PM, Floris Bos <b...@je-eigen-domein.nl> wrote:
Several people are posting replies without quoting the message they are replying to.

Sadly, we can't disable the forumlike view...

Could at least stop advertising it as a forum on the cubie website, and disable posting from the web in the googlegroups settings...

-- 
Yours sincerely,

Floris Bos

blackstag

unread,
Feb 6, 2013, 9:17:10 AM2/6/13
to cubie...@googlegroups.com
Shhh we are not allowed to use a mailing list as a mailing list it
must be all things to all people.
> --
> You received this message because you are subscribed to the Google Groups
> "Cubieboard" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cubieboard+...@googlegroups.com.
> Visit this group at http://groups.google.com/group/cubieboard?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Maro

unread,
Feb 6, 2013, 9:46:36 AM2/6/13
to cubie...@googlegroups.com
Hi,

small tip if you want to run java application on your desktop:

pacman -S jre7-openjdk if you want only to run

pacman
-S  jdk7-openjdk if you want to developen tools

once istalled
:

cd
/usr/lib

ln -s libffi.so.6.0.0 libffi.so.5

to test digit java

Connor Irwin

unread,
Feb 15, 2013, 10:12:12 PM2/15/13
to cubie...@googlegroups.com
So I got everything up and running thanks to your tutorial. However I have one problem. I can't update my system using pacman -Syu or pacman -Syyu. When I try to I get the following error message at the end of the update process.\


error: failed to commit transaction (conflicting files)
bash: /usr/bin/bash exists in filesystem
bash: /usr/bin/bashbug exists in filesystem
file: /usr/share/file/misc/magic.mgc exists in filesystem
Errors occurred, no packages were upgraded.

Connor Irwin

unread,
Feb 15, 2013, 11:56:56 PM2/15/13
to cubie...@googlegroups.com
Another issue that I am having is that Arch is only detecting 307mb of usable ram. I have the 1Gb model and raspbian showed me an available 800mb. Is this something that can be fixed or would I have to try a different image such as debian?


On Saturday, February 2, 2013 2:50:53 PM UTC-8, Maro wrote:

George Ioakimedes

unread,
Feb 16, 2013, 10:32:53 AM2/16/13
to cubie...@googlegroups.com
are you sure you downloaded the correct hardware pack, there is 1 for 512MB and a different one for the 1GB board?

--

Connor Irwin

unread,
Feb 16, 2013, 3:44:51 PM2/16/13
to cubie...@googlegroups.com
ah crap I have the wrong one. Thanks though

Brian

unread,
Feb 17, 2013, 6:33:42 PM2/17/13
to cubie...@googlegroups.com
I agree with the inadequacies of googlegroups for dicussion.  


Trying to follow anything here is a nightmare!

Bastiaan van den Berg

unread,
Feb 18, 2013, 4:38:43 AM2/18/13
to cubie...@googlegroups.com
On Mon, Feb 18, 2013 at 12:33 AM, Brian <castal...@gmail.com> wrote:
Trying to follow anything here is a nightmare!

Get a proper email client :)

--
buZz

Marcos Martinez

unread,
Feb 18, 2013, 5:18:59 AM2/18/13
to cubie...@googlegroups.com
Yep, with gmail it sorts fine the threads

Enviado desde mi iPhone
--

TimeBreaker

unread,
Feb 18, 2013, 10:19:45 AM2/18/13
to cubie...@googlegroups.com
Hi,
i'm very new in cubieboard,and I have a question in understanding the process of build arch img for cubieboard...
Is is that where is the path /media/andrea/boot from?Is it the mount point of the mmc?or it is just a common file created handly?

George Ioakimedes

unread,
Feb 18, 2013, 12:05:05 PM2/18/13
to cubie...@googlegroups.com
/media/andrea/boot is the mounting point of the SD Card first partition. It WILL be a different name on your machine depending on how the card is mounted.

If you issue a mount command it will list the mouted devices and where they are mounted (i.e. /dev/sdc1  -->/media/ boot

--

Lluís Forns

unread,
Feb 18, 2013, 6:54:58 PM2/18/13
to cubie...@googlegroups.com
I download the cubieboard_hwpack.tar.xz file, which should be for de 1Gb version, but I only have 307mb of ram; what am I missing?


2013/2/18 George Ioakimedes <georg...@gmail.com>



--
*Ser freak no és imprescindible per ser informàtic, però ajuda.
*La vida no ha de ser feliç, ha de ser plena.
*Abans d'imprimir aquest missatge, pensa en el medi ambient.

Lluís Forns

unread,
Feb 19, 2013, 9:18:35 AM2/19/13
to cubie...@googlegroups.com
I answer myself, I didn't update the bootloader from the './hwpack/bootloader':


# dd if=sunxi-spl.bin of=/dev/sde bs=1024 seek=8
# dd if=u-boot.bin of=/dev/sde bs=1024 seek=32

hope it will be useful to somebody.

2013/2/19 Lluís Forns <enb...@gmail.com>

John B.

unread,
Mar 17, 2013, 5:09:01 PM3/17/13
to cubie...@googlegroups.com
On Sunday, February 3, 2013 7:17:49 PM UTC-5, Bastiaan van den Berg wrote:
Cool, this would be awesome on the wiki, please use http://linux-sunxi.org/ArchLinux as the link as this doc works for all A10 devices ;)

Does that mean this process should work on the Hackberry A10 as well? Because I tried getting it to boot Maro's image with the UBOOT from the Miniand Forum [1] and failed to get it to work. 

Somebody built a headless Arch Linux image for the Hackberry [2], but I'd love to be able to get screen output.

I'm new to the ARM world, so apologies if this is an incredibly dumb question.

Thanks,
John

Maro

unread,
Mar 20, 2013, 10:23:50 AM3/20/13
to cubie...@googlegroups.com
I think not due to the incompatible hardware of the Hackberry (the have the same processor only), i will suggest to try to install fedora arm version.
This i very nice and powerfull version of fedora and i use it since i found it.
It should work for any allwirnner board and the installation process is very simple (if in ubuntu the command for select and install your board don't work use bash before the command) 

Lim Benjamin

unread,
Apr 5, 2013, 2:38:44 AM4/5/13
to cubie...@googlegroups.com
The current kernel Im using now does not have modules for iptables, uvcvideo. 

I tried using modprobe and insmod to load the modules, there was no error message, but when i did modinfo, I found out the modules were not loaded.

I was hoping to use Roman's kernel since most of the modules are already loaded but couldnt install it as it was a .deb file with no BUILDPKG.

Would appreciate some help to either load the modules or a precompiled kernel with the modules already present.

Thanks. 

Roman Mamedov

unread,
Apr 5, 2013, 3:55:23 AM4/5/13
to cubie...@googlegroups.com, ma...@limbenjamin.com
On Thu, 4 Apr 2013 23:38:44 -0700 (PDT)
Lim Benjamin <ma...@limbenjamin.com> wrote:

> I was hoping to use Roman's kernel since most of the modules are already
> loaded but couldnt install it as it was a .deb file with no BUILDPKG.

uImage is already distributed separately from the .deb, and from inside
the .deb itself you only need the "/lib/modules/" directory, you can unpack it
and manually place into your system.

--
With respect,
Roman
signature.asc

Roel

unread,
Apr 5, 2013, 10:02:56 AM4/5/13
to cubie...@googlegroups.com, ma...@limbenjamin.com
I just want to mention You can't just copy the rootfs directory from the hardware pack to arch rootfs.

The modules file in the rootfs should be moved to /etc/modules-load.d/cubieboard.conf
the modules itself shoud be copied to /usr/lib

Do a lsmod after boot to check if the modules are loaded.

Regards,
Roel

Lim Benjamin

unread,
Apr 5, 2013, 10:06:57 AM4/5/13
to cubie...@googlegroups.com, ma...@limbenjamin.com
Thanks for all your help. I'm currently a little tied up and have not tried it out yet.

I will post back with the results probably tomorrow once I have got down to it. 

Lim Benjamin

unread,
Apr 5, 2013, 9:27:28 PM4/5/13
to cubie...@googlegroups.com, ma...@limbenjamin.com
I have loaded Roman's 3.0.62-rm1-rm2 kernel on the cubieboard running arch arm. The steps are as what Roman and Roel have described.

1. unpack the .deb file and copy the contents of /lib/modules into usr/lib/modules on your arch fs.
2. mount mmcblk0p1 on your arch and replace uImage with the downloaded copy(Backup the old image just in case)
3. Comment out the entire /etc/modules-load.d/cubieboard.conf file.
4. Reboot

This will boot into the kernel without any modules loaded. Once successfully booted, run a 'uname -r' to check that new kernel is booted. Do a 'depmod -a' to resolve all dependency issues. You can now load modules required using 'modprobe MODULENAME'

Note: cubieboard.conf contains the modules that you want to load at boot. I couldnt find the file to replace cubieboard.conf that Roel mentioned so I commented out the entire file. Some errors might happen if you do not because your arch might try to load some modules from your old kernel that is not present in your new kernel.

Another thing I tried was to extract only certain .ko modules that I wanted and load them on my current kernel. This will not work because modules are tied to certain kernels only. Run 'modinfo MODULENAME' and see 'vermagic: 3.0.62-r1-rm2 mod_unload modversions ARMv7' , so this module will only work on that particular version. You cannot mix and match modules from various kernels.

Thanks to Roman and Roel for their help 
Reply all
Reply to author
Forward
0 new messages