Coder Social home page Coder Social logo

khadas / fenix Goto Github PK

View Code? Open in Web Editor NEW
203.0 13.0 132.0 297.58 MB

One-stop script set to build Ubuntu/Debian images

License: GNU General Public License v2.0

Makefile 9.41% Shell 79.04% C 7.90% Batchfile 2.97% Dockerfile 0.26% C++ 0.43%
build-tools ubuntu debian arm64v8 kernel distribution amlogic rockchip kodi

fenix's Introduction

Build Download

Fenix script set to build Ubuntu/Debian images

Documentation Licence Version PRs Welcome

Supported build host:

  • Ubuntu 22.04 Jammy x64
    • Building Ubuntu 20.04 Focal image
    • Building Ubuntu 22.04 Jammy image
    • Building Debian 10 Buster image
    • Building Debian 11 Bullseye image
  • Docker

How to use

Install essential packages

$ sudo apt-get install git make lsb-release qemu-user-static

Clone Fenix repository

$ mkdir -p ~/project/khadas
$ cd ~/project/khadas
$ git clone --depth 1 https://github.com/khadas/fenix
$ cd fenix

Setup build environment

  • Setup environment manually.
$ source env/setenv.sh
  • Or you can load environment configuration from file.
$ source env/setenv.sh config config-template.conf

You need to edit config-template.conf file to correct variables.

Build image

$ make

For Chinese users, it's better to use mirror from China:

$ DOWNLOAD_MIRROR=china make

Somethings with Redhat series

Disable SELinux

$ vim /etc/selinux/config
$ SELINUX=enforcing --> SELINUX=disabled
$ sudo reboot

Build in Docker

Get Docker image

$ cd fenix
$ docker pull numbqq/fenix:latest

Build image in Docker

Run fenix in docker.

$ docker run -it --name fenix -v $(pwd):/home/khadas/fenix \
             -v /etc/localtime:/etc/localtime:ro \
             -v /etc/timezone:/etc/timezone:ro \
             -v $HOME/.ccache:/home/khadas/.ccache --privileged \
             --device=/dev/loop-control:/dev/loop-control \
             --device=/dev/loop0:/dev/loop0 --cap-add SYS_ADMIN \
             numbqq/fenix

We are in Docker container now, start to build.

khadas@919cab43f66d:~/fenix$ source env/setenv.sh
khadas@919cab43f66d:~/fenix$ make

For Chinese users, it's better to use mirror from China:

khadas@919cab43f66d:~/fenix$ DOWNLOAD_MIRROR=china make

To restart the Docker container a second time.

$ docker start fenix
$ docker exec -ti fenix bash

fenix's People

Contributors

150balbes avatar davorvr avatar gouwa avatar hyphop avatar ivanivanivanivanivanivan avatar jacobzang avatar jeanlego avatar numbqq avatar qqnumb avatar raffaellod avatar siyu6974 avatar terry2droid avatar tutorgaming avatar viraniac avatar yan-wyb avatar zhangn1985 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fenix's Issues

VIM3 is missing?

Options for the build are Edge, VIM1 and VIM2. Will VIM3 be added?

[VIM3] Debian / ubuntu mainline build failed

Hello,

I'm trying to build a new image with the latest fenix (0.8.4) for both ubuntu (focal) or Debian (10) with mainline uboot, mainline kernel and server mode.
These 2 builds fail with this message:

make[1]: Leaving directory '/home/khadas/fenix/build/linux-mainline-5.6'
Info: Building debs...
Info: Building package: linux-u-boot-vim3-mainline
dpkg-deb: error: parsing file '/home/khadas/fenix/build/images/.tmp/linux-u-boot-vim3-mainline_0.8.4-_arm64/DEBIAN/control' near line 2 package 'linux-u-boot-vim3-mainline':
'Version' field value '0.8.4-': revision number is empty
make: *** [Makefile:7: all] Error 2

Any ideas to fix this ?
Thank you.
Regards,

Possible bug in docker image building

Hello,
My name is Yury Savitskiy I just started to use NPU SDK for VIM3.
I tried to build VIM3 image inside docker as it is described in https://docs.khadas.com/vim3/FenixScript.html. But I got error:

...
Extracting 'opencv3-d6bf3f8647acf00cad479220e9b940290214fa80.tar.gz' to '/home/khadas/fenix/build'...
./scripts/create_image.sh:108 Warning: This script requires root privileges, trying to use sudo, please enter your passowrd!
Info: Preparing rootfs for VIM3-bionic
Info: Creating new rootfs for bionic
Info: Installing base system - Stage 1/2
/usr/sbin/debootstrap: 1455: /usr/sbin/debootstrap: cannot create /home/khadas/fenix/build/images/.tmp/rootfs-VIM3-bionic-server/test-dev-null: Permission denied
E: Cannot install into target '/home/khadas/fenix/build/images/.tmp/rootfs-VIM3-bionic-server' mounted with noexec or nodev
Cleanup...
Makefile:7: recipe for target 'all' failed
make: *** [all] Error 1

I tried to run docker with sudo and tried to run sudo su inside container but it did not solve the problem. I was not able to write login/password after string:

./scripts/create_image.sh:108 Warning: This script requires root privileges, trying to use sudo, please enter your password!

I was able to build VIM3 image in virtual machine Ubuntu 18.04 and use it for inception_v3 example building.

May be there is some problem in docker image building or in documentation?

My system is Ubuntu 16.04 and I made all steps exactly as in https://docs.khadas.com/vim3/FenixScript.html.

Ubuntu xenial build failed

qemu: Unsupported syscall: 267
/bin/sync: error syncing '/boot/initrd.img-4.20.3': Function not implemented
dpkg: error processing package initramfs-tools (--install):
subprocess installed post-installation script returned error exit status 1
Processing triggers for systemd (229-4ubuntu21.15) ...
Processing triggers for ureadahead (0.100.0-19) ...
Errors were encountered while processing:
initramfs-tools
Cleanup...
Makefile:7: recipe for target 'all' failed
make: *** [all] Error 1

khadas mcu&fun driver issues.

Hi, nick

after build failed with edge/R3399 kernel config, I start to read the drivers.
the driver directly extern some functions from meson-thermal driver, make them build failed with edge kernel config.

it looks like implement 2 major function: system control (USB3/PCIE switch, MCU rest), and fun control.
I guess it should be implemented as MFD with 2 sub-functions: sysfs system control driver, fun control driver (could it use cooling framework? make it more generic to fit it to edge, or future devices)

some questions:

1, for uboot code:

        "storeboot="\
            "cfgload;"\
            "ext4load mmc 1:5 1080000 zImage;ext4load mmc 1:5 10000000 uInitrd;ext4load mmc 1:5 20000000 dtb.img;booti 1080000 10000000 20000000;"\
            "run update;"\
            "\0"\

I guess this is for normal Android boot, but mmc 1:5 looks like sdcard partition 5? if it right, cfgload will load valid boot command for Android.
so this code means this logic.
if NOT Andoid boot; then try boot OS in sdcard, otherwise try update.
how does boot.ini look like?

2: uboot code:

        "recovery_from_sdcard="\
            "setenv bootargs ${bootargs} aml_dt=${aml_dt} recovery_part={recovery_part} recovery_offset={recovery_offset};"\
            "if fatload mmc 0 ${loadaddr} aml_autoscript; then autoscr ${loadaddr}; fi;"\
            "if fatload mmc 0 ${loadaddr} recovery.img; then "\
                    "if fatload mmc 0 ${dtb_mem_addr} dtb.img; then echo sd dtb.img loaded; fi;"\
                    "wipeisb; "\
                    "bootm ${loadaddr};fi;"\
            "\0"\

when reboot to update mode, aml_autocsript will be put into internal emmc fat partition, u-boot will run this script. if this script contain boot command for OS in sdcard, it will boot to it. right?
is ther any example for aml_autocsript?

discuss on gpu package build

Replaces: libegl1-mesa, libegl1, libgles2

1, for Debian no package libegl1
2, for Debian libgles2 is virtual package
3, suggest to use Conflicts, Provides with Replaces

		Replaces: libegl1-mesa, libgles2, aml-mali-905
		Provides: libegl1-mesa, libgles2, aml-mali-905
                Conflicts: libegl1-mesa, libgles2, aml-mali-905

Cannot Build Debian Stretch

I attempted a couple of times to build an image for Debian and was receiving an error. I instead built for Ubuntu and everything was fine. I was attempting to do the build via docker. The error I received was:

Info: Building WiringPi packages...
Info: Building Kodi packages...
cp: cannot stat 'stretch/arm64/*.deb': No such file or directory
Makefile:7: recipe for target 'all' failed
make: *** [all] Error 1

Below are the bits from setenv:

#VERSION: 0.7

#KHADAS_BOARD=VIM3
#VENDOR=Amlogic
#CHIP=A311D
#LINUX=4.9
#UBOOT=2015.01
#DISTRIBUTION=Debian
#DISTRIB_RELEASE=stretch
#DISTRIB_TYPE=lxde
#DISTRIB_ARCH=arm64
#INSTALL_TYPE=EMMC

debian build fail - need fix paths

...
make[1]: Leaving directory '/mnt/temp/khadas/fenix/build/linux-mainline-5.5-rc2'
Info: Building debs...
cp: cannot stat '/mnt/temp/khadas/fenix/linux/arch/arm64/boot/dts/amlogic/meson-g12b-a311d-khadas-vim3.dtb': No such file or directory
Makefile:7: recipe for target 'all' failed
make: *** [all] Error 1

my temporary solution

master@peace:/mnt/temp/khadas/fenix$ ln -s build/linux-mainline-5.5-rc2 linux

Wrong MODULE_DEVICE_TABLE entry for mcu_dt_ids

Found this when compiling linux 5.5.5.

`
--- ./drivers/misc/khadas-mcu.c.orig 2020-02-23 23:40:03.537604496 -0700
+++ ./drivers/misc/khadas-mcu.c 2020-02-23 23:41:12.509383947 -0700
@@ -697,7 +697,7 @@ static struct of_device_id mcu_dt_ids[]
{ .compatible = "khadas-mcu" },
{},
};
-MODULE_DEVICE_TABLE(i2c, mcu_dt_ids);
+MODULE_DEVICE_TABLE(of, mcu_dt_ids);

struct i2c_driver mcu_driver = {
.driver = {
`

u-boot seems to do a clean build every time

This makes it hard to iterate.

Steps:

  1. run "make". Let it get through building uboot, but fail somewhere later.
  2. edit the makefiles to try to fix the problem.
  3. run "make" again.

EXPECTED: Since u-boot built successfully, nothing should be done
ACTUAL: u-boot is rebuilt from scratch.

patches for sun4i?

just check patches for kernel 5.0.4, I find 2 patches:

0057-ASoC-sun4i-i2s-multichannel-updates.patch
0058-ASoC-sun4i-i2s-multichannel-updates-fixes.patch

are they really needed?

and for 0079-arm64-dts-VIM1-add-bluetooth-node.patch is merged to 4.20?

[Request] Build on Linux Mint

Can you make this to run on Linux Mint (an Ubutu Core distro); right now I have to use a docker session to build with, since I don't use Ubuntu, but instead use Linux Mint.

bug with sudo

https://bugs.launchpad.net/ubuntu/+source/sudo/+bug/1823202

╭─rkm@Khadas ~
╰─➤ sudo -s
[oh-my-zsh] Insecure completion-dependent directories detected:
drwxr-xr-x 11 rkm rkm 4096 Mar 30 19:19 /home/rkm/.oh-my-zsh
drwxr-xr-x 266 rkm rkm 12288 Mar 30 19:19 /home/rkm/.oh-my-zsh/plugins
drwxr-xr-x 2 rkm rkm 4096 Mar 30 19:19 /home/rkm/.oh-my-zsh/plugins/git

[oh-my-zsh] For safety, we will not load completions from these directories until
[oh-my-zsh] you fix their permissions and ownership and restart zsh.
[oh-my-zsh] See the above list for directories with group or other writability.

[oh-my-zsh] To fix your permissions you can do so by disabling
[oh-my-zsh] the write permission of "group" and "others" and making sure that the
[oh-my-zsh] owner of these directories is either root or your current user.
[oh-my-zsh] The following command may help:
[oh-my-zsh] compaudit | xargs chmod g-w,o-w

[oh-my-zsh] If the above didn't help or you want to skip the verification of
[oh-my-zsh] insecure directories you can set the variable ZSH_DISABLE_COMPFIX to
[oh-my-zsh] "true" before oh-my-zsh is sourced in your zshrc file.

zsh compinit: insecure directories, run compaudit for list.
Ignore insecure directories and continue [y] or abort compinit [n]? ncompinit: initialization aborted
complete:13: command not found: compdef
╭─root@Khadas ~
╰─➤ exit 127 ↵
╭─rkm@Khadas ~
╰─➤ sudo su 127 ↵
root@Khadas:/home/rkm# compaudit | xargs chmod g-w,o-w
compaudit: command not found
chmod: missing operand after ‘g-w,o-w’
Try 'chmod --help' for more information.
root@Khadas:/home/rkm# compaudit | xargs chmod g-w
compaudit: command not found
chmod: missing operand after ‘g-w’
Try 'chmod --help' for more information.
root@Khadas:/home/rkm# compaudit | xargs chmod -w
compaudit: command not found
chmod: missing operand
Try 'chmod --help' for more information.
root@Khadas:/home/rkm#

You shouldn't use interactive shell, or any program with executable configuration, while your HOME points to something not owned by your user. That's the big issue and it's with sudo, not zsh, not omz, not any other shell or application you launch. You can go shout "you are doing security wrong" at Ubuntu. Good luck.

╭─rkm@Khadas ~
╰─➤ id rkm && getent passwd rkm
uid=1001(rkm) gid=1001(rkm) groups=1001(rkm),0(root),4(adm),5(tty),6(disk),20(dialout),21(fax),24(cdrom),25(floppy),26(tape),27(sudo),29(audio),30(dip),44(video),46(plugdev),50(staff),60(games),100(users),101(systemd-journal),104(input),108(netdev),112(bluetooth),113(lpadmin),121(pulse-access)
rkm:x:1001:1001:Ryan McKee,,,,:/home/rkm:/usr/bin/zsh

╭─rkm@Khadas ~
╰─➤ sudo /usr/bin/env 1 ↵
LC_MESSAGES=en_US.UTF-8
LANG=en_US.UTF-8
LANGUAGE=en_US.UTF-8
TERM=xterm-256color
XAUTHORITY=/home/rkm/.Xauthority
COLORTERM=truecolor
DISPLAY=:0.0
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
HOME=/home/rkm
LC_CTYPE=en_US.UTF-8
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:.tar=01;31:.tgz=01;31:.arc=01;31:.arj=01;31:.taz=01;31:.lha=01;31:.lz4=01;31:.lzh=01;31:.lzma=01;31:.tlz=01;31:.txz=01;31:.tzo=01;31:.t7z=01;31:.zip=01;31:.z=01;31:.Z=01;31:.dz=01;31:.gz=01;31:.lrz=01;31:.lz=01;31:.lzo=01;31:.xz=01;31:.zst=01;31:.tzst=01;31:.bz2=01;31:.bz=01;31:.tbz=01;31:.tbz2=01;31:.tz=01;31:.deb=01;31:.rpm=01;31:.jar=01;31:.war=01;31:.ear=01;31:.sar=01;31:.rar=01;31:.alz=01;31:.ace=01;31:.zoo=01;31:.cpio=01;31:.7z=01;31:.rz=01;31:.cab=01;31:.wim=01;31:.swm=01;31:.dwm=01;31:.esd=01;31:.jpg=01;35:.jpeg=01;35:.mjpg=01;35:.mjpeg=01;35:.gif=01;35:.bmp=01;35:.pbm=01;35:.pgm=01;35:.ppm=01;35:.tga=01;35:.xbm=01;35:.xpm=01;35:.tif=01;35:.tiff=01;35:.png=01;35:.svg=01;35:.svgz=01;35:.mng=01;35:.pcx=01;35:.mov=01;35:.mpg=01;35:.mpeg=01;35:.m2v=01;35:.mkv=01;35:.webm=01;35:.ogm=01;35:.mp4=01;35:.m4v=01;35:.mp4v=01;35:.vob=01;35:.qt=01;35:.nuv=01;35:.wmv=01;35:.asf=01;35:.rm=01;35:.rmvb=01;35:.flc=01;35:.avi=01;35:.fli=01;35:.flv=01;35:.gl=01;35:.dl=01;35:.xcf=01;35:.xwd=01;35:.yuv=01;35:.cgm=01;35:.emf=01;35:.ogv=01;35:.ogx=01;35:.aac=00;36:.au=00;36:.flac=00;36:.m4a=00;36:.mid=00;36:.midi=00;36:.mka=00;36:.mp3=00;36:.mpc=00;36:.ogg=00;36:.ra=00;36:.wav=00;36:.oga=00;36:.opus=00;36:.spx=00;36:.xspf=00;36:
MAIL=/var/mail/root
LOGNAME=root
USER=root
USERNAME=root
SHELL=/bin/bash
SUDO_COMMAND=/usr/bin/env

SUDO_USER=rkm
SUDO_UID=1001
SUDO_GID=1001
╭─rkm@Khadas ~
╰─➤

CyberManifest: sudo is a package. Also, once filed, add zsh to the bug since it could be a bug in zsh's package as well.

Not necessarily zsh itself, but the packaging.

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: sudo 1.8.21p2-3ubuntu1
Uname: Linux 4.9.40 aarch64
ApportVersion: 2.20.9-0ubuntu7.6
Architecture: arm64
CurrentDesktop: XFCE
Date: Thu Apr 4 11:07:42 2019
SourcePackage: sudo
UpgradeStatus: No upgrade log present (probably fresh install)
VisudoCheck:
/etc/sudoers: parsed OK
/etc/sudoers.d/README: parsed OK

You should use sudo -i to get a clean root login without your local user configuration seeping into the shell.

[14:40:45] CyberManifest: no, not an issue with sudo or Ubuntu. Just wrong usage. You cannot block sudo from running other programs because they will try to read the program's configuration files from an invalid place
[14:41:20] (because you setuid-ed to a different user, and left the environment variables as they were

CyberManifest: for the kernel, you can try raising it at #ubuntu-kernel (but I think it will be difficult to convince them to use something off mainline...)
for u-boot, there IS a u-boot-tools pacakge already available (but IDK if it is the full u-boot thing)
since precise, BTW. It seems to have configuration files for a series of vendors

[15:26:48] <slacker_nl> CyberManifest: I think the problem is with sudo. I'm running it on debian stable (1.8.19p1) and don't have home in keep_env afaik, at work we have 1.8.16 and that keeps HOME, and you have 1.8.21 which also keeps HOME

CyberManifest: query Khadas about submitting patches to mailine(s)

replace file system error

hi
i build fenix on my ubuntu18.04 host, and it can workd on VIM3 board

but when i replace myself file system in build/image dir ,the start log is stoped at

[   16.504974@3] BTRFS: selftest: Running btrfs_split_item tests
[   16.510689@3] BTRFS: selftest: Running extent I/O tests
[   16.515873@3] BTRFS: selftest: Running find delalloc tests
[   16.630324@3] BTRFS: selftest: Running extent buffer bitmap tests
[   16.682790@3] BTRFS: selftest: Extent I/O tests finished
[   16.683896@3] BTRFS: selftest: Running btrfs_get_extent tests
[   16.689363@3] BTRFS: selftest: Running hole first btrfs_get_extent test
[   16.695876@3] BTRFS: selftest: Running outstanding_extents tests
[   16.701860@3] BTRFS: selftest: Running qgroup tests
[   16.706683@3] BTRFS: selftest: Qgroup basic add
[   16.711221@3] BTRFS: selftest: Qgroup multiple refs test
[   16.716528@3] BTRFS: selftest: Running free space tree tests

Is there anything else i need do?

No such file or directory : u-boot.bin.sd.bin (Uboot mainline)

Hello,

I'm trying to build this image :
PARAMETERS*
Fenix Version: 0.4
Khadas Board: VIM1
Uboot Version: mainline
Uboot Configuration: khadas-vim_defconfig
Uboot Branch: master
Linux Version: mainline
Linux Configuration: defconfig
Linux DTB: arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dtb
Linux Branch: master
Distribution: Debian
Distribution Release: stretch
Distribution Type: server
Distribution Arch: arm64
Install Type: SD-USB
Final Image: VIM1_Debian-server-stretch_Linux-4.19_arm64_SD-USB_V20181121.img


Everything is working properly except it tries to build the image :

Image install type: SD-USB
dd:  'project/khadas/fenix/build/images/u-boot-mainline/u-boot.bin.sd.bin': No such file or directory
Cleanup...
make: *** [Makefile:7: all] Error 1

Problem Vim2 and armhf

Hello,
I create an image with armhf fenix and I install this image on my vim2 with usb burning tool but my vim2 does not start. I only have the Khadas bootlogo on my screen.

On fenix I chose the options, kernel v4.9, Ubuntu mate, armhf, eMMC.

When I create an image in arm64 it works.

Do you have an idea to make a linux armhf image work on vim2?

libMali fbdev for VIM1 with dma_buf support

Hello ,
Is it possible to have libMali.so fbdev for VIM 64bit Mali450 with DMA_BUF support (EGL_EXT_image_dma_buf_import), I could only find this for mali450-X and never for fbdev ?

Mali errors

I am having some errors with updated script, using ubuntu 18.04., didn't have any errors few weeks ago.

The script didn't create any image.

This is the output in terminal: Info: Installing linux-gpu-amlogic-s905x-arm-mali-m450-r7p0-x11_0.5_arm64.deb in chroot...
Selecting previously unselected package linux-gpu-amlogic-s905x-arm-mali-m450-r7p0-x11.
(Reading database ... 102336 files and directories currently installed.)
Preparing to unpack .../linux-gpu-amlogic-s905x-arm-mali-m450-r7p0-x11_0.5_arm64.deb ...
Unpacking linux-gpu-amlogic-s905x-arm-mali-m450-r7p0-x11 (0.5) ...
dpkg: error processing archive /root/linux-gpu-amlogic-s905x-arm-mali-m450-r7p0-x11_0.5_arm64.deb (--install):
trying to overwrite '/usr/include/EGL/egl.h', which is also in package libegl1-mesa-dev:arm64 18.0.5-0ubuntu0~18.04.1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
/root/linux-gpu-amlogic-s905x-arm-mali-m450-r7p0-x11_0.5_arm64.deb
Cleanup...
Makefile:7: recipe for target 'all' failed
make: *** [all] Error 1

This isn't closed issue, i did edit and now it says it's closed.

2 improvemants suggestion

1, use apt instead of apt-get for better use experience.
2, use meta package for desktop installation, eg for xfce, use task-xfce-desktop and task-desktop, not list single packages in PACKAGE_LIST, and some additional packages add to PACKAGE_LIST.

contribute an improvement, but not test on VIM.

systemctl will read /run/systemd/reboot-param for reboot target, and will use syscall reboot send to kernel, finally to aml's reboot,
https://github.com/systemd/systemd/blob/master/src/basic/reboot-util.c#L52-L65
https://github.com/khadas/linux/blob/Vim/drivers/amlogic/reset/gxbb_poweroff.c

so we can use systemd service to write some right value to reboot-param.

first: mkdir /etc/systemd/system/reboot.target.wants
2nd: create reboot-param.service to /etc/systemd/system/

[Unit]
Description=Reboot-Param
Requires=systemd-reboot.service
Before=systemd-reboot.service
#After=shutdown.target umount.target final.target
[Service]
Type=oneshot
ExecStart=/bin/sh -c "echo update > /run/systemd/reboot-param" 

3rd: create soft link to /etc/systemd/system/reboot.target.wants

you know I don't have my VIM-Linux worked, if that not work, that's because /run is unmounted before systemctl read the file. maybe uncomment After line could work.

EMMC firmware built on ubuntu 17.10 does not boot at all

hi
with these params...
PARAMETERS*
board: VIM1
linux version: 4.9
uboot version: 2015.01
distribution: Debian
distribution release: stretch
distribution type: server
distribution architecture: arm64
install type: EMMC
uboot configuration: kvim_defconfig
linux dtb: arch/arm64/boot/dts/amlogic/kvim_linux.dtb
uboot git branch: khadas-vim-v2015.01
linux git branch: khadas-vim-4.9.y
root directory: /home/raxy/project/khadas/fenix
image directory: /home/raxy/project/khadas/fenix/build/images
image file name: VIM1_Debian-stretch_Linux-4.9_server_arm64_EMMC_2018-06-02.img


I manage to burn the img but it does not boot!!

Here are the console messages:

GXL:BL1:9ac50e:a1974b;FEAT:ADFC318C;POC:3;RCY:0;EMMC:0;READ:0;0.0;CHK:0;
TE: 114167

BL2 Built : 20:32:17, Sep  8 2017. 
gxl g6296b83 - xiaobo.gu@droid12

set vcck to 1120 mv
set vddee to 1000 mv
Board ID = 6
CPU clk: 1200MHz
DQS-corr enabled
DDR scramble enabled
DDR3 chl: Rank0+1 @ 768MHz - PASS
Rank0: 1024MB(auto)-2T-11
Rank1: 1024MB(auto)-2T-11
DataBus test pass!
AddrBus test pass!
-s
Load fip header from eMMC, src: 0x0000c200, des: 0x01400000, size: 0x00004000
New fip structure!
Load bl30 from eMMC, src: 0x00010200, des: 0x01100000, size: 0x0000d600
Load bl31 from eMMC, src: 0x00020200, des: 0x05100000, size: 0x0002c600
Load bl33 from eMMC, src: 0x00050200, des: 0x01000000, size: 0x00066a00
NOTICE:  BL3-1: v1.0(release):a625749
NOTICE:  BL3-1: Built : 11:25:15, Aug 25 2017
[BL31]: GXL CPU setup!
NOTICE:  BL31: BL33 decompress pass
mpu_config_enable:ok
[Image: gxl_v1.1.3243-377db0f 2017-09-07 11:28:58 qiufang.dai@droid07]
OPS=0x82
9d 42 bd c7 a1 12 ec 2f 5f 6 30 b8 [0.341028 Inits done]
secure task start!
high task start!
low task start!
ERROR:   Error initializing runtime service opteed_fast


U-Boot 2015.01 (Jun 02 2018 - 19:26:13)

DRAM:  2 GiB
Relocation Offset is: 76eae000
register usb cfg[0][1] = 0000000077f56a18
[CANVAS]canvas init
boot_device_flag : 1
Nand PHY Ver:1.01.001.0006 (c) 2013 Amlogic Inc.
init bus_cycle=6, bus_timing=7, system=5.0ns
reset failed
get_chip_type and ret:fffffffe
get_chip_type and ret:fffffffe
chip detect failed and ret:fffffffe
nandphy_init failed and ret=0xfffffff1
MMC:   aml_priv->desc_buf = 0x0000000073eae6b0
aml_priv->desc_buf = 0x0000000073eb09d0
SDIO Port B: 0, SDIO Port C: 1
emmc/sd response timeout, cmd8, status=0x1ff2800
emmc/sd response timeout, cmd55, status=0x1ff2800
init_part() 293: PART_TYPE_AML
[mmc_init] mmc init success
dtb magic edfe0dd0
start dts,buffer=0000000073eb3200,dt_addr=0000000073eb3200
parts: 3
00:      logo   0000000002000000 1
01:   ramdisk   0000000002000000 1
02:    rootfs   ffffffffffffffff 4
init_part() 293: PART_TYPE_AML
eMMC/TSD partition table have been checked OK!
check pattern success
mmc env offset: 0x6c00000 
In:    serial
Out:   serial
Err:   serial
## defenv_reserve
Saving Environment to aml-storage...
mmc env offset: 0x6c00000 
Writing to MMC(1)... done
reboot_mode=cold_boot
[store]To run cmd[emmc dtb_read 0x1000000 0x40000]
_verify_dtb_checksum()-909: calc 7a8e8f46, store 7a8e8f46
_verify_dtb_checksum()-909: calc 7a8e8f46, store 7a8e8f46
dtb_read()-1031: total valid 2
dtb_read()-1098: do nothing
vpu: clk_level in dts: 7
vpu: set clk: 666667000Hz, readback: 666660000Hz(0x300)
vpu: vpu_clk_gate_init_off
vpp: vpp_init
hpd_state=0
cvbs performance type = 6, table = 0
Net:   dwmac.c9410000amlkey_init() enter!
[EFUSE_MSG]keynum is 4
[BL31]: tee size: 0

upgrade_step=2
[OSD]load fb addr from dts
[OSD]fb_addr for logo: 0x7e000000
[OSD]load fb addr from dts
[OSD]fb_addr for logo: 0x7e000000
[CANVAS]addr=0x7e000000 width=3840, height=2160
amlkey_init() enter!
amlkey_init() 71: already init!
[EFUSE_MSG]keynum is 4
[BL31]: tee size: 0
[KM]Error:f[key_manage_query_size]L507:key[usid] not programed yet
[KM]Error:f[key_manage_query_size]L507:key[mac] not programed yet
[KM]Error:f[key_manage_query_size]L507:key[deviceid] not programed yet
saradc - saradc sub-system

Usage:
saradc saradc open <channel>            - open a SARADC channel
saradc close    - close the SARADC
saradc getval   - get the value in current channel
saradc get_in_range <min> <max> - return 0 if current value in the range of current channel

gpio: pin GPIOAO_2 (gpio 102) value is 1
Product checking: pass!
Hit Enter or space or Ctrl+C key to stop autoboot -- :  0 
card out
emmc/sd response timeout, cmd8, status=0x1ff2800
emmc/sd response timeout, cmd55, status=0x1ff2800
emmc/sd response timeout, cmd1, status=0x1ff2800
** Bad device mmc 0 **
cfgload: fatload: no boot.ini or empty file
** File not found /boot/boot.ini **
cfgload: ext4load: no boot.ini or empty file
** File not found zImage **
** File not found uInitrd **
** File not found dtb.img **
[rsvmem] get fdtaddr NULL!
rsvmem - reserve memory

Usage:
rsvmem check                   - check reserved memory
rsvmem dump                    - dump reserved memory

rsvmem check failed
Bad Linux ARM64 Image magic!
InUsbBurn
[MSG]sof
Set Addr 12
Get DT cfg
Get DT cfg
set CFG

enable lima driver?

I find lima driver patches, but they are not enabled, do you have plan to enable it?

url redirection error for http://dl.khadas.com/

curl -I http://dl.khadas.com/docs
HTTP/1.1 302 Found
Date: Sat, 21 Jul 2018 12:28:21 GMT
Server: Apache
Location: https://dl.khadas.comdocs
Content-Type: text/html; charset=iso-8859-1
curl -I http://dl.khadas.com/Firmware/
HTTP/1.1 302 Found
Date: Sat, 21 Jul 2018 12:28:04 GMT
Server: Apache
Location: https://dl.khadas.comFirmware/
Content-Type: text/html; charset=iso-8859-1

Missing serial# and cpuid# on latest 20190830 firmware

Describe the bug A clear and concise description of what the bug is.
I cannot found the serial and cpuid info in u-boot, please expose this also in /proc/cmdline

To Reproduce Steps to reproduce the behavior:
printenv serial# I get 1234567890
cpuid is not set

Expected behavior A clear and concise description of what you expected to happen.
Can read the serial and cpuid number

Additional context Add any other context about the problem here.
There are some spurious keys like serverip and netmask I guess are left from some DHCP/TFTP tests

missing fbset in initramfs

local-top script: khadas_init.sh requires fbset, but it not copied to initramfs

create file /etc/initramfs-tools/hook/fbset, and chmod +x
with below content:

#!/bin/sh

set -e

PREREQ=""

prereqs()
{
	echo "${PREREQ}"
}

case "${1}" in
	prereqs)
		prereqs
		exit 0
		;;
esac

. /usr/share/initramfs-tools/hook-functions

if [ -x /bin/fbset ]
then
	copy_exec /bin/fbset /bin

	LIBC_DIR=$(ldd /bin/fbset | sed -nr 's#.* => (/lib.*)/libc\.so\.[0-9.-]+ \(0x[[:xdigit:]]+\)$#\1#p')
	find -L "$LIBC_DIR" -maxdepth 1 -name 'libgcc_s.*' -type f | while read so; do
		copy_exec "$so"
	done
fi

a bug in build-package: use `=` in if condition.

if [ "$(type -t post_unpack)" = "function" ]; then
post_unpack
fi
if [ "$(type -t pre_patch)" = "function" ]; then
pre_patch
fi
for i in $PKG_DIR/patches/$PKG_NAME-*.patch \
$PKG_DIR/patches/$PKG_VERSION/*.patch; do
if [ -f "$i" ]; then
if [ -n "$(grep -E '^GIT binary patch$' $i)" ]; then
cat $i | git apply --directory=`echo "$PKG_BUILD" | cut -f1 -d\ ` -p1 --verbose --whitespace=nowarn --unsafe-paths
else
cat $i | patch -d `echo "$PKG_BUILD" | cut -f1 -d\ ` -p1
fi
fi
done
if [ "$(type -t post_patch)" = "function" ]; then

if [ "$(type -t pre_make_$TARGET)" = "function" ]; then
pre_make_$TARGET
fi
if [ "$(type -t make_$TARGET)" = "function" ]; then
make_$TARGET
fi
if [ "$(type -t post_make_$TARGET)" = "function" ]; then
post_make_$TARGET
fi
if [ "$(type -t makeinstall_$TARGET)" = "function" ]; then
makeinstall_$TARGET
fi

= or ==

VIM/Amlogic: update Xserver or disable pageflip for modesetting

upstream issue: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3143

我测试过升级xserver可以解决这个问题。

升级xserver可以用我的build rules: https://github.com/zhangn1985/xserver-build-rules , 配合xserver主线: https://gitee.com/mirrors_addons/xserver
同时需要升级fbdev,可以使用: https://salsa.debian.org/xorg-team/driver/xserver-xorg-video-fbdev

因为upstream issue提到的xserver的patch就是disable pageflip,所以也可以禁止modesetting driver的pageflip。
man modesetting

       Option "PageFlip" "boolean"
              Enable DRI3 page flipping.  The default is on.

Can't build image in Docker

An error occurs during building a firmware under Docker. Tested on fenix v0.6 and current master.

  1. Build docker as README.md shows
  2. Start docker
[kostousov-ds@volga 23:32:52]fenix(0)% git co master
Предыдущая позиция HEAD была 93f6d11e8038 version bump to v0.6
Переключено на ветку «master»
Ваша ветка обновлена в соответствии с «origin/master».
[kostousov-ds@volga 23:32:56]fenix(0)% git pull
Уже обновлено.
[kostousov-ds@volga 23:32:59]fenix(0)% git remote -v
origin  https://github.com/khadas/fenix (fetch)
origin  https://github.com/khadas/fenix (push)
[kostousov-ds@volga 23:33:04]fenix(0)% sudo docker run -it -v $(pwd):/home/khadas/fenix -v /etc/localtime:/etc/localtime:ro --privileged fenix
khadas@290c4108564b:~/fenix$ source env/setenv.sh 

Choose Khadas board:
1. Edge
2. VIM1
3. VIM2

Which board would you like? [2] 

Choose uboot version:
1. uboot-2015.01
2. uboot-mainline

Which uboot version would you like? [1] 2

Choose linux version:
Force set to linux-mainline

Choose distribution:
1. Ubuntu
2. Debian

Which distribution would you like? [1] 

Choose Ubuntu release:
1. xenial
2. bionic

Which Ubuntu release would you like? [2] 

Choose Ubuntu type:
1. server
2. mate
3. xfce
4. lxde

Which Ubuntu type would you like? [1] 

Set architecture to 'arm64' by default.

Choose install type:
Force set to install-SD-USB
===========================================
#VERSION: 0.6

#KHADAS_BOARD=VIM1
#VENDOR=Amlogic
#CHIP=S905X
#LINUX=mainline
#UBOOT=mainline
#DISTRIBUTION=Ubuntu
#DISTRIB_RELEASE=bionic
#DISTRIB_TYPE=server
#DISTRIB_ARCH=arm64
#INSTALL_TYPE=SD-USB

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

Environment setup done.
Type 'make' to build.

An error occurs during make:

khadas@290c4108564b:~/fenix$ make
./scripts/create_image.sh

***********************PARAMETERS************************
Fenix Version:         0.6
Khadas Board:          VIM1
Uboot Version:         mainline
Uboot Configuration:   khadas-vim_defconfig
Uboot Branch:          master
Linux Version:         mainline
Linux Configuration:   defconfig
Linux DTB:             arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dtb
Linux Branch:          master
Distribution:          Ubuntu
Distribution Release:  bionic
Distribution Type:     server
Distribution Arch:     arm64
Install Type:          SD-USB
Final Image:           VIM1_Ubuntu-server-bionic_Linux-5.0.4_arm64_SD-USB_V20190423.img
*********************************************************

Info: Build host: bionic
Info: Running in container: docker
Info: apt-cacher is disabled in containers, set NO_APT_CACHER=no to override
Info: Module 'binfmt_misc' not installed, try to install it!
config/functions/common-functions:118 Warning: Requires root privileges, please enter your passowrd!
Makefile:7: recipe for target 'all' failed
make: *** [all] Error 1

I do export NO_APT_CACHER=no and repeat make:

…
Created symlink /etc/systemd/system/multi-user.target.wants/apt-cacher-ng.service → /lib/systemd/system/apt-cacher-ng.service.
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of start.
Processing triggers for systemd (237-3ubuntu10.21) ...
Info: Module 'binfmt_misc' not installed, try to install it!
config/functions/common-functions:118 Warning: Requires root privileges, please enter your passowrd!
Makefile:7: recipe for target 'all' failed
make: *** [all] Error 1

What I do wrong?

VIM3L debian buster image does not boot

I created a Debian buster image for VIM3L, but it does not boot. When power on, the white LED is on for several seconds, then off. There is no output from HDMI. The configuration I use is

===========================================
#VERSION: 0.8.3

#KHADAS_BOARD=VIM3L
#VENDOR=Amlogic
#CHIP=S905D3
#LINUX=mainline
#UBOOT=mainline
#DISTRIBUTION=Debian
#DISTRIB_RELEASE=buster
#DISTRIB_TYPE=server
#DISTRIB_ARCH=arm64
#INSTALL_TYPE=SD-USB

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

I use the latest Ubuntu 18.04 as the host.
fenix d2f0c35

Thanks,

do-fenix-full-upgrade on Focal wants to install Bionic package fenix-updater-package-bionic-vim3-mainline

There is a slight issue in the new Ubuntu Focal images with do-fenix-full-upgrade, as it tries to install the old fenix-updater-package-bionic-vim3-mainline package instead of the new fenix-updater-package-focal-vim3-mainline.

The file do-fenix-full-upgrade is from linux-board-package-focal-vim3_0.9_arm64.deb package, which is build by the config/functions/build-board-deb script, but then I was lost...

khadas@khadas:~$ cat /etc/issue
Ubuntu 20.04 LTS \n \l

khadas@khadas:~$ sudo do-fenix-full-upgrade 
Hit:1 http://ports.ubuntu.com focal InRelease
Hit:2 http://ports.ubuntu.com focal-security InRelease
Hit:3 http://ports.ubuntu.com focal-updates InRelease
Hit:4 http://ports.ubuntu.com focal-backports InRelease
Hit:5 https://dl.khadas.com/repos/vim3 focal InRelease
Reading package lists... Done                   
Building dependency tree       
Reading state information... Done
All packages are up to date.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Installing Fenix updater: fenix-updater-package-bionic-vim3-mainline ...
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package fenix-updater-package-bionic-vim3-mainline

another question about buildroot.

Amlogic发布的buildroot编译出来的aml_upgrade_package.img,怎么烧入到eMMC?

比较了一下,编译出来的和 image_upgrade 类似,又有些许不同。

请问,有哪些注意事项呢?

Can't build latest linux kernel

build configuration

#VERSION: 0.8.3

#KHADAS_BOARD=VIM1
#VENDOR=Amlogic
#CHIP=S905X
#LINUX=mainline
#UBOOT=mainline
#DISTRIBUTION=Ubuntu
#DISTRIB_RELEASE=bionic
#DISTRIB_TYPE=server
#DISTRIB_ARCH=arm64
#INSTALL_TYPE=SD-USB

compilation fail with error

make[1]: Leaving directory '/home/khadas/fenix/build/linux-mainline-5.5-rc2'
Info: Building debs...
cp: cannot stat '/home/khadas/fenix/linux/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dtb': No such file or directory
Makefile:7: recipe for target 'all' failed

git commit

commit 1ad94e389744cb3fa1c371bb008ac79ebf93facb (HEAD -> master, tag: v0.8.3, origin/master, origin/HEAD)

Trying to build Ubuntu Mate

I need midi (snd_seq module), so I am trying to build an .img to install on the EMMC. Here's the conf:

#LINUX=3.14
#UBOOT=2015.01
#UBUNTU_TYPE=mate
#UBUNTU_MATE_ROOTFS_TYPE=mate-rootfs
#UBUNTU=16.04.2
#UBUNTU_ARCH=arm64
#INSTALL_TYPE=EMMC

I donwloaded the http://www.mediafire.com/file/sthi6u5gf7vxymz/ubuntu-mate-16.04.2-arm64.tar.gz and installed on the archives/ubuntu-mate path, BUT I have an error:

  HOSTCC  scripts/conmakehash
  HOSTCC  scripts/mod/mk_elfconfig
  CC      scripts/mod/devicetable-offsets.s
In file included from include/linux/compiler.h:54:0,
                 from include/uapi/linux/stddef.h:1,
                 from include/linux/stddef.h:4,
                 from /home/psc/project/fenix/linux/include/uapi/linux/posix_types.h:4,
                 from include/uapi/linux/types.h:13,
                 from include/linux/types.h:5,
                 from include/linux/mod_devicetable.h:11,
                 from scripts/mod/devicetable-offsets.c:2:
include/linux/compiler-gcc.h:106:30: fatal error: linux/compiler-gcc6.h: No such file or directory
 #include gcc_header(__GNUC__)
                              ^
compilation terminated.
scripts/Makefile.build:204: recipe for target 'scripts/mod/devicetable-offsets.s' failed
make[3]: *** [scripts/mod/devicetable-offsets.s] Error 1
make[3]: *** Waiting for unfinished jobs....
  HOSTCC  scripts/dtc/data.o
  SHIPPED scripts/dtc/dtc-lexer.lex.c
scripts/Makefile.build:455: recipe for target 'scripts/mod' failed
make[2]: *** [scripts/mod] Error 2
make[2]: *** Waiting for unfinished jobs....
  SHIPPED scripts/dtc/dtc-parser.tab.h
  SHIPPED scripts/dtc/dtc-parser.tab.c
  HOSTCC  scripts/dtc/dtc.o
  HOSTCC  scripts/dtc/flattree.o
  HOSTCC  scripts/selinux/mdp/mdp
  HOSTCC  scripts/dtc/fstree.o
  HOSTCC  scripts/dtc/livetree.o
  HOSTCC  scripts/dtc/srcpos.o
  HOSTCC  scripts/dtc/treesource.o
  HOSTCC  scripts/dtc/util.o
  HOSTCC  scripts/dtc/dtc-lexer.lex.o
  HOSTCC  scripts/dtc/dtc-parser.tab.o
  HOSTLD  scripts/dtc/dtc
Makefile:540: recipe for target 'scripts' failed
make[1]: *** [scripts] Error 2
make[1]: Leaving directory '/home/psc/project/fenix/linux'
Cleanup...
Makefile:34: recipe for target 'ubuntu-mate' failed
make: *** [ubuntu-mate] Error 2

Any idea?

WiFi Doesn't Work in Mainline

WiFi Doesn't Work for the Khadas VIM2 Max in Mainline U-Boot With Debian Stretch XFCE yet driver blobs are clearly in place: https://github.com/khadas/fenix/tree/master/archives/hwpacks/wlan-firmware/brcm

I tried as suggested from: https://forum.khadas.com/t/armbian-kodi-ubuntu-debian-for-sd-usb-emmc/825

sudo modprobe dhd
But I get: modprobe: FATAL: Module dhd not found in directory /lib/modules/5.0.4

And then I tried:

sudo modprobe wifi_dummy
But I get: modprobe: FATAL: Module wifi_dummy not found in directory /lib/modules/5.0.4

https://lore.kernel.org/lkml/[email protected]/T/#u
See: u200 (S905D2)

https://www.kernel.org/doc/Documentation/devicetree/bindings/arm/amlogic.txt
See: - "khadas,vim2" (Meson gxm s912)

http://linux-meson.com/doku.php?id=hardware
See: Meson-GXM / S912
See: Khadas VIM2 (arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts)

http://openlinux.amlogic.com:8000/download/doc/Linux_BSP_Kernel4.9_Buildroot_OpenLinux_Release_Notes_V20180330.pdf
See: U200(S905D2)

missing kvim.dtb symlink for vim mainline emmc

in line 610 from file /scripts/create_image.sh

there seems to be missing a symlink for kvim.dtb

I was trying to build for VIM1 with mainline linux, 2015 uboot a ubuntu_server16 image and got always a error about a missing symlink.
It can be fixed with

`## Fixup upgrade dtb link
fixup_dtb_link() {
ret=0
cd $UPGRADE_DIR
rm -rf kvim.dtb

    case "$LINUX" in
            4.9)
                    ln -s ../../linux/arch/arm64/boot/dts/amlogic/$LINUX_DTB kvim.dtb
                    ;;
            3.14)
                    ln -s ../../linux/arch/arm64/boot/dts/$LINUX_DTB kvim.dtb
                    ;;
    mainline)
                    ln -s ~/project/khadas/ubuntu/build/images/linux-mainline/meson-gxl-s905x-khadas-vim.dtb kvim.dtb
                    ;;
            *)
                    error_msg $CURRENT_FILE $LINENO "Unsupported linux version:$LINUX"
                    ret=-1
    esac

    cd -

    return $ret

}
`

Another problem: I cant get this image to burn to emmc, the amlogic tools always give an error.
Image here: http://ovh.to/NnGVV5P

archives/hwpacks/video-firmware/Amlogic/meson': No such file or directory

Hello. When i was trying to build linux image with fenix, it stops with Error:
cp: cannot stat 'archives/hwpacks/video-firmware/Amlogic/meson': No such file or directory

this is "log"
........
LD [M] sound/usb/snd-usbmidi-lib.ko
LD [M] sound/xen/snd_xen_front.ko
make[1]: Leaving directory '/home/khadas/fenix/build/linux-mainline-4.20.3'
Info: Building debs...
Info: Build board deb...
Image Name: S912 autoscript
Created: Fri Jan 18 22:56:51 2019
Image Type: AArch64 Linux Script (uncompressed)
Data Size: 5129 Bytes = 5.01 kB = 0.00 MB
Load Address: 00000000
Entry Point: 00000000
Contents:
Image 0: 5121 Bytes = 5.00 kB = 0.00 MB
Image Name: Amlogic autoscript
Created: Fri Jan 18 22:56:51 2019
Image Type: AArch64 Linux Script (uncompressed)
Data Size: 654 Bytes = 0.64 kB = 0.00 MB
Load Address: 00000000
Entry Point: 00000000
Contents:
Image 0: 646 Bytes = 0.63 kB = 0.00 MB
adding: aml_autoscript (deflated 65%)
adding: aml_autoscript.txt (deflated 72%)
/home/khadas/fenix/build/linux-mainline-4.20.3
cp: cannot stat 'archives/hwpacks/video-firmware/Amlogic/meson': No such file or directory
Makefile:7: recipe for target 'all' failed
make: *** [all] Error 1

this is my configuration

Choose install type:
Force set to install-SD-USB

#VERSION: 0.5

#KHADAS_BOARD=VIM2
#VENDOR=Amlogic
#CHIP=S912
#LINUX=mainline
#UBOOT=mainline
#DISTRIBUTION=Ubuntu
#DISTRIB_RELEASE=xenial
#DISTRIB_TYPE=mate
#DISTRIB_ARCH=arm64
#INSTALL_TYPE=SD-USB

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

Environment setup done.
Type 'make' to build.

I`v tried to build it with Docker, but Error is the same. Then i run under root: make image:
This script requires root privileges, trying to use sudo, please enter your passowrd!
sudo -E ./scripts/make_image.sh
Info: Build host: bionic
Info: Running in container: docker
Info: apt-cacher is disabled in containers, set NO_APT_CACHER=no to override
Info: Image install type: SD-USB
losetup: /home/khadas/fenix/build/images/VIM2_Ubuntu-mate-xenial_Linux-4.20.3_arm64_SD-USB_V20190118.img: failed to set up loop device: No such file or directory
Makefile:22: recipe for target 'image' failed
make: *** [image] Error 1

What it can be, and how can i solve this?

Kernel module missing for nftables in Debian Buster image

I was testing out the new Debian Buster build and it looks like it does not include the nftables kernel modules.
Debian has switched default firewalls from iptables to nftables and as a result, if the nftables kernel modules are missing, neither iptables nor nftables rules can be loaded into the system.

Build debian server kernel 4.9 for VIM2 using docker failed at almost last steps

Try to build on NUC, it fails when running /home/khadas/fenix/scripts/rootfs_stage.sh
part of the logs:


***********************PARAMETERS************************
Fenix Version:         0.3
Khadas Board:          VIM2
Uboot Version:         2015.01
Uboot Configuration:   kvim2_defconfig
Uboot Branch:          khadas-vim-v2015.01
Linux Version:         4.9
Linux Configuration:   kvim_defconfig
Linux DTB:             arch/arm64/boot/dts/amlogic/kvim2_linux.dtb
Linux Branch:          khadas-vim-4.9.y
Distribution:          Debian
Distribution Release:  stretch
Distribution Type:     server
Distribution Arch:     arm64
Install Type:          EMMC
Final Image:           VIM2_Debian-server-stretch_Linux-4.9_arm64_EMMC_2018-08-03.img
*********************************************************


make[1]: Leaving directory '/home/khadas/fenix/linux'                                                                                                                                
Info: Building debs...                                                                                                                                                               
Info: Build board deb...                                                                                                                                                             
Building package: linux-board-package-amlogic-s912                                                                                                                                   
dpkg-deb: building package 'linux-board-package-amlogic-s912' in '/home/khadas/fenix/build/images/.tmp/linux-board-package-amlogic-s912_0.3_arm64.deb'.                              
./scripts/create_image.sh:88 Warning: This script requires root privileges, trying to use sudo, please enter your passowrd!                                                          
Info: Preparing rootfs for VIM2-stretch                                                                                                                                              
Info: Creating new rootfs for stretch                                                                                                                                                
Info: Installing base system - Stage 1/2                                                                                                                                             
I: Retrieving InRelease                                                                                                                                                              
I: Retrieving Release                                                                                                                                                                
I: Retrieving Release.gpg                                                                                                                                                            
I: Checking Release signature                                                                                                                                                        
I: Valid Release signature (key id 067E3C456BAE240ACEE88F6FEF0F382A1A7B6500)                                                                                                         
I: Retrieving Packages                                                                                                                                                               
I: Validating Packages                                                                                                                                                               
I: Resolving dependencies of required packages...                                                                                                                                    
I: Resolving dependencies of base packages...                                                                                                                                        
I: Found additional required dependencies: libaudit1 libaudit-common libbz2-1.0 libcap-ng0 libdb5.3 libdebconfclient0 libgcrypt20 libgpg-error0 liblz4-1 libncursesw5 libsemanage1 li
bsemanage-common libsystemd0 libudev1 libustr-1.0-1                                                                                                                                  
I: Found additional base dependencies: dmsetup gnupg-agent libapparmor1 libassuan0 libbsd0 libcap2 libc-l10n libcryptsetup4 libdevmapper1.02.1 libdns-export162 libelf1 libfastjson4l
ibffi6 libgmp10 libgnutls30 libhogweed4 libidn11 libidn2-0 libip4tc0 libip6tc0 libiptc0 libisc-export160 libksba8 liblocale-gettext-perl liblognorm5 libmnl0 libncurses5 libnetfilter
-conntrack3 libnettle6 libnfnetlink0 libnpth0 libp11-kit0 libpsl5 libseccomp2 libsqlite3-0 libtasn1-6 libtext-charwidth-perl libtext-iconv-perl libtext-wrapi18n-perl libunistring0li
bxtables12 pinentry-curses xxd    

.....

I: Extracting libsystemd0...
I: Extracting libudev1...
I: Extracting sysvinit-utils...
I: Extracting tar...
I: Extracting tzdata...
I: Extracting libustr-1.0-1...
I: Extracting bsdutils...
I: Extracting libblkid1...
I: Extracting libfdisk1...
I: Extracting libmount1...
I: Extracting libsmartcols1...
I: Extracting libuuid1...
I: Extracting mount...
I: Extracting util-linux...
I: Extracting liblzma5...
I: Extracting zlib1g...
Info: Installing base system - Stage 2/2
chroot: failed to run command ‘/bin/bash’: Exec format error
Cleanup...
Makefile:7: recipe for target 'all' failed
make: *** [all] Error 126

Any clues?

No such file or directory: '/include/config/kernel.release'

Hi!

I have a VIM 2 board and I set the configuration like this:

#VERSION: 0.3

#KHADAS_BOARD=VIM2
#VENDER=Amlogic
#CHIP=S912
#LINUX=mainline
#UBOOT=2015.01
#DISTRIBUTION=Ubuntu
#DISTRIB_RELEASE=bionic
#DISTRIB_TYPE=server
#DISTRIB_ARCH=arm64
#INSTALL_TYPE=SD-USB

Then I run the make command and I get this error:

../fip/gxl/u-boot.bin build done!
make[1]: Leaving directory '/root/fenix/u-boot'
Info: Building debs...
Info: Build linux debs...
head: cannot open '/include/config/kernel.release' for reading: No such file or directory
Makefile:7: recipe for target 'all' failed
make: *** [all] Error 1

Build environment: Ubuntu 18.04 LTS (Bionic Beaver) x64 server with latest updates

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.