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 EUA » Wed May 07, 2014 2:44 am

I don't have boot screen on my cubieboard2. Cannot find how to do. :(
EUA
 
Posts: 7
Joined: Wed May 07, 2014 2:34 am

Re: ArchLinux ARM for CubieTruck : any ideas ?

Postby Abroxa » Wed May 07, 2014 5:42 am

Hi Thomas,

thanks again, I just got Arch up and running without any problems using your guide. I don't need display output since it should replace my energy-wasting old NAS and add a couple of other services (dns, cups, svn, ...). Interesting point regarding fragile NAND and root FS. I wonder if this really matters if I put my storage on a separate HDD. But if so, which steps are necessary to get the SD-card partition to my HDD? Can I use the same commands? That is copying the whole partition and dd the u-boot stuff with bs=1024 seek=8?

Best
Daniel
Abroxa
 
Posts: 5
Joined: Fri May 02, 2014 9:10 am

Re: ArchLinux ARM for CubieTruck : any ideas ?

Postby moscar » Wed May 07, 2014 8:12 am

Hello Abroxa

You can't boot directly from sata so you need to have the u-boot on the sd-card (or pissible nand, I have never done that) and then have root=/dev/sda1 or whatever partition you use for the root fs on the HDD.

It's great to have your root fs on a hdd because it is a lot faster than a SD-card.
moscar
 
Posts: 24
Joined: Wed Nov 20, 2013 6:18 pm

Re: ArchLinux ARM for CubieTruck : any ideas ?

Postby fanningert » Wed May 07, 2014 5:12 pm

Hello,

@Abroxy, Daniel
Moscar allready say it. The main point to move the root filesystem on a SSD is speed. I extend in the mean time my guide.

@EUA
Sorry but this thread is for cubietruck. You should use the official guide on Arch Linux ARM to install the image.

@cheray
Sorry, but I don't test the HDMI or VGA output. I don't need it at the moment. When I have time I will test it on the weekend.

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 sappel » Sun May 11, 2014 11:11 am

Hello everyone,

after some testing a while back I thought I'd give it another try... ;)

I have a few questions:
@fanninger: why do you need the external usb ethernet adapter? can't you just add"sunxi_gmac" to mnt/etc/modules-load.d after unpacking ArchLinuxARM-sun7i-latest.tar.gz to mnt ??

In my case, it seems to work to do it that way. At least my CT receives an IP from the router, but I somehow can't connect via ssh. Although the sshd_config in the package above seems pretty closed down...will check that in a bit (I'm not familiar with arch yet, so I need to check the standard config stuff first ;) ).
EDIT: So sshd is enable in systemd, still need to figure out why it's denying the connection. The config is obviously only used in case one doesn't want to use the standard configuration. I'll allow root login though and test it again.


@all:
Does anyone have hdmi output running? I tried loading several modules, I checked the script.bin / script.fex, but no output...
If anyone has a working hdmi output, please let me know if it's only module loading or if there is more to it.

regards
sappel
sappel
 
Posts: 10
Joined: Sun May 11, 2014 9:44 am

Re: ArchLinux ARM for CubieTruck : any ideas ?

Postby PLyttle » Sun May 11, 2014 2:40 pm

You are right, you can also configure USB-tethering (or even wifi) to establish connection
I wrote up my install procedure, for both SD and nand install.

almost everything works out of the box, except bluetooth.
This is not a script, but you can copy-paste most commands


Content of the configuration files:

---/etc/modules-load.d/cubie.conf--- ( make display and ethernet work )
$this->bbcode_second_pass_code('', 'sunxi_gmac
bcmdhd
fbcon
lcd
hdmi
disp
disp_ump
ump
g_ether
sunxi_cedar_mod
')-----------------------------------
g_ether is for usb-tethering, bcmdhd for wifi. both need to be configured before they work

---/etc/modprobe.d/gmac.conf--- ( keep IP-address stable, make your own MAC)
$this->bbcode_second_pass_code('', 'options sunxi_gmac mac_str="00:11:22:33:44:55"
')-------------------------------

Procedure:

< make an SD-card on the Host computer. mountpoint = /dev/sdX>
mkdir mnt
wget http://archlinuxarm.org/os/ArchLinuxARM ... est.tar.gz
wget http://mirror.archlinuxarm.org/armv7h/a ... pkg.tar.xz
sudo su ( superuser from now on )
dd if=/dev/zero of=/dev/sdX bs=1M count=1
fdisk /dev/sdX ( n - p - 1 - enter - enter - w )
mkfs.ext4 /dev/sdX1
mount /dev/sdX1 mnt
tar -xf ArchLinuxARM-sun7i-latest.tar.gz -C mnt
nano mnt/etc/modules-load.d/cubie.conf ( enter above content )
nano mnt/etc/modprobe.d/gmac.conf ( enter above content )
cp ArchLinuxARM-sun7i-latest.tar.gz mnt/root
tar -xf uboot-cubietruck-2014.01-4-armv7h.pkg.tar.xz -C mnt --exclude='.PKGINFO' --exclude='.MTREE' --exclude='.INSTALL'
sync
dd if=mnt/boot/u-boot-sunxi-with-spl.bin of=/dev/sdX bs=1024 seek=8
sync
umount mnt
exit ( back to normal user )

< put card in cubietruck, connect ethernet and apply power >
ssh assigned_IP_address -l root ( password = root )

pacman -S sunxi-tools dosfstools wget
wget http://www.dropbox.com/s/7puy5v0v3pk7y6 ... n-boot.tgz

pacman -S uboot-cubietruck ( say yes to all questions )
pacman -Syu

< done with the SD-card, continue with nand, only if you want to boot from internal nand >

nand-part -f a20 /dev/nand 32768 'bootloader 131072' 'rootfs 14778368'
mkfs.vfat /dev/nanda
mkfs.ext4 /dev/nandb

< populate the rootfs filesystem on /dev/nandb >
mount /dev/nandb /mnt
tar -xf ArchLinuxARM-sun7i-latest.tar.gz -C /mnt
cp /etc/modules-load.d/cubie.conf /mnt/etc/modules-load.d/
cp /etc/modprobe.d/gmac.conf /mnt/etc/modprobe.d/
sync
cp /mnt/boot/uImage . ( save for the next step )
umount /mnt

< populate the bootloader filesystem on /dev/nanda >
mount /dev/nanda /mnt
tar -xf nand1-cubietruck-debian-boot.tgz -C /mnt
mv uImage /mnt ( replace the debian kernel )
sync
umount /mnt
poweroff ( you are done, remove SD-card )
( and press reset. )
Last edited by PLyttle on Sun May 11, 2014 5:18 pm, edited 1 time in total.
PLyttle
 
Posts: 120
Joined: Mon Jun 10, 2013 6:52 am

Re: ArchLinux ARM for CubieTruck : any ideas ?

Postby sappel » Sun May 11, 2014 3:55 pm

Thanks for your reply PLyttle,

VGA works now, no X running yet, but I'll look into it later.

next steps:
  • enable ssh
  • moving rootfs to hdd/ssd
  • getting wifi to work (so far dmesg said something about sdio_wifi problems. I added a parameter section for sdio_wifi in script.fex and put it to /boot after converting it to script.bin. Now some GPIO, reset amd power state: off messages showed up.
  • setting up X
  • check for hw accell + installing XBMC :)

I'll report back, if possible ^^
sappel
 
Posts: 10
Joined: Sun May 11, 2014 9:44 am

Re: ArchLinux ARM for CubieTruck : any ideas ?

Postby PLyttle » Sun May 11, 2014 4:26 pm

for wifi to work you need the firmware installed.

find it here: http://dl.cubieforums.com/patwood/ap6210.zip
unzip and put it in /usr/lib/firmware. (that is the whole subdirectory ap6210)

you need wpa_supplicant, that is easy,
$this->bbcode_second_pass_code('', 'pacman -S wpa_supplicant
')
you need to create /etc/wpa_supplicant.conf:

$this->bbcode_second_pass_code('', 'ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel
update_config=1

network={
ssid="YourSSID"
psk="YourPSK"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP
auth_alg=OPEN
id_str="Cubie3"
}
')

you need to create /etc/netctl/wlan0:
$this->bbcode_second_pass_code('', 'Description='wpa dynamic wireless ethernet'
Interface=wlan0
Connection=wireless
IP=dhcp
Security=wpa-config
WPAConfigFile='/etc/wpa_supplicant.conf'
')

then execute as root:
$this->bbcode_second_pass_code('', 'netctl enable wlan0
netctl start wlan0
')

wireless "should" work, but I always need to restart first

ssh needs no additional setup on the cubietruck.

For X you need at least:
xorg-xinit, a windowmanager, eg lxde or xfce4
and a screendriver like xf86-video-fbdev.

I havent played with X yet, so don't know what works
success PL
PLyttle
 
Posts: 120
Joined: Mon Jun 10, 2013 6:52 am

Re: ArchLinux ARM for CubieTruck : any ideas ?

Postby sappel » Sun May 11, 2014 4:38 pm

thanks once again, I'll give it a shot some time.
Right now I need to be able to boot again...after I moved the rootfs, I can't boot anymore. Tried to undo everything, set up the sdcard another time, but now I only get a scrambled screen output on vga and nothing works, no SSH possible, no input or prompt or anything. Need to figure out why before I can continue ^^
sappel
 
Posts: 10
Joined: Sun May 11, 2014 9:44 am

Re: ArchLinux ARM for CubieTruck : any ideas ?

Postby PLyttle » Sun May 11, 2014 4:52 pm

Only one thing to do.... start over :-)

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

PreviousNext

Return to Allwinner

Who is online

Users browsing this forum: No registered users and 0 guests