Building Custom image for BPI-R18-AVS-720P


(Saira Bibi) #1

I am trying to build a custom image for BPI using https://github.com/BPI-SINOVOIP/BPI-M64-bsp-4.4.First of all I ran this script with option 1. It compiled everything. But after compiling when I try to run the script using option 7 to flash image on SD card it gives some error message and ends with “Build Success” message. But my BPI board does not boot up with mentioned SD Card. I am attaching output for further reference. How to fix this issue to run custom image for BPI.

> $ ./build.sh 
> top dir 
> NOTICE:
> new build.sh default select BPI-R18-AVS-720P and pack all boards
> supported boards:
> BPI-M64-720P
> BPI-M64-LCD7
> BPI-R18-AVS-720P
> 
> ./configure: line 96: env.sh: Permission denied
> This tool support following building mode(s):
> --------------------------------------------------------------------------------
> 	1. Build all, uboot and kernel and pack to download images.
> 	2. Build uboot only.
> 	3. Build kernel only.
> 	4. kernel configure.
> 	5. Pack the builds to target download image, this step must execute after u-boot,
> 	   kernel and rootfs build out
> 	6. Create bsp update packages for BPI SD image
> 	7. Update local build to SD with bpi image flashed
> 	8. Clean all build.
> --------------------------------------------------------------------------------
> Please choose a mode(1-7): 7
> 
>  Now building...
> 
> scripts/mk_install_sd.sh
> --------------------------------------------------------------------------------
>   1. HDMI 720P
>   2. LCD7 Panel
> --------------------------------------------------------------------------------
> Please choose a type to install(1-5): 1
> 
> Please type the SD device(/dev/sdX): /dev/sdb
> 
> 720P type will be intalled to /dev/sdb, [Y/n] Y
> 
> Yes
> 
> sudo gunzip -c SD/bpi-m64/100MB/BPI-M64-720P-linux4.4-8k.img.gz | dd of=/dev/sdb bs=1024 seek=8 status=progress
> [sudo] password for emumba: 
> 102392+0 records in
> 102392+0 records out
> 104849408 bytes (105 MB, 100 MiB) copied, 56.1243 s, 1.9 MB/s
> 
> bootloader download finished
> 
> DEVICE=/dev/sdb
> umount device: /dev/sdb
> umount /dev/sdb1
> umount /dev/sdb2
> 
> ######################
> update /dev/sdb1(vfat) with ./BPI-BOOT-bpi-m64-linux4.4.tgz
> ######################
> 
> 
> tar xf ./BPI-BOOT-bpi-m64-linux4.4.tgz --keep-directory-symlink -C /mnt
> total 5
> drwxr-xr-x  3 root root  512 Jun 25 19:27 .
> drwxr-xr-x 26 root root 4096 Jun 21 09:29 ..
> drwxr-xr-x  3 root root  512 Jun 25 19:27 bananapi
> 
> ######################
> update /dev/sdb2(ext4) with ./4.4.89-BPI-M64-Kernel-net.tgz ./4.4.89-BPI-M64-Kernel.tgz ./BOOTLOADER-bpi-m64-linux4.4.tgz
> ######################
> 
> mount: /mnt: wrong fs type, bad option, bad superblock on /dev/sdb2, missing codepage or helper program, or other error.
> 
> tar xf ./4.4.89-BPI-M64-Kernel-net.tgz --keep-directory-symlink -C /mnt
> tar xf ./4.4.89-BPI-M64-Kernel.tgz --keep-directory-symlink -C /mnt
> tar xf ./BOOTLOADER-bpi-m64-linux4.4.tgz --keep-directory-symlink -C /mnt
> total 24
> drwxr-xr-x  6 root root 4096 Jun 26 09:54 .
> drwxr-xr-x 26 root root 4096 Jun 21 09:29 ..
> drwxr-xr-x  2 root root 4096 Jun 25 16:34 buildrootbpi
> drwxr-xr-x  3 root root 4096 Jun 20 15:44 lib
> drwxr-xr-x  2 root root 4096 Jun 26 09:54 temp
> drwxr-xr-x  4 root root 4096 Jun 20 15:44 usr
> umount: /mnt: not mounted.
> /home/emumba/bpi/BPI-M64-bsp-4.4
> 
>  Build success!

(bpi team) #2

are you want to run ubuntu linux or tina os ,if you nee tina linux ,can not use this BSP


(Saira Bibi) #3

I want to run Ubuntu mate.


(bpi team) #4

are you test ubuntu image from wiki page-> ubuntu image ??

http://wiki.banana-pi.org/BPI-R18-AI(Allwinner_SoC-Only_3-Mic_Far-Field_Dev_Kit)


(Saira Bibi) #5

Yeah I have tested this image and its working perfectly. But I want to build my own image using mentioned repo. But somehow it does not work.


(August) #6

This bsp is just a demo state for R18 board, and option 7 in build script is used for m64 board only, you can check scripts/mk_install_sd.sh and modify it to replace the right r18 bootloader, and test.


(August) #7

Or you can directly replace the r18 bootloader with bpi-bootsel command

$ sudo bpi-bootsel SD/bpi-m64/100MB/BPI-R18-AVS-720P-linux4.4-8k.img.gz /dev/sdX


(August) #8

Please check your file permission.


(Saira Bibi) #9

Sorry to mention that i did change the value for BOARD " BOARD=“BPI-R18-AVS-720P” in build.sh script.


(Saira Bibi) #10

I followed these steps :

  • 1 . ./build.sh with option 8 (clean all existing)

    1. ./build.sh with option 1 (To rebuild all )
    1. ./build.sh with option 7 ( To prepare SD Card)
    1. sudo bpi-bootsel SD/bpi-m64/100MB/ /BPI-R18-AVS-720P-linux4.4-8k.img.gz /dev/sdb (To set proper bootloader.)

    issue still persist with error ######################

    update /dev/sdb2(ext4) with ./4.4.89-BPI-M64-Kernel-net.tgz ./4.4.89-BPI-M64-Kernel.tgz ./BOOTLOADER-bpi-m64-linux4.4.tgz ######################

    mount: /mnt: wrong fs type, bad option, bad superblock on /dev/sdb2, missing codepage or helper program, or other error.

I have tried multiple SDCards.


(August) #11

Which image did you flash to your sd card, This bsp code is just for bsp update, not for creating a complete ubuntu image. Please make sure you have download correct bpi ubuntu image, then update the bsp output to the sd.


(Saira Bibi) #12

I did not download any Ubuntu Image. I flash one of the following images created at SD/bpi-m64/100MB/:

  • BPI-M64-720P-linux4.4-8k.img.gz
  • BPI-M64-LCD7-linux4.4-8k.img.gz
  • BPI-R18-AVS-720P-linux4.4-8k.img.gz From your last comment so I assume this repository is not to build complete Ubuntu image for BPI?

Please guide me how can I build a complete custom Ubuntu image for BPI?