Discussion

WIKI & GitHub not working

32 10122
In Ubuntu 12.04, it is libusb-1.0-0-dev. I do know if the libusb-dev-XXXX is different in 14.04.

winuser  
Reply 11# tony_zhang

Ok, so what happens, say 2 years down the road, when they may be using 16.03?

I think the wiki & the github should be updated for new users.
Or else you may have to get a copy of 12.04 on your github or wiki, so that others may use it in the future?

Please work something out for 14.04 users.

The uImage and uboot (step-by-step) are still useable, only the script.bin (sunxi-tools) is not working and thus the compilation problem for the BSP.

Thanks.

Building the script.bin works absolutely fine for me on Ubuntu 14.04 LTS.
The way I set up my build environment is fairly simple: Installed Ubuntu 14.04 LTS 64bit in a virtual machine (VirtualBox on a Win7 64bit host). After updating all packages, i installed the toolchain as described in the LeMaker wiki. The only thing I noticed here is that apt automatically installed the newer GCC 4.8 packages instead of 4.7. But i proceeded with that and have no problems.
Do you run everything as root? Before i start entering the build commands I simply start a shell as root with 'sudo bash' so i don't need to worry about permissions or adding sudo to every command.

Maybe you can setup a new, clean build environment in a VM and try again?

winuser  
I am doing a completely new run using 12.04 at the moment - to see how it is like. Will post my findings after completion.

So the main thing is the newer GCC 4.8 packages - did you notice anything else in your run?

For the benefit of others
to change gcc-4.7-arm-linux-gnueabihf-base to gcc-4.8-arm-linux-gnueabihf-base and
also change g++-4.7-arm-linux-gnueabihf to g++-4.8-arm-linux-gnueabihf
I will try this after my present above job.

Setting up VM's may be a bit too much for beginners - that's why i am doing things according to the Wiki.

Thank you for your contributions.

winuser  
I managed to download a copy of ubuntu 12.04, installed it and run update - 424 packages to download (>200 MB).
Do not upgrade or you will turn your 12.04 to 14.04

Installed the neccessary packages from
http://wiki.lemaker.org/Building_u-boot,_script.bin_and_linux-kernel
On Ubuntu 12.04, change
gcc-4.7-arm-linux-gnueabihf-base and g++-4.7-arm-linux-gnueabihf
to
gcc-4.6-arm-linux-gnueabihf-base and g++-4.6-arm-linux-gnueabihf

[sudo apt-get install
kpartx
build-essential
u-boot-tools
uboot-mkimage    (no need to run this as it is included in the above u-boot-tools)
binutils-arm-linux-gnueabihf
gcc-4.7-arm-linux-gnueabihf-base    (change as above if using 12.04 and change to gcc-4.8-arm-linux-gnueabihf if on 14.04)
g++-4.7-arm-linux-gnueabihf    (change as above if using 12.04 and change to g++-4.8-arm-linux-gnueabihf if on 14.04)
gcc-arm-linux-gnueabihf
cpp-arm-linux-gnueabihf
libusb-1.0-0
libusb-1.0-0-dev
git
wget
fakeroot
kernel-package
zlib1g-dev
libncurses5-dev]

[This is where LeMaker need to make changes in order for 14.04 users to continue doing the following work i.e. they have to update the packages to install (here in the Wiki) or to make changes to their Git-Hub (where you download when you run git]


Run the Step by step

Building u-boot

git clone https://github.com/LeMaker/u-boot-bananapi.git
cd u-boot-bananapi
make CROSS_COMPILE=arm-linux-gnueabihf- Bananapi_config
make CROSS_COMPILE=arm-linux-gnueabihf-

[The above ran till completion without any mistakes - so Wiki & GitHub ok with 12.04
Please read this in conjunction with
http://wiki.lemaker.org/Building_u-boot,_script.bin_and_linux-kernel
on what should be done further. ]

cd ..

Building the kernel

First, get the linux kernel repository by following:
git clone https://github.com/LeMaker/linux-bananapi.git

cd linux-bananapi
Second, set default kernel configuration:
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- sun7i_defconfig
[This is where you come back after completion to tweak your system by re-configuring the file .config (hidden file).
You can tweak your kernel configuration by running:
make linux-config
However, do know what exactly you are doing before altering the hidden .config file
Then run the following steps again to get the new uImage]

Third, tweak the config. You can open some kind of kernel configuring software or close the useless kernel configuration by editing your kernel configuration:
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- menuconfig
[You also come back here later, to tweak by changing menuconfig, then run the following steps again to get the new uImage]

Building uImage and modules:
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- uImage modules
As a final step, create the full module tree:
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- INSTALL_MOD_PATH=output modules_install

[The above also ran without errors in 12.04
Please read the wiki on other things that need to be done]

cd ..

Building script.bin

First, get the following repositories:
git clone https://github.com/LeMaker/sunxi-tools.git
git clone https://github.com/LeMaker/sunxi-boards.git

cd sunxi-tools
then run "make"

The above ran with the following errors -  
[
mark@mark-Lu-12:~$ cd sunxi-tools
mark@mark-Lu-12:~/sunxi-tools$ make
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]
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
compilation terminated.
make: *** [fel] Error 1
mark@mark-Lu-12:~/sunxi-tools$
]

so it seems that it is also not working for even 12.04
This means we are not able to get the Banana.fex file which is used to make tweaks to the system.
So at the moment we are only able to only make changes to the kernel on our own but not able to make changes to script.bin (by editing Banana.fex)

LeMaker should check the above to reconfirm.
Then to make amends to both their Wiki and/or GitHub

I have tried compile on Ubuntu14.04 sever, without any problem. I do not know where you has something wrong.

winuser  
Reply 16# tony_zhang

So did you make any changes? Or rather was any changes made to your system to enable the run?

i ran on a brand new system on both 12.04 and 14.04 by strictly following your wiki and those are the results i had.

I just did what I have written in the WIKI.

winuser  
Hi,

Thank you for your work.

Can you please provide more details on your build environment - like OS used, what packages were installed, etc, etc.

Thanks.

Reply 19# winuser
Ubuntu 12.04 desktop and Ubuntu 14.04 server:
  1. sudo apt-get install build-essential u-boot-tools uboot-mkimage binutils-arm-linux-gnueabihf gcc-4.7-arm-linux-gnueabihf-base g++-4.7-arm-linux-gnueabihf gcc-arm-linux-gnueabihf cpp-arm-linux-gnueabihf libusb-1.0-0 libusb-1.0-0-dev git wget fakeroot kernel-package zlib1g-dev libncurses5-dev
Copy the Code

  1. gcc-4.6-arm-linux-gnueabihf-base g++-4.6-arm-linux-gnueabihf
Copy the Code
for Ubuntu 12.04

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

Points Rules