How to build BPI-M2+ image by youself


(bpi team) #1

edit bpi-migrate commond and add -c,–config option ,let user choose other BPI board also can use BPI-BOOT and BPI-ROOT to install all commond

after upgrad: /usr/bin/bpi-migrate v1.3.0(github)

bpi-migrate -v will show -c,–config

use commond : bpi-migrate -c bpi-m2p.conf -r root.tgz you can get M2+ boot file and kernel module

bpi-m2p.conf on github , will auto download to local and use it

also can use as below bpi-migrate -c bpi-m2p.conf -c busybox.conf

this way you can create a busybox image for BPI-M2+

all file have on github,if not save on local , will auto download from github, not need to download before. include busybox root file, have on guthub.

https://github.com/BPI-SINOVOIP/BPI-files/raw/master/rootfs/busybox-1.24.2-root.tgz

https://github.com/BPI-SINOVOIP/BPI-files/raw/master/others/for-bpi-tools/conf/board/bpi-m2p.conf

## bpi-m2p.conf
#
BPILICENSE="GPLv2 or any later version"
BPICONF="bpi-m2p.conf"
BPICONFVERSION="v1.0.0"
BPIBOARD="bpi-m2p"
#
## BPI SD partition layout: SIZE=7456 (MB) for eMMC/SD
##    0:100MB: RAW DATA: unallocated area, no label,
##      (0-100MB)        a. bootloader like u-boot
##                       b. boot logo
##                       c. env
##                       d. android kernel
##    1:256MB:      FAT: label BPI-BOOT, 
##      (100MB-356MB)    a. uEnv.txt / boot.scr
##                       b. kernel & initrd
##                       c. script.bin / dtb
##    2: ~END:     EXT4: label BPI-ROOT,
##      (356MB~END)      for rootfs like ubuntu / debian ...
#
#
## 0. 100MB: UBOOTIMGGZ 
#
#RAWSIZE=100 #can not change
#UBOOTIMGGZ=BPI_M3_720P.img.gz
#BPI-M2U
#UBOOTIMGGZ=BPI_M2U_720P.img.gz
#BPI-M2
#UBOOTIMGGZ=BPI_M2_720P.img.gz
#BPI-M2P
UBOOTIMGGZ=BPI_M2P_720P.img.gz
#
## 1. BPI-BOOT: BOOTFILE
#
#BOOTSIZE defaut 256, empty for default
BOOTSIZE=""
#
    #BOOTFILES="BPI-BOOT.tgz"
    #BPI-M2U
    #BOOTFILES="BPI-BOOT-bpi-m2u.tgz"
    #BPI-M2
    #BOOTFILES="BPI-BOOT-bpi-m2.tgz"
    #BPI-M2P
    BOOTFILES="BPI-BOOT-bpi-m2p.tgz"
    #
    ## 2.1 BPI-ROOT: ROOTFILE for base 
    #
    #SD SIZE defaut 7456, empty for default, BPI-ROOT SIZE = 7456 - 100 - 256 = 7100
    SIZE=""
    ROOTFILE=""
    #
    ## 2.2 BPI-ROOT: BPIFILES for addon
    #
    BPIFILES="bpi-tools.tgz
    3.3.0-BPI-M2-Kernel.tgz
    3.4.39-BPI-M2P-Kernel.tgz
    3.4.39-BPI-M3-Kernel.tgz
    3.4.112-sun8i.tgz
    3.4.112-sun7i.tgz
    3.10.101-pine64-bpi-m64.tgz
    rpi-kernel.tgz
    4.6.5-300.fc24.armv7hl.tgz
    3.10.65-BPI-M2U-Kernel.tgz
    libvdpau_sunxi.tgz
    bt.tgz
    camera.tgz
    brcm.tgz"
    #
    #BPI-M2P only
    BPIFILES="bpi-tools.tgz
    3.4.39-BPI-M2P-Kernel.tgz
    libvdpau_sunxi.tgz
    bt.tgz
    camera.tgz
    brcm.tgz"
    #END

https://github.com/BPI-SINOVOIP/BPI-files/raw/master/others/for-bpi-tools/conf/os/busybox.conf

    #
    ## busybox.conf
    #
    BPILICENSE="GPLv2 or any later version"
    BPICONF="busybox.conf"
    BPICONFVERSION="v1.0.0"
    #
    ## busybox only
    #
    SIZE="128"
    BOOTSIZE="16"
    BPIFILES="bpi-tools.tgz"
    ROOTURL="https://github.com/BPI-SINOVOIP/BPI-files/raw/master/rootfs/busybox-1.24.2-root.tgz"
    ROOTFILE="busybox-1.24.2-root.tgz"
    IMGFILE="busybox-1.24.2-${BPIBOARD}.img"
    #END