Discussion

WIKI & GitHub not working

32 10107
winuser  
Hello,

From the bananapi WIKI, i set up the cross toolchain by using the Banana Pi BSP.
I have combined the original "git clone https://github.com/LeMaker/bananapi-bsp.git" with the downloaded "bananapi-bsp-master" from the Lemaker GitHub.

After running the ./configure, i ran make and got the following error message:-

[
git submodule init
git submodule update sunxi-tools
Cloning into 'sunxi-tools'...
remote: Counting objects: 978, done.
remote: Compressing objects: 100% (452/452), done.
remote: Total 978 (delta 516), reused 978 (delta 516)
Receiving objects: 100% (978/978), 339.59 KiB | 173.00 KiB/s, done.
Resolving deltas: 100% (516/516), done.
Checking connectivity... done.
Submodule path 'sunxi-tools': checked out 'e2a3f16e36f6b53b37baf9771af7f2ebf7f648cf'
make -C sunxi-tools
make[1]: Entering directory `/home/mark/bananapi-bsp/sunxi-tools'
gcc -g -O0 -Wall -Wextra -std=c99 -D_POSIX_C_SOURCE=200112L -Iinclude/  -o fexc fexc.c script.c script_uboot.c script_bin.c script_fex.c
ln -s fexc bin2fex
ln -s fexc fex2bin
gcc -g -O0 -Wall -Wextra -std=c99 -D_POSIX_C_SOURCE=200112L -Iinclude/  -o bootinfo bootinfo.c
bootinfo.c: In function ‘print_script’:
bootinfo.c:274:25: warning: unused parameter ‘script’ [-Wunused-parameter]
void print_script(void *script)
                         ^
gcc -g -O0 -Wall -Wextra -std=c99 -D_POSIX_C_SOURCE=200112L -Iinclude/ `pkg-config --cflags libusb-1.0`  -o fel fel.c  `pkg-config --libs libusb-1.0`
/bin/sh: 1: pkg-config: not found
/bin/sh: 1: pkg-config: not found
fel.c:22:20: fatal error: libusb.h: No such file or directory
#include <libusb.h>
                    ^
compilation terminated.
make[1]: *** [fel] Error 1
make[1]: Leaving directory `/home/mark/bananapi-bsp/sunxi-tools'
make: *** [tools] Error 2
mark@mark-lubuntu:~/bananapi-bsp$
]

I installed "pkg-config" eventhough it was not on the original list of things to install in the cross toolchain and ran make again and the following error message followed:-

[
In file included from /home/mark/toolchain/bananapi-bsp/u-boot-bananapi/include/configs/sun7i.h:28:0,
                 from include/config.h:16,
                 from /home/mark/toolchain/bananapi-bsp/u-boot-bananapi/include/common.h:18,
                 from /home/mark/toolchain/bananapi-bsp/u-boot-bananapi/arch/arm/lib/asm-offsets.c:15:
/home/mark/toolchain/bananapi-bsp/u-boot-bananapi/include/configs/sunxi-common.h:26:56: fatal error: asm/arch/cpu.h: No such file or directory
#include <asm/arch/cpu.h> /* get chip and board defs */
                                                        ^
compilation terminated.
make[3]: *** [lib/asm-offsets.s] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: *** [arch/arm/lib/asm-offsets.s] Error 1
make[2]: *** [prepare0] Error 2
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory `/home/mark/toolchain/bananapi-bsp/u-boot-bananapi'
make: *** [u-boot] Error 2
mark@mark-lubuntu:~/toolchain/bananapi-bsp$
]

I think both your WIKI and LeMaker Github is all in a mess. Could you advise on the solution?

Thanks.
Did you install all necessary packages by following the wiki instruction?

winuser  
Reply 2# tony_zhang

Yes, all packages were installed except uboot-mkimage (does not exist and taken care of by u-boot-tools).

After the first error message, i additionally install "pkg-config" in order to run make further.

Which Distribution are you using? When I set up my kernel build environment, I first used Debian 7.6 but ran into errors with packages for the toolchain not available. Then I installed Ubuntu 14.04 LTS and everything worked well. Maybe someone else can confirm this, but I guess the Wiki should be updated in this regard.

Mind you, I didn't try to use the BSP. I just set up the build environment to build the Kernel from the LeMaker sources on GitHub and that worked well under Ubuntu 14.04 LTS following the Wiki.

The first time you get error is because you do not have installed libusb-dev, you are stopped at compiling script.bin.
The second time you get error is in unbolt compiling. I remembered I have seen this error somewhere, but I can not remember where. Also I remembered that when uboot-mkimage that is in uboot-tools, we need put the uboot-mkimage in another place. Please try using google. My google is blocked now

winuser  
Reply 4# silentcreek

I am using Lubuntu 14.04.1 LTS - the distro should not be the problem.

winuser  
Reply 5# tony_zhang

I did install libusb-1.0-0-dev. Is there such a package as libusb-dev and if yes, then i need to install that too?
( I also did install libusb-1.0-0 ).

What about "pkg-config" ? Do we need that - it seems like it?

uboot-mkimage is not available to install and your Wiki mentioned that specifically (in small print). If i find it then where shall i install it?

winuser  
All right, i have installed uboot-image from

http://pkgs.org/ubuntu-12.04/ubu ... 2_all.deb/download/

then get into the same error message:-

[
make[1]: Leaving directory `/home/mark/bananapi-bsp/u-boot-bananapi'
mkdir -p /home/mark/bananapi-bsp/output
[ ! -s boot.cmd ] || mkimage -A arm -O u-boot -T script -C none -n "boot" -d boot.cmd /home/mark/bananapi-bsp/build/boot.scr
make -C sunxi-tools
make[1]: Entering directory `/home/mark/bananapi-bsp/sunxi-tools'
gcc -g -O0 -Wall -Wextra -std=c99 -D_POSIX_C_SOURCE=200112L -Iinclude/ `pkg-config --cflags libusb-1.0`  -o fel fel.c  `pkg-config --libs libusb-1.0`
/bin/sh: 1: pkg-config: not found
/bin/sh: 1: pkg-config: not found
fel.c:22:20: fatal error: libusb.h: No such file or directory
#include <libusb.h>
                    ^
compilation terminated.
make[1]: *** [fel] Error 1
make[1]: Leaving directory `/home/mark/bananapi-bsp/sunxi-tools'
make: *** [tools] Error 2
mark@mark-Lubuntu:~/bananapi-bsp$
]

After that, i completely reinstalled another ubuntu 14.04.1 LTS, update & upgrade, reinstalled all the required packages including uboot-mkimage and run

"git clone https://github.com/LeMaker/bananapi-bsp.git"
"./configure Bananpi", then
"make"

then i get the same old result as above.
This time i did not install pkg-config to run make again.

Looking at the error messages - it seems to indicate that there is definitely something wrong with your GitHub and/or the Wiki.

Can you get someone to do the same from your GitHub and get their results???

To be able to get this working is important as it serve as a basis of change for both new BananaPi owners as well as old users, who want to tweak their present systems.

Of course, we can also try to run the other 3 methods seperately but that is another matter. What is on the Wiki and the GitHub should be able to work and not return the results that i have.

Thanks.

Have you tried the step by step instructions? That works for me. I haven't tried the BSP.

winuser  
Reply 9# silentcreek


I have done the step-by-step to get uImage - its ok. In fact you can even do this from the BananaPi itself and still get the required results (no need for independent ubuntu).

As for getting the script.bin (step-by-step) - the same non-working results as in the BSP run. There is something wrong within the internal scripts of the sunxi-tools especially when the error message clearly indicate "pkg-config".

I am sure you know that in order to tweak the system, we need both the script.bin as well as the uImage (or rather to edit files within both the processes).
Some tweaks require the processes within the script.bin and some within the processes of building uImage and for others, we need to tweak both.

Maybe you could also help by doing the BSP run and see your returns?
Thanks.

You have to log in before you can reply Login | Sign Up

Points Rules