Difference between revisions of "User:Oogwaymaki"

From PINE64
Jump to navigation Jump to search
Line 20: Line 20:
First please install these Dependencies:
First please install these Dependencies:


apt-get install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu build-essential autoconf libtool cmake pkg-config git python-dev swig3.0 libpcre3-dev nodejs-dev crossbuild-essential-arm64 git
apt-get install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu build-essential autoconf libtool cmake pkg-config git python-dev swig3.0 libpcre3-dev nodejs-dev crossbuild-essential-arm64 git losetup


The following main sources are needed:
The following main sources are needed:
Line 81: Line 81:


After making apply the patch..
After making apply the patch..
# make again
now, go to your sdcard
(use a CLEAN scard NO Partitions)
fdisk /dev/sd#
create 4 primary partitions,
the 1rst one should be the "boot" partition containing Uboot stuff, I'd suggest a gigabyte
the other 3 could be your choice
Lets start with the first OS were going to use:
JUMPDRIVE (allows booting the EMMC and fixing it if we break it!!!)
Download it here:
https://github.com/dreemurrs-embedded/Jumpdrive/releases/download/0.4/pine64-pinephone.img.xz
then use losetup





Revision as of 00:10, 26 June 2020

Summary:

After following these steps:

- You'll have a Custom UBOOT (Crust ENABLED) that allows MultiBOOT Using 3 different OS's depending on key combo of volume up / volume down or none pressing on boot - You'll be able to experiment on SD Card without Touching your EMMC - You'll learn how to take a part a PINE PHONE IMAGE (most, and put each OS On one partition

=============================================================================================

All the information here, has been discussed in the open source community on web sites. I have simply developed a process on how to do this on the pine phone.

We use utilities such as Cross Compilation, Uboot, Patches, which will be credited.

First step, make sure you have a cross compiler for your Computer, for particularly the arm device, you will need to download a few packages, I assume we're using Debian Linux (if your using another OS you can find similar commands by searching on the web or to make it simpler download a docker Debian image, and install the pre-requisites which I will list here for Debian)

You an also use vagrant/virtual box VMware or other virtualization platforms.


First please install these Dependencies:

apt-get install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu build-essential autoconf libtool cmake pkg-config git python-dev swig3.0 libpcre3-dev nodejs-dev crossbuild-essential-arm64 git losetup

The following main sources are needed:

This will download quite a few sources needed for Uboot and existing OS's available to PinePhone

https://github.com/crust-firmware/meta.git

We will also apply this patch:

https://megous.com/git/u-boot/patch/?id=0ab6225154c3d8b74f06fb3b181b52a9a64b4602

(I will attach the one I used I had to modify the above patch to work with the code.)

The crust-firmware also says you need to download the or1k compiler:

https://musl.cc/or1k-linux-musl-cross.tgz

I suggest untarring this in the /opt folder.


1. Once you have these dependency:

  1. cd /usr/src
  2. git clone https://github.com/crust-firmware/meta.git
  3. cd /usr/src/meta


Edit the following file Make file

  1. Cross compiler

CROSS_aarch64 = aarch64-linux-musl- CROSS_or1k = or1k-linux-musl-

  1. General options

DEBUG ?= 0 REPRODUCIBLE ?= 0

  1. Board selection

BOARD ?= pinebook


Example:

  1. Cross compiler

CROSS_aarch64 = /usr/bin/aarch64-linux-gnu- CROSS_or1k = /opt/or1k-linux-musl-cross/bin/or1k-linux-musl-

  1. General options

DEBUG ?= 0 REPRODUCIBLE ?= 0

  1. Board selection

BOARD ?= pinephone

  1. make

(this should take a 10-30 mins depending on speed..I hope less than 30 mins!!)

After making apply the patch..

  1. make again

now, go to your sdcard (use a CLEAN scard NO Partitions)

fdisk /dev/sd# create 4 primary partitions, the 1rst one should be the "boot" partition containing Uboot stuff, I'd suggest a gigabyte the other 3 could be your choice

Lets start with the first OS were going to use:

JUMPDRIVE (allows booting the EMMC and fixing it if we break it!!!)

Download it here:

https://github.com/dreemurrs-embedded/Jumpdrive/releases/download/0.4/pine64-pinephone.img.xz

then use losetup





Sites Referenced/Inspiration:

https://www.96boards.org/documentation/iot/ https://github.com/dreemurrs-embedded/Jumpdrive https://github.com/dreemurrs-embedded/Pineloader https://www.thegeekstuff.com/2014/12/patch-command-examples/ https://stackoverflow.com/questions/9980186/how-to-create-a-patch-for-a-whole-directory-to-update-it https://courses.linuxchix.org/kernel-hacking-2002/11-creating-applying-and-submitting-patches.html

patch from the link above to work: