mirror of
https://github.com/mayfrost/guides.git
synced 2024-11-28 02:11:46 +00:00
Update CROSS-COMPILING.md
This commit is contained in:
parent
26e997474f
commit
050f59bd05
@ -5,11 +5,11 @@ Installing a distro for ARM. The distro is CRUX, the target is an Odroid C2. The
|
|||||||
## TOC
|
## TOC
|
||||||
1. [CROSS COMPILATION TOOLS](#cross-compilation-tools)
|
1. [CROSS COMPILATION TOOLS](#cross-compilation-tools)
|
||||||
2. [PARTITIONING](#partitioning)
|
2. [PARTITIONING](#partitioning)
|
||||||
3. [BOOTLOADER](#bootloader)
|
3. [MOUNTING](#mounting)
|
||||||
4. [MOUNTING](#mounting)
|
4. [ROOT PARTITION](#root-partition)
|
||||||
5. [ROOT PARTITION](#root-partition)
|
5. [BOOT PARTITION](#boot-partition)
|
||||||
6. [BOOT PARTITION](#boot-partition)
|
6. [COMPILING KERNEL](#compiling-kernel)
|
||||||
7. [COMPILING KERNEL](#compiling-kernel)
|
7. [BOOTLOADER](#bootloader)
|
||||||
|
|
||||||
|
|
||||||
## CROSS COMPILATION TOOLS
|
## CROSS COMPILATION TOOLS
|
||||||
@ -74,36 +74,6 @@ Name of "_CROSS_COMPILE_" variable will change depending on the choosen option.
|
|||||||
`mkfs.<BOOTLOADER_FILESYSTEM> /dev/sdX1`
|
`mkfs.<BOOTLOADER_FILESYSTEM> /dev/sdX1`
|
||||||
|
|
||||||
|
|
||||||
## BOOTLOADER
|
|
||||||
Minimum 3072 bytes free at the start of the drive and before the boot partition.
|
|
||||||
|
|
||||||
* OPTION 1: Download and extract the binary
|
|
||||||
```
|
|
||||||
wget http://odroid.in/guides/ubuntu-lfs/boot.tar.gz
|
|
||||||
tar -zxvf boot.tar.gz
|
|
||||||
cd boot
|
|
||||||
```
|
|
||||||
Alternative download link: http://dn.odroid.com/S905/BootLoader/ODROID-C2/c2_boot_release_ubuntu.tar.gz
|
|
||||||
|
|
||||||
* OPTION 2: Compile the bootloader yourself
|
|
||||||
```
|
|
||||||
git clone https://github.com/hardkernel/u-boot.git -b odroidc2-v2015.01
|
|
||||||
cd u-boot
|
|
||||||
make ARCH=arm64 CROSS_COMPILE=<LINARO_TOOLS_DIRECTORY>/bin/aarch64-linux-gnu- odroidc2_defconfig
|
|
||||||
make -j4
|
|
||||||
cd boot
|
|
||||||
```
|
|
||||||
|
|
||||||
* Flash the bootloader
|
|
||||||
```
|
|
||||||
chmod +x sd_fusing.sh
|
|
||||||
./sd_fusing.sh /dev/sdX
|
|
||||||
```
|
|
||||||
* Notice the target is the device NOT a partition
|
|
||||||
* Set resolution by editing file root/boot/boot.ini
|
|
||||||
* Might want to comment out the display-autodetect option
|
|
||||||
|
|
||||||
|
|
||||||
## MOUNTING
|
## MOUNTING
|
||||||
* Mount root filesystem
|
* Mount root filesystem
|
||||||
`mount /dev/sdX2 /mnt`
|
`mount /dev/sdX2 /mnt`
|
||||||
@ -177,5 +147,35 @@ make odroidc2_defconfig
|
|||||||
`make -j 4 ARCH=arm64 CROSS_COMPILE=<LINARO_TOOLS_DIRECTORY>/bin/aarch64-linux-gnu- INSTALL_HDR_PATH=/mnt/usr/ headers_install`
|
`make -j 4 ARCH=arm64 CROSS_COMPILE=<LINARO_TOOLS_DIRECTORY>/bin/aarch64-linux-gnu- INSTALL_HDR_PATH=/mnt/usr/ headers_install`
|
||||||
|
|
||||||
|
|
||||||
|
## BOOTLOADER
|
||||||
|
Minimum 3072 bytes free at the start of the drive and before the boot partition.
|
||||||
|
|
||||||
|
* OPTION 1: Download and extract the binary
|
||||||
|
```
|
||||||
|
wget http://odroid.in/guides/ubuntu-lfs/boot.tar.gz
|
||||||
|
tar -zxvf boot.tar.gz
|
||||||
|
cd boot
|
||||||
|
```
|
||||||
|
Alternative download link: http://dn.odroid.com/S905/BootLoader/ODROID-C2/c2_boot_release_ubuntu.tar.gz
|
||||||
|
|
||||||
|
* OPTION 2: Compile the bootloader yourself
|
||||||
|
```
|
||||||
|
git clone https://github.com/hardkernel/u-boot.git -b odroidc2-v2015.01
|
||||||
|
cd u-boot
|
||||||
|
make ARCH=arm64 CROSS_COMPILE=<LINARO_TOOLS_DIRECTORY>/bin/aarch64-linux-gnu- odroidc2_defconfig
|
||||||
|
make -j4
|
||||||
|
cd boot
|
||||||
|
```
|
||||||
|
|
||||||
|
* Flash the bootloader
|
||||||
|
```
|
||||||
|
chmod +x sd_fusing.sh
|
||||||
|
./sd_fusing.sh /dev/sdX
|
||||||
|
```
|
||||||
|
* Notice the target is the device NOT a partition
|
||||||
|
* Set resolution by editing file root/boot/boot.ini
|
||||||
|
* Might want to comment out the display-autodetect option
|
||||||
|
|
||||||
|
|
||||||
And done. Next follow the distro tweaks: https://github.com/mayfrost/guides/blob/master/DISTROS.md
|
And done. Next follow the distro tweaks: https://github.com/mayfrost/guides/blob/master/DISTROS.md
|
||||||
Also check the list of software alternative to bloatware and support minimalism https://github.com/mayfrost/guides/blob/master/ALTERNATIVES.md
|
Also check the list of software alternative to bloatware and support minimalism https://github.com/mayfrost/guides/blob/master/ALTERNATIVES.md
|
||||||
|
Loading…
Reference in New Issue
Block a user