8,367
edits
Changes
no edit summary
<br>
According to the prompt, you can see the generated Android firmware sun50iw6p1_android_petrel-p1_uart0.img in the OrangePi_3 / lichee / tools / pack / directory. Below, please refer to the "Android Firmware Burning" section to complete the Android firmware burning.
<br>
<br>
== '''Setting up a Linux compilation environment''' ==
<br>
=== '''Get the Linux SDK source code from Github''' ===
<br>
# '''Orange Pi Linux source downloader'''
Orange Pi 3's Linux source code has been uploaded to GitHub. The currently supported kernel version is '''Linux 4.9 and the mainline kernel''' (some drivers are still under development). We can use the Orange Pi Linux source-specific downloader to download and obtain the downloader source code. Here's the way:
<div style="border:1px solid #dddddd;background:#f1f1f1;padding:5px;">
$ sudo apt-get install git<br>
$ git clone '''https://github.com/orangepi-xunlong/OrangePi_Build.git'''<br>
$ cd OrangePi_Build<br>
$ ls<br>
Build_OrangePi.sh lib README.md
</div>
<br>
# '''Run the downloader'''
<br>
<div style="border:1px solid #dddddd;background:#f1f1f1;padding:5px;">
$ ./Build_OrangePi.sh
</div>
<br>
Enter the root password and press enter
<div style="padding-left:200px;">[[文件:Orange-pi-3-img5.png|600px]]</div>
<br>
Select 0 Build system with uboot / kernel / rootfs / image to enter the interface of development board model selection.
<br>
<br>
<div style="padding-left:200px;">[[文件:Orange-pi-3-img6.png|600px]]</div>
<br>
Select orange pi 3, enter the kernel version selection interface after entering<br>
<br>
<div style="padding-left:200px;">[[文件:Orange-pi-3-img7.png|600px]]</div>
<br>
At present, the orangepi 3 development board supports the kernel code of '''Linux 4.9 and mainline.''' Select one of them and press Enter to start downloading the corresponding SDK source code.<br>
<div style="padding-left:200px;">[[文件:Orange-pi-3-img8.png|600px]]</div>
The downloaded source code will be stored in the same directory of OrangePi_Build<br>
<br>
<div style="border:1px solid #dddddd;background:#f1f1f1;padding:5px;">
$ ls ../OrangePi_Build -l OrangePi_Build<br>
<p style="padding-left:20px;">'''OrangePiH6_Linux4.9''' (Where the kernel version is Linux4.9)<br>
'''OrangePiH6_mainline''' (The current kernel version is Linux5.3.5)</p>
</div>
<br>
=== '''Get the source code of Linux SDK from Baidu Cloud Disk''' ===
<br>
If GitHub fails to download the code, you can download the source code compression package of Linux SDK directly from Baidu Cloud Disk.<br>
Download link is:
=== '''Set up a compilation environment''' ===
<br>
Orange Pi H6 Linux SDK has only been tested on PCs with Ubuntu 18.04. Please prepare the host environment of ubuntu 18.04 before use.<br>
The Linux source directory structure for Orange Pi H6 is shown below:
<div style="border:1px solid #dddddd;background:#f1f1f1;padding:5px;">
$ cd OrangePiH6_Linux4.9<br>
$ tree -L 1<br>
.<br>
├── build.sh -> scripts/build.s Compile startup script<br>
├── external Store additional configuration files<br>
├── kernel Linux kernel source<br>
├── output Store output files, only generated after compiling source code<br>
├── scripts Script files used during compilation<br>
├── toolchain Cross-compilation toolchain used by the kernel and u-boot<br>
└── uboot Store boot0 and u-boot source code6 directories, 1 file<br>
</div>
<br>
=== '''Compile Linux and U-boot source code''' ===
<br>
* execute the compilation start up script
<br>
<div style="border:1px solid #dddddd;background:#f1f1f1;padding:5px;">
$ cd OrangePiH6_Linux4.9<br>
$ sudo ./build.sh
</div>
<br>
Select OrangePi 3 and press Enter
<div>[[文件:Orange-pi-3-img9.png|600px]]</div>
The functions of each option are as follows:<br>
<div style="font-weight:700">
* 0 Build Release Image —— Compile ubuntu or debian distribution images
* 1 Build Rootfs —— Compile rootfs for ubuntu or debian
* 2 Build Uboot —— Compile boot0 and u-boot source code
* 3 Build Linux —— Compile Linux kernel source code
* 4 Build Module only —— Compile Linux kernel modules
* 5 Update kernel Image —— Update kernel in SD card Linux system
* 6 Update Module —— Update the kernel module in SD card Linux system
* 7 Update Uboot —— Update boot0 and u-boot and dtb configuration of SD card Linux system
</div>
<div>[[文件:Orange-pi-3-img10.png|600px]]</div>
The final file generated by the compilation will be saved in the output directory<br>