Skip to main content

Source compilation OmniROM 12.1 for Orange Pi Zero 2W / Zero 3

This article is about OmniROM compilation for Orange Pi Zero 2W / Zero 3.


1. Follow this link to download source code:

https://github.com/YAJATapps/android_apollo-p2_local_manifest/blob/omni-12.1/README.md 


2. After syncing the source code, configure the build:

cd longan
./build.sh config


Welcome to mkscript setup progress
All available platform:
0. android
1. linux
Choice [android]: 0
All available ic:
0. h618
Choice [h618]: 0
All available board:
0. ft
1. p1
2. p2
3. p3
4. p7
5. p7l
6. perf1
7. perf2
8. perf3
9. qa
Choice [p2 - Zero 2W OR p3 - Zero 3]: 2
All available flash:
0. default
1. nor
Choice [default]: 0
All available kern_ver:
0. linux-5.4
Choice [linux-5.4]: 0
All available arch:
0. arm
1. arm64
Choice [arm64]: 1
......
*** Default configuration is based on 'sun50iw9p1smp_h618_android_defconfig'
#
# configuration written to .config
#
make[1]: Leaving directory '/home/omni12/longan/out/kernel/build'
make: Leaving directory '/home/omni12/longan/kernel/linux-5.4'
INFO: clean buildserver

INFO: prepare_buildserver


3. Build the kernel:

    ./build.sh


4. Go back to root directory from longan directory:

    cd ..


5. Source build environment:

    source build/envsetup.sh


6. Config and Lunch:

  • If you are compiling for Zero 3 then edit device/allwinner/apollo-p2/device.mk

         Set PRODUCT_ORANGE_PI_ZERO_2W to false. No need to change anything for Zero 2W.

  • If you are compiling for arm64 then edit device/softwinner/apollo/common/system/config.mk
          Set TARGET_ARCH ?= arm64

    

    lunch omni_apollo_p2-userdebug


7. Make android:

    make


8. Packing the image into allwinner format:

    cd longan

 

    If you are compiling for Zero 3 then edit build/pack. 

    change the line 79 from "PACK_BOARD=${FLAGS_board} # p3"    to    "PACK_BOARD=p3".

    No need to change anything for Zero 2W.


    pack


The output image is generated at longan/out/h618_android12_p2_uart0.img OR h618_android12_p3_uart0.img for Zero 3.

Burn it with PhoenixCard.



Comments