AndyPi
Posts: 83
Joined: Wed Feb 22, 2012 10:24 pm
Location: Gloucestershire,UK

Arch on Pi2

Thu Feb 05, 2015 11:37 am

Any information / instructions on running Arch on Pi2 ?

AndyPi
Posts: 83
Joined: Wed Feb 22, 2012 10:24 pm
Location: Gloucestershire,UK

Re: Arch on Pi2

Thu Feb 05, 2015 1:36 pm


sdjf
Posts: 1395
Joined: Fri Mar 16, 2012 5:20 am
Location: California
Contact: Website

Re: Arch on Pi2

Thu Feb 05, 2015 4:11 pm

And if you can wait, there will be an Arch tar ball available, I would hope fairly soon. There are other posts in various subforums at archlinuxarm.org telling us that pepedog has one on the way to him, and that archlinuxarm development for Raspberry Pi 2 is in process.

Unfortunately, because of the way they have the archlinuxarm forum structured, there are questions and answers all over the place there. But I am sure once there is a tarball available, we will see an announcement in the Arch subforum here.
FORUM TIP: To view someone's posting history, sign in, click on their user name, then on "Search User's Posts." || Running ArchLinuxArm on Model 2B and 512MB Model B

AndyPi
Posts: 83
Joined: Wed Feb 22, 2012 10:24 pm
Location: Gloucestershire,UK

Re: Arch on Pi2

Thu Feb 05, 2015 4:57 pm

Thanks for that update.

pepedog
Posts: 1043
Joined: Fri Oct 07, 2011 9:55 am

Re: Arch on Pi2

Thu Feb 05, 2015 9:02 pm

It caught us on the hop, we have to buy our own pi's
Top dev will have his tomorrow (maybe me too), kernel will be neon enabled and as well as pure armv7hf rootfs there will be an xbmc with neon enabled too.
No image will be available, just tar rootfs
V5 soft float will be dropped

Lartza
Posts: 3
Joined: Thu Jul 05, 2012 8:19 am

Re: Arch on Pi2

Fri Feb 06, 2015 7:13 am

They now made it officially supported :)

http://archlinuxarm.org/platforms/armv7 ... berry-pi-2

Thanks for the fast build!

ktb
Posts: 1447
Joined: Fri Dec 26, 2014 7:53 pm

Re: Arch on Pi2

Fri Feb 06, 2015 7:28 am

I'd like to see how well chromium works on the Pi2B. I'll wipe out my current Arch card and try it out later.

AndyPi
Posts: 83
Joined: Wed Feb 22, 2012 10:24 pm
Location: Gloucestershire,UK

Re: Arch on Pi2

Fri Feb 06, 2015 1:12 pm

Im getting some
error: failed to commit transaction (invalid or corrupted package (checksum))
on installing extra packages. e.g. iw

After initial boot I installed wpa_supplicant and then rng_tools without problem.

I usually dont do any of the pacman-key related stuff, is this a problem. I have tried pacman-key --populate archlinux but get

==> ERROR: The keyring file /usr/share/pacman/keyrings/archlinux.gpg does not exist.

pacman.conf says
# If you wish to check signatures but avoid local sign and trust issues, use
# the following line. This will treat any key imported into pacman's keyring as
# trusted.
#SigLevel = Optional TrustAll
# For now, off by default unless you read the above.
SigLevel = Never

AndyPi
Posts: 83
Joined: Wed Feb 22, 2012 10:24 pm
Location: Gloucestershire,UK

Re: Arch on Pi2

Fri Feb 06, 2015 1:45 pm

OK Ive fixed this. All to do with problems resolv.conf.

AndyPi
Posts: 83
Joined: Wed Feb 22, 2012 10:24 pm
Location: Gloucestershire,UK

Re: Arch on Pi2

Fri Feb 06, 2015 2:47 pm

Trying to build a wifi driver (works on Pi1).

./arch/arm/include/asm/barrier.h:41:27: fatal error: mach/barriers.h: No such file or directory
#include <mach/barriers.h>
^
compilation terminated.

it looks for it if CONFIG_ARCH_HAS_BARRIERS is defined

what to do ?

pepedog
Posts: 1043
Joined: Fri Oct 07, 2011 9:55 am

Re: Arch on Pi2

Fri Feb 06, 2015 6:54 pm

AndyPi wrote:Trying to build a wifi driver (works on Pi1).

./arch/arm/include/asm/barrier.h:41:27: fatal error: mach/barriers.h: No such file or directory
#include <mach/barriers.h>
^
compilation terminated.

it looks for it if CONFIG_ARCH_HAS_BARRIERS is defined

what to do ?
Download PKGBUILD's
Increment release
Start build with makepkg, interrupt at "starting build"
cd to src/Linux-whatever its call, make menuconfig, when finished move .config back as config
makepkg -g, copy back md5sums, paste them in. Only PKGBUILD and config are changed

You now have enough info to submit pull request https://github.com/archlinuxarm/PKGBUILDs

Hint (you will have to create github account and figure out ssh keys, create user on your Linux (same username as github)

Code: Select all

git clone --depth 1 git@github.com:archlinuxarm/PKGBUILDs.git
copy files where you want it, 
git add core/linux-raspberrypi/PKGBUILD
git add core/linux-raspberrypi/config
git commit -m "core/linux-raspberrypi config changes" -a
git push

ktb
Posts: 1447
Joined: Fri Dec 26, 2014 7:53 pm

Re: Arch on Pi2

Fri Feb 06, 2015 9:30 pm

ktb wrote:I'd like to see how well chromium works on the Pi2B. I'll wipe out my current Arch card and try it out later.
The answer is that Chromium works very well on Pi2B.

Music videos work :D

liskandar
Posts: 1
Joined: Sat Feb 07, 2015 11:56 am

Re: Arch on Pi2

Sat Feb 07, 2015 11:59 am

Any of you experience Pi2 crashing after plugging in keyboard or mouse? :(

AndyPi
Posts: 83
Joined: Wed Feb 22, 2012 10:24 pm
Location: Gloucestershire,UK

Re: Arch on Pi2

Sat Feb 07, 2015 12:04 pm

pepedog wrote:
AndyPi wrote:Trying to build a wifi driver (works on Pi1).

./arch/arm/include/asm/barrier.h:41:27: fatal error: mach/barriers.h: No such file or directory
#include <mach/barriers.h>
^
compilation terminated.

it looks for it if CONFIG_ARCH_HAS_BARRIERS is defined

what to do ?
Download PKGBUILD's
Increment release
Start build with makepkg, interrupt at "starting build"
cd to src/Linux-whatever its call, make menuconfig, when finished move .config back as config
makepkg -g, copy back md5sums, paste them in. Only PKGBUILD and config are changed

You now have enough info to submit pull request https://github.com/archlinuxarm/PKGBUILDs

Hint (you will have to create github account and figure out ssh keys, create user on your Linux (same username as github)

Code: Select all

git clone --depth 1 git@github.com:archlinuxarm/PKGBUILDs.git
copy files where you want it, 
git add core/linux-raspberrypi/PKGBUILD
git add core/linux-raspberrypi/config
git commit -m "core/linux-raspberrypi config changes" -a
git push
Thanks for this info but am I right in thinking that the missing barriers.h is a fault in the BCM2709 Pi kernel. I found this bit from Catalin Marinas <catalin.marinas@arm.com> 4 year ago
This is version 3 of this set of patches. The *mb() barriers semantics
are now correctly implemented WRT arch_is_coherent(). For the ARMv7 and
CONFIG_SMP cases, the mb() and wmb() become a DSB. Platform code can
override them by defining CONFIG_ARCH_HAS_BARRIERS and implementing the
mach/barriers.h file
The BCM2709 kernel is configured to override this behaviour
config ARCH_BCM2709
bool "Broadcom BCM2709 family"
select ARCH_HAS_BARRIERS if SMP
select CPU_V7
select HAVE_SMP
select ARM_AMBA
select MIGHT_HAVE_CACHE_L2X0
select HAVE_SCHED_CLOCK
select NEED_MACH_MEMORY_H
select NEED_MACH_IO_H
select COMMON_CLK
select ARCH_HAS_CPUFREQ
select GENERIC_CLOCKEVENTS
select MACH_BCM2709
select VC4
select FIQ
# select ZONE_DMA
help
This enables support for Broadcom BCM2709 boards.
But no mach/barriers.h file is included. This is inconsistent. I have raised it as an issue on the Github, I hope this is the right thing to do.

ktb
Posts: 1447
Joined: Fri Dec 26, 2014 7:53 pm

Re: Arch on Pi2

Sat Feb 07, 2015 12:34 pm

Here's a warning for Pi2B users using Arch Linux.

There appears to be a problem with these new kernel packages. You may want to wait a while before installing them:
linux-raspberrypi 3.18.5-3
linux-raspberrypi-headers 3.18.5-3

Any time I press a key while booting or after boot has completed, something in the kernel freaks out and the Pi freezes.

Code: Select all

[   15.074567] Unable to handle kernel paging request at virtual address fac17200
[   15.084772] pgd = ec6dc000

Entering kdb (current=0xc0a72220, pid 0) on processor 0 Oops: (null)
due to oops @ 0xc0488210
 dCPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.18.5-3-ARCH #1
 dtask: c0a72220 ti: c0a50000 task.ti: c0a50000
PS is at memcpy+0xb0/0x330
LR is at 0x0
pc : [<c0488210>]    lr : [<00000000>]    psr: 000f0193
sp : c0a51dd4  ip : 00000018  fp : c0ab87b4
r10: 00000010  r9 : ee984844  r8 : 00390000
r7 : 00000001  r6 : face17200  r5 : ee98489d  r4 : f0866468
r3 : 00000001  r2 : ffffffe8  r1 : f0866470  r0 : fac17200
Flags: nzcv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
Control: 10c5387d  Table: 2c6dc06a  DAC: 00000015
 dCPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.18.5-3-ARCH #1
[<c0015648>] (unwind_backtrace) from [<c0011f28>] (show_stack+0x10/0x14)
[<c0011f28>] (show_stack) from [<c0730964>] (dump_stack+0x19/0x14)
[<c0730964>] (dump_stack) from [<c00b3764>] (kdb_dumpregs+0x30/0x50)
[<c00b3764>] (kdb_dumpregs) from [<c00b6af8>] (kdb_main_loop+0x39c/0x794)
[<c00b6af8>] (kdb_main_loop) from [<c00b963c>] (kdb_stub+0x25c/0x4a0)
[<c00b963c>] (kdb_stub) from [<c00afc2c>] (kgdb_cpu_enter+0x42c/0x748)
[<c00afc2c>] (kgdb_cpu_enter) from [<c00b01fc>] (kgdb_handle_exception+0x190/0x1dc)
liskandar wrote:Any of you experience Pi2 crashing after plugging in keyboard or mouse? :(
I think your problem is related to what I'm seeing. It looks like I can boot without problems if I unplug the keyboard and mouse and then SSH in. The older kernel works fine.
Last edited by ktb on Sat Feb 07, 2015 12:44 pm, edited 2 times in total.

fruitoftheloom
Posts: 23337
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Arch on Pi2

Sat Feb 07, 2015 12:42 pm

liskandar wrote:Any of you experience Pi2 crashing after plugging in keyboard or mouse? :(
Yes have a USB RF Keysonic ACK-540RF "laptop" style Keyboard which when press a key throws an error and halts Alarmpi
Rather than negativity think outside the box !
RPi 4B 4GB (SSD Boot)..
Asus ChromeBox 3 Celeron is my other computer...

ktb
Posts: 1447
Joined: Fri Dec 26, 2014 7:53 pm

Re: Arch on Pi2

Sat Feb 07, 2015 1:06 pm

In case any of you feel stuck, you should be able to use the older kernel fairly easily.

- Extract the kernel7.img from the original Arch Linux release archive you used for installation.
- Rename it to something like kernel7-3.18.5-2.img and copy that renamed IMG file to the /boot partition.
- Edit (or add to) the /boot/config.txt file so that the older kernel image is used:

Code: Select all

kernel=kernel7-3.18.5-2.img
I downloaded and recompiled the previous kernel's PKGBUILD from here:
https://github.com/archlinuxarm/PKGBUIL ... aspberrypi
Last edited by ktb on Sat Feb 07, 2015 2:07 pm, edited 1 time in total.

AndyPi
Posts: 83
Joined: Wed Feb 22, 2012 10:24 pm
Location: Gloucestershire,UK

Re: Arch on Pi2

Sat Feb 07, 2015 1:22 pm

On the barriers.h file...I am a bit naive and learning as I go so bear with me.
On git hub there is barriers.h file in linux/arch/arm/mach-bcm2709/include/mach/. However when I try to find it on my machine
# find / -name mach
/usr/share/terminfo/m/mach
/usr/lib/modules/3.18.5-2-ARCH/build/arch/arm/mach-bcm2708/include/mach
/usr/lib/modules/3.18.5-2-ARCH/build/arch/arm/include/asm/mach
/usr/lib/modules/3.18.5-2-ARCH/build/include/config/need/mach
/usr/lib/modules/3.18.5-2-ARCH/build/include/config/mach
there is a mach-bcm2709 folder but it does not have any includes
# ls -al /usr/lib/modules/3.18.5-2-ARCH/build/arch/arm/mach-bcm2709
drwxr-xr-x 2 root root 4096 Feb 6 02:19 .
drwxr-xr-x 73 root root 4096 Feb 6 02:20 ..
-rw-r--r-- 1 root root 1147 Feb 6 02:19 Kconfig
although bcm2708 does
# ls -al /usr/lib/modules/3.18.5-2-ARCH/build/arch/arm/mach-bcm2708
drwxr-xr-x 3 root root 4096 Feb 6 02:19 .
drwxr-xr-x 73 root root 4096 Feb 6 02:20 ..
drwxr-xr-x 3 root root 4096 Feb 5 16:01 include
-rw-r--r-- 1 root root 1212 Feb 6 02:19 Kconfig
does this help. Should there be an includes folder ?

ktb
Posts: 1447
Joined: Fri Dec 26, 2014 7:53 pm

Re: Arch on Pi2

Sat Feb 07, 2015 1:32 pm

@AndyPi

Did you install linux-raspberrypi-headers?

sudo pacman -S linux-raspberrypi-headers

AndyPi
Posts: 83
Joined: Wed Feb 22, 2012 10:24 pm
Location: Gloucestershire,UK

Re: Arch on Pi2

Sat Feb 07, 2015 1:33 pm

Furthermore barriers.h. I grabbed the folder from github and copied into mach-bcm2709 and all seems well. But I guess the includes should be installed with the linux headers

AndyPi
Posts: 83
Joined: Wed Feb 22, 2012 10:24 pm
Location: Gloucestershire,UK

Re: Arch on Pi2

Sat Feb 07, 2015 1:35 pm

ktb wrote:@AndyPi

Did you install linux-raspberrypi-headers?

sudo pacman -S linux-raspberrypi-headers
yes, but as I say no bcm709 includes came with it (I think)

ktb
Posts: 1447
Joined: Fri Dec 26, 2014 7:53 pm

Re: Arch on Pi2

Sat Feb 07, 2015 1:42 pm

AndyPi wrote:
ktb wrote:@AndyPi

Did you install linux-raspberrypi-headers?

sudo pacman -S linux-raspberrypi-headers
yes, but as I say no bcm709 includes came with it (I think)
When I installed the new kernel packages (3.18.5-3) which I mentioned above, I did end up with a barriers.h file here:
/usr/lib/modules/3.18.5-3-ARCH/build/arch/arm/mach-bcm2709/include/mach/barriers.h

I can't say whether it existed in the previous kernel headers package because I hadn't installed that package until the newer release was available.

Edit: I'll try building and installing from the previous commit for that PKGBUILD. I'll let you know...

AndyPi
Posts: 83
Joined: Wed Feb 22, 2012 10:24 pm
Location: Gloucestershire,UK

Re: Arch on Pi2

Sat Feb 07, 2015 1:56 pm

Ok, all is well. Blimey...the compile time on the old pi was best part of 20 minutes on pi2, using -j6, 2 minutes !

ktb
Posts: 1447
Joined: Fri Dec 26, 2014 7:53 pm

Re: Arch on Pi2

Sat Feb 07, 2015 6:44 pm

"They've managed to produce the first device that kills itself trying address high memory, a round of applause please.

Temporary fix: set gpu_mem=256"

https://github.com/archlinuxarm/PKGBUILDs/issues/1086

fruitoftheloom
Posts: 23337
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Arch on Pi2

Sat Feb 07, 2015 6:49 pm

ktb wrote:"They've managed to produce the first device that kills itself trying address high memory, a round of applause please.

Temporary fix: set gpu_mem=256"

https://github.com/archlinuxarm/PKGBUILDs/issues/1086
Thanks for heads up, it has cured the USB Keyboard issue ;)
Last edited by fruitoftheloom on Sat Feb 07, 2015 7:09 pm, edited 1 time in total.
Rather than negativity think outside the box !
RPi 4B 4GB (SSD Boot)..
Asus ChromeBox 3 Celeron is my other computer...

Return to “Arch”