How to compile BPI-M3-bsp kernel on BPI-M3


(Frank) #21

CC drivers/video/sunxi/disp2/disp/de/lowlevel_sun8iw6/de_clock.o drivers/video/sunxi/disp2/disp/de/lowlevel_sun8iw6/de_wb.c: In function ‘WB_EBIOS_Set_Para’: drivers/video/sunxi/disp2/disp/de/lowlevel_sun8iw6/de_wb.c:314:94: warning: ‘cs_out_h0’ may be used uninitialized in this function [-Wmaybe-uninitialized] if((cs_out_w0 == fs_out_w0)&&(cs_out_h0 == fs_out_h0)&&(cs_out_w1 == fs_out_w1)&&(cs_out_h1 == fs_out_h1)) ^ drivers/video/sunxi/disp2/disp/de/lowlevel_sun8iw6/de_wb.c:314:68: warning: ‘cs_out_w0’ may be used uninitialized in this function [-Wmaybe-uninitialized] if((cs_out_w0 == fs_out_w0)&&(cs_out_h0 == fs_out_h0)&&(cs_out_w1 == fs_out_w1)&&(cs_out_h1 == fs_out_h1)) ^ LD drivers/usb/built-in.o LD drivers/video/sunxi/disp2/disp/disp.o LD drivers/video/sunxi/disp2/disp/built-in.o LD drivers/video/sunxi/built-in.o LD drivers/video/built-in.o LD drivers/built-in.o make[1]: Leaving directory ‘/root/BPI-M3-bsp/linux-sunxi’ Makefile:57: recipe for target ‘kernel’ failed make: *** [kernel] Error 2

Any suggestions how to compile the kernle on M3 ? I tried to compile it on Ubuntu. best regards

Frank


#22

@sinovoip Your entry in gitbook s also with errors too…


(Frank) #23

@sinovoip please put the correct files togehther to one zip-file so we can compile everything on M3


(Brian Kim) #25

I made uImage with the topic and 2016-07-10-ubuntu-16.04-xenial-minimal-preview-bpi-m3.img. but, board does not jump to kernel address.

This is my boot log. ** Unable to read “bananapi/berryboot.img” from mmc 0:1 **

Booting kernel from Legacy Image at 48000000 …

Image Name: Linux-3.4.39-BPI-M3-Kernel Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 5671816 Bytes = 5.4 MiB Load Address: 40008000 Entry Point: 40008000 Verifying Checksum … OK Loading Kernel Image … OK OK [ 4.956][mmc]: MMC Device 2 not found [ 4.960][mmc]: mmc not find,so not exit [ 4.964] Starting kernel …

[sun8i_fixup]: From boot, get meminfo: Start: 0x40000000 Size: 2048MB ion_carveout reserve: 96m 128m ion_reserve_common: ion reserve: [0xb8000000, 0xc0000000]! ion_cma reserve: 120m 176m 512m ion_reserve_common: ion reserve: [0xa0000000, 0xc0000000]! ------sun8i_smp_init_ops----37-----

When I compare with normal boot log, it is not jump to kernel address.

Booting kernel from Legacy Image at 48000000 …

Image Name: Linux-3.4.39-BPI-M3-Kernel Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 5717288 Bytes = 5.5 MiB Load Address: 40008000 Entry Point: 40008000 Verifying Checksum … OK Loading Kernel Image … OK OK [ 4.958][mmc]: MMC Device 2 not found [ 4.962][mmc]: mmc not find,so not exit [ 4.966] Starting kernel …

[sun8i_fixup]: From boot, get meminfo: Start: 0x40000000 Size: 2048MB ion_carveout reserve: 96m 128m ion_reserve_common: ion reserve: [0xb8000000, 0xc0000000]! ion_cma reserve: 120m 176m 512m ion_reserve_common: ion reserve: [0xa0000000, 0xc0000000]! ------sun8i_smp_init_ops----37----- [ 0.000000] Booting Linux on physical CPU 0 [ 0.000000] Initializing cgroup subsys cpuset [ 0.000000] Initializing cgroup subsys cpu [ 0.000000] Linux version 3.4.39-BPI-M3-Kernel (root@8ac3451c5c3b) (gcc version 4.6.3 20120201 (prerelease) (crosstool-NG linaro-1.13.1-2012.02-20120222 - Linaro GCC 2012.02) ) #1 SMP PREEMPT Tue May 3 13:47:01 UTC 2016

I think it is related with compile environment.

If you share correct environment for compile. I will try it. (ubuntu version, gcc version and so on…)


(Wassim Znaidi) #26

Hi Sinovoip,

what do you mean by “After the completion of the copy Uimage to boot partition boot/BPI m3 below”


(Francisco Perez) #27

I have the same problem, what can i do after to compile the kernel BPI M3?Thanks


(strongLi) #28

RAM配置不对,改成板子对于的内存大小

linux-sunxi\arch\arm\mach-sunxi\include\mach\sun8i\memory-sun8iw6p1.h
#define PLAT_PHYS_OFFSET         UL(0x40000000)
#ifdef CONFIG_EVB_PLATFORM
#define PLAT_MEM_SIZE            SZ_1G //SZ_2G
#else
#define PLAT_MEM_SIZE            SZ_256M
#endif

(fred) #29

Hi @strongLi Are you sure of the solution. I tried to modify memory-sun8iw6p1.h as you mention above but I am still stuck on my kernel boot process. Same as @Brian_Kim the last message is:

------sun8i_smp_init_ops----37-----

Help will be appreciate. Thank you


(fred) #30

I forget to say that I didn’t change any configuration in kernel config. I simply tried first to boot the BPI-M3 with a kernel compile by myself base on the source given from github.com/BPI-SINOVOIP/BPI-M3-bsp.git

@sinovoip


(fred) #31

Hi! @Brian_Kim Did you succeed in booting your kernel image. I’m exactly stuck at the same step as you described:

Loaded environment from uEnv.txt Running uenvcmd … Banana Pi bpi-m3 chip: a83t Service: linux bpiuser:

** Unable to read “bananapi/berryboot.img” from mmc 0:1 **

Booting kernel from Legacy Image at 48000000 …

Image Name: Linux-3.4.39-BPI-M3-Kernel-MY_UNMODIFIED_VERSION Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 6945776 Bytes = 6.6 MiB Load Address: 40008000 Entry Point: 40008000 Verifying Checksum … OK Loading Kernel Image … OK OK [ 5.146][mmc]: MMC Device 2 not found [ 5.150][mmc]: mmc not find,so not exit [ 5.154] Starting kernel …

[sun8i_fixup]: From boot, get meminfo: Start: 0x40000000 Size: 2048MB ion_carveout reserve: 96m 128m ion_reserve_common: ion reserve: [0xb8000000, 0xc0000000]! ion_cma reserve: 120m 176m 512m ion_reserve_common: ion reserve: [0xa0000000, 0xc0000000]! ------sun8i_smp_init_ops----37-----


(fred) #32

@sinovoip are you still interest in feedback because the bsp git version for M3 didn’t work at all.

Another question: Why the kernel (3.4.39-BPI-M3-Kernel) have 5.7Mo size in ArchLinuxARM-lite-bpi-m3 2016-5-10 file and 7Mo in ubuntu-16.04-mate-desktop-beta-bpi-m3-ov8865-sd-emmc.img -2017-7-13.

uname -r give exactly the same version name but the kernel uImage size is different…

Kernel Config is exactly the same for ubuntu-16.04-mate-desktop-beta-bpi-m3-ov8865-sd-emmc.img and bsp git repository but compile kernel with git stop booting at the step describe above.

Any help would be appreciate.


Building kernel
(fred) #33

Got it! for //github.com/BPI-SINOVOIP/BPI-M3-bsp.git you must change the gcc compiler to gcc-linaro-arm-linux-gnueabihf-4.7-2013.04-20130415_linux

Kernel can’t boot with gcc 4.9 compilation see: