Firefly Open Source Community

   Login   |   Register   |
New_Topic
Print Previous Topic Next Topic

Archlinux ARM for Firefly-rk3288

10

Credits

0

Prestige

0

Contribution

new registration

Rank: 1

Credits
10

Archlinux ARM for Firefly-rk3288

Posted at 1/31/2016 17:27:28      View:6393 | Replies:3        Print      Only Author   [Copy Link] 1#
Last edited by linjc In 1/31/2016 17:42 Editor

I am so exciting when I see the post of Archlinux on Firefly-rk3288 from tlgimenes, It is cool!!
I search in internet about Archlinux and I found that Archlinux arm can run smooly in raspberrypi. So It may work well in Firefly-rk3288. I try to do it, and share my note here. I should say thanks to tlgimenes here, because his post help me a lot.
there is my note
1.flash the official firmware of ubuntu to the board
2.download the miniroot from here and flash linux-boot-miniroot.img to boot partition.
3.reboot the board and enter the miniroot mode
  1. miniroot#
Copy the code

4.in official firmware, /dev/mmcblk0p5 is file system of ubuntu, so  make it to ext4 and mount to /mnt
  1. miniroot# mkfs.ext4 -E nodiscard /dev/mmcblk0p5
  2. miniroot# mount /dev/mmcblk0p5 /mnt/
Copy the code
5.connect to ethernet and download the archlinux package, you can download it from their official web too.

  1. miniroot# udhcpc
  2. miniroot# wget –P /mnt http://archlinuxarm.org/os/ArchLinuxARM-veyron-latest.tar.gz
Copy the code
6.uncompress

  1. miniroot# cd /mnt/
  2. miniroot# tar -xzf ArchLinuxARM-veyron-latest.tar.gz
Copy the code
7.change root to archlinux and add a user

  1. miniroot# chroot /mnt/
  2. [root@miniroot /]# useradd -m -s /bin/bash firefly
  3. [root@miniroot /]# passwd firefly
Copy the code
8.change the hostname

  1. [root@miniroot /]# vi /etc/hostname
Copy the code
9.change the service of serial

  1. [root@miniroot /]# cp /lib/systemd/system/serial-getty\@.service /lib/systemd/system/serial-getty@ttyS2.service
  2. [root@miniroot /]vi /lib/systemd/system/serial-getty@ttyS2.service (change the "%i.device" to "%i")
  3. [root@miniroot /]# systemctl enable [email]serial-getty@ttyS2.service[/email]
Copy the code
note: the newest code change the ttyS2 to ttyFIQ0, so I change it to ttyFIQ0 in my firmware.
10.You can start archlinux now

  1. [root@miniroot /]# exit
  2. miniroot# boot /mnt: /lib/systemd/systemd
Copy the code
11.You can login using the user you just add, and I use firefly

  1. Arch login: firefly
  2. Password
Copy the code
12.Enter root mode, and the root password of archlinux is "root"

  1. [firefly@Arch ~]$ su
  2. Password:
  3. [root@Arch firefly]#
Copy the code
13.Start network service

  1. [root@Arch firefly]# systemctl enable dhcpcd.service
  2. [root@Arch firefly]# systemctl start dhcpcd.service
Copy the code
14.Update the system

  1. [root@Arch firefly]# pacman –Syu
Copy the code
Note: you should input "N" here, or you will clear all what you do just now
  1. >>> Updating module dependencies. Please wait ...
  2. A new kernel version needs to be flashed onto /dev/mmcblk0p5.
  3. Do you want to do this now? [y|N]
  4. N
Copy the code

15.Install sudo

  1. [root@Arch firefly]# pacman -S sudo
Copy the code
edit the profile, and add the user permission
  1. [root@Arch firefly]# visudo
  2. firefly ALL=(ALL) ALL
Copy the code

16.add wifi

tlgimenes run the wifi by using libhybris, here is a simple way. I copy the file /system/ from official firmware of ubuntu to archlinux.
  1. [root@Arch firefly]# cp -r /path/system/ /
Copy the code
copy the script to archlinux

  1. [root@Arch firefly]# cp wifi-on.sh /usr/local/bin/
  2. [root@Arch firefly]# cp wifi-off.sh /usr/local/bin/
Copy the code
edit the service file of systemd

  1. [root@Arch firefly]# vi /lib/systemd/system/wifi-on.service
Copy the code
start the wifi service when system start

  1. [root@Arch firefly]# systemctl enable wifi-on.service
Copy the code
17.add bluetooth

install bluez
  1. [root@Arch firefly]# pacman -S bluez
  2. [root@Arch firefly]# pacman -S bluez-utils
Copy the code
add profile (you can get the file from my firmware, here I put my files in u-disk, and mount in /media/)

  1. [root@Arch firefly]# cp /media/bluetooth-brcm /etc/default/bluetooth-brcm
Copy the code
add the bluetooth script

  1. [root@Arch firefly]# cp /media/do-brcm-patchram-plus.sh /usr/local/bin/
Copy the code
start the bluetooth service

  1. [root@Arch firefly]# systemctl enable bluetooth-brcm-firmware.service
  2. [root@Arch firefly]# systemctl enable bluetooth.service
Copy the code
18.you should resize the partition of file system, when your system start first, I run a script service when system start here

  1. [root@Arch firefly]# touch /firstboot
  2. [root@Arch firefly]# vi /usr/local/bin/first-boot.sh
  3. [root@Arch firefly]# chmod a+x /usr/local/bin/first-boot.sh
  4. [root@Arch firefly]# vi /lib/systemd/system/rc.local.service (you can get the file from my firmware)
Copy the code
enable the service

  1. [root@Arch firefly]# systemctl enable rc.local.service
Copy the code
19.You can remove some file useless, such as the software package what you installed:

  1. [root@Arch firefly]# rm /var/cache/pacman/pkg/*
Copy the code
20.pack the firmware

I reboot the board and enter miniroot (I insert the u-disk and mount to /media/ here):
  1. miniroot# mount /dev/mmcblk0p5 /mnt/
  2. miniroot# mkdir /media
  3. miniroot# mount /dev/sda /media/
  4. miniroot# dd if=/dev/zero of=/media/linuxroot.img bs=1M count=1024
  5. miniroot# mkfs.ext4 -F -L linuxroot /media/linuxroot.img
  6. miniroot# mkdir tmp
  7. miniroot# mount -o loop /media/linuxroot.img /tmp/
  8. miniroot# cp -a /mnt/* /tmp/
  9. miniroot# umount /tmp/
  10. miniroot# umount /media/
  11. miniroot# umount /mnt/
Copy the code
Now, the linuxroot.img is the file system of archlinux.
21.pack to a update.img

I change the AndroidTool, and you can copy the files include linuxroot.img,linux-boot.img,resource.img,misc_zero.img  to the direction rockdev/Image/ then run the script mkupdate.bat, the update.img will create in rockdev/
22. if you want auto enter your archlinux and don not want enter miniroot, you can change these:
  1. miniroot# editenv
  2. root=/dev/mmcblk0p5:
  3. init=/sbin/init
  4. #ethaddr=00:11:22:33:44:55
  5. #fbset_args="-a -nonstd 1 -g 1920 1080 1920 1080 32 -rgba 8/0,8/8,8/16,8/24"
  6. #fbset_args="-a -nonstd 4 -g 1280 720 1280 720 16 -rgba 5/11,6/5,5/0,0/0"
  7. autoboot=1
  8. miniroot# saveenv
  9. miniroot# reboot –f
Copy the code

I just transplanted a basic archlinux file system, if you want to make a perfect system, you also need to install a lot of software, I hope you can share it with everyone, just like tlgimenes, thank you very much.


If you find the wrong place, please tell me.


google driver:archlinux firmware: https://drive.google.com/file/d/ ... Tg/view?usp=sharing

baidu disk:
archlinux firmware link: http://pan.baidu.com/s/1bomaoVH password: mpfk
archlinux+xfce firmware link: http://pan.baidu.com/s/1numvXrV password: g82u


Reply

Use props Report

2442

Credits

0

Prestige

0

Contribution

vip

Rank: 6Rank: 6

Credits
2442
Posted at 1/31/2016 17:34:16        Only Author  2#
nice job
Reply

Use props Report

19

Credits

0

Prestige

0

Contribution

new registration

Rank: 1

Credits
19
Posted at 2/1/2016 06:41:14        Only Author  3#
Thanks you very much for your job
Reply

Use props Report

147

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
147
Posted at 2/10/2016 02:22:42        Only Author  4#
Nice Job !!

Hope people will use these nice tips I just can't duplicate it here at home because I don't have a serial debugging cable, but if you do, I think this is a better solution than my previous one. By the ways, did you manage to make miniroot boot not only using the debug serial port but using the VGA port instead ?

I'm also still trying to figure out a way of using libhybris or any other way of having Mali accelerated openGL ES working on X/Wayland under Arch and writing a comprehensive tutorial on how to do it, like you just did with the Arch installation.

If anyone  have already done it or have a hint on how doing it, please let me know

cheers \o/
Reply

Use props Report

You need to log in before you can reply Login | Register

This forum Credits Rules

Quick Reply Back to top Back to list