Use Fenix scripts to build your own ubuntu image


#41

Good. I have a few more additions, I will form for them a pull-request, where they can be discussed. :slight_smile:


#42

Hi numbqq
You have a Desktop Mate is displayed (bakground) normally ? I have a background instead of solid black fill. Tried to take a version of the image “server”, set it in manual Mate and XORG. In this embodiment, the desktop is working fine, all the colors correct.


#43

Hi balbes150,

I choose install-chroot and execute make ubuntu-mate to build mate desktop, the desktop is displayed normally. You tried make ubuntu-mate to build mate desktop doesn’t display normally?

Thanks.


#44

Hi numbqq
Try to run this image on VIM S905x. I assembled it with the fenix. By the way,
I have in this way the desktop becomes black.
I suggest doing one SD_USB image for all models of VIM and VIM2.

https://yadi.sk/d/vG94P4St3Qboqd


#45

Hi balbes150,

Yes, one SD_USB image is good for situation that whit Android running on EMMC and boot Ubuntu use Android u-boot. But if EMMC is clean we need u-boot in SD_USB image, it’s different for VIM and VIM2, so for this situation we need two images. But I think this is not common. One image will be convenient.

Thanks.


#46

Hi numbqq

IMHO the default u-boot for version of the image SD_USB not needed. In normal state of run of the images with SD and USB VIM\VIM2 must be used the boot loader from the internal memory (eMMC or the SPI) in the multi-boot. If someone will need to make the SD card bootable (this is clearly not regular users), he can record the desired option with u-boot on the SD card.

You can further release the finished versions of the images of the “recovery system” specifically for VIM and VIM2 for separately (recording on the SD card). In which will be installed the right version of the u-boot. These images are a set of tools (scripts) for fast system recovery, backup, etc. the Logic behind the use of such a “recovery image”. The user downloaded the image , recorded on the SD card, hooked up to VIM, and using the M-register, has launched a system (regardless of the state of the eMMC and boot loader in it). You can add the autoscript which when executed will automatically restore the firmware in eMMC to default (factory) state.


#47

Hi numbqq.

You can add in the source code to kernel 3.14 (which are used in the script FENIX) this dts file to build the dtb for VIM2 ? I checked on the VIM2 with kernel 3.14 and this in a dtb image Ubuntu Mate 17.04 (compiled script fenix). This dtb works well with SD cards. Then it will be possible to collect a single universal image with kernel 3.14 for both VIM and VIM2. By the way, the last images even without the dtb files work well on all VIM\VIM2. :slight_smile:


#48

Hi balbes150,

For current Ubuntu kernel we have not add 3.14 support for VIM2, maybe it’s necessary to add support fot it.:smiley:


#49

Hello i would build ubuntu server (with NAT) for emmc
(I hope after the upgrade.img build the NAT in Kernel was active)
i have this errors … ( when i build for USB SD allways the script works without errors)
any hints??
when i change u-boot then no emmc build is possible to set

Current environment:

#KHADAS_BOARD=VIM
#LINUX=mainline
#UBOOT=2015.01
#UBUNTU=16.04.2
#UBUNTU_ARCH=arm64
#INSTALL_TYPE=EMMC

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

result ==

Ign:14 http://mirrors.ustc.edu.cn/ubuntu-ports xenial-security/universe armhf Packages
Ign:7 http://mirrors.ustc.edu.cn/ubuntu-ports xenial/universe armhf Packages
Get:10 http://mirrors.ustc.edu.cn/ubuntu-ports xenial-updates/universe armhf Packages [650 kB]
Ign:10 http://mirrors.ustc.edu.cn/ubuntu-ports xenial-updates/universe armhf Packages
Get:12 http://mirrors.ustc.edu.cn/ubuntu-ports xenial-security/main armhf Packages [439 kB]
Ign:12 http://mirrors.ustc.edu.cn/ubuntu-ports xenial-security/main armhf Packages
Get:14 http://mirrors.ustc.edu.cn/ubuntu-ports xenial-security/universe armhf Packages [225 kB]
Ign:14 http://mirrors.ustc.edu.cn/ubuntu-ports xenial-security/universe armhf Packages
Err:7 http://mirrors.ustc.edu.cn/ubuntu-ports xenial/universe armhf Packages
Error writing to output file - write (28: No space left on device) Error writing to file - write (28: No space left on device) [IP: 202.141.176.110 80]
Err:10 http://mirrors.ustc.edu.cn/ubuntu-ports xenial-updates/universe armhf Packages
Error writing to output file - write (28: No space left on device) Error writing to file - write (28: No space left on device) [IP: 202.141.176.110 80]
Err:12 http://mirrors.ustc.edu.cn/ubuntu-ports xenial-security/main armhf Packages
Error writing to output file - write (28: No space left on device) Error writing to file - write (28: No space left on device) [IP: 202.141.176.110 80]
Ign:14 http://mirrors.ustc.edu.cn/ubuntu-ports xenial-security/universe armhf Packages
Fetched 10.0 MB in 28s (357 kB/s)
Reading package lists… Done
E: Failed to fetch http://mirrors.ustc.edu.cn/ubuntu-ports/dists/xenial/universe/binary-armhf/Packages Error writing to output file - write (28: No space left on device) Error writing to file - write (28: No space left on device) [IP: 202.141.176.110 80]
E: Failed to fetch http://mirrors.ustc.edu.cn/ubuntu-ports/dists/xenial-updates/universe/binary-armhf/Packages Error writing to output file - write (28: No space left on device) Error writing to file - write (28: No space left on device) [IP: 202.141.176.110 80]
E: Failed to fetch http://mirrors.ustc.edu.cn/ubuntu-ports/dists/xenial-security/main/binary-armhf/Packages Error writing to output file - write (28: No space left on device) Error writing to file - write (28: No space left on device) [IP: 202.141.176.110 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
Reading package lists… Done
Building dependency tree
Reading state information… Done
Package libc6:armhf 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:
libdb1-compat initscripts tzdata

E: Package ‘libc6:armhf’ has no installation candidate


#50

No space left on device. You need to change the image size.


#51

Thank you numbqq for the Hint.
I have done this but now the second Error stops me…

Packing update image using config: package.conf
[Msg]Pack Item[USB , DDR] from (images/upgrade/u-boot.bin.usb.bl2),sz[0xc000]B,
[Msg]Pack Item[USB , UBOOT] from (images/upgrade/u-boot.bin.usb.tpl),sz[0xac000]B,ft[normal]
[Msg]Pack Item[PARTITION , _aml_dtb] from (images/upgrade/kvim.dtb),[ERR]f(AmlImagePack.cpp)L1332:failed to open source file : images/upgrade/kvim.dtb
Image pack FAILED
Cleanup…
Makefile:27: die Regel für Ziel „server“ scheiterte
make: *** [server] Fehler 253

kvim.dtb is missing ??

I think it would be build from the script?
Have u please a Tip again?


#52

Hi schluri,

Well, I found that you choose mainline linux, but there is no eMMC installtion image for mainline linux now. You should choose linux 3.14 or 4.9. This issue need to be fixed…

Thanks.


#53

@numbqq

Thank you for fast response …
i ve build now with 3.14 … successfully build and works on vim :slight_smile:

Just for debuginfo: 4.9 same error as mainline …


#54

Hi schluri,

Well, found this issue, you need to update linux 4.9.

Thanks.


#55

Hello numbqq , update to 4.9 reports …

INSTALL include/linux/usb (11 files)
_ INSTALL include/linux/tc_act (14 files)_
_ INSTALL include/linux/wimax (1 file)_
_ INSTALL include/linux (438 files)_
_ INSTALL include/asm (36 files)_
make: Verzeichnis „/home/rudi/project/fenix/linux“ wird verlassen
cp: Aufruf von stat für ‘/home/rudi/project/fenix/linux/arch/arm64/boot/dts/amlogic/kvim.dtb’ nicht möglich: Datei oder Verzeichnis nicht gefunden
Cleanup…
Makefile:27: die Regel für Ziel „server“ scheiterte
_make: *** [server] Fehler

Current environment:_
===========================================emphasized text

#KHADAS_BOARD=VIM
#LINUX=4.9
#UBOOT=2015.01
#UBUNTU=16.04.2
#UBUNTU_ARCH=arm64
#INSTALL_TYPE=EMMC

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

3.14 works fine … but 4.9 Hangs


#56

kvim.dtb has not been built, it’s strange…

Are you sure this patch for linux 4.9 has been applied?


#57

so … i have reinstalled the fenix Script again …
start a make server with

#KHADAS_BOARD=VIM
#LINUX=4.9
#UBOOT=2015.01
#UBUNTU=16.04.2
#UBUNTU_ARCH=arm64
#INSTALL_TYPE=EMMC

and now the rootfs.img is missing …

:frowning:
must i do more as start the make server script to build a vim image for 4.9 ?

CHK include/generated/timeconst.h
CHK include/generated/bounds.h
CHK include/generated/asm-offsets.h
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
GZIP kernel/config_data.gz
CHK kernel/config_data.h
Building modules, stage 2.
MODPOST 5 modules
make[1]: Verzeichnis „/home/rudi/projekt/fenix/linux“ wird verlassen
dd: konnte ‘/home/rudi/projekt/fenix/build/images/rootfs.img’ nicht öffnen: Datei oder Verzeichnis nicht gefunden
Cleanup…
Makefile:27: die Regel für Ziel „server“ scheiterte
make: *** [server] Fehler 1



update: now i have a folder called /projekt/fenix/build/images_upgrade-7a276d5
try to rename it to images … and make server again … time will tell …

new errormessage after renameing … now…
LD [M] fs/aufs/aufs.ko
LD [M] drivers/media/usb/gspca/gspca_main.ko
LD [M] drivers/net/wireless/bcmdhd/dhd.ko
make[1]: Verzeichnis „/home/rudi/projekt/fenix/linux“ wird verlassen
dd: konnte ‘/home/rudi/projekt/fenix/build/images/rootfs.img’ nicht öffnen: Zu viele Ebenen aus symbolischen Links
Cleanup…
Makefile:27: die Regel für Ziel „server“ scheiterte
make: *** [server] Fehler 1

to much symbolic Links:frowning: @ :clock5:


#58

Hi schluri,

I think I find why /home/rudi/projekt/fenix/build/images/rootfs.img is missing. Sorry for this bug. You need to update Fenix.

You can’t rename images_upgrade-7a276d5 to images, they are different folders. Try to remove it.

$ rm -rf build/images

After update Fenix, try make server again.

Thanks.


#59

Hello Numbqq , just say Thank you for the fix
Script works very well , 4.9 16.04.3 emmc …

root@Khadas:~# cat /etc/issue
Ubuntu 16.04.3 LTS \n \l

root@Khadas:~# uname -a
Linux Khadas 4.9.40 #1 SMP PREEMPT Wed Jan 31 15:14:25 CET 2018 aarch64 aarch64 aarch64 GNU/Linux
root@Khadas:~#

:raising_hand_man: Greets Schluri


#60

Hi Nick.
In the last commit changed the build command from “make ubuntu-mate\server” in command “make” ?