The officially official Devuan Forum!

You are not logged in.

#1 2020-09-18 17:07:37

anto
Member
Registered: 2017-01-04
Posts: 5  

Devuan on Khadas VIM3

Hello Everybody,

I just bought Khadas VIM3 board (https://docs.khadas.com/vim3/) and of course I have to install Devuan on it. big_smile

Did anybody successfully do that already?

What is your suggestion? Netinstall, adapt https://github.com/khadas/fenix to Devuan then compile it, or something else?

Thanks a lot in advance for your help.

Kind regards,

Anto

Offline

#2 2020-09-18 19:15:25

tuxd3v
Member
Registered: 2019-11-14
Posts: 123  

Re: Devuan on Khadas VIM3

hello anto,

I don't own a Khadas ViM3 sad
I have been adding support for it in the builder:
https://gitea.devuan.org/tuxd3v/edev1

The builder assume you are working in a 'i686' or you could be working in amd64( I can help you to configure for amd64.. )..

Does you have a Serial Adapter to connect to the board to see the output?

If so, you can start by building a bootloader for it, and burn it to the sdcard,. smile
if the A311D, has the same bootloader scheme as the S905X3, you should start burning the bootloader at sector 1 of the sdcard..

Then try to boot the board connecting the serial adapter and then the power.. smile

EDIT: I generated a devuan rootfs for you , its HERE   smile

Last edited by tuxd3v (2020-09-18 23:12:51)


Best Regards,
tux

Offline

#3 2020-09-19 07:19:12

anto
Member
Registered: 2017-01-04
Posts: 5  

Re: Devuan on Khadas VIM3

Hello Tux,

Thanks a lot for the Beowulf rootfs. I will try that one.

At the moment, the status of my VIM3 board is still scatter on my desk big_smile.

My Khadas VIM3 Pro

I have just opened the boxes last night.

I still could not locate the Serial adapter of my old Raspberry Pi, but yes I plan to connect the Serial adapter for development and troubleshooting purpose.

After I assemble it, perhaps I will see how it behaves using the Ubuntu image on https://dl.khadas.com/Firmware/VIM3/Ubuntu/SD_USB/.

In regards to the Embedded Devuan Builder, I am indeed using i686. Perhaps later on I can provide more information for building Khadas VIM3.

I will keep you posted.

Kind regards,

Anto

Offline

#4 2020-09-19 22:06:15

tuxd3v
Member
Registered: 2019-11-14
Posts: 123  

Re: Devuan on Khadas VIM3

anto wrote:

Hello Tux,
Thanks a lot for the Beowulf rootfs. I will try that one.

In regards to the Embedded Devuan Builder, I am indeed using i686. Perhaps later on I can provide more information for building Khadas VIM3.

I will keep you posted.

You welcome

Its a nice setup, that you have here.. smile
Nice!
You even brought the Fan, make some tests pushing the board at full throttle later and check the temps, so that we can have an idea of the Fan efficiency smile

Best Regards,
tux


Best Regards,
tux

Offline

#5 2020-09-20 13:41:16

anto
Member
Registered: 2017-01-04
Posts: 5  

Re: Devuan on Khadas VIM3

My progress up to now.

Unfortunately, I could not extract the ROOTFS provided by Tux below.

tuxd3v wrote:

EDIT: I generated a devuan rootfs for you , its HERE   smile

I got the following error extracting it.

anto@hp8570w:/data/Development/Khadas_VIM3/RootFS$ tar -xvf ViM3_devuan_beowulf_3.0.0_arm64.tar
ViM3_devuan-beowulf-base-arm64/
ViM3_devuan-beowulf-base-arm64/rootfs/
.
.
ViM3_devuan-beowulf-base-arm64/rootfs/srv/
tar: Exiting with failure status due to previous errors
anto@hp8570w:/data/Development/Khadas_VIM3/RootFS$ 

So I built my own ROOTFS files using Debootstrap.

anto@hp8570w:/data/Development/Khadas_VIM3/mkdir Devuan_ARM64
anto@hp8570w:/data/Development/Khadas_VIM3/qemu-debootstrap --arch arm64 beowulf Devuan_ARM64 http://deb.devuan.org/merged/
anto@hp8570w:/data/Development/Khadas_VIM3/chroot Devuan_ARM64
<--- did some setup --->

I then cleaned up the content of the ROOTFS of the SD card built from the image on https://dl.khadas.com/Firmware/VIM3/Debian/, then copied the content of the above /data/Development/Khadas_VIM3/Devuan_ARM64 into it.

At the first boot, of course I got errors as below.

root@khadas-vim3:~# dmesg
[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 5.9.0-rc2 (master@universe) (aarch64-none-linux-gnu-gcc (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10)) 9.2.1 20191025, GNU ld (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10)) 2.33.1.20191209) #0.9.3 SMP Thu Aug 27 17:22:08 CST 2020
[    0.000000] Machine model: Khadas VIM3
[    0.000000] [Firmware Bug]: Kernel image misaligned at boot, please fix your bootloader! <----------------- Of course!
[    0.000000] Reserved memory: created CMA memory pool at 0x00000000bd800000, size 768 MiB
.
.
[    5.037537] udevd[1659]: starting version 3.2.7
[    5.061230] random: udevd: uninitialized urandom read (16 bytes read)
[    5.066475] random: udevd: uninitialized urandom read (16 bytes read)
[    5.070166] random: udevd: uninitialized urandom read (16 bytes read)
[    5.082134] udevd[1659]: specified group 'kvm' unknown
[    5.138032] udevd[1659]: starting eudev-3.2.7
[    5.141100] udevd[1659]: specified group 'kvm' unknown
[    5.210835] udevd[1699]: could not open moddep file '/lib/modules/5.9.0-rc2/modules.dep.bin'  <------------ Missing as I am using linux-image-4.19.0-10-arm64
[    5.215218] udevd[1699]: could not open moddep file '/lib/modules/5.9.0-rc2/modules.dep.bin'  <------------ Missing as I am using linux-image-4.19.0-10-arm64
[    6.331356] meson8b-dwmac ff3f0000.ethernet eth0: PHY [0.0:00] driver [RTL8211F Gigabit Ethernet] (irq=31)
.
.

Then I tried to natively compile linux-5.9-rc2 that I downloaded from https://git.kernel.org/pub/scm/linux/ke … linux.git/, with the hope (naive beginner's hope big_smile) that the boot loader image will be aligned. After I installed the new kernel and rebooted, surprisingly the boot loader is still not aligned big_smile. Though udev is not complaining anymore with the missing modules.deb.bin as it exists now.

root@khadas-vim3:~# ls -ltr /lib/modules/5.9.0-rc2
total 1480
-rw-r--r--  1 root root 166701 Sep 20 13:35 modules.symbols.bin
-rw-r--r--  1 root root 132517 Sep 20 13:35 modules.symbols
-rw-r--r--  1 root root    196 Sep 20 13:35 modules.softdep
-rw-r--r--  1 root root  43373 Sep 20 13:35 modules.order
-rw-r--r--  1 root root    196 Sep 20 13:35 modules.devname
-rw-r--r--  1 root root 154606 Sep 20 13:35 modules.dep.bin
-rw-r--r--  1 root root 105384 Sep 20 13:35 modules.dep
-rw-r--r--  1 root root 107645 Sep 20 13:35 modules.builtin.modinfo
-rw-r--r--  1 root root  19091 Sep 20 13:35 modules.builtin.bin
-rw-r--r--  1 root root  15929 Sep 20 13:35 modules.builtin
-rw-r--r--  1 root root 383826 Sep 20 13:35 modules.alias.bin
-rw-r--r--  1 root root 357179 Sep 20 13:35 modules.alias
drwxr-xr-x 10 root root   4096 Sep 20 14:24 kernel
root@khadas-vim3:~#

I think without a proper tool, I would not be able to compile the boot loader. Or is there any other way to generate the boot loaded image that is aligned with the kernel?

Does anybody have any hints or suggestion on this?

Thanks a lot in advance for your help.

Offline

#6 2020-09-20 18:46:57

tuxd3v
Member
Registered: 2019-11-14
Posts: 123  

Re: Devuan on Khadas VIM3

hello anto,
I forgot to say that, to extract my ROOTFS, you will need to do it as root( because there are inside folders that only root has access too... that is the motive why it is failing.. ).
for example:

sudo tar -xzvf ViM3_devuan_beowulf_3.0.0_arm64.tar.gz

Login Credentials:
root      : toor
devuan: devuan

Then you will need to copy:
* The kernel to rootfs/boot
* 'boot.scr' script to rootfs/boot
* copy '/lib/modules/Kernel_version' to rootfs/lib/modules
* the Device tree binary file( dtb ) to maybe rootfs/boot/dtb??( the place is defined in the 'boot.scr' script sad , my advice would be to try to read it and understand what it does, and the places it checks, and then copy the dtb to that place, you can try with 'strings  /boot/boot.scr'  )



But you can start by creating your own bootloader and later the kernel image..
The kernel image you will need to get a working one, if you don't want your hands to get very dirty, you can copy the '/proc/config.gz' of a working image, as a start..

# modprobe configs
# zcat /proc/config.gz

edev1 builder will create the bootloader for you, but you will need to create the boot.scr by hand( based on the boot.scr of the image you already have..with 'strings  /boot/boot.scr'  )

You create by hand the 'boot.cmd' as a text file, then compile it to binary( 'boot.scr' ), with:

mkimage -C none -A arm64 -T script -d boot.cmd boot.scr

I see there a mesg line with:

[    0.000000] Reserved memory: created CMA memory pool at 0x00000000bd800000, size 768 MiB

768 MB is insanely high,
A value of [ 128 - 256MB ] is very good.
but this is only a optimization, and nothing to do with the problem you are facing.. smile

Last edited by tuxd3v (2020-09-20 22:07:20)


Best Regards,
tux

Offline

#7 2020-10-08 01:46:27

tuxd3v
Member
Registered: 2019-11-14
Posts: 123  

Re: Devuan on Khadas VIM3

hello anto,
does you know, if its possible to power up the board with Qualcomm QuickCharge, via usb type C?


Best Regards,
tux

Offline

Board footer