Fenix images on VIM4

Which system do you use? Android, Ubuntu, OOWOW or others?

Ubuntu

Which version of system do you use? Khadas official images, self built images, or others?

Self-built

Please describe your issue below:

Will images built for VIM3 with fenix run on VIM4? If not, will the fenix repo on github be updated to support VIM4 boards? I’d like to build custom images based on Ubuntu 20.04 that run on this platform

1 Like

No, it is different SoC.

Yes, there already has a early version to support VIM4, you can check the VIM4 branch.
We are work on a new version to support VIM4, I will push to GitHub soon.

I just got a new vim4 as well. I’d love to build my own distro as well. Is there a tutorial that describes step by step procedure?

Nice. What distro do you want to make as there are so many flavors already and what difference will it have than the already existing ones?

No there is clear tutorial on how to make a distro but you can follow fenix guide to create your own distro for vim4 and make the necessary changes as per your taste.

1 Like

I want to have the latest fedora run on it. I’m a Java developer so new to building Linux distributions. But as long as there is some documentation I’ll be able to work with it.

What would the high level steps be for getting fedora running on vim4?

hei, what is the status of this?
would be really nice to have ubuntu20 support so to install ROS noetic (last ros1 supported version)
the alternative is to build ros1 from source on ubuntu22, which seems a very painfull process…
thanks!

1 Like

Already upload to GitHub, please check.

found it!
I will build it and test it now, thanks!

@numbqq so I built it correctly, I get the .img file but when I try to flash it on my VIM4 I get this error:

pol@pol-P15:~/repos/khadas/utils$ aml-burn-tool -b VIM4 -i /home/pol/repos/khadas/fenix/build/images/vim4-ubuntu-20.04-minimal-linux-5.4-fenix-1.0.11-220609-emmc-develop.raw.img
Burning image ‘/home/pol/repos/khadas/fenix/build/images/vim4-ubuntu-20.04-minimal-linux-5.4-fenix-1.0.11-220609-emmc-develop.raw.img’ for ‘VIM4’ to eMMC…
next try index 3, current opt arg /home/pol/repos/khadas/fenix/build/images/vim4-ubuntu-20.04-minimal-linux-5.4-fenix-1.0.11-220609-emmc-develop.raw.img
MSG[TLS]pkg path /home/pol/repos/khadas/fenix/build/images/vim4-ubuntu-20.04-minimal-linux-5.4-fenix-1.0.11-220609-emmc-develop.raw.img
MSG[TLS]exe run path:/home/pol/repos/khadas/utils/aml-flash-tool/tools/adnl
MSG[FLW]Aml_flow_init version V1.1-trunk Nov 1 2019!
MSG[FLW]Tooltype 3
DBG[FLW]ok in load lib AmlImagePack.so
MSG[FLW]OK leave Aml_flow_init

ERR[FLW]f(lua_res_release)L134:lua_res_release!
[ERR]f(AmlImagePack.cpp)L150:Err aml pkg magic 0x5085db4e
[ERR]f(aml_img_api_4_dll.cpp)L36:Fail in open img[/home/pol/repos/khadas/fenix/build/images/vim4-ubuntu-20.04-minimal-linux-5.4-fenix-1.0.11-220609-emmc-develop.raw.img]
ERR[FLW]f(usb_flow_img_load)L71:Fail in open img[/home/pol/repos/khadas/fenix/build/images/vim4-ubuntu-20.04-minimal-linux-5.4-fenix-1.0.11-220609-emmc-develop.raw.img]
ERR[FLW]f(Aml_Image_load)L176:Fail in read item from img, ret -72
ERR[TLS]f(main.cpp)L199:Fail in load img

Any help on this? thank you!

Don’t choose raw image when you build.

Nice! now the process starts, but it fails

pol@pol-P15:~/repos/khadas/utils$ aml-burn-tool -b VIM4 -i ../fenix/build/images/vim4-ubuntu-20.04-xfce-linux-5.4-fenix-1.0.11-220609-emmc-develop.img
Burning image '../fenix/build/images/vim4-ubuntu-20.04-xfce-linux-5.4-fenix-1.0.11-220609-emmc-develop.img' for 'VIM4' to eMMC...
next try index 3, current opt arg ../fenix/build/images/vim4-ubuntu-20.04-xfce-linux-5.4-fenix-1.0.11-220609-emmc-develop.img
MSG[TLS]pkg path ../fenix/build/images/vim4-ubuntu-20.04-xfce-linux-5.4-fenix-1.0.11-220609-emmc-develop.img
MSG[TLS]exe run path:/home/pol/repos/khadas/utils/aml-flash-tool/tools/adnl
MSG[FLW]Aml_flow_init version V1.1-trunk Nov  1 2019!
MSG[FLW]Tooltype 3
DBG[FLW]ok in load lib AmlImagePack.so
MSG[FLW]OK leave Aml_flow_init

ERR[FLW]f(lua_res_release)L134:lua_res_release!
[Msg]Image package version 0x2
MSG[FLW]open img ok
MSG[FLW]dll modulePath /home/pol/repos/khadas/utils/aml-flash-tool/tools/adnl/./usb_flow
MSG[FLW]Read usb_flow.aml with sz 188400
MSG[FLW]plug[0] add loader[usb_flow_dnl]
MSG[FLW]plug[0] add loader[aml_mod_imgdec]
MSG[FLW]plug[0] add loader[aml_mod_util]
MSG[FLW]plug[0] add loader[aml_mod_key_burn]
MSG[FLW]plug[0] add loader[aml_mod_tool_apis]
MSG[FLW]plug[0] add loader[aml_mod_fastboot_dev]
MSG[FLW]plug[0] add loader[aml_mod_key_init]
MSG[FLW]plug[0] add loader[usb_flow_image_load]
MSG[FLW]plug[0] add loader[aml_mod_worldcup_dev]
MSG[FLW]plug[0] add loader[usb_flow_worldcup]
MSG[FLW]plug[0] add loader[json]
MSG[FLW]Decrypt and load lua flow ok
MSG[FLW]dll modulePath /home/pol/repos/khadas/utils/aml-flash-tool/tools/adnl/./usb_flow
MSG[FLW]mod run time path /home/pol/repos/khadas/utils/aml-flash-tool/tools/adnl/./usb_flow
package.path=	/usr/local/share/lua/5.3/?.lua;/usr/local/share/lua/5.3/?/init.lua;/usr/local/lib/lua/5.3/?.lua;/usr/local/lib/lua/5.3/?/init.lua;./?.lua;./?/init.lua
package.cpath=	/home/pol/repos/khadas/utils/aml-flash-tool/tools/adnl/./usb_flow/?.so;/usr/local/lib/lua/5.3/?.so;/usr/local/lib/lua/5.3/loadall.so;./?.so;/usr/local/lib/lua/5.3/lib?53.so;./lib?53.so
MSG[AUL]_libInstallPath=/home/pol/repos/khadas/utils/aml-flash-tool/tools/adnl/./usb_flow
DBG[AUL]ok in load lib /home/pol/repos/khadas/utils/aml-flash-tool/tools/adnl/./usb_flow/AmlImagePack.so
DBG[AUL]ok in load lib /home/pol/repos/khadas/utils/aml-flash-tool/tools/adnl/./usb_flow/libamlfastboot.so
[FLW]LMsg[ImgLoad]--[Trunk]flow V2.7 version 0b4a88e-clean at Tue Mar 16 18:46:20 CST 2021
[FLW]LMsg[ImgLoad]imgPath[../fenix/build/images/vim4-ubuntu-20.04-xfce-linux-5.4-fenix-1.0.11-220609-emmc-develop.img]
DBG[AUL]to open [../fenix/build/images/vim4-ubuntu-20.04-xfce-linux-5.4-fenix-1.0.11-220609-emmc-develop.img]
[Msg]Image package version 0x2
MSG[AUL]OK in open pkg(../fenix/build/images/vim4-ubuntu-20.04-xfce-linux-5.4-fenix-1.0.11-220609-emmc-develop.img)
LMsg[Imgdec]item[conf,platform] sz 28, buf cap 28
LMsg[Imgdec]-----platform conf------
LMsg[Imgdec][Platform] 0x0812
LMsg[Imgdec][soctype] T7
LMsg[Imgdec]-----platform conf------
[FLW]LMsg[ImgLoad]maintype    	subtype     	FileFormat verify Cmd
[FLW]LMsg[ImgLoad]UBOOT       	aml_sdc_burn	normal	3248640
[FLW]LMsg[ImgLoad]dtb         	meson1      	normal	118493
[FLW]LMsg[ImgLoad]aml         	usb_flow    	normal	188400
[FLW]LMsg[ImgLoad]conf        	platform    	normal	28
[FLW]LMsg[ImgLoad]ini         	aml_sdc_burn	normal	589
[FLW]LMsg[ImgLoad]USB         	UBOOT       	normal	3248128
[FLW]LMsg[ImgLoad]USB         	DDR         	normal	3248128
[FLW]LMsg[ImgLoad]PARTITION   	_aml_dtb    	normal	118493	verify sha1sum 8054d327d2a23d3e655433bac38a71bb40eaa809
[FLW]LMsg[ImgLoad]PARTITION   	rootfs      	normal	4651483136	verify sha1sum be1c70cdb26074d0ff52de8693c2302afea8e228
[FLW]LMsg[ImgLoad]PARTITION   	bootloader  	normal	3248128	verify sha1sum 5fa0e38092667145c925115bafa3105c43a00cc9
[FLW]LMsg[ImgLoad]end parse image items
[FLW]LMsg[ImgLoad]Use extern key module
[FLW]LMsg[ImgLoad]internal key module init called
[FLW]LMsg[ImgLoad]use external key_provider_init xx
[FLW]LMsg[ImgLoad]use external aml_key
[FLW]LMsg[ImgLoad]Supported usb type nil
[FLW]LMsg[ImgLoad]json cfg /tmp/lua_ccpdzB
[FLW]LMsg[ImgLoad]Load jason OK
[FLW]LMsg[ImgLoad]Save ltype to jason OK
DBG[FLW]pcall ret true, errcode 0
MSG[FLW]imgCfgPath /tmp/lua_ccpdzB
MSG[TLS]Waiting for Amlogic DNL device ANY
MSG[TLS]Update path for existed dev
MSG[TLS]serial not specified, assign to 105660110991180200000000
MSG[TLS]cb: devicePath /dev/bus/usb/001/010
MSG[FLW]cDevType dnl
MSG[TLS]Get para ox0xffef98
MSG[FLW]device para 0x0xffef98
MSG[FLW]CREATE state for[105660110991180200000000]
MSG[FLW]plug[0] add loader[usb_flow_dnl]
MSG[FLW]plug[0] add loader[aml_mod_imgdec]
MSG[FLW]plug[0] add loader[aml_mod_util]
MSG[FLW]plug[0] add loader[aml_mod_key_burn]
MSG[FLW]plug[0] add loader[aml_mod_tool_apis]
MSG[FLW]plug[0] add loader[aml_mod_fastboot_dev]
MSG[FLW]plug[0] add loader[aml_mod_key_init]
MSG[FLW]plug[0] add loader[usb_flow_image_load]
MSG[FLW]plug[0] add loader[aml_mod_worldcup_dev]
MSG[FLW]plug[0] add loader[usb_flow_worldcup]
MSG[FLW]plug[0] add loader[json]
MSG[FLW]Decrypt and load lua flow ok
MSG[FLW]dll modulePath /home/pol/repos/khadas/utils/aml-flash-tool/tools/adnl/./usb_flow
DBG[FLW]to call usb_flow_dnl.lua
package.path=	/usr/local/share/lua/5.3/?.lua;/usr/local/share/lua/5.3/?/init.lua;/usr/local/lib/lua/5.3/?.lua;/usr/local/lib/lua/5.3/?/init.lua;./?.lua;./?/init.lua
package.cpath=	/home/pol/repos/khadas/utils/aml-flash-tool/tools/adnl/./usb_flow/?.so;/usr/local/lib/lua/5.3/?.so;/usr/local/lib/lua/5.3/loadall.so;./?.so;/usr/local/lib/lua/5.3/lib?53.so;./lib?53.so
MSG[AUL]_libInstallPath=/home/pol/repos/khadas/utils/aml-flash-tool/tools/adnl/./usb_flow
DBG[AUL]ok in load lib /home/pol/repos/khadas/utils/aml-flash-tool/tools/adnl/./usb_flow/AmlImagePack.so
LMsg[usbFlw]imgCfgPath /tmp/lua_ccpdzB
LMsg[usbFlw]get img cfg from json file /tmp/lua_ccpdzB
MSG[TLS][105660110991180200000000]LMsg[usbFlw]modUsb function: 0x1094ce0
DBG[AUL]p1 is 1, p2 is 2
MSG[TLS][105660110991180200000000]LMsg[usbFlw]Load mod dnl ok
MSG[TLS][105660110991180200000000]LMsg[usbFlw]to open img["../fenix/build/images/vim4-ubuntu-20.04-xfce-linux-5.4-fenix-1.0.11-220609-emmc-develop.img"]
DBG[AUL]to open [../fenix/build/images/vim4-ubuntu-20.04-xfce-linux-5.4-fenix-1.0.11-220609-emmc-develop.img]
[Msg]Image package version 0x2
MSG[AUL]OK in open pkg(../fenix/build/images/vim4-ubuntu-20.04-xfce-linux-5.4-fenix-1.0.11-220609-emmc-develop.img)
MSG[TLS][105660110991180200000000]LMsg[usbFlw]device path [/dev/bus/usb/001/010]
MSG[TLS][105660110991180200000000]LMsg[usbFlw]portXY=[[105660110991180200000000]]
DBG[AUL]To open dev: /dev/bus/usb/001/010
MSG[FB]busnum 1, devnum 10
MSG[TLS][105660110991180200000000]LMsg[usbFlw]Use extern key module
MSG[TLS][105660110991180200000000]LMsg[usbFlw]key module loaded
ERR[FB]data read failure (err 110)
ERR[AUL]f(l_aml_fastboot.cpp)L168:Fail in bulk IN, ret=110
MSG[TLS][105660110991180200000000]734LErr[usbFlw]Fail in bulk IN transfer, err 110
MSG[TLS][105660110991180200000000]LMsg[usbFlw]stack traceback:
MSG[TLS][105660110991180200000000]LMsg[usbFlw]	[string "usb_flow_dnl"]:917: in upvalue 'prERR'
MSG[TLS][105660110991180200000000]LMsg[usbFlw]	[string "aml_mod_fastboot_dev"]:734: in local 'p1'
MSG[TLS][105660110991180200000000]LMsg[usbFlw]	[string "aml_mod_util"]:467: in function <[string "aml_mod_util"]:461>
MSG[TLS][105660110991180200000000]LMsg[usbFlw]	(...tail calls...)
MSG[TLS][105660110991180200000000]LMsg[usbFlw]	[string "aml_mod_fastboot_dev"]:67: in function <[string "aml_mod_fastboot_dev"]:62>
MSG[TLS][105660110991180200000000]LMsg[usbFlw]	(...tail calls...)
MSG[TLS][105660110991180200000000]LMsg[usbFlw]	[string "aml_mod_fastboot_dev"]:265: in upvalue 'usb_cmd_getvar_bytes'
MSG[TLS][105660110991180200000000]LMsg[usbFlw]	[string "aml_mod_fastboot_dev"]:273: in method 'Identify'
MSG[TLS][105660110991180200000000]LMsg[usbFlw]	[string "usb_flow_dnl"]:975: in main chunk
LMsg[UTIL]setErr mod, no USB 2
MSG[TLS][105660110991180200000000]69LErr[usbFlw]Fail in read cmd result
MSG[TLS][105660110991180200000000]266LErr[usbFlw]io err while getvar:identify
MSG[TLS][105660110991180200000000]977LErr[usbFlw]Fail in identifyHost
DBG[FLW]pcall ret false, errcode 0
ERR[FLW]f(Aml_Device_plugin)L366:Fail in call usb_flow_dnl.lua, ret 1
MSG[TLS][105660110991180200000000]burn FAIL!!Oh-Oh-Oh!!

any idea?
thank you

Same problem I had with it.

You can log in using the debug port, desktop does not start and all I see is Khadas spash screen. I did not attempt to try to find a problem, just installed 22. and it works.

Just thought about this, might try this using the debug port and see what happens. login will be khadas

$ sudo apt install ubuntu-desktop

@foxsquirrel
thank you for the tip
I have been using Fenix to build all the possible combination of display managers and nothing seems to work.
the only image working out of the box is the -server, which does not provide a gui interface (of course)

any feedback? @numbqq
thank you,

P.

Have you tried working on it via the backdoor debug port ? I don’t know enough about that issue to begin troubleshooting. It seems odd that it is actually running and gui is not. It might be the drivers for that kernel version and Ubuntu version just will not work.

I would like to get 20.04 going on the VIM4, if you find a solution please keep me in the loop.

What’s your host PC? Can you check another USB host or USB cable ?

Sorey but how is the usb host related?
Even if I flash the ubuntu server and then I install a gui via apt i have the same issue
The display manager does not work (service lightdm not started at boot for example

I will work on this more today

It’s not really a big issue to work without gui to be honest, just less convenient

Please use fenix to build desktop image directly.
Install desktop from server image still some other thinks to do.

I used fenix to build all the possible ubuntu 20 configuration, only the ‘server’ and ‘minimal’ seem to work
and flash them using the burning tool

gnome, xfce, lightdm, none of these works

here’s my /images folder just to understand:

image

also the aml burnin tool does not seem to work in ubuntu 20
am I missing some library here?

" burn FAIL!!Oh-Oh-Oh!! "
you guys are really funny ahaha

windows10 works fine, on the contrary

Need to check desktop with Ubuntu 20.04, we only tested with Ubuntu 22.04 at this moment, maybe have issues for Ubuntu 20.04.

2 Likes