OSHW-DEIMOS/SOFTWARE/A64-TERES/scripts
Dimitar Gamishev 6c6e7818f8 New packages added:
audioselect
debug_switch
2019-01-17 16:08:29 +02:00
..
configuration-files Fixed typos. 2018-12-07 11:35:58 +02:00
platform-scripts Improved install desktop script 2018-12-05 15:35:30 +02:00
prebuilt New packages added: 2019-01-17 16:08:29 +02:00
systemd-services stuff 2017-10-13 14:07:48 +03:00
build_image.sh stuff 2017-10-13 14:07:48 +03:00
build_uboot_a64.sh stuff 2017-10-13 14:07:48 +03:00
build_uboot.sh Fixed wrong paths in script 2018-12-06 09:13:33 +02:00
Docker.md Added Docker file to init build enviorement and Docker.md with instructions 2018-12-17 13:55:22 +02:00
flash_boot0_only.sh Added scripts to help flashing boot0/uboot only Author : Simon Eisenmann longsleep 2018-12-05 11:31:15 +02:00
flash_u-boot_only.sh Added scripts to help flashing boot0/uboot only Author : Simon Eisenmann longsleep 2018-12-05 11:31:15 +02:00
install_kernel_headers.sh stuff 2017-10-13 14:07:48 +03:00
install_kernel_modules.sh stuff 2017-10-13 14:07:48 +03:00
install_kernel.sh Fixed typos. 2018-12-07 11:35:58 +02:00
make_initrd.sh stuff 2017-10-13 14:07:48 +03:00
make_kernel_tarball.sh stuff 2017-10-13 14:07:48 +03:00
make_rootfs.sh defined KEY_SUSPEND 2017-11-10 15:49:31 +02:00
make_simpleimage.sh mkfs.ext4 build incommpatible with 3.10 kernels ext4, when build on Ubuntu > 16.04 2018-12-10 11:00:48 +02:00
pack_uboot.sh stuff 2017-10-13 14:07:48 +03:00
README.md Use -jnproc instead of -j4 2018-10-08 22:55:21 -07:00

Build Instructions

Linux

1. Getting source code and helper scripts

cd ~/
git clone https://github.com/OLIMEX/DIY-LAPTOP
cd DIY-LAPTOP/SOFTWARE/A64-TERES/

2. Setup toolchain

sudo apt install gcc-aarch64-linux-gnu
sudo apt install gcc-4.7-arm-linux-gnueabihf
sudo apt install kpartx bsdtar mtools dos2unix device-tree-compiler

3. Cross-compile sources

Linux

cd linux-a64
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- olimex_teres1_defconfig
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- LOCALVERSION= clean
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j`nproc` LOCALVERSION= Image
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j`nproc` LOCALVERSION= modules
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j`nproc` LOCALVERSION= modules_install  INSTALL_MOD_PATH=out INSTALL_MOD_STRIP=1

Allwinner Pack Tools

cd ../
make -C sunxi-pack-tools

U-Boot

cd scripts/
./build_uboot.sh #A64-Teres

or

./build_uboot_a64.sh #A64-OLinuXino

4. Helper Scripts

Ramdisk

Either make one with the steps below or download one from some other place. Make sure the initrd is for aarch64.

Get Busybox tree

cd ../
git clone --depth 1 --branch 1_24_stable --single-branch git://git.busybox.net/busybox busybox

Configure and build Busybox

Build a static busybox for aarch64. Start by copying the blobs/a64_config_busybox file to .config of your Busybox folder.

cp blobs/a64_config_busybox busybox/.config
cd busybox 
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j`nproc` oldconfig
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j`nproc`

Make initrd.gz

Use the make_initrd.sh script to create a simple initrd based on the busybox binary previously compiled.

cd ../scripts
./make_initrd.sh

Create bootable image

Create kernel tarball :

./make_kernel_tarball.sh . ../linux-a64 #This will produce file named linux-a64-xx.yy.zz.tar.xz 

Create simple image structure:

sudo ./make_simpleimage.sh teres.img 1000 ./linux-a64-3.10.104-1.tar.xz 
sudo xz teres.img

Build a bootable image:

sudo ./build_image.sh teres.img.xz ./linux-a64-3.10.104-1.tar.xz xenial

If successfully completed, this command will create file named xenial-teres-bspkernel-<date>.img. Use dd to write this image to an SD Card:

dd if=xenial-teres-bspkernel-<date>.img of=/dev/sdX bs=1M status=progress

Use these credentials to log in after first boot:

  • User: olimex
  • Password: olimex

Connection to the internet can be enabled via command-line by running:

nmtui

Feel free to install everything you want, e.g., a graphical desktop environment:

./platform-scripts/install_desktop.sh mate # installs mate desktop