Building a Minimal System with BPI-M2

Building a Minimal System with BPI-M2

Google Download Link: https://drive.google.com/a/edu.52miku.tk/file/d/0B4l1r4Ltm446MFBvUkwtVU9lcmM/view

Baidu Download Link: http://pan.baidu.com/s/1ntrHIh7


3 Likes

@BPI_Justin, script doesnā€™t work

Hereā€™s console log:

 chyduck@homie:~/bananapi/BPI-M2-bsp$ sudo ./build.sh
[sudo] password for chyduck: 
==========================================
            BPI-M2 BSP Build Tool         
==========================================

This tool support following BPI board(s):
------------------------------------------
	1. BPI_M2_720P
	2. BPI_M2_1080P
	3. BPI_M2_LCD7
	4. BPI_M2_USB_720P
	5. BPI_M2_USB_1080P
	6. BPI_M2_USB_LCD7
------------------------------------------
Please choose a target(1-6): 1


 Now configuring...

BPI_M2_720P configured. Now run `make`

 Configure success!

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. Build rootfs for linux, and copy target files to output
		ROOTFS=/xxx/rootfs.tar.gz
		This is optinal, default using rootfs/linux/default_linux_rootfs.tar.gz.
	6. Pack the builds to target download image, this step must execute after u-boot,
	   kernel and rootfs build out
	7. Clean all build.
--------------------------------------------------------------------------------
Please choose a mode(1-6): 1

 Now building...

#mkdir -p /home/chyduck/bananapi/BPI-M2-bsp/build/BPI_M2_720P/sun6i-u-boot
#make -C u-boot-sunxi sun6i_config O=/home/chyduck/bananapi/BPI-M2-bsp/build/BPI_M2_720P/sun6i-u-boot CROSS_COMPILE=/home/chyduck/bananapi/BPI-M2-bsp/allwinner-tools/toolchain/bin/arm-linux-gnueabi- -j6
make -C u-boot-sunxi sun6i_config CROSS_COMPILE=/home/chyduck/bananapi/BPI-M2-bsp/allwinner-tools/toolchain/bin/arm-linux-gnueabi- -j6
make[1]: Entering directory '/home/chyduck/bananapi/BPI-M2-bsp/u-boot-sunxi'
/bin/bash: /home/chyduck/bananapi/BPI-M2-bsp/allwinner-tools/toolchain/bin/arm-linux-gnueabi-gcc: No such file or directory
/bin/bash: /home/chyduck/bananapi/BPI-M2-bsp/allwinner-tools/toolchain/bin/arm-linux-gnueabi-gcc: No such file or directory
dirname: missing operand
Try 'dirname --help' for more information.
/bin/bash: /home/chyduck/bananapi/BPI-M2-bsp/allwinner-tools/toolchain/bin/arm-linux-gnueabi-gcc: No such file or directory
dirname: missing operand
Try 'dirname --help' for more information.
Configuring for sun6i board...
make[1]: Leaving directory '/home/chyduck/bananapi/BPI-M2-bsp/u-boot-sunxi'
#make -C u-boot-sunxi all O=/home/chyduck/bananapi/BPI-M2-bsp/build/BPI_M2_720P/sun6i-u-boot CROSS_COMPILE=/home/chyduck/bananapi/BPI-M2-bsp/allwinner-tools/toolchain/bin/arm-linux-gnueabi- -j6
make -C u-boot-sunxi all CROSS_COMPILE=/home/chyduck/bananapi/BPI-M2-bsp/allwinner-tools/toolchain/bin/arm-linux-gnueabi- -j6
make[1]: Entering directory '/home/chyduck/bananapi/BPI-M2-bsp/u-boot-sunxi'
/bin/bash: /home/chyduck/bananapi/BPI-M2-bsp/allwinner-tools/toolchain/bin/arm-linux-gnueabi-gcc: No such file or directory
/bin/bash: /home/chyduck/bananapi/BPI-M2-bsp/allwinner-tools/toolchain/bin/arm-linux-gnueabi-gcc: No such file or directory
dirname: missing operand
Try 'dirname --help' for more information.
Generating include/autoconf.mk
/bin/bash: line 3: /home/chyduck/bananapi/BPI-M2-bsp/allwinner-tools/toolchain/bin/arm-linux-gnueabi-gcc: No such file or directory
/bin/bash: /home/chyduck/bananapi/BPI-M2-bsp/allwinner-tools/toolchain/bin/arm-linux-gnueabi-gcc: No such file or directory
dirname: missing operand
Try 'dirname --help' for more information.
Generating include/autoconf.mk.dep
/bin/bash: line 3: /home/chyduck/bananapi/BPI-M2-bsp/allwinner-tools/toolchain/bin/arm-linux-gnueabi-gcc: No such file or directory
/bin/bash: /home/chyduck/bananapi/BPI-M2-bsp/allwinner-tools/toolchain/bin/arm-linux-gnueabi-gcc: No such file or directory
/bin/bash: /home/chyduck/bananapi/BPI-M2-bsp/allwinner-tools/toolchain/bin/arm-linux-gnueabi-gcc: No such file or directory
dirname: missing operand
Try 'dirname --help' for more information.
/bin/bash: /home/chyduck/bananapi/BPI-M2-bsp/allwinner-tools/toolchain/bin/arm-linux-gnueabi-gcc: No such file or directory
/bin/bash: /home/chyduck/bananapi/BPI-M2-bsp/allwinner-tools/toolchain/bin/arm-linux-gnueabi-ld: No such file or directory
/bin/bash: /home/chyduck/bananapi/BPI-M2-bsp/allwinner-tools/toolchain/bin/arm-linux-gnueabi-gcc: No such file or directory
dirname: missing operand
Try 'dirname --help' for more information.
/bin/bash: /home/chyduck/bananapi/BPI-M2-bsp/allwinner-tools/toolchain/bin/arm-linux-gnueabi-gcc: No such file or directory
dirname: missing operand
Try 'dirname --help' for more information.
/home/chyduck/bananapi/BPI-M2-bsp/allwinner-tools/toolchain/bin/arm-linux-gnueabi-gcc -DDO_DEPS_ONLY \
	-g  -Os   -fno-common -ffixed-r8 -msoft-float   -D__KERNEL__ -I/home/chyduck/bananapi/BPI-M2-bsp/u-boot-sunxi/include -fno-builtin -ffreestanding -nostdinc -isystem  -pipe  -DCONFIG_ARM -D__ARM__         -mcpu=cortex-a7 -Werror -Wall -Wstrict-prototypes      \
	-o lib/asm-offsets.s lib/asm-offsets.c -c -S
/bin/bash: /home/chyduck/bananapi/BPI-M2-bsp/allwinner-tools/toolchain/bin/arm-linux-gnueabi-gcc: No such file or directory
Makefile:556: recipe for target 'lib/asm-offsets.s' failed
make[1]: *** [lib/asm-offsets.s] Error 127
make[1]: Leaving directory '/home/chyduck/bananapi/BPI-M2-bsp/u-boot-sunxi'
Makefile:41: recipe for target 'u-boot' failed
make: *** [u-boot] Error 2

 Build success!

UPD: Iā€™ve install all of tools what is needed to build.

HI: your build environment? 32bit? 64bit?

It matters? I try to build in on Ubuntu 15.10 x64

Hi Justin,

The script builds successfully, except that the kernel name is ā€œ3.3.0-BPI-Kernel-V0.1ā€ instead of ā€œ3.3.0-BPI-Kernelā€ as assumed in cp_download_files()

I followed all the steps in document too, except the last one, where I assume you mean: sudo ln -s <download_directory>lib/modules/3.11.0-15-generic/ modules instead of sudo ln -s /lib/modules/3.11.0-15-generic/ modules

(and I am using the ubuntu rootfs instead of debian)

But, the image doesnā€™t boot, and thereā€™s no boot log on the UART pins either so I am unable to debug.

ā€“

Has anybody else had any success in getting an working image?

/bin/bash: /home/chyduck/bananapi/BPI-M2-bsp/allwinner-tools/toolchain/bin/arm-linux-gnueabi-gcc: No such file or directory

Hi chyDuck,

Can you post of the output of ls -l /home/chyduck/bananapi/BPI-M2-bsp/allwinner-tools/toolchain/bin/

No. Only community provided efforts helped: For example this http://www.bananapi.com/index.php/forum/general-discussion-for-bpi-m2/995-working-wifi-on-modern-kernels-4-1-tested or now Armbian. I tried all tutorials here but not a single one works and itā€™s not possible to build OS images.

Thanks, Iā€™ll check out that post. I already use Armbian now, just thought Iā€™ll try to build an image using this kernel to see if it had all the drivers.