Use Fenix scripts to build your own ubuntu image


#1

Use Fenix scripts to build your own ubuntu image

This tutorial is about how to use Fenix scripts to build your own ubuntu image.

Preperations:

Assume that you have installed the build environment on your host PC. If not, install them first.

$ sudo apt-get update
$ sudo apt-get -y upgrade
$ sudo apt-get install git make lsb-release

Clone Fenix repository

Clone Fenix repo to somewhere like: ~/project/

$ mkdir ~/project/
$ cd ~/project/
$ git clone https://github.com/khadas/fenix

Setup build environment

You should setup the build environment first.For example board type, linux version, ubuntu version and ubuntu architecture.

$ cd /path/to/fenix
$ source env/setenv.sh

You will get result like this:

nick@Server:~/project/fenix$ source env/setenv.sh 

Choose Khadas board:
1. VIM
2. VIM2

Which board would you like? [1] 1

Choose linux version:
1. linux-3.14
2. linux-4.9

Which linux version would you like? [2] 2

Choose ubuntu version:
1. ubuntu-16.04.2
2. ubuntu-17.04
3. ubuntu-17.10

Which ubuntu version would you like? [1] 1

Choose ubuntu architecture:
1. ubuntu-arm64
2. ubuntu-armhf

Which ubuntu architecture would you like? [1] 1
===========================================

#KHADAS_BOARD=VIM
#LINUX=4.9
#UBUNTU=16.04.2
#UBUNTU_ARCH=arm64

===========================================

Build Ubuntu image

If you have setup the environment then it’s time to build the ubuntu server image.

$ make

If it’s your first time to build, many repos(u-boot,linux,image_upgrade,utils) will be cloned automatically from Khadas GitHub.
If build successfully, ubuntu image will be in folder /path/to/fenix/images/ with name update.img. You can upgrade on Windows PC with USB-C cable.

Get help messages

You can get help messags by executing make help

nick@Server:~/project/khadas/ubuntu$ make help
Fenix scripts help messages:
  server        - Create ubuntu server update image.
  ubuntu-mate   - Create ubuntu mate update image.
  remount       - Remount rootfs and recreate initrd.
  github        - Update repositories from Khadas GitHub.
  image         - Pack update image.
  clean         - Cleanup.
  info          - Display current environment.

make server

  • Create ubuntu server image.

make ubuntu-mate

  • Create ubuntu mate image.(TBD)

make remount

  • Just remount the rootfs you have created and recreate initrd. If you have some modifications of kernel or modules, you just need to execute make remount to update kernel and initrd. You can choose autorun script or manual chroot. For manual chroot, you can do what you want in chroot jail.

make github

  • Update local repos to Khadas GitHub latest repos.

make image

  • Just pack update image.After make remount, use this command to create update image.

make clean

  • Cleanup image files and generated files in u-boot and linux.

make info

  • Show current environment.

In the end

For more information, please read the scripts.

NOTICE

The default ubuntu port mirrors we used in chroot are Chinese mirrors. So you maybe need to change them to some other port mirrors.You can modify it here:

https://github.com/khadas/fenix/blob/master/scripts/server.sh#L381

If any questions please feedback here.

Thanks.


[VIM] Ubuntu Mate with Linux-4.14.11 and U-boot-v2018.01-rc3 ROM alpha-V180106 [SD/USB INSTALLATION]
Overclocking possible?
Gcc5 support for Khadas VIM2 in Ubuntu Mate 16.04?
VIM2 performance
How to create ubuntu for VIM2 using the official image?
[FIXED] Midi (on Ubuntu Mate) not working
VIMs Ubuntu Mate V180531
[FIXED] Midi (on Ubuntu Mate) not working
VIM Ubuntu Mate with Linux-3.14 KODI 17.3 ROM V180127 [EMMC INSTALLATION]
Install Oracle Linux 7.4 (ARM) on Khadas Vim 2
Try to build Ubuntu image
[resolved] Pb with mkinitramfs .... open /dev/fb0: No such file or directory
GPIO export on Ubuntu is not working. What's the problem?
#2

I have error:

@ubuntu:~/project/fenix$ make ubuntu-mate
./scripts/ubuntu-mate.sh VIM 16.04.2 4.9 arm64
/home/davemf/project/fenix

PARAMETERS*
board: VIM
linux version: 4.9
ubuntu version: 16.04.2
ubuntu architecture: arm64
uboot configuration: kvim_defconfig
linux dtb: kvim.dtb
ubuntu mate: ubuntu-mate-16.04.2-arm64.tar.gz
uboot git branch: ubuntu
linux git branch: ubuntu-4.9
base directory: /home/davemf
project directory: /home/davemf/project
khadas directory: /home/davemf/project/khadas
ubuntu working directory: /home/davemf/project/fenix
amlogic update tool config: package.conf


/home/davemf/project/fenix
./scripts/ubuntu-mate.sh:351 Error: ‘ubuntu-mate-16.04.2-arm64.tar.gz’ does not exist, please download it into folder
’/home/davemf/project/fenix/archives/ubuntu-mate’ manually, and try again!
/home/davemf/project/fenix

Sun Oct 15 14:20:54 MSK 2017
Time elapsed: 0 days 0 hours 0 minutes 0 seconds.

ubuntu 17 has error too:

./scripts/ubuntu-mate.sh:351 Error: ‘artful-mate-arm64.tar.gz’ does not exist, please download it into folder

How to create ubuntu-mate?


#3

As ubuntu mate rootfs is so big, if you want to build ubuntu mate image you have to download ubuntu mate rootfs to folder /home/davemf/project/fenix/archives/ubuntu-mate manually and try make ubuntu-mate again. And just ubuntu mate 16.04 is available now.

Thanks.


#4

What is the default username / password for ubuntu server access?

thks


#5

Hello, I have not used the server version, but have you tried…
User: khadas, Password: khadas
Or User: root, Password: khadas


#6

Hi,

I’m trying to generate the image but I can not.
Below are all the commands I used:

  1. Create an environment on vultr.com with “16.04.2 LTS (Xenial Xerus)”

  2. After starting the environment, I executed apt-get to install all necessary packages, as below:

apt-get -y update
apt-get -y install gcc-arm-none-eabi gcc-4.9 git build-essential libncurses5-dev libssl-dev wget qemu qemu-user-static binfmt-support lib32stdc++6 libstdc++6 zlib1g:i386 python bc sysstat

  1. I downloaded gcc-linaro-aarch64-linux-gnu-4.9-2014.09_linux.tar.bz2 and installed as directed and added in the last line of ‘/ etc / profile’ the line below:

wget http://releases.linaro.org/archive/14.09/components/toolchain/binaries/gcc-linaro-aarch64-linux-gnu-4.9-2014.09_linux.tar.bz2
mkdir /opt/toolchains
tar -xjf gcc-linaro-aarch64-linux-gnu-4.9-2014.09_linux.tar.bz2 -C /opt/toolchains

vi /etc/profile
export PATH=$PATH:/opt/toolchains/gcc-linaro-aarch64-linux-gnu-4.9-2014.09_linux/bin

  1. I cloned the git project, ran ‘setenv.sh’ and circled the ‘make server’.

mkdirset ~/project/
cd ~/project/
git clone https://github.com/khadas/fenix

cd ~/project/fenix
source env/setenv.sh (vim2 + linux-4.9 + ubuntu-16.04.2 + ubuntu-arm64)
make server

The error reported in the ‘make server’ are as follows:

./scripts/server.sh VIM2 16.04.2 4.9 arm64
Utils repository dose not exist, clone utils repository('master') from Khadas GitHub...
Cloning into 'utils'...
Upgrade repository dose not exist, clone images_upgrade repository('master') from Khadas GitHub...
Cloning into 'upgrade'...
/root/project/fenix

***********************PARAMETERS************************
board:                         VIM2
linux version:                 4.9
ubuntu version:                16.04.2
ubuntu architecture:           arm64
uboot configuration:           kvim2_defconfig
linux dtb:                     kvim2.dtb
ubuntu base:                   ubuntu-base-16.04.2-base-arm64.tar.gz
uboot git branch:              ubuntu
linux git branch:              ubuntu-4.9
base directory:                /root
project directory:             /root/project
khadas directory:              /root/project/khadas
ubuntu working directory:      /root/project/fenix
amlogic update tool config:    package.conf
*********************************************************

/root/project/fenix
'ubuntu-base-16.04.2-base-arm64.tar.gz' does not exist, begin to downloading...
--2017-11-02 19:43:00--  http://cdimage.ubuntu.com/ubuntu-base/releases/16.04.2/release/ubuntu-base-16.04.2-base-arm64.tar.gz
Resolving cdimage.ubuntu.com (cdimage.ubuntu.com)... 91.189.88.165, 2001:67c:1360:8001::24
Connecting to cdimage.ubuntu.com (cdimage.ubuntu.com)|91.189.88.165|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 46731914 (45M) [application/x-gzip]
Saving to: ‘ubuntu-base-16.04.2-base-arm64.tar.gz’

2017-11-02 19:43:03 (20.6 MB/s) - ‘ubuntu-base-16.04.2-base-arm64.tar.gz’ saved [46731914/46731914]

/root/project/fenix
U-boot repository does not exist, clone u-boot repository('ubuntu') form Khadas GitHub...
Cloning into 'u-boot'...
U-boot: Already on branch 'ubuntu'
Build u-boot...
make[1]: Entering directory '/root/project/fenix/u-boot'
  HOSTCC  scripts/basic/fixdep
  GEN     ./Makefile
  HOSTCC  scripts/kconfig/conf.o
  SHIPPED scripts/kconfig/zconf.tab.c
  SHIPPED scripts/kconfig/zconf.lex.c
  SHIPPED scripts/kconfig/zconf.hash.c
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
#
# configuration written to .config
#
make[1]: Leaving directory '/root/project/fenix/u-boot'
make[1]: Entering directory '/root/project/fenix/u-boot'
  GEN     ./Makefile
scripts/kconfig/conf --silentoldconfig Kconfig
  CHK     include/config.h
  UPD     include/config.h
  GEN     include/autoconf.mk
  GEN     include/autoconf.mk.dep
  CHK     include/config/uboot.release
  CHK     include/generated/timestamp_autogenerated.h
  GEN     ./Makefile
  UPD     include/generated/timestamp_autogenerated.h
	CPP task_entry.s
	CPP misc.s
	CPP user_task.lds
	CC user_task.o
	CC misc.o
	CC uart.o
	CC suspend.o
	CC dvfs.o
	CC lib/delay.o
	CC lib/string.o
	CC task_entry.o
In file included from uart.c:23:0:
/usr/lib/gcc/arm-none-eabi/4.9.3/include/stdint.h:9:26: fatal error: stdint.h: No such file or directory
 # include_next <stdint.h>
                          ^
compilation terminated.
Makefile:87: recipe for target '/root/project/fenix/u-boot/build/scp_task/uart.o' failed
make[3]: *** [/root/project/fenix/u-boot/build/scp_task/uart.o] Error 1
make[3]: *** Waiting for unfinished jobs....
/root/project/fenix/u-boot/Makefile:903: recipe for target '/root/project/fenix/u-boot/build/scp_task/bl301.bin' failed
make[2]: *** [/root/project/fenix/u-boot/build/scp_task/bl301.bin] Error 2
make[2]: *** Waiting for unfinished jobs....
  UPD     include/config/uboot.release
Makefile:147: recipe for target 'sub-make' failed
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory '/root/project/fenix/u-boot'
Linux repository does not exist, clone linux repository('ubuntu-4.9') form Khadas GitHub...
Cloning into 'linux'... 
Checking out files: 100% (59909/59909), done.
Linux: Already on branch 'ubuntu-4.9'
Build linux...
make[1]: Entering directory '/root/project/fenix/linux'
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  SHIPPED scripts/kconfig/zconf.tab.c
  SHIPPED scripts/kconfig/zconf.lex.c
  SHIPPED scripts/kconfig/zconf.hash.c
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
drivers/net/wireless/bcmdhd/Kconfig:50:warning: defaults for choice values not supported
#
# configuration written to .config
#
make[1]: Leaving directory '/root/project/fenix/linux'
make[1]: Entering directory '/root/project/fenix/linux'
scripts/kconfig/conf  --silentoldconfig Kconfig
drivers/net/wireless/bcmdhd/Kconfig:50:warning: defaults for choice values not supported
arch/arm64/Makefile:23: ld does not support --fix-cortex-a53-843419; kernel may be susceptible to erratum
  CHK     include/config/kernel.release
  UPD     include/config/kernel.release
  CHK     include/config/kernel.release_full
  UPD     include/config/kernel.release_full
  WRAP    arch/arm64/include/generated/asm/bugs.h
  SYSMAP  System.map
  OBJCOPY arch/arm64/boot/Image
  Building modules, stage 2.
  MODPOST 5 modules
  CC      drivers/gpu/arm/mali/mali.mod.o
  CC      drivers/media/usb/gspca/gspca_main.mod.o
  CC      drivers/net/wireless/bcmdhd/dhd.mod.o
  CC      fs/aufs/aufs.mod.o
  CC      fs/efivarfs/efivarfs.mod.o
  LD [M]  fs/efivarfs/efivarfs.ko
  LD [M]  drivers/gpu/arm/mali/mali.ko
  LD [M]  drivers/media/usb/gspca/gspca_main.ko
  LD [M]  fs/aufs/aufs.ko
  LD [M]  drivers/net/wireless/bcmdhd/dhd.ko
make[1]: Leaving directory '/root/project/fenix/linux'
0+0 records in
0+0 records out
0 bytes copied, 0.000171589 s, 0.0 kB/s
mke2fs 1.42.13 (17-May-2015)
Discarding device blocks:   4096/256000             done                            
Creating filesystem with 256000 4k blocks and 64000 inodes
Filesystem UUID: b5eafa0e-4cf6-4546-90a4-b1f17fa80d30
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376

Allocating group tables: 0/8   done                            
Writing inode tables: 0/8   done                            
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: 0/8   done

make: Entering directory '/root/project/fenix/linux'
arch/arm64/Makefile:23: ld does not support --fix-cortex-a53-843419; kernel may be susceptible to erratum
./scripts/gcc-version.sh: line 25: aarch64-linux-gnu-gcc: command not found
./scripts/gcc-version.sh: line 26: aarch64-linux-gnu-gcc: command not found
make: aarch64-linux-gnu-gcc: Command not found
make: aarch64-linux-gnu-gcc: Command not found
  INSTALL drivers/gpu/arm/mali/mali.ko
  INSTALL drivers/media/usb/gspca/gspca_main.ko
  INSTALL fs/aufs/aufs.ko
  INSTALL fs/efivarfs/efivarfs.ko
  INSTALL drivers/net/wireless/bcmdhd/dhd.ko
make: aarch64-linux-gnu-gcc: Command not found
  DEPMOD  4.9.40
make: Leaving directory '/root/project/fenix/linux'

NOTE: YOU ARE NOW IN THE VIRTUAL TARGET, SETUP ANYTHING YOU WANT.
      TYPE 'exit' TO CONTINUE IF FINISHED.

Generating locales (this might take a while)...
  en_US.UTF-8... done
Generation complete.
/RUNME.sh: line 35: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
Generating locales (this might take a while)...
  en_US.UTF-8... done
Generation complete.
Err:1 http://mirrors.ustc.edu.cn/ubuntu-ports xenial InRelease
  Temporary failure resolving 'mirrors.ustc.edu.cn'
Err:2 http://mirrors.ustc.edu.cn/ubuntu-ports xenial-updates InRelease
  Temporary failure resolving 'mirrors.ustc.edu.cn'
Err:3 http://mirrors.ustc.edu.cn/ubuntu-ports xenial-backports InRelease
  Temporary failure resolving 'mirrors.ustc.edu.cn'
Err:4 http://mirrors.ustc.edu.cn/ubuntu-ports xenial-security InRelease
  Temporary failure resolving 'mirrors.ustc.edu.cn'
Reading package lists...
W: Failed to fetch http://mirrors.ustc.edu.cn/ubuntu-ports/dists/xenial/InRelease  Temporary failure resolving 'mirrors.ustc.edu.cn'
W: Failed to fetch http://mirrors.ustc.edu.cn/ubuntu-ports/dists/xenial-updates/InRelease  Temporary failure resolving 'mirrors.ustc.edu.cn'
W: Failed to fetch http://mirrors.ustc.edu.cn/ubuntu-ports/dists/xenial-backports/InRelease  Temporary failure resolving 'mirrors.ustc.edu.cn'
W: Failed to fetch http://mirrors.ustc.edu.cn/ubuntu-ports/dists/xenial-security/InRelease  Temporary failure resolving 'mirrors.ustc.edu.cn'
W: Some index files failed to download. They have been ignored, or old ones used instead.
Reading package lists...
Building dependency tree...
Reading state information...
Calculating upgrade...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists...
Building dependency tree...
Reading state information...
Package udev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  systemd

Package ifupdown is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'ifupdown' has no installation candidate
E: Unable to locate package net-tools
E: Package 'udev' has no installation candidate
E: Unable to locate package fbset
E: Unable to locate package vim
E: Unable to locate package sudo
E: Unable to locate package initramfs-tools
E: Unable to locate package bluez
E: Unable to locate package rfkill
E: Unable to locate package libbluetooth-dev
E: Unable to locate package iputils-ping
Err:1 http://mirrors.ustc.edu.cn/ubuntu-ports xenial InRelease
  Temporary failure resolving 'mirrors.ustc.edu.cn'
Err:2 http://mirrors.ustc.edu.cn/ubuntu-ports xenial-updates InRelease
  Temporary failure resolving 'mirrors.ustc.edu.cn'
Err:3 http://mirrors.ustc.edu.cn/ubuntu-ports xenial-backports InRelease
  Temporary failure resolving 'mirrors.ustc.edu.cn'
Err:4 http://mirrors.ustc.edu.cn/ubuntu-ports xenial-security InRelease
  Temporary failure resolving 'mirrors.ustc.edu.cn'
Reading package lists...
W: Failed to fetch http://mirrors.ustc.edu.cn/ubuntu-ports/dists/xenial/InRelease  Temporary failure resolving 'mirrors.ustc.edu.cn'
W: Failed to fetch http://mirrors.ustc.edu.cn/ubuntu-ports/dists/xenial-updates/InRelease  Temporary failure resolving 'mirrors.ustc.edu.cn'
W: Failed to fetch http://mirrors.ustc.edu.cn/ubuntu-ports/dists/xenial-backports/InRelease  Temporary failure resolving 'mirrors.ustc.edu.cn'
W: Failed to fetch http://mirrors.ustc.edu.cn/ubuntu-ports/dists/xenial-security/InRelease  Temporary failure resolving 'mirrors.ustc.edu.cn'
W: Some index files failed to download. They have been ignored, or old ones used instead.
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package libc6:armhf
Reading package lists...
Building dependency tree...
Reading state information...
Package apparmor is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Unable to locate package lxc
E: Unable to locate package aufs-tools
E: Unable to locate package cgroup-lite
E: Package 'apparmor' has no installation candidate
E: Unable to locate package docker.io
E: Couldn't find any package by glob 'docker.io'
E: Couldn't find any package by regex 'docker.io'
usermod: group 'docker' does not exist
/usr/local/bin/mkimage: Can't open /boot/initrd.img: No such file or directory
Image Name:   linux-4.9
Created:      Thu Nov  2 19:50:33 2017
Image Type:   AArch64 Linux Kernel Image (uncompressed)
Data Size:    17920512 Bytes = 17500.50 kB = 17.09 MB
Load Address: 01080000
Entry Point:  01080000
qemu: Unsupported syscall: 278
Created symlink /etc/systemd/system/multi-user.target.wants/bluetooth-khadas.service, pointing to /lib/systemd/system/bluetooth-khadas.service.

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

cp: cannot stat 'rootfs/boot/initrd.img': No such file or directory
error: could not load ramdisk 'images/initrd.img'
rm: cannot remove 'rootfs/boot/initrd.img': No such file or directory
Packing update image using config: package.conf
[Msg]Pack Item[USB         ,              DDR] from (images/upgrade/u-boot.bin.usb.bl2),[ERR]f(AmlImagePack.cpp)L1332:failed to open source file : images/upgrade/u-boot.bin.usb.bl2 
Image pack FAILED

Thu Nov  2 19:50:34 UTC 2017
Time elapsed: 0 days 0 hours 7 minutes 35 seconds.

Thanks :wink:


#7

Hi uchina,

It seems that your environment is not correct. What’s your host PC?

Try to comment the following line.

https://github.com/khadas/fenix/blob/master/scripts/server.sh#L383


#8

Hi @numbqq,

The environment is a clean installation of Ubuntu 16.0.4.
It is even an environment created in the vultr (like a digitalocean).

I’ve already commented this line that you suggested, but I did it again and I’m posting below the execution log.

./scripts/server.sh VIM2 16.04.2 4.9 arm64
Utils repository dose not exist, clone utils repository('master') from Khadas GitHub...
Cloning into 'utils'...
Upgrade repository dose not exist, clone images_upgrade repository('master') from Khadas GitHub...
Cloning into 'upgrade'...
/root/project/fenix

***********************PARAMETERS************************
board:                         VIM2
linux version:                 4.9
ubuntu version:                16.04.2
ubuntu architecture:           arm64
uboot configuration:           kvim2_defconfig
linux dtb:                     kvim2.dtb
ubuntu base:                   ubuntu-base-16.04.2-base-arm64.tar.gz
uboot git branch:              ubuntu
linux git branch:              ubuntu-4.9
base directory:                /root
project directory:             /root/project
khadas directory:              /root/project/khadas
ubuntu working directory:      /root/project/fenix
amlogic update tool config:    package.conf
*********************************************************

/root/project/fenix
'ubuntu-base-16.04.2-base-arm64.tar.gz' does not exist, begin to downloading...
--2017-11-05 01:44:11--  http://cdimage.ubuntu.com/ubuntu-base/releases/16.04.2/release/ubuntu-base-16.04.2-base-arm64.tar.gz
Resolving cdimage.ubuntu.com (cdimage.ubuntu.com)... 91.189.88.164, 2001:67c:1360:8001::1d
Connecting to cdimage.ubuntu.com (cdimage.ubuntu.com)|91.189.88.164|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 46731914 (45M) [application/x-gzip]
Saving to: ‘ubuntu-base-16.04.2-base-arm64.tar.gz’

...

2017-11-05 01:44:14 (20.9 MB/s) - ‘ubuntu-base-16.04.2-base-arm64.tar.gz’ saved [46731914/46731914]

/root/project/fenix
U-boot repository does not exist, clone u-boot repository('ubuntu') form Khadas GitHub...
Cloning into 'u-boot'...
U-boot: Already on branch 'ubuntu'
Build u-boot...
make[1]: Entering directory '/root/project/fenix/u-boot'
  HOSTCC  scripts/basic/fixdep
  GEN     ./Makefile
  HOSTCC  scripts/kconfig/conf.o
  SHIPPED scripts/kconfig/zconf.tab.c
  SHIPPED scripts/kconfig/zconf.lex.c
  SHIPPED scripts/kconfig/zconf.hash.c
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
#
# configuration written to .config
#
make[1]: Leaving directory '/root/project/fenix/u-boot'
make[1]: Entering directory '/root/project/fenix/u-boot'
  GEN     ./Makefile
scripts/kconfig/conf --silentoldconfig Kconfig
  CHK     include/config.h
  UPD     include/config.h
...
	CC task_entry.o
In file included from uart.c:23:0:
/usr/lib/gcc/arm-none-eabi/4.9.3/include/stdint.h:9:26: fatal error: stdint.h: No such file or directory
 # include_next <stdint.h>
                          ^
compilation terminated.
Makefile:87: recipe for target '/root/project/fenix/u-boot/build/scp_task/uart.o' failed
make[3]: *** [/root/project/fenix/u-boot/build/scp_task/uart.o] Error 1
make[3]: *** Waiting for unfinished jobs....
/root/project/fenix/u-boot/Makefile:903: recipe for target '/root/project/fenix/u-boot/build/scp_task/bl301.bin' failed
make[2]: *** [/root/project/fenix/u-boot/build/scp_task/bl301.bin] Error 2
make[2]: *** Waiting for unfinished jobs....
  UPD     include/config/uboot.release
Makefile:147: recipe for target 'sub-make' failed
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory '/root/project/fenix/u-boot'
Linux repository does not exist, clone linux repository('ubuntu-4.9') form Khadas GitHub...
Cloning into 'linux'...
Checking out files:  25% (15056/59909)   
...   
Checking out files: 100% (59909/59909), done.
Linux: Already on branch 'ubuntu-4.9'
Build linux...
make[1]: Entering directory '/root/project/fenix/linux'
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  SHIPPED scripts/kconfig/zconf.tab.c
  SHIPPED scripts/kconfig/zconf.lex.c
  SHIPPED scripts/kconfig/zconf.hash.c
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
drivers/net/wireless/bcmdhd/Kconfig:50:warning: defaults for choice values not supported
#
# configuration written to .config
#
make[1]: Leaving directory '/root/project/fenix/linux'
make[1]: Entering directory '/root/project/fenix/linux'
scripts/kconfig/conf  --silentoldconfig Kconfig
drivers/net/wireless/bcmdhd/Kconfig:50:warning: defaults for choice values not supported
arch/arm64/Makefile:23: ld does not support --fix-cortex-a53-843419; kernel may be susceptible to erratum
  CHK     include/config/kernel.release
  UPD     include/config/kernel.release
...
  LD [M]  fs/aufs/aufs.ko
make[1]: Leaving directory '/root/project/fenix/linux'
0+0 records in
0+0 records out
0 bytes copied, 0.000227139 s, 0.0 kB/s
mke2fs 1.42.13 (17-May-2015)
Discarding device blocks:   4096/256000
Creating filesystem with 256000 4k blocks and 64000 inodes
Filesystem UUID: ac8bc02c-ee3d-4727-9a0f-4fd43400f8ee
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376

Allocating group tables: 0/8
Writing inode tables: 0/8
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: 0/8

make: Entering directory '/root/project/fenix/linux'
arch/arm64/Makefile:23: ld does not support --fix-cortex-a53-843419; kernel may be susceptible to erratum
./scripts/gcc-version.sh: line 25: aarch64-linux-gnu-gcc: command not found
./scripts/gcc-version.sh: line 26: aarch64-linux-gnu-gcc: command not found
make: aarch64-linux-gnu-gcc: Command not found
make: aarch64-linux-gnu-gcc: Command not found
  INSTALL drivers/gpu/arm/mali/mali.ko
  INSTALL drivers/media/usb/gspca/gspca_main.ko
  INSTALL drivers/net/wireless/bcmdhd/dhd.ko
  INSTALL fs/aufs/aufs.ko
  INSTALL fs/efivarfs/efivarfs.ko
make: aarch64-linux-gnu-gcc: Command not found
  DEPMOD  4.9.40
make: Leaving directory '/root/project/fenix/linux'

NOTE: YOU ARE NOW IN THE VIRTUAL TARGET, SETUP ANYTHING YOU WANT.
      TYPE 'exit' TO CONTINUE IF FINISHED.

Generating locales (this might take a while)...
  en_US.UTF-8... done
Generation complete.
/RUNME.sh: line 35: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
Generating locales (this might take a while)...
  en_US.UTF-8... done
Generation complete.
Err:1 http://ports.ubuntu.com/ubuntu-ports xenial InRelease
  Temporary failure resolving 'ports.ubuntu.com'
Err:2 http://ports.ubuntu.com/ubuntu-ports xenial-updates InRelease
  Temporary failure resolving 'ports.ubuntu.com'
Err:3 http://ports.ubuntu.com/ubuntu-ports xenial-backports InRelease
  Temporary failure resolving 'ports.ubuntu.com'
Err:4 http://ports.ubuntu.com/ubuntu-ports xenial-security InRelease
  Temporary failure resolving 'ports.ubuntu.com'
Reading package lists...
W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/xenial/InRelease  Temporary failure resolving 'ports.ubuntu.com'
W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/xenial-updates/InRelease  Temporary failure resolving 'ports.ubuntu.com'
W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/xenial-backports/InRelease  Temporary failure resolving 'ports.ubuntu.com'
W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/xenial-security/InRelease  Temporary failure resolving 'ports.ubuntu.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.
Reading package lists...
Building dependency tree...
Reading state information...
Calculating upgrade...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  busybox-initramfs cpio dbus file initramfs-tools-bin initramfs-tools-core
...
  vim-common vim-runtime xdg-user-dirs xml-core
0 upgraded, 66 newly installed, 0 to remove and 0 not upgraded.
Need to get 32.5 MB of archives.
After this operation, 143 MB of additional disk space will be used.
Err:1 http://ports.ubuntu.com/ubuntu-ports xenial/main arm64 libatm1 arm64 1:2.5.1-1.5
  Temporary failure resolving 'ports.ubuntu.com'
Err:2 http://ports.ubuntu.com/ubuntu-ports xenial/main arm64 libmnl0 arm64 1.0.3-5
  Temporary failure resolving 'ports.ubuntu.com'
Err:3 http://ports.ubuntu.com/ubuntu-ports xenial-updates/main arm64 udev arm64 229-4ubuntu16
  Temporary failure resolving 'ports.ubuntu.com'
Err:4 http://ports.ubuntu.com/ubuntu-ports xenial/main arm64 sgml-base all 1.26+nmu4ubuntu1
  Temporary failure resolving 'ports.ubuntu.com'
Err:5 http://ports.ubuntu.com/ubuntu-ports xenial/main arm64 libgpm2 arm64 1.20.4-6.1
  Temporary failure resolving 'ports.ubuntu.com'
Err:6 http://ports.ubuntu.com/ubuntu-ports xenial/main arm64 busybox-initramfs arm64 1:1.22.0-15ubuntu1
  Temporary failure resolving 'ports.ubuntu.com'
Err:7 http://ports.ubuntu.com/ubuntu-ports xenial/main arm64 cpio arm64 2.11+dfsg-5ubuntu1
  Temporary failure resolving 'ports.ubuntu.com'
Err:8 http://ports.ubuntu.com/ubuntu-ports xenial/main arm64 libmagic1 arm64 1:5.25-2ubuntu1
  Temporary failure resolving 'ports.ubuntu.com'
Err:9 http://ports.ubuntu.com/ubuntu-ports xenial/main arm64 file arm64 1:5.25-2ubuntu1
  Temporary failure resolving 'ports.ubuntu.com'
Err:10 http://ports.ubuntu.com/ubuntu-ports xenial/main arm64 iproute2 arm64 4.3.0-1ubuntu3
  Temporary failure resolving 'ports.ubuntu.com'
Err:11 http://ports.ubuntu.com/ubuntu-ports xenial-updates/main arm64 ifupdown arm64 0.8.10ubuntu1.2
  Temporary failure resolving 'ports.ubuntu.com'
Err:12 http://ports.ubuntu.com/ubuntu-ports xenial-updates/main arm64 initramfs-tools-bin arm64 0.122ubuntu8.8
  Temporary failure resolving 'ports.ubuntu.com'
Err:13 http://ports.ubuntu.com/ubuntu-ports xenial-updates/main arm64 libklibc arm64 2.0.4-8ubuntu1.16.04.3
  Temporary failure resolving 'ports.ubuntu.com'
Err:14 http://ports.ubuntu.com/ubuntu-ports xenial-updates/main arm64 klibc-utils arm64 2.0.4-8ubuntu1.16.04.3
  Temporary failure resolving 'ports.ubuntu.com'
Err:15 http://ports.ubuntu.com/ubuntu-ports xenial/main arm64 kmod arm64 22-1ubuntu4
  Temporary failure resolving 'ports.ubuntu.com'
Err:16 http://ports.ubuntu.com/ubuntu-ports xenial-updates/main arm64 initramfs-tools-core all 0.122ubuntu8.8
  Temporary failure resolving 'ports.ubuntu.com'
Err:17 http://ports.ubuntu.com/ubuntu-ports xenial/main arm64 linux-base all 4.0ubuntu1
  Temporary failure resolving 'ports.ubuntu.com'
Err:18 http://ports.ubuntu.com/ubuntu-ports xenial-updates/main arm64 initramfs-tools all 0.122ubuntu8.8
  Temporary failure resolving 'ports.ubuntu.com'
Err:19 http://ports.ubuntu.com/ubuntu-ports xenial/main arm64 libgmp10 arm64 2:6.1.0+dfsg-2
  Temporary failure resolving 'ports.ubuntu.com'
Ign:20 http://ports.ubuntu.com/ubuntu-ports xenial-security/main arm64 libnettle6 arm64 3.2-1ubuntu0.16.04.1
Ign:21 http://ports.ubuntu.com/ubuntu-ports xenial-security/main arm64 libhogweed4 arm64 3.2-1ubuntu0.16.04.1
Ign:22 http://ports.ubuntu.com/ubuntu-ports xenial-security/main arm64 libidn11 arm64 1.32-3ubuntu1.1
Err:23 http://ports.ubuntu.com/ubuntu-ports xenial/main arm64 libffi6 arm64 3.2.1-4
  Temporary failure resolving 'ports.ubuntu.com'
Err:24 http://ports.ubuntu.com/ubuntu-ports xenial-updates/main arm64 libp11-kit0 arm64 0.23.2-5~ubuntu16.04.1
  Temporary failure resolving 'ports.ubuntu.com'
Ign:25 http://ports.ubuntu.com/ubuntu-ports xenial-security/main arm64 libtasn1-6 arm64 4.7-3ubuntu0.16.04.1
Ign:26 http://ports.ubuntu.com/ubuntu-ports xenial-security/main arm64 libgnutls30 arm64 3.4.10-4ubuntu1.2
Ign:27 http://ports.ubuntu.com/ubuntu-ports xenial-security/main arm64 libgnutls-openssl27 arm64 3.4.10-4ubuntu1.2
Err:28 http://ports.ubuntu.com/ubuntu-ports xenial/main arm64 iputils-ping arm64 3:20121221-5ubuntu2
  Temporary failure resolving 'ports.ubuntu.com'
Ign:29 http://ports.ubuntu.com/ubuntu-ports xenial-security/main arm64 libisc-export160 arm64 1:9.10.3.dfsg.P4-8ubuntu1.4
Ign:30 http://ports.ubuntu.com/ubuntu-ports xenial-security/main arm64 libdns-export162 arm64 1:9.10.3.dfsg.P4-8ubuntu1.4
Err:31 http://ports.ubuntu.com/ubuntu-ports xenial-updates/main arm64 isc-dhcp-client arm64 4.3.3-5ubuntu12.6
  Temporary failure resolving 'ports.ubuntu.com'
Err:32 http://ports.ubuntu.com/ubuntu-ports xenial-updates/main arm64 isc-dhcp-common arm64 4.3.3-5ubuntu12.6
  Temporary failure resolving 'ports.ubuntu.com'
Ign:33 http://ports.ubuntu.com/ubuntu-ports xenial-security/main arm64 libexpat1 arm64 2.1.0-7ubuntu0.16.04.2
Err:34 http://ports.ubuntu.com/ubuntu-ports xenial/main arm64 libmpdec2 arm64 2.4.2-1
  Temporary failure resolving 'ports.ubuntu.com'
Ign:35 http://ports.ubuntu.com/ubuntu-ports xenial-security/main arm64 libssl1.0.0 arm64 1.0.2g-1ubuntu4.6
Ign:36 http://ports.ubuntu.com/ubuntu-ports xenial-security/main arm64 libpython3.5-minimal arm64 3.5.2-2ubuntu0~16.04.1
Err:37 http://ports.ubuntu.com/ubuntu-ports xenial/main arm64 mime-support all 3.59ubuntu1
  Temporary failure resolving 'ports.ubuntu.com'
Err:38 http://ports.ubuntu.com/ubuntu-ports xenial/main arm64 libsqlite3-0 arm64 3.11.0-1ubuntu1
  Temporary failure resolving 'ports.ubuntu.com'
Ign:39 http://ports.ubuntu.com/ubuntu-ports xenial-security/main arm64 libpython3.5-stdlib arm64 3.5.2-2ubuntu0~16.04.1
Err:40 http://ports.ubuntu.com/ubuntu-ports xenial/main arm64 libxtables11 arm64 1.6.0-2ubuntu3
  Temporary failure resolving 'ports.ubuntu.com'
Err:41 http://ports.ubuntu.com/ubuntu-ports xenial/main arm64 net-tools arm64 1.60-26ubuntu1
  Temporary failure resolving 'ports.ubuntu.com'
Err:42 http://ports.ubuntu.com/ubuntu-ports xenial-updates/main arm64 sudo arm64 1.8.16-0ubuntu1.3
  Temporary failure resolving 'ports.ubuntu.com'
Ign:43 http://ports.ubuntu.com/ubuntu-ports xenial-security/main arm64 vim-common arm64 2:7.4.1689-3ubuntu1.2
Err:44 http://ports.ubuntu.com/ubuntu-ports xenial/main arm64 libcap-ng0 arm64 0.7.7-1
  Temporary failure resolving 'ports.ubuntu.com'
Err:45 http://ports.ubuntu.com/ubuntu-ports xenial-updates/main arm64 libdbus-1-3 arm64 1.10.6-1ubuntu3.3
  Temporary failure resolving 'ports.ubuntu.com'
Err:46 http://ports.ubuntu.com/ubuntu-ports xenial-updates/main arm64 dbus arm64 1.10.6-1ubuntu3.3
  Temporary failure resolving 'ports.ubuntu.com'
Err:47 http://ports.ubuntu.com/ubuntu-ports xenial-updates/main arm64 libglib2.0-0 arm64 2.48.2-0ubuntu1
  Temporary failure resolving 'ports.ubuntu.com'
Err:48 http://ports.ubuntu.com/ubuntu-ports xenial-updates/main arm64 libglib2.0-data all 2.48.2-0ubuntu1
  Temporary failure resolving 'ports.ubuntu.com'
Err:49 http://ports.ubuntu.com/ubuntu-ports xenial/main arm64 libicu55 arm64 55.1-7
  Temporary failure resolving 'ports.ubuntu.com'
Ign:50 http://ports.ubuntu.com/ubuntu-ports xenial-security/main arm64 libxml2 arm64 2.9.3+dfsg1-1ubuntu0.1
Err:51 http://ports.ubuntu.com/ubuntu-ports xenial/main arm64 manpages all 4.04-2
  Temporary failure resolving 'ports.ubuntu.com'
Err:52 http://ports.ubuntu.com/ubuntu-ports xenial-updates/main arm64 shared-mime-info arm64 1.5-2ubuntu0.1
  Temporary failure resolving 'ports.ubuntu.com'
Err:53 http://ports.ubuntu.com/ubuntu-ports xenial/main arm64 xdg-user-dirs arm64 0.15-2ubuntu6
  Temporary failure resolving 'ports.ubuntu.com'
Err:54 http://ports.ubuntu.com/ubuntu-ports xenial/main arm64 xml-core all 0.13+nmu2
  Temporary failure resolving 'ports.ubuntu.com'
Err:55 http://ports.ubuntu.com/ubuntu-ports xenial/main arm64 bluez arm64 5.37-0ubuntu5
  Temporary failure resolving 'ports.ubuntu.com'
Err:56 http://ports.ubuntu.com/ubuntu-ports xenial/main arm64 fbset arm64 2.1-28
  Temporary failure resolving 'ports.ubuntu.com'
Err:57 http://ports.ubuntu.com/ubuntu-ports xenial/main arm64 libbluetooth3 arm64 5.37-0ubuntu5
  Temporary failure resolving 'ports.ubuntu.com'
Err:58 http://ports.ubuntu.com/ubuntu-ports xenial-updates/main arm64 libc-dev-bin arm64 2.23-0ubuntu5
  Temporary failure resolving 'ports.ubuntu.com'
Ign:59 http://ports.ubuntu.com/ubuntu-ports xenial-security/main arm64 linux-libc-dev arm64 4.4.0-62.83
Err:60 http://ports.ubuntu.com/ubuntu-ports xenial-updates/main arm64 libc6-dev arm64 2.23-0ubuntu5
  Temporary failure resolving 'ports.ubuntu.com'
Ign:61 http://ports.ubuntu.com/ubuntu-ports xenial-security/main arm64 libpython3.5 arm64 3.5.2-2ubuntu0~16.04.1
Err:62 http://ports.ubuntu.com/ubuntu-ports xenial/main arm64 manpages-dev all 4.04-2
  Temporary failure resolving 'ports.ubuntu.com'
Err:63 http://ports.ubuntu.com/ubuntu-ports xenial/main arm64 rfkill arm64 0.5-1ubuntu3
  Temporary failure resolving 'ports.ubuntu.com'
Ign:64 http://ports.ubuntu.com/ubuntu-ports xenial-security/main arm64 vim-runtime all 2:7.4.1689-3ubuntu1.2
Ign:65 http://ports.ubuntu.com/ubuntu-ports xenial-security/main arm64 vim arm64 2:7.4.1689-3ubuntu1.2
Err:66 http://ports.ubuntu.com/ubuntu-ports xenial/main arm64 libbluetooth-dev arm64 5.37-0ubuntu5
  Temporary failure resolving 'ports.ubuntu.com'
Err:20 http://ports.ubuntu.com/ubuntu-ports xenial-security/main arm64 libnettle6 arm64 3.2-1ubuntu0.16.04.1
  Temporary failure resolving 'ports.ubuntu.com'
...
  Temporary failure resolving 'ports.ubuntu.com'
Err:65 http://ports.ubuntu.com/ubuntu-ports xenial-security/main arm64 vim arm64 2:7.4.1689-3ubuntu1.2
  Temporary failure resolving 'ports.ubuntu.com'
E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/l/linux-atm/libatm1_2.5.1-1.5_arm64.deb  Temporary failure resolving 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/libm/libmnl/libmnl0_1.0.3-5_arm64.deb  Temporary failure resolving 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/s/systemd/udev_229-4ubuntu16_arm64.deb  Temporary failure resolving 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/s/sgml-base/sgml-base_1.26+nmu4ubuntu1_all.deb  Temporary failure resolving 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/g/gpm/libgpm2_1.20.4-6.1_arm64.deb  Temporary failure resolving 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/b/busybox/busybox-initramfs_1.22.0-15ubuntu1_arm64.deb  Temporary failure resolving 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/c/cpio/cpio_2.11+dfsg-5ubuntu1_arm64.deb  Temporary failure resolving 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/f/file/libmagic1_5.25-2ubuntu1_arm64.deb  Temporary failure resolving 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/f/file/file_5.25-2ubuntu1_arm64.deb  Temporary failure resolving 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/i/iproute2/iproute2_4.3.0-1ubuntu3_arm64.deb  Temporary failure resolving 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/i/ifupdown/ifupdown_0.8.10ubuntu1.2_arm64.deb  Temporary failure resolving 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/i/initramfs-tools/initramfs-tools-bin_0.122ubuntu8.8_arm64.deb  Temporary failure resolving 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/k/klibc/libklibc_2.0.4-8ubuntu1.16.04.3_arm64.deb  Temporary failure resolving 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/k/klibc/klibc-utils_2.0.4-8ubuntu1.16.04.3_arm64.deb  Temporary failure resolving 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/k/kmod/kmod_22-1ubuntu4_arm64.deb  Temporary failure resolving 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/i/initramfs-tools/initramfs-tools-core_0.122ubuntu8.8_all.deb  Temporary failure resolving 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/l/linux-base/linux-base_4.0ubuntu1_all.deb  Temporary failure resolving 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/i/initramfs-tools/initramfs-tools_0.122ubuntu8.8_all.deb  Temporary failure resolving 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/g/gmp/libgmp10_6.1.0+dfsg-2_arm64.deb  Temporary failure resolving 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/n/nettle/libnettle6_3.2-1ubuntu0.16.04.1_arm64.deb  Temporary failure resolving 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/n/nettle/libhogweed4_3.2-1ubuntu0.16.04.1_arm64.deb  Temporary failure resolving 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/libi/libidn/libidn11_1.32-3ubuntu1.1_arm64.deb  Temporary failure resolving 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/libf/libffi/libffi6_3.2.1-4_arm64.deb  Temporary failure resolving 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/p/p11-kit/libp11-kit0_0.23.2-5~ubuntu16.04.1_arm64.deb  Temporary failure resolving 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/libt/libtasn1-6/libtasn1-6_4.7-3ubuntu0.16.04.1_arm64.deb  Temporary failure resolving 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/g/gnutls28/libgnutls30_3.4.10-4ubuntu1.2_arm64.deb  Temporary failure resolving 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/g/gnutls28/libgnutls-openssl27_3.4.10-4ubuntu1.2_arm64.deb  Temporary failure resolving 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/i/iputils/iputils-ping_20121221-5ubuntu2_arm64.deb  Temporary failure resolving 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/b/bind9/libisc-export160_9.10.3.dfsg.P4-8ubuntu1.4_arm64.deb  Temporary failure resolving 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/b/bind9/libdns-export162_9.10.3.dfsg.P4-8ubuntu1.4_arm64.deb  Temporary failure resolving 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/i/isc-dhcp/isc-dhcp-client_4.3.3-5ubuntu12.6_arm64.deb  Temporary failure resolving 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/i/isc-dhcp/isc-dhcp-common_4.3.3-5ubuntu12.6_arm64.deb  Temporary failure resolving 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/e/expat/libexpat1_2.1.0-7ubuntu0.16.04.2_arm64.deb  Temporary failure resolving 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/m/mpdecimal/libmpdec2_2.4.2-1_arm64.deb  Temporary failure resolving 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/o/openssl/libssl1.0.0_1.0.2g-1ubuntu4.6_arm64.deb  Temporary failure resolving 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/p/python3.5/libpython3.5-minimal_3.5.2-2ubuntu0~16.04.1_arm64.deb  Temporary failure resolving 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/m/mime-support/mime-support_3.59ubuntu1_all.deb  Temporary failure resolving 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/s/sqlite3/libsqlite3-0_3.11.0-1ubuntu1_arm64.deb  Temporary failure resolving 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/p/python3.5/libpython3.5-stdlib_3.5.2-2ubuntu0~16.04.1_arm64.deb  Temporary failure resolving 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/i/iptables/libxtables11_1.6.0-2ubuntu3_arm64.deb  Temporary failure resolving 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/n/net-tools/net-tools_1.60-26ubuntu1_arm64.deb  Temporary failure resolving 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/s/sudo/sudo_1.8.16-0ubuntu1.3_arm64.deb  Temporary failure resolving 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/v/vim/vim-common_7.4.1689-3ubuntu1.2_arm64.deb  Temporary failure resolving 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/libc/libcap-ng/libcap-ng0_0.7.7-1_arm64.deb  Temporary failure resolving 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/d/dbus/libdbus-1-3_1.10.6-1ubuntu3.3_arm64.deb  Temporary failure resolving 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/d/dbus/dbus_1.10.6-1ubuntu3.3_arm64.deb  Temporary failure resolving 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/g/glib2.0/libglib2.0-0_2.48.2-0ubuntu1_arm64.deb  Temporary failure resolving 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/g/glib2.0/libglib2.0-data_2.48.2-0ubuntu1_all.deb  Temporary failure resolving 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/i/icu/libicu55_55.1-7_arm64.deb  Temporary failure resolving 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/libx/libxml2/libxml2_2.9.3+dfsg1-1ubuntu0.1_arm64.deb  Temporary failure resolving 'ports.ubuntu.com'

 E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/g/glibc/libc-dev-bin_2.23-0ubuntu5_arm64.deb  Temporary failure resolving 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/l/linux/linux-libc-dev_4.4.0-62.83_arm64.deb  Temporary failure resolving 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/g/glibc/libc6-dev_2.23-0ubuntu5_arm64.deb  Temporary failure resolving 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/p/python3.5/libpython3.5_3.5.2-2ubuntu0~16.04.1_arm64.deb  Temporary failure resolving 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/m/manpages/manpages-dev_4.04-2_all.deb  Temporary failure resolving 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/r/rfkill/rfkill_0.5-1ubuntu3_arm64.deb  Temporary failure resolving 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/v/vim/vim-runtime_7.4.1689-3ubuntu1.2_all.deb  Temporary failure resolving 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/v/vim/vim_7.4.1689-3ubuntu1.2_arm64.deb  Temporary failure resolving 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/b/bluez/libbluetooth-dev_5.37-0ubuntu5_arm64.deb  Temporary failure resolving 'ports.ubuntu.com'

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
Err:1 http://ports.ubuntu.com/ubuntu-ports xenial InRelease
  Temporary failure resolving 'ports.ubuntu.com'
Err:2 http://ports.ubuntu.com/ubuntu-ports xenial-updates InRelease
  Temporary failure resolving 'ports.ubuntu.com'
Err:3 http://ports.ubuntu.com/ubuntu-ports xenial-backports InRelease
  Temporary failure resolving 'ports.ubuntu.com'
Err:4 http://ports.ubuntu.com/ubuntu-ports xenial-security InRelease
  Temporary failure resolving 'ports.ubuntu.com'
Reading package lists...
W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/xenial/InRelease  Temporary failure resolving 'ports.ubuntu.com'
W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/xenial-updates/InRelease  Temporary failure resolving 'ports.ubuntu.com'
W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/xenial-backports/InRelease  Temporary failure resolving 'ports.ubuntu.com'
W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/xenial-security/InRelease  Temporary failure resolving 'ports.ubuntu.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package libc6:armhf
Reading package lists...
Building dependency tree...
Reading state information...
Package cgroup-lite is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Unable to locate package aufs-tools
E: Package 'cgroup-lite' has no installation candidate
E: Unable to locate package docker.io
E: Couldn't find any package by glob 'docker.io'
E: Couldn't find any package by regex 'docker.io'
usermod: group 'docker' does not exist
/usr/local/bin/mkimage: Can't open /boot/initrd.img: No such file or directory
Image Name:   linux-4.9
Created:      Sun Nov  5 01:51:15 2017
Image Type:   AArch64 Linux Kernel Image (uncompressed)
Data Size:    17920512 Bytes = 17500.50 kB = 17.09 MB
Load Address: 01080000
Entry Point:  01080000
qemu: Unsupported syscall: 278
Created symlink /etc/systemd/system/multi-user.target.wants/bluetooth-khadas.service, pointing to /lib/systemd/system/bluetooth-khadas.service.

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

cp: cannot stat 'rootfs/boot/initrd.img': No such file or directory
error: could not load ramdisk 'images/initrd.img'
rm: cannot remove 'rootfs/boot/initrd.img': No such file or directory
Packing update image using config: package.conf
[Msg]Pack Item[USB         ,              DDR] from (images/upgrade/u-boot.bin.usb.bl2),[ERR]f(AmlImagePack.cpp)L1332:failed to open source file : images/upgrade/u-boot.bin.usb.bl2 
Image pack FAILED

Log complete in pastebin:
https://pastebin.com/P9Cn0QRW

Thanks!


#9

Hi,
I think you have to update runme.sh script and add usage of google dns for example 8.8.8.8. You can search in the forum for that.

Regards,


#10

Hi @Venso,

Thanks, I used RUNME.sh to configure DNS and the apt-get part worked, but there are other errors that happen …

Full execution log:
https://pastebin.com/3mny7WwX

Excerpts with errors:

In file included from uart.c:23:0:
/usr/lib/gcc/arm-none-eabi/4.9.3/include/stdint.h:9:26: fatal error: stdint.h: No such file or directory
 # include_next <stdint.h>
                          ^
compilation terminated.
Makefile:87: recipe for target '/root/project/fenix/u-boot/build/scp_task/uart.o' failed
make[3]: *** [/root/project/fenix/u-boot/build/scp_task/uart.o] Error 1
make[3]: *** Waiting for unfinished jobs....
/root/project/fenix/u-boot/Makefile:903: recipe for target '/root/project/fenix/u-boot/build/scp_task/bl301.bin' failed
make[2]: *** [/root/project/fenix/u-boot/build/scp_task/bl301.bin] Error 2
make[2]: *** Waiting for unfinished jobs....
  UPD     include/config/uboot.release
Makefile:147: recipe for target 'sub-make' failed
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory '/root/project/fenix/u-boot'

another:

Allocating group tables: 0/8   done                            
Writing inode tables: 0/8   done                            
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: 0/8   done

make: Entering directory '/root/project/fenix/linux'
arch/arm64/Makefile:23: ld does not support --fix-cortex-a53-843419; kernel may be susceptible to erratum
./scripts/gcc-version.sh: line 25: aarch64-linux-gnu-gcc: command not found
./scripts/gcc-version.sh: line 26: aarch64-linux-gnu-gcc: command not found
make: aarch64-linux-gnu-gcc: Command not found
make: aarch64-linux-gnu-gcc: Command not found
  INSTALL drivers/gpu/arm/mali/mali.ko
  INSTALL drivers/media/usb/gspca/gspca_main.ko
  INSTALL drivers/net/wireless/bcmdhd/dhd.ko
  INSTALL fs/aufs/aufs.ko
  INSTALL fs/efivarfs/efivarfs.ko
make: aarch64-linux-gnu-gcc: Command not found
  DEPMOD  4.9.40
make: Leaving directory '/root/project/fenix/linux'

NOTE: YOU ARE NOW IN THE VIRTUAL TARGET, SETUP ANYTHING YOU WANT.
      TYPE 'exit' TO CONTINUE IF FINISHED.

another…

Running in chroot, ignoring request.
 * Reloading system message bus config...       e[80G Failed to open connection to "system" message bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
invoke-rc.d: initscript dbus, action "force-reload" failed.
Running in chroot, ignoring request.

another…

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

umount: /root/project/fenix/rootfs/sys: target is busy
        (In some cases useful info about processes that
         use the device is found by lsof(8) or fuser(1).)
umount: /root/project/fenix/rootfs: target is busy
        (In some cases useful info about processes that
         use the device is found by lsof(8) or fuser(1).)
Packing update image using config: package.conf
[Msg]Pack Item[USB         ,              DDR] from (images/upgrade/u-boot.bin.usb.bl2),[ERR]f(AmlImagePack.cpp)L1332:failed to open source file : images/upgrade/u-boot.bin.usb.bl2 
Image pack FAILED

I tried to separate the sections above with some errors, but there are other excerpts in the complete log that I can not interpret if they are errors or not …

Thanks :wink:


#11

Hi luchina,

Can you execute the following commands?

nick@Server:~/project/khadas/ubuntu/u-boot$ arm-none-eabi-gcc -v
Using built-in specs.
COLLECT_GCC=arm-none-eabi-gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-none-eabi/4.8.2/lto-wrapper
Target: arm-none-eabi
Configured with: ../gcc-4.8.2/configure --build=x86_64-linux-gnu --prefix=/usr --includedir='/usr/lib/include' --mandir='/usr/lib/share/man' --infodir='/usr/lib/share/info' --sysconfdir=/etc --localstatedir=/var --libexecdir='/usr/lib/lib/gcc-arm-none-eabi' --disable-maintainer-mode --disable-dependency-tracking --enable-languages=c,c++ --prefix=/usr/lib --infodir=/usr/share/doc/gcc-arm-none-eabi/info --mandir=/usr/share/man --htmldir=/usr/share/doc/gcc-arm-none-eabi/html --pdfdir=/usr/share/doc/gcc-arm-none-eabi/pdf --bindir=/usr/bin --libexecdir=/usr/lib --libdir=/usr/lib --with-system-zlib --enable-multilib --disable-decimal-float --disable-libffi --disable-libgomp --disable-libmudflap --disable-libquadmath --disable-libssp --disable-libstdcxx-pch --disable-libstdc++-v3 --disable-nls --disable-shared --disable-threads --disable-tls --disable-plugin --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=arm-none-eabi --with-gnu-as --with-gnu-ld --with-headers=no --without-newlib --with-pkgversion=4.8.2-14ubuntu1+6 --without-included-gettext --with-multilib-list=armv6-m,armv7-m,armv7e-m,armv7-r CFLAGS='-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat' CPPFLAGS=-D_FORTIFY_SOURCE=2 CXXFLAGS='-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat' FFLAGS='-g -O2' LDFLAGS=-Wl,-z,relro AR_FOR_TARGET=arm-none-eabi-ar AS_FOR_TARGET=arm-none-eabi-as LD_FOR_TARGET=arm-none-eabi-ld NM_FOR_TARGET=arm-none-eabi-nm OBJDUMP_FOR_TARGET=arm-none-eabi-objdump RANLIB_FOR_TARGET=arm-none-eabi-ranlib READELF_FOR_TARGET=arm-none-eabi-readelf STRIP_FOR_TARGET=arm-none-eabi-strip
Thread model: single
gcc version 4.8.2 (4.8.2-14ubuntu1+6) 
nick@Server:~/project/khadas/ubuntu/u-boot$ aarch64-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=aarch64-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc-cross/aarch64-linux-gnu/4.8/lto-wrapper
Target: aarch64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.8.4-2ubuntu1~14.04.1' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/aarch64-linux-gnu/include/c++/4.8.4 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap --disable-libsanitizer --disable-libquadmath --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-arm64-cross/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-arm64-cross --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-arm64-cross --with-arch-directory=arm64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libgcj --enable-multiarch --disable-werror --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=aarch64-linux-gnu --program-prefix=aarch64-linux-gnu- --includedir=/usr/aarch64-linux-gnu/include
Thread model: posix
gcc version 4.8.4 (Ubuntu/Linaro 4.8.4-2ubuntu1~14.04.1) 


#12

Hi @numbqq,

Following are the results:

root@khadas:~/project/fenix# arm-none-eabi-gcc -v
Using built-in specs.
COLLECT_GCC=arm-none-eabi-gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-none-eabi/4.9.3/lto-wrapper
Target: arm-none-eabi
Configured with: ../src/configure --build=x86_64-linux-gnu --prefix=/usr --includedir='/usr/lib/include' --mandir='/usr/lib/share/man' --infodir='/usr/lib/share/info' --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir='/usr/lib/lib/x86_64-linux-gnu' --libexecdir='/usr/lib/lib/x86_64-linux-gnu' --disable-maintainer-mode --disable-dependency-tracking --mandir=/usr/share/man --enable-languages=c,c++,lto --enable-multilib --disable-decimal-float --disable-libffi --disable-libgomp --disable-libmudflap --disable-libquadmath --disable-libssp --disable-libstdcxx-pch --disable-nls --disable-shared --disable-threads --disable-tls --build=x86_64-linux-gnu --target=arm-none-eabi --with-system-zlib --with-gnu-as --with-gnu-ld --with-pkgversion=15:4.9.3+svn231177-1 --without-included-gettext --prefix=/usr/lib --infodir=/usr/share/doc/gcc-arm-none-eabi/info --htmldir=/usr/share/doc/gcc-arm-none-eabi/html --pdfdir=/usr/share/doc/gcc-arm-none-eabi/pdf --bindir=/usr/bin --libexecdir=/usr/lib --libdir=/usr/lib --disable-libstdc++-v3 --host=x86_64-linux-gnu --with-headers=no --without-newlib --with-multilib-list=armv6-m,armv7-m,armv7e-m,armv7-r CFLAGS='-g -O2 -fstack-protector-strong' CPPFLAGS=-D_FORTIFY_SOURCE=2 CXXFLAGS='-g -O2 -fstack-protector-strong' FCFLAGS='-g -O2 -fstack-protector-strong' FFLAGS='-g -O2 -fstack-protector-strong' GCJFLAGS='-g -O2 -fstack-protector-strong' LDFLAGS='-Wl,-Bsymbolic-functions -Wl,-z,relro' OBJCFLAGS='-g -O2 -fstack-protector-strong' OBJCXXFLAGS='-g -O2 -fstack-protector-strong' INHIBIT_LIBC_CFLAGS=-DUSE_TM_CLONE_REGISTRY=0 AR_FOR_TARGET=arm-none-eabi-ar AS_FOR_TARGET=arm-none-eabi-as LD_FOR_TARGET=arm-none-eabi-ld NM_FOR_TARGET=arm-none-eabi-nm OBJDUMP_FOR_TARGET=arm-none-eabi-objdump RANLIB_FOR_TARGET=arm-none-eabi-ranlib READELF_FOR_TARGET=arm-none-eabi-readelf STRIP_FOR_TARGET=arm-none-eabi-strip
Thread model: single
gcc version 4.9.3 20150529 (prerelease) (15:4.9.3+svn231177-1)

other result:

root@khadas:~/project/fenix# aarch64-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=aarch64-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/opt/toolchains/gcc-linaro-aarch64-linux-gnu-4.9-2014.09_linux/bin/../libexec/gcc/aarch64-linux-gnu/4.9.2/lto-wrapper
Target: aarch64-linux-gnu
Configured with: /cbuild/slaves/oorts/crosstool-ng/builds/aarch64-linux-gnu-linux/.build/src/gcc-linaro-4.9-2014.09/configure --build=i686-build_pc-linux-gnu --host=i686-build_pc-linux-gnu --target=aarch64-linux-gnu --prefix=/cbuild/slaves/oorts/crosstool-ng/builds/aarch64-linux-gnu-linux/install --with-sysroot=/cbuild/slaves/oorts/crosstool-ng/builds/aarch64-linux-gnu-linux/install/aarch64-linux-gnu/libc --enable-languages=c,c++,fortran --disable-multilib --enable-multiarch --with-arch=armv8-a --with-pkgversion='crosstool-NG linaro-1.13.1-4.9-2014.09 - Linaro GCC 4.9-2014.09' --with-bugurl=https://bugs.launchpad.net/gcc-linaro --enable-__cxa_atexit --disable-libmudflap --enable-libgomp --disable-libssp --with-gmp=/cbuild/slaves/oorts/crosstool-ng/builds/aarch64-linux-gnu-linux/.build/aarch64-linux-gnu/build/static --with-mpfr=/cbuild/slaves/oorts/crosstool-ng/builds/aarch64-linux-gnu-linux/.build/aarch64-linux-gnu/build/static --with-mpc=/cbuild/slaves/oorts/crosstool-ng/builds/aarch64-linux-gnu-linux/.build/aarch64-linux-gnu/build/static --with-isl=/cbuild/slaves/oorts/crosstool-ng/builds/aarch64-linux-gnu-linux/.build/aarch64-linux-gnu/build/static --with-cloog=/cbuild/slaves/oorts/crosstool-ng/builds/aarch64-linux-gnu-linux/.build/aarch64-linux-gnu/build/static --with-libelf=/cbuild/slaves/oorts/crosstool-ng/builds/aarch64-linux-gnu-linux/.build/aarch64-linux-gnu/build/static --enable-threads=posix --disable-libstdcxx-pch --enable-linker-build-id --enable-plugin --with-local-prefix=/cbuild/slaves/oorts/crosstool-ng/builds/aarch64-linux-gnu-linux/install/aarch64-linux-gnu/libc --enable-c99 --enable-long-long
Thread model: posix
gcc version 4.9.2 20140904 (prerelease) (crosstool-NG linaro-1.13.1-4.9-2014.09 - Linaro GCC 4.9-2014.09)

For information, I’m using “Ubuntu 16.04 x64” from a clean install.

Thanks :wink:


#13

Hi luchina,

So can you build now?


#14

Hi @numbqq,

I ran the tests but an error occurred again.

Log of execution:
https://pastebin.com/E8VJrjbd

There are several errors during execution, below some:

In file included from uart.c:23:0:
/usr/lib/gcc/arm-none-eabi/4.9.3/include/stdint.h:9:26: fatal error: stdint.h: No such file or directory
 # include_next <stdint.h>
                          ^
compilation terminated.
Makefile:87: recipe for target '/root/project/fenix/u-boot/build/scp_task/uart.o' failed
make[3]: *** [/root/project/fenix/u-boot/build/scp_task/uart.o] Error 1
make[3]: *** Waiting for unfinished jobs....
/root/project/fenix/u-boot/Makefile:903: recipe for target '/root/project/fenix/u-boot/build/scp_task/bl301.bin' failed
make[2]: *** [/root/project/fenix/u-boot/build/scp_task/bl301.bin] Error 2
make[2]: *** Waiting for unfinished jobs....
  UPD     include/config/uboot.release
Makefile:147: recipe for target 'sub-make' failed
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory '/root/project/fenix/u-boot'

another…

make: Entering directory '/root/project/fenix/linux'
arch/arm64/Makefile:23: ld does not support --fix-cortex-a53-843419; kernel may be susceptible to erratum
./scripts/gcc-version.sh: line 25: aarch64-linux-gnu-gcc: command not found
./scripts/gcc-version.sh: line 26: aarch64-linux-gnu-gcc: command not found
make: aarch64-linux-gnu-gcc: Command not found
make: aarch64-linux-gnu-gcc: Command not found
  INSTALL drivers/gpu/arm/mali/mali.ko
  INSTALL fs/aufs/aufs.ko
  INSTALL drivers/media/usb/gspca/gspca_main.ko
  INSTALL drivers/net/wireless/bcmdhd/dhd.ko
  INSTALL fs/efivarfs/efivarfs.ko
make: aarch64-linux-gnu-gcc: Command not found
  DEPMOD  4.9.40
make: Leaving directory '/root/project/fenix/linux'

NOTE: YOU ARE NOW IN THE VIRTUAL TARGET, SETUP ANYTHING YOU WANT.
      TYPE 'exit' TO CONTINUE IF FINISHED.

another…

qemu: Unsupported syscall: 278
Created symlink /etc/systemd/system/multi-user.target.wants/bluetooth-khadas.service, pointing to /lib/systemd/system/bluetooth-khadas.service.

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

umount: /root/project/fenix/rootfs/sys: target is busy
        (In some cases useful info about processes that
         use the device is found by lsof(8) or fuser(1).)
umount: /root/project/fenix/rootfs: target is busy
        (In some cases useful info about processes that
         use the device is found by lsof(8) or fuser(1).)
Packing update image using config: package.conf
[Msg]Pack Item[USB         ,              DDR] from (images/upgrade/u-boot.bin.usb.bl2),[ERR]f(AmlImagePack.cpp)L1332:failed to open source file : images/upgrade/u-boot.bin.usb.bl2 
Image pack FAILED

Thanks :wink:


#15

Hi luchina,

It’s strange that you have build kernel successfully, but failed when install modules with error aarch64-linux-gnu-gcc: Command not found. I have no idea yet, can you try other host PC? :disappointed_relieved:


#16

Hi @numbqq,

Yeah, really weird! :frowning:

I have tried another host pc, but it has not been successful.
I’ve tried using host pc other versions of Ubuntu, like 14 and 17, but both of them have the same error.

Currently I use a VM on the site vultr.com (it costs a few cents :smiley:), because they do deploy in less than 60 seconds, so all the tests I do, is always from a clean installation of ubuntu 16.0.4.

This ‘aarch64-linux-gnu-gcc’ error looks like it happens inside the chroot, does not it?
Another thing, did you notice that u-boot also does not complete the compilation?

For now this is it, if you want, I can create a VM in VULTR for you to access and test, it will make it available in a few minutes with a clean installation.

Thanks


#17

Hi @luchina,

Of course, I will try o find out why, thank you!:wink:


#18

Hi @luchina,

Some packages are missing, try to install them.

$ sudo apt-get install zlib1g:i386
$ sudo apt-get install libnewlib-arm-none-eabi
$ sudo apt-get install python
$ sudo apt-get install bc
$ sudo apt-get install gcc-aarch64-linux-gnu

Good Luck!


#19

Hi @numbqq,

A million thanks, it worked right!


#20

@numbqq

Are these messages normal?

Preparing to unpack .../libc6_2.23-0ubuntu9_arm64.deb ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/aarch64-linux-gnu/perl/5.22.1 /usr/local/share/perl/5.22.1 /usr/lib/aarch64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/aarch64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/aarch64-linux-gnu/perl-base .) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype
Unpacking libc6:arm64 (2.23-0ubuntu9) over (2.23-0ubuntu5) ...
Setting up libc6:arm64 (2.23-0ubuntu9) ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/aarch64-linux-gnu/perl/5.22.1 /usr/local/share/perl/5.22.1 /usr/lib/aarch64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/aarch64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/aarch64-linux-gnu/perl-base .) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype
Processing triggers for libc-bin (2.23-0ubuntu5) ...

another…

Preparing to unpack .../makedev_2.3.1-93ubuntu2~ubuntu16.04.1_all.deb ...
Unpacking makedev (2.3.1-93ubuntu2~ubuntu16.04.1) over (2.3.1-93ubuntu1) ...
Setting up locales (2.23-0ubuntu9) ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/aarch64-linux-gnu/perl/5.22.1 /usr/local/share/perl/5.22.1 /usr/lib/aarch64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/aarch64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/aarch64-linux-gnu/perl-base .) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype
Generating locales (this might take a while)...

another…

Setting up libssl1.0.0:arm64 (1.0.2g-1ubuntu4.9) ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/aarch64-linux-gnu/perl/5.22.1 /usr/local/share/perl/5.22.1 /usr/lib/aarch64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/aarch64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/aarch64-linux-gnu/perl-base .) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype

another…

Running in chroot, ignoring request.
 * Reloading system message bus config...       e[80G Failed to open connection to "system" message bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
invoke-rc.d: initscript dbus, action "force-reload" failed.

another…

Preparing to unpack .../libc6_2.23-0ubuntu9_armhf.deb ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/aarch64-linux-gnu/perl/5.22.1 /usr/local/share/perl/5.22.1 /usr/lib/aarch64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/aarch64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/aarch64-linux-gnu/perl-base .) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype
Unpacking libc6:armhf (2.23-0ubuntu9) ...
Processing triggers for libc-bin (2.23-0ubuntu9) ...
Setting up gcc-6-base:armhf (6.0.1-0ubuntu1) ...
Setting up libgcc1:armhf (1:6.0.1-0ubuntu1) ...
Setting up libc6:armhf (2.23-0ubuntu9) ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/aarch64-linux-gnu/perl/5.22.1 /usr/local/share/perl/5.22.1 /usr/lib/aarch64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/aarch64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/aarch64-linux-gnu/perl-base .) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype

another…

update-initramfs: deferring update (trigger activated)
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults

another…

Setting up less (481-2.1ubuntu0.2) ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
debconf: falling back to frontend: Readline
Setting up libbsd0:arm64 (0.8.2-1) ...
Setting up netbase (5.3) ...
Setting up libapparmor-perl (2.10.95-0ubuntu2.7) ...
Setting up busybox-static (1:1.22.0-15ubuntu1) ...
Setting up openssl (1.0.2g-1ubuntu4.9) ...
Setting up ca-certificates (20170717~16.04.1) ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
debconf: falling back to frontend: Readline

another…

debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
debconf: falling back to frontend: Readline

another…

Setting up libpam-cgfs (2.0.7-0ubuntu1~16.04.2) ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
debconf: falling back to frontend: Readline

another…

running python rtupdate hooks for python3.5...
qemu: Unsupported syscall: 278
qemu: Unsupported syscall: 278
qemu: Unsupported syscall: 278
running python post-rtupdate hooks for python3.5...
qemu: Unsupported syscall: 278
qemu: Unsupported syscall: 278
Setting up lsb-release (9.20160110ubuntu0.2) ...
Setting up apparmor (2.10.95-0ubuntu2.7) ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
debconf: falling back to frontend: Readline
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
/usr/bin/diff: /var/lib/apparmor/profiles/.apparmor.md5sums: No such file or directory
Setting up plymouth-theme-ubuntu-text (0.9.2-3ubuntu13.2) ...
qemu: Unsupported syscall: 278
update-alternatives: using /usr/share/plymouth/themes/ubuntu-text/ubuntu-text.plymouth to provide /usr/share/plymouth/themes/text.plymouth (text.plymouth) in auto mode

another…

Image Type:   AArch64 Linux Kernel Image (uncompressed)
Data Size:    18051584 Bytes = 17628.50 kB = 17.22 MB
Load Address: 01080000
Entry Point:  01080000
qemu: Unsupported syscall: 278
Created symlink /etc/systemd/system/multi-user.target.wants/bluetooth-khadas.service, pointing to /lib/systemd/system/bluetooth-khadas.service.

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

umount: /root/project/fenix/rootfs/sys: target is busy
        (In some cases useful info about processes that
         use the device is found by lsof(8) or fuser(1).)
umount: /root/project/fenix/rootfs: target is busy
        (In some cases useful info about processes that
         use the device is found by lsof(8) or fuser(1).)
Packing update image using config: package.conf

Finally, ‘make’ successfully completed and generated the image update.img that I will test shortly, but I was doubtful in these messages above.

Once again, thank you for your help!