Open frantiseksimorda opened 8 years ago
I guess you got a 64-bit system. Make sure you can run the 32-bit executable file on your system.
On Ubuntu, I do this:
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 zlib1g:i386
jim60105: Thanks for reply, but I think that i386 is a different architecture and you cannot run apps compiled to i386 on armv7.
I dirty copied gcc and ld from /bin to specified path (from system of my Banana Archlinux):
/root/bpi/BPI-M3-bsp/allwinner-tools/toolchain/bin
And it ended a littel further, looking for some "cc1" binary, which i didn't found in system. So clearly binaries in that repository are compiled for wrong architecture.
[root@bananapi BPI-M3-bsp]# ./build.sh
==========================================
BPI-M3 BSP Build Tool
==========================================
This tool support following BPI board(s):
------------------------------------------
1. BPI_M3_720P
2. BPI_M3_1080P
3. BPI_M3_LCD7
4. BPI_M3_USB_720P
5. BPI_M3_USB_1080P
6. BPI_M3_USB_LCD7
------------------------------------------
Please choose a target(1-6): 2
Now configuring...
BPI_M3_1080P 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...
make -C u-boot-sunxi sun8iw6p1_config CROSS_COMPILE=/root/bpi/BPI-M3-bsp/allwinner-tools/toolchain/bin/arm-linux-gnueabi- -j16
make[1]: Entering directory '/root/bpi/BPI-M3-bsp/u-boot-sunxi'
Configuring for sun8iw6p1 board...
make[1]: Leaving directory '/root/bpi/BPI-M3-bsp/u-boot-sunxi'
make -C u-boot-sunxi all CROSS_COMPILE=/root/bpi/BPI-M3-bsp/allwinner-tools/toolchain/bin/arm-linux-gnueabi- -j16
make[1]: Entering directory '/root/bpi/BPI-M3-bsp/u-boot-sunxi'
Generating include/autoconf.mk
arm-linux-gnueabi-gcc: error trying to exec 'cc1': execvp: No such file or directory
Generating include/autoconf.mk.dep
arm-linux-gnueabi-gcc: error trying to exec 'cc1': execvp: No such file or directory
/root/bpi/BPI-M3-bsp/allwinner-tools/toolchain/bin/arm-linux-gnueabi-gcc -DDO_DEPS_ONLY \
-g -Os -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -I/root/bpi/BPI-M3-bsp/u-boot-sunxi/include -I/root/bpi/BPI-M3-bsp/u-boot-sunxi/include/openssl -fno-builtin -ffreestanding -nostdinc -isystem include -pipe -DCONFIG_ARM -D__ARM__ -mfpu=neon -D__NEON_SIMD__ -mcpu=cortex-a7 -Wall -Wstrict-prototypes \
-o lib/asm-offsets.s lib/asm-offsets.c -c -S
arm-linux-gnueabi-gcc: error trying to exec 'cc1': execvp: No such file or directory
Makefile:649: recipe for target 'lib/asm-offsets.s' failed
make[1]: *** [lib/asm-offsets.s] Error 1
make[1]: Leaving directory '/root/bpi/BPI-M3-bsp/u-boot-sunxi'
Makefile:45: recipe for target 'u-boot' failed
make: *** [u-boot] Error 2
Build success!
http://blog.jim60105.com/2016/03/bananapi-m3-cross-compile.html
some user have success ,you can see this link.
Actually, I ran into the same issue yesterday, and solved it by what I just said. I had finished compiling this on ArchLinux x86_64, and I had mentioned it here before. I'm not really sure, but I think it should work.
The point is, can I compile it on BPI M3 it self? Or shoud I do it on normal PC/Laptop (x86 station)?
Thanks
LOL "Build success" :-1:
I've tried to run binaries in folder specified
And it ended:
Seems it's different architecture bin files? PS: using Archlinux
As root, because of error mentioned here can't work as normal user. That is reason why I tried to compile it myself.