Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => A20 => Topic started by: Klaus on February 24, 2020, 02:05:33 PM

Title: Building image for a T2-OLinuXino-MICRO-e8Gs16M-IND
Post by: Klaus on February 24, 2020, 02:05:33 PM
Hi folks,

I would like to build a armbian image from scratch (ArmbianHowTo) and therefore started with building the U-Boot (https://www.olimex.com/wiki/ArmbianHowTo#Building_u-boot) following the ArmbianHowTo (https://www.olimex.com/wiki/ArmbianHowTo).

The platform I'm using is Debian Buster with GCC 8.3.0

I already get stuck there with the following error message:
Traceback (most recent call last):
  File "scripts/dtc/pylibfdt/setup.py", line 21, in <module>
    from distutils.core import setup, Extension
ModuleNotFoundError: No module named 'distutils.core'
make[3]: *** [scripts/dtc/pylibfdt/Makefile:27: scripts/dtc/pylibfdt/_libfdt.so] Fehler 1
make[2]: *** [scripts/Makefile.build:432: scripts/dtc/pylibfdt] Fehler 2
make[1]: *** [scripts/Makefile.build:432: scripts/dtc] Fehler 2
make: *** [Makefile:551: scripts] Fehler 2

Anything I'm doing wrong or missing in the HowTo?

BTW: Is there any information available on what is required on the building platform?
Title: Re: Building image for a T2-OLinuXino-MICRO-e8Gs16M-IND
Post by: LubOlimex on February 24, 2020, 02:40:53 PM
You need Bionic 18.04. For the environment read here: https://docs.armbian.com/Developer-Guide_Build-Preparation/
Title: Re: Building image for a T2-OLinuXino-MICRO-e8Gs16M-IND
Post by: Klaus on February 24, 2020, 03:06:48 PM
Ok, got Ubuntu Bionic 18.04 but I'm not sure what to make of "Please note that system requirements (both hardware and OS/software) may differ depending on the build environment (Vagrant, Docker, Virtualbox, native)."

When I now try to build the U-Boot I get this error message:
Traceback (most recent call last):
  File "scripts/dtc/pylibfdt/setup.py", line 21, in <module>
    from distutils.core import setup, Extension
ModuleNotFoundError: No module named 'distutils.core'
scripts/dtc/pylibfdt/Makefile:27: recipe for target 'scripts/dtc/pylibfdt/_libfdt.so' failed
make[3]: *** [scripts/dtc/pylibfdt/_libfdt.so] Error 1
scripts/Makefile.build:432: recipe for target 'scripts/dtc/pylibfdt' failed
make[2]: *** [scripts/dtc/pylibfdt] Error 2
scripts/Makefile.build:432: recipe for target 'scripts/dtc' failed
make[1]: *** [scripts/dtc] Error 2
Makefile:551: recipe for target 'scripts' failed
make: *** [scripts] Error 2

How should I proceed?
Title: Re: Building image for a T2-OLinuXino-MICRO-e8Gs16M-IND
Post by: LubOlimex on February 24, 2020, 03:17:36 PM
Looks like some python packages are missing, try to install

sudo apt-get install python3-distutils
sudo apt install python3-pip
sudo apt install python-pip

report back how it goes.
Title: Re: Building image for a T2-OLinuXino-MICRO-e8Gs16M-IND
Post by: Klaus on February 24, 2020, 03:36:49 PM
After sudo apt install python3-distutils python3-pip python-pip swig U-Boot seems to compile.
Only the following message poped up:
===================== WARNING ======================
This board does not use CONFIG_DM_VIDEO Please update
the board to use CONFIG_DM_VIDEO before the v2019.07 release.
Failure to update by the deadline may result in board removal.
See doc/driver-model/MIGRATION.txt for more info.
====================================================

I'll try Building Image (https://www.olimex.com/wiki/ArmbianHowTo#Building_image) now.
Title: Re: Building image for a T2-OLinuXino-MICRO-e8Gs16M-IND
Post by: Klaus on March 13, 2020, 06:06:42 PM
Got started on the build process and can't find

olinuxino-a20  - Common configuration file for All A20-OLinuXino boards
as an option under CSC/WIP/EOS/TVB

What would the current build process look like?
Title: Re: Building image for a T2-OLinuXino-MICRO-e8Gs16M-IND
Post by: LubOlimex on March 16, 2020, 08:10:05 AM
It should be there. I see it:

https://github.com/OLIMEX/build/tree/olimex/config/boards

Did you do everything up this point as suggested?
Title: Re: Building image for a T2-OLinuXino-MICRO-e8Gs16M-IND
Post by: Klaus on March 16, 2020, 06:02:43 PM
Indeed, it's there, until ...

If I clone the '/olimex/build' I'll have 103 board configs.
In there are:
olimex.som204-a20.csc
olimex.som-a13.csc
olimex.som-a20.csc
olinuxino-a13.csc
olinuxino-a20.csc
olinuxino-a33.csc
olinuxino-a64.csc
olinuxino-h3.conf

If I rerun '.compile.sh', I'll have 116 bord configs.
In there than are only:
olimex.som204-a20.csc
olimex.som-a20.csc
olinuxino-a13.csc
olinux.som-a13.csc  <- it's not a typo !! (at least not from me ;.) )

olinuxino-a20.csc is then definitely gone!!
Title: Re: Building image for a T2-OLinuXino-MICRO-e8Gs16M-IND
Post by: LubOlimex on March 17, 2020, 08:52:35 AM
It seems you are not building the Olimex fork but the armbian:

https://github.com/armbian/build/tree/master/config/boards

vs

https://github.com/OLIMEX/build/tree/olimex/config/boards

Maybe something in the compile.sh?
Title: Re: Building image for a T2-OLinuXino-MICRO-e8Gs16M-IND
Post by: JohnS on March 17, 2020, 10:01:26 AM
Also, if it's the armbian and it fails, raise a bug report (with them) so they know.

John
Title: Re: Building image for a T2-OLinuXino-MICRO-e8Gs16M-IND
Post by: Klaus on March 17, 2020, 10:05:32 AM
I think I found the problem.

In lines 34 to 59 of build/compile.sh the missing config-default.conf is created.
As build/config-example.conf is also missing, build/config/templates/config-example.conf is copied to build/ and build/config-default.conf is linked to build/config-example.conf
build/config-default.conf is then sourced in line 51 of build/compile.sh.

In line 26 of build/config-default.conf LIB_TAG is set to "master".

Therefore, when in line 91 of build/compile.sh the command git checkout "${LIB_TAG:-master}" is executed, the branch will switch from 'olimex' to 'master'(armbian?).

Can you confirm this, and how should it be?

@JohnS: I belive olinuxino-a20 is a csc board config which comes from olimex and seems not to be supported by armbian. Why should i report that to armbian?

@LubOlimex: I understand that the 'lost' files are part of the olimex branch and not of the master branch. is that correct?
Title: Re: Building image for a T2-OLinuXino-MICRO-e8Gs16M-IND
Post by: LubOlimex on March 17, 2020, 11:16:46 AM
I guess but building the latest image should be easier, try the following:

git clone --branch olimex https://github.com/olimex/build

cd build

touch .ignore_changes

./compile.sh

Refer to this thread: https://www.olimex.com/forum/index.php?topic=7260.15
Title: Re: Building image for a T2-OLinuXino-MICRO-e8Gs16M-IND
Post by: Klaus on March 17, 2020, 11:37:02 AM
Shouldn't that be mentioned under ArmbianHowTo (https://www.olimex.com/wiki/ArmbianHowTo)  ;)  or can that be fixed in the /config/template/config-example.conf of the olimex branch?
Title: Re: Building image for a T2-OLinuXino-MICRO-e8Gs16M-IND
Post by: JohnS on March 18, 2020, 06:18:32 PM
Is it now building OK?

John
Title: Re: Building image for a T2-OLinuXino-MICRO-e8Gs16M-IND
Post by: Klaus on March 19, 2020, 01:36:37 PM
The Build-process now keeps the config files for the olimex boards. But it seems that, with this 'modification', there no updates from the armbian side coming into the build process anymore.