ArchLinux ARM for CubieTruck : any ideas ?

This forum is for supported devices using an ARMv7 Allwinner SoC.

Re: ArchLinux ARM for CubieTruck : any ideas ?

Postby Almin » Sun Aug 24, 2014 7:01 pm

Hey guys,

I recently dd'd my root partition to SSD and changed the uENV.txt appropriately. But if I ssh into it and do df -h it tells me it (the root partition /) only has a few hundred MBs of free space left. Even though it uses the root partition on the SSD, it still thinks it only has the 4 GB of disk space on the NAND!

Could you please help me, please?! I'm running out of ideas!
Almin
 
Posts: 2
Joined: Sun Aug 24, 2014 5:54 pm

Re: ArchLinux ARM for CubieTruck : any ideas ?

Postby Isgar » Fri Sep 05, 2014 10:15 am

Hi,

I used PLyttle's instructions to install arch and it works fine so far. But I can't decrypt my hard drive now with cryptsetup:
$this->bbcode_second_pass_code('', '> cryptsetup open /dev/sda1 data
device-mapper: reload ioctl on temporary-cryptsetup-321 failed: No such file or directory
Failed to setup dm-crypt key mapping for device /dev/sda1.
Check that kernel supports aes-xts-plain64 cipher (check syslog for more info).')
Indeed, 'cryptsetup benchmark' shows there is no aes-xts:
$this->bbcode_second_pass_code('', '# Algorithm | Key | Encryption | Decryption
aes-cbc 128b 13.2 MiB/s 14.2 MiB/s
serpent-cbc 128b N/A N/A
twofish-cbc 128b N/A N/A
aes-cbc 256b 10.7 MiB/s 11.0 MiB/s
serpent-cbc 256b N/A N/A
twofish-cbc 256b N/A N/A
aes-xts 256b N/A N/A
serpent-xts 256b N/A N/A
twofish-xts 256b N/A N/A
aes-xts 512b N/A N/A
serpent-xts 512b N/A N/A
twofish-xts 512b N/A N/A
')
Before I used this image, but it eventually broke since I had to disable systemd updates.

Is there a way to get aes-xts-plain64 to work with this kernel?
Isgar
 
Posts: 15
Joined: Thu Sep 04, 2014 10:45 pm

Re: ArchLinux ARM for CubieTruck : any ideas ?

Postby PLyttle » Fri Sep 05, 2014 11:14 am

get ready to build your own kernel package.

get the kernel source:$this->bbcode_second_pass_code('', 'git clone https://github.com/archlinuxarm/PKGBUILDs.git
')
get the necessary tools:
$this->bbcode_second_pass_code('', 'sudo pacman -Suy gcc bc make patch git pkgfile fakeroot xmlto docbook-xsl uboot-mkimage
')
go to the directory PKGBUILDs/core/linux-sun7i

edit PKGBUILD to enable nconfig,
remove the first # from the line :
$this->bbcode_second_pass_quote('', ' ') #make nconfig # new CLI menu for configuration

so it reads :
$this->bbcode_second_pass_quote('', ' ') make nconfig # new CLI menu for configuration

save the file and type:$this->bbcode_second_pass_code('', 'makepkg')
when the config menu appears go to

Cryptographic API --->
< > XTS support
and type y
< > changes to <*>

type F9 and enter to save

Building continues, now wait until it is done.
You will have 2 new packages in your current directory. A kernel and a headers package.

you can install them with sudo pacman -U <packagename>

reboot and enjoy
PLyttle
 
Posts: 120
Joined: Mon Jun 10, 2013 6:52 am

Re: ArchLinux ARM for CubieTruck : any ideas ?

Postby Isgar » Fri Sep 05, 2014 5:54 pm

Thank you, works like a charm!

Do I have to rebuild the kernel when uboot-cubietruck gets updated?
Isgar
 
Posts: 15
Joined: Thu Sep 04, 2014 10:45 pm

Re: ArchLinux ARM for CubieTruck : any ideas ?

Postby Almin » Fri Sep 05, 2014 6:54 pm

Btw, I made a stupid mistakte: I forgot to (e2fsck &) resize2fs the root partition. :oops: :roll: :?
My problem is solved. :roll: :mrgreen:


edit: Arch is best again! :lol:
Almin
 
Posts: 2
Joined: Sun Aug 24, 2014 5:54 pm

Re: ArchLinux ARM for CubieTruck : any ideas ?

Postby PLyttle » Fri Sep 05, 2014 8:04 pm

@Isgar

No, but you do when linux-sun7i gets updated

You can prevent updating this package by editing /etc/pacman.conf

edit line $this->bbcode_second_pass_quote('', '#')IgnorePkg =

to
$this->bbcode_second_pass_quote('', 'I')gnorePkg = linux-sun7i linux-sun7i-headers


To build your own new kernel go to PKGBUILDs directory and type $this->bbcode_second_pass_code('', 'git pull')
then build the package again.
remember to run nconfig before you do.

In the mean time it might be wise to read up on the arch makepkg system.

LP
PLyttle
 
Posts: 120
Joined: Mon Jun 10, 2013 6:52 am
Top

Re: ArchLinux ARM for CubieTruck : any ideas ?

Postby fanningert » Sat Sep 06, 2014 8:58 pm

Ok, after a long time I will update my help tools (my image for cubietruck is to old) to create a working sdcard.

https://github.com/fanningert/Installsc ... Cubietruck

When you have ideas for the scripts, please tell me it.
Raspberry Pi | Raspberry Pi 2 | SolidRun ClearFog | USB Armory | Cubieboard 2 | Cubietruck
fanningert
 
Posts: 17
Joined: Wed Apr 09, 2014 7:59 pm
Location: Vienna

Re: ArchLinux ARM for CubieTruck : any ideas ?

Postby fanningert » Sun Sep 07, 2014 9:10 am

Hi,

after I update the system on a cubietruck I get no ip addr more.

Here the error message from the journal.

$this->bbcode_second_pass_code('', 'Sep 07 09:03:38 alarm systemd[1]: Started Network Service.
Sep 07 09:03:38 alarm systemd-networkd[103]: eth0 : DHCP error: client failed: Invalid argument
Sep 07 09:03:38 alarm systemd-networkd[103]: eth0 : could not acquire DHCPv4 lease
Sep 07 09:03:38 alarm systemd-networkd[103]: eth0 : failed')

I think the problem is that I update the systemd package to the current version.

Has any one a solution for this problem?

UPDATE: I changed to a static configuration and this is working.

Regards Thomas
Raspberry Pi | Raspberry Pi 2 | SolidRun ClearFog | USB Armory | Cubieboard 2 | Cubietruck
fanningert
 
Posts: 17
Joined: Wed Apr 09, 2014 7:59 pm
Location: Vienna

Re: ArchLinux ARM for CubieTruck : any ideas ?

Postby PLyttle » Sun Sep 07, 2014 2:09 pm

It is not the systemd package. (why does everybody always think it is systemd?)
it is the openresolv package which is the culprit

fall back on the previous version (3.5.6-1), and it should work again.
problem is, the package is most likely not in your cache so you'll have to rebuild it.
I reverse-patched the PKGBUILDs for you.
Save the files below in a separate directory and type $this->bbcode_second_pass_code('', 'makepkg')
assuming you already installed the necessary tools. (gcc bc make patch pkgfile fakeroot) If not you'll get warnings/errors.

install with pacman -U <packagefile>

filename: PKGBUILD
$this->bbcode_second_pass_code('', '# $Id$
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Ignacio Galmarino <igalmarino@gmail.com>

pkgname=openresolv
pkgver=3.5.6
pkgrel=1
pkgdesc="resolv.conf management framework (resolvconf)"
arch=(any)
url="http://roy.marples.name/projects/openresolv"
license=('custom:BSD')
backup=(etc/resolvconf.conf)
provides=(resolvconf)
depends=(bash)
makedepends=(systemd)
source=("http://roy.marples.name/downloads/openresolv/${pkgname}-${pkgver}.tar.b
z2"
fs33801.patch)
md5sums=('ac03b7a52cf0f2040cc70df641f1baff'
'440790d3403b2ae2c4bb1d657c7e36a4')

prepare() {
cd $pkgname-$pkgver
patch -Np1 -i ../fs33801.patch
sed -n '2,25{s:^# \?::;p}' resolvconf.in >LICENSE
}

build() {
cd $pkgname-$pkgver
./configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib/resolvconf \
--sbindir=/usr/bin
}

package() {
cd $pkgname-$pkgver
make DESTDIR="$pkgdir" install

install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
')

filename: fs33801.patch
$this->bbcode_second_pass_code('', 'diff --git i/dnsmasq.in w/dnsmasq.in
index 96b5593..384d9df 100644
--- i/dnsmasq.in
+++ w/dnsmasq.in
@@ -33,10 +33,9 @@
NL="
"

-: ${dnsmasq_pid:=/var/run/dnsmasq.pid}
-[ -s "$dnsmasq_pid" ] || dnsmasq_pid=/var/run/dnsmasq/dnsmasq.pid
: ${dnsmasq_service:=dnsmasq}
: ${dnsmasq_restart:=@RESTARTCMD ${dnsmasq_service}@}
+: ${dnsmasq_reload:=/usr/bin/systemctl reload ${dnsmasq_service}}
newconf="# Generated by resolvconf$NL"
newresolv="$newconf"

@@ -182,7 +181,7 @@ if $changed; then
eval $dnsmasq_restart
fi
if $dbus; then
- $changed || kill -HUP $(cat "$dnsmasq_pid")
+ $changed || eval $dnsmasq_reload
# Send even if empty so old servers are cleared
if $dbus_ex; then
method=SetDomainServers
diff --git i/resolvconf.conf.5.in w/resolvconf.conf.5.in
index 81fe154..9b4f1bd 100644
--- i/resolvconf.conf.5.in
+++ w/resolvconf.conf.5.in
@@ -215,8 +215,8 @@ variables, documented below.
Location of the dnsmasq service.
.It Sy dnsmasq_restart
Command to restart the dnsmasq service.
-.It Sy dnsmasq_pid
-Location of the dnsmasq pidfile.
+.It Sy dnsmasq_reload
+Command to reload the dnsmasq service.
.It Sy libc_service
Location of the libc service.
.It Sy libc_restart
@@ -229,10 +229,8 @@ Command to restart the named service.
Command to restart the pdnsd service.
.It Sy unbound_service
Location of the unbound service.
-.It Sy unbound_restart
-Command to restart the unbound service.
-.It Sy unbound_pid
-Location of the unbound pidfile.
+.It Sy unbound_reload
+Command to reload the unbound service.
.Sh SEE ALSO
.Xr resolv.conf 5
and
diff --git i/unbound.in w/unbound.in
index 4ee0da7..5e4a326 100644
--- i/unbound.in
+++ w/unbound.in
@@ -33,9 +33,8 @@
NL="
"

-: ${unbound_pid:=/var/run/unbound.pid}
: ${unbound_service:=unbound}
-: ${unbound_restart:=@RESTARTCMD ${unbound_service}@}
+: ${unbound_reload:=/usr/bin/systemctl reload-or-try-restart ${unbound_service}
}
newconf="# Generated by resolvconf$NL"

for d in $DOMAINS; do
@@ -67,12 +66,5 @@ if [ ! -f "$unbound_conf" ] || \
[ "$(cat "$unbound_conf")" != "$(printf %s "$newconf")" ]
then
printf %s "$newconf" >"$unbound_conf"
- # If we can't sent a HUP then force a restart
- if [ -s "$unbound_pid" ]; then
- if ! kill -HUP $(cat "$unbound_pid") 2>/dev/null; then
- eval $unbound_restart
- fi
- else
- eval $unbound_restart
- fi
+ eval $unbound_reload
fi
')
LP
PLyttle
 
Posts: 120
Joined: Mon Jun 10, 2013 6:52 am

Re: ArchLinux ARM for CubieTruck : any ideas ?

Postby maggu2810 » Mon Sep 29, 2014 11:42 am

$this->bbcode_second_pass_code('', '
Sep 07 09:03:38 alarm systemd[1]: Started Network Service.
Sep 07 09:03:38 alarm systemd-networkd[103]: eth0 : DHCP error: client failed: Invalid argument
Sep 07 09:03:38 alarm systemd-networkd[103]: eth0 : could not acquire DHCPv4 lease
Sep 07 09:03:38 alarm systemd-networkd[103]: eth0 : failed
')

That is an error raised by systemd.

I run in the same trouble and checked why the error was hit:
https://bugs.freedesktop.org/show_bug.cgi?id=84373

systemd needs at least a kernel v3.7.

https://www.mail-archive.com/systemd-de ... 22274.html
https://www.mail-archive.com/systemd-de ... 22454.html
maggu2810
 
Posts: 35
Joined: Thu May 29, 2014 12:52 pm

PreviousNext

Return to Allwinner

Who is online

Users browsing this forum: Google [Bot] and 14 guests