|
Archlinux ARM for Firefly-rk3288
Posted at 1/31/2016 17:27:28
View:6476
|
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
4.in official firmware, /dev/mmcblk0p5 is file system of ubuntu, so make it to ext4 and mount to /mnt
- miniroot# mkfs.ext4 -E nodiscard /dev/mmcblk0p5
- 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.
- miniroot# udhcpc
- miniroot# wget –P /mnt http://archlinuxarm.org/os/ArchLinuxARM-veyron-latest.tar.gz
Copy the code 6.uncompress
- miniroot# cd /mnt/
- miniroot# tar -xzf ArchLinuxARM-veyron-latest.tar.gz
Copy the code 7.change root to archlinux and add a user
- miniroot# chroot /mnt/
- [root@miniroot /]# useradd -m -s /bin/bash firefly
- [root@miniroot /]# passwd firefly
Copy the code 8.change the hostname
- [root@miniroot /]# vi /etc/hostname
Copy the code 9.change the service of serial
- [root@miniroot /]# cp /lib/systemd/system/serial-getty\@.service /lib/systemd/system/serial-getty@ttyS2.service
- [root@miniroot /]vi /lib/systemd/system/serial-getty@ttyS2.service (change the "%i.device" to "%i")
- [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
- [root@miniroot /]# exit
- miniroot# boot /mnt: /lib/systemd/systemd
Copy the code 11.You can login using the user you just add, and I use firefly
- Arch login: firefly
- Password
Copy the code 12.Enter root mode, and the root password of archlinux is "root"
- [firefly@Arch ~]$ su
- Password:
- [root@Arch firefly]#
Copy the code 13.Start network service
- [root@Arch firefly]# systemctl enable dhcpcd.service
- [root@Arch firefly]# systemctl start dhcpcd.service
Copy the code 14.Update the system
- [root@Arch firefly]# pacman –Syu
Copy the code Note: you should input "N" here, or you will clear all what you do just now
- >>> Updating module dependencies. Please wait ...
- A new kernel version needs to be flashed onto /dev/mmcblk0p5.
- Do you want to do this now? [y|N]
- N
Copy the code
15.Install sudo
- [root@Arch firefly]# pacman -S sudo
Copy the code edit the profile, and add the user permission
- [root@Arch firefly]# visudo
- 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.
- [root@Arch firefly]# cp -r /path/system/ /
Copy the code copy the script to archlinux
- [root@Arch firefly]# cp wifi-on.sh /usr/local/bin/
- [root@Arch firefly]# cp wifi-off.sh /usr/local/bin/
Copy the code edit the service file of systemd
- [root@Arch firefly]# vi /lib/systemd/system/wifi-on.service
Copy the code start the wifi service when system start
- [root@Arch firefly]# systemctl enable wifi-on.service
Copy the code 17.add bluetooth
install bluez
- [root@Arch firefly]# pacman -S bluez
- [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/)
- [root@Arch firefly]# cp /media/bluetooth-brcm /etc/default/bluetooth-brcm
Copy the code add the bluetooth script
- [root@Arch firefly]# cp /media/do-brcm-patchram-plus.sh /usr/local/bin/
Copy the code start the bluetooth service
- [root@Arch firefly]# systemctl enable bluetooth-brcm-firmware.service
- [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
- [root@Arch firefly]# touch /firstboot
- [root@Arch firefly]# vi /usr/local/bin/first-boot.sh
- [root@Arch firefly]# chmod a+x /usr/local/bin/first-boot.sh
- [root@Arch firefly]# vi /lib/systemd/system/rc.local.service (you can get the file from my firmware)
Copy the code enable the service
- [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:
- [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):
- miniroot# mount /dev/mmcblk0p5 /mnt/
- miniroot# mkdir /media
- miniroot# mount /dev/sda /media/
- miniroot# dd if=/dev/zero of=/media/linuxroot.img bs=1M count=1024
- miniroot# mkfs.ext4 -F -L linuxroot /media/linuxroot.img
- miniroot# mkdir tmp
- miniroot# mount -o loop /media/linuxroot.img /tmp/
- miniroot# cp -a /mnt/* /tmp/
- miniroot# umount /tmp/
- miniroot# umount /media/
- 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:
- miniroot# editenv
- root=/dev/mmcblk0p5:
- init=/sbin/init
- #ethaddr=00:11:22:33:44:55
- #fbset_args="-a -nonstd 1 -g 1920 1080 1920 1080 32 -rgba 8/0,8/8,8/16,8/24"
- #fbset_args="-a -nonstd 4 -g 1280 720 1280 720 16 -rgba 5/11,6/5,5/0,0/0"
- autoboot=1
- miniroot# saveenv
- 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
|
|