|
Edited by jeancf at 2015-12-16 17:05
Hi,
I want to report that I managed to get arch installed and running on the Orange Pi using the latest mainline u-boot and mainline linux kernel from arch (4.3.2).
You will find below the description of the process (.md file in attachment also). Once it is done, you can keep the installation updated using pacman, except for the u-boot as the package does not exist yet. I am going to check what it takes to officialize the support in arch. Probably contribute the u-boot package which I am happy to do.
Compile u-boot
### Download and configure toolchain ###
Go to http://www.linaro.org/downloads/, scroll down to *Linaro Toolchain* and download the file linked next to *linaro-toolchain-binaries (little-endian)*. The file should be named something like `gcc-linaro-<version>-<date>-x86_64-arm-linux-gnueabihf.tar.xz`
Extract the content of the archive to a folder and make sure that the `bin` folder of the package is in your `PATH`. It can be added for the current session only by using:
- export PATH="$PATH":/home/user/folder/gcc-linaro-<VERSION>-<DATE>-x86_64_arm-linux-gnueabihf/bin/
Copy code Specify that cross compilation to ARM should be used:
- export CROSS_COMPILE=arm-linux-gnueabihf-
Copy code
### Download and compile u-boot ###
Get latest stable u-boot from `ftp://ftp.denx.de/pub/u-boot/` and unpack.
In the main u-boot folder, execute `make Orangepi_defconfig` to configure u-boot.
Execute `make all` to build all the u-boot images for OrangePi.
Install archlinux on SD card
1. Clean up the beginning of the SD Card:
Identify the name of your SD card by using `lsblk`.
- dd if=/dev/zero of=/dev/sdX bs=1M count=8
Copy code where `/dev/sdX` is the name of the SD Card.
2. Partition the SD Card.
Start by deleting all partitions that may already exist on the card.
Create a primary partition starting and 2048 and extending to the end of the card
Write the partition and exit
3. Create and mount the ext4 filesystem:
- mkfs.ext4 /dev/sdX1
- mkdir mnt
- mount /dev/sdX1 mnt
Copy code where `/dev/sdX1' is the name of the partition on the SD Card
4. Download and extract the root filesystem:
- wget [url]http://archlinuxarm.org/os/ArchLinuxARM-armv7-latest.tar.gz[/url]
- bsdtar -xpf ArchLinuxARM-armv7-latest.tar.gz -C mnt
- sync
Copy code
Copy u-boot on SD card
1. Install the U-Boot bootloader:
In the main u-boot folder where you compiled u-boot you will find the bootloader file called `u-boot-sunxi-with-spl.bin`
- dd if=u-boot-sunxi-with-spl.bin of=/dev/sdX bs=1024 seek=8
Copy code 2. Create a file called `boot.txt` with the following content
- part uuid ${devtype} ${devnum}:${bootpart} uuid
- setenv bootargs console=${console} root=PARTUUID=${uuid} rw rootwait
- if load ${devtype} ${devnum}:${bootpart} ${kernel_addr_r} /boot/zImage; then
- if load ${devtype} ${devnum}:${bootpart} ${fdt_addr_r} /boot/dtbs/${fdtfile}; then
- if load ${devtype} ${devnum}:${bootpart} ${ramdisk_addr_r} /boot/initramfs-linux.img; then
- bootz ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r};
- else
- bootz ${kernel_addr_r} - ${fdt_addr_r};
- fi;
- fi;
- fi
- if load ${devtype} ${devnum}:${bootpart} 0x48000000 /boot/uImage; then
- if load ${devtype} ${devnum}:${bootpart} 0x43000000 /boot/script.bin; then
- setenv bootm_boot_mode sec;
- bootm 0x48000000;
- fi;
- fi
Copy code 3. Convert it to binary format:
Install uboot-tools with `pacman -S uboot-tools`
- mkimage -A arm -O linux -T script -C none -n "U-Boot boot script" -d boot.txt boot.scr
- cp boot.scr mnt/boot
- sync
- unmount /dev/sdX
Copy code 4. Insert the micro SD card into the pcDuino3, connect the USB or SATA drive, connect ethernet, and apply 5V power.
Use the serial console or SSH to the IP address given to the board by your router.
Login as the default user `alarm` with the password `alarm`.
The default root password is `root`.
|
This thread contains more resources
You need to Log in to download or view,No account?
Register
x
|