User Manual Orange Pi Zero 3

  Features   |  Use   |  Linux   |    Linux SDK     |  Android   |  Android SRC   |

RU          EN  

Chapt 4. Linux SDK - orangepi-build instruction
Страница:   124    125    126    127    128    129    130    131    132  


4.2.1. Download orangepi-build from github
The linux sdk refers to the code of orangepi-build. orangepi-build is modified based on the armbian build system. Using orangepi-build, multiple versions of linux images can be compiled. Use the following command to download the orangepi-build code:

test@test:~$ sudo apt-get update
test@test:~$ sudo apt-get install -y git
test@test:~$ git clone https://github.com/orangepi-xunlong/orangepi-build.git -b next

Note that the development board using the H618 Soc needs to download the source code of the next branch of orangepi-build. The above git clone command needs to specify the branch of the orangepi-build source code as next.



Img 4.1

Downloading the orangepi-build code through the git clone command does not require entering the user name and password of the github account (the same is true for downloading other codes in this manual), if the Ubuntu PC prompts the user to enter the github account after entering the git clone command The name and password are usually entered incorrectly in the address of the orangepi-build warehouse behind the git clone. Please check the spelling of the command carefully, instead of thinking that we forgot to provide the username and password of the github account.

The u-boot and linux kernel versions currently used by the H618 series development boards are as follows:

  • branch: current u-boot version: u-boot v.2018.05 Linux kernel version: linux 5.4
  • branch: next u-boot version: u-boot v.2021.07 Linux kernel version: linux 6.1

    The branch mentioned here is not the same thing as the branch of the orangepi-build source code, please do not confuse it. This branch is mainly used to distinguish different kernel source code versions. We currently define the linux5.4 bsp kernel provided by Allwinner as the current branch. The latest linux6.1 LTS kernel is defined as the next branch.

    After orangepi-build is downloaded, it will contain the following files and folders:

      a. build.sh: Compile the startup script

      b. external: Contains the configuration files needed to compile the image, specific scripts, and the source code of some programs, etc.

      c. LICENSE: GPL 2 license file

      d. README.md : orangepi-build documentation

      e. scripts: General script for compiling linux images

    test@test:~/orangepi-build$ ls
    build.sh external LICENSE README.md scripts

    If you downloaded the code of orangepi-build from github, after downloading, you may find that orangepi-build does not contain the source code of u-boot and linux kernel, nor does u-boot and linux kernel need to use cross-compilation tools Chain, this is normal, because these things are stored in other separate github warehouses or some servers (the addresses will be detailed below). orangepi-build will specify the address of u-boot, linux kernel and cross-compilation toolchain in the script and configuration file. When running orangepi-build, when it finds that there are no such things locally, it will automatically go to the corresponding place to download them.

    4.2.2. Download the cross-compilation toolchain

    When orangepi-build runs for the first time, it will automatically download the cross-compilation toolchain and put it in the toolchains folder. Every time you run the build.sh script of orangepi-build, it will check whether the cross-compilation toolchain in toolchains exists. If it does not exist, the download will be restarted, if it exists, it will be used directly, and the download will not be repeated.



    Img 4.2
    The mirror URL of the cross-compilation toolchain in China is the open source software mirror site of Tsinghua University:

    Tsinghua University

    After the toolchains are downloaded, it will contain multiple versions of the cross-compilation toolchain:

    test@test:~/orangepi-build$ ls toolchains/
    gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu
    gcc-linaro-4.9.4-2017.01-x86_64_aarch64-linux-gnu
    gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabi
    gcc-arm-11.2-2022.02-x86_64-arm-none-linux-gnueabihf
    gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabi
    gcc-linaro-aarch64-none-elf-4.8-2013.11_linux
    gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu
    gcc-linaro-5.5.0-2017.10-x86_64_arm-linux-gnueabihf
    gcc-linaro-arm-linux-gnueabihf-4.8-2014.04_linux
    gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf
    gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu
    gcc-linaro-arm-none-eabi-4.8-2014.04_linux

    The cross-compilation toolchain used to compile the H618 Linux kernel source code is:

      a. linux5.4

      gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu 

      b. linux6.1

      gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu
    The cross-compilation toolchain used to compile the H618 u-boot source code is:

      a. v2018.05

      gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabi

      b. v2021.07

      gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu 

     <         > 


  • Страница:   124    125    126    127    128    129    130    131    132