qemu I'm trying to virtualize FreeBSD 13.2 for armv7 on my ARM Chromebook (armhf) with qemu-kvm

It still does not work,I don't know why,but it does not recognize the virtio-disk that I have modified before applying the patch...and it does not recognizes also the original img file : "FreeBSD-13.2-RELEASE-arm-armv7-GENERICSD.img"

Screenshot_2023-09-29_10-44-06.png


Screenshot_2023-09-29_10-43-33.png
 
It stops here :

Building /boot/kernel/linker.hints

do you have a vague idea about why ? it seems an error related to the kernel ? I've copied the dtb and the kernel dirs to the boot directory of the freebsd img file. Something else could be missing ?

this error gone away when I've used 1024 gb of memory instead of 400 or 500 mb.
 
Instead,using these qemu parameters,FreeBSD is able to boot enterely :

Code:
DISK=/Dati/img/FreeBSD-13.2-RELEASE-arm-armv7-GENERICSD.img

qemu-system-arm \
-enable-kvm -serial stdio \
 -m 1024 -M virt -cpu cortex-a15 \
-drive if=pflash,format=raw,unit=0,file=$UEFICODE \
-drive if=pflash,format=raw,unit=1,file=$UEFIVARS \
-drive file=$DISK,media=disk,format=raw \
-device i82559b,netdev=net0,mac="52:54:00:12:34:55" \
-netdev type=user,id=net0 \
-device virtio-gpu-pci \
-usb -device nec-usb-xhci \
-device usb-kbd -device usb-mouse \
-device vmware-svga,id=video0,vgamem_mb=16

So,this argument is good :

Code:
    -drive file=$DISK,media=disk,format=raw \

but these aren't :

Code:
<disk type="file" device="disk">
  <driver name="qemu" type="raw"/>
  <source file="/Dati/img/FreeBSD-13.2-RELEASE-arm-armv7-GENERICSD.img"/>
  <target dev="vda" bus="virtio"/>
  <address type="pci" domain="0x0000" bus="0x04" slot="0x00" function="0x0"/>
</disk>

what's the difference ?
 
Maybe these FreeBSD boot log messages (that I have recorded when FreeBSD booted properly using qemu,without libvirt) can be useful to understand what's wrong :

 
The next to last line looks like a Tiano EDK2 UEFI boot process.
[I would have cut and paste here but you posted an image]

Why does it have a null string... Like a missing setting.
 
Like I have mentioned before I have no QEMU experience but the process seems to parallel Bhyve.
On bhyve you can open up the UEFI firmware of a VM just like a regular computer.
Set boot drive and options.

Since this appears to be booting EDK2 firmware have you tried getting into the firmware? See what the target is.

Maybe the problem will become more apparent.
 
I've fixed the problem. The point was that qemu accepts the virtio disk as :

Code:
-drive file=$DISK,media=disk,format=raw \

but libvirt wants this kind of disk :

Code:
<disk type="file" device="disk">
<driver name="qemu" type="raw"/>
<source file="/Dati/img/FreeBSD-13.2-RELEASE-arm-armv7-GENERICSD.img" index="1"/>
<backingStore/>
<target dev="sda" bus="usb"/>
<alias name="usb-disk0"/>
<address type="usb" bus="0" port="1"/>
</disk>
 
Someone wants to explain to me because a lot of packages are missing inside my FreeBSD 13.2 for armV7 installation ? I don't see firefox,xfce,kde,lxde,peek...and so on.
 
xfce,kde,lxde
No chance. You have to use a lighter desktop than those. Armv7 is pretty much embedded use in my opinion.
Still viable but limited.
Enlightment and OpenBox worked for me in the past. I did run LXDE on BBB for a challenge.

Package Fallout means the FreeBSD Package Build Server failed to build a port.

See the Nuclear Fallout sign at top of FreshPorts???? www/firefox
That means something did not build. Maybe only one ARCH failed.
There is FALLOUT.
Somebody must fix because robot can't build and is reporting back. FAILED.
Poudiere is the robot builder in this case.

If you notice that 'Quarterly' Armv7 failed for Firefox. It can't hurt to try 'latest'.
Maybe the fallout has been fixed.
 
otter-browser can't be compiled correctly :

Code:
libtool: compile:  cc -DHAVE_CONFIG_H -I. -I../.. -I./../../gl -I./../../gl -I./../includes -I./../includes -I
./.. -DLIBICONV_PLUG -isystem /usr/local/include -D_THREAD_SAFE -I/usr/local/include -Wtype-limits -fno-common
 -Wall -Wbad-function-cast -Wdate-time -Wdisabled-optimization -Wdouble-promotion -Wextra -Winit-self -Winvali
d-pch -Wmissing-declarations -Wmissing-include-dirs -Wmissing-prototypes -Wnested-externs -Wnull-dereference -
Wold-style-definition -Wpacked -Wpointer-arith -Wshadow -Wstrict-prototypes -Wuninitialized -Wunknown-pragmas 
-Wvariadic-macros -Wwrite-strings -Wformat=2 -Wno-missing-field-initializers -Wno-unused-parameter -fdiagnosti
cs-show-option -fno-builtin-strcmp -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local
/include/p11-kit-1 -O2 -pipe -DLIBICONV_PLUG -fstack-protector-strong -isystem /usr/local/include -fno-strict-
aliasing -MT privkey_pkcs8_pbes1.lo -MD -MP -MF .deps/privkey_pkcs8_pbes1.Tpo -c privkey_pkcs8_pbes1.c  -fPIC 
-DPIC -o .libs/privkey_pkcs8_pbes1.o 
privkey_pkcs8_pbes1.c:34:10: fatal error: 'nettle/md5.h' file not found 
#include <nettle/md5.h> 
         ^~~~~~~~~~~~~~ 
1 error generated. 
gmake[16]: *** [Makefile:2261: privkey_pkcs8_pbes1.lo] Error 1 
gmake[16]: Leaving directory '/usr/ports/security/gnutls/work/gnutls-3.7.10/lib/x509' 
gmake[15]: *** [Makefile:2140: all] Error 2 
gmake[15]: Leaving directory '/usr/ports/security/gnutls/work/gnutls-3.7.10/lib/x509' 
gmake[14]: *** [Makefile:2903: all-recursive] Error 1 
gmake[14]: Leaving directory '/usr/ports/security/gnutls/work/gnutls-3.7.10/lib' 
gmake[13]: *** [Makefile:2507: all] Error 2 
gmake[13]: Leaving directory '/usr/ports/security/gnutls/work/gnutls-3.7.10/lib' 
gmake[12]: *** [Makefile:2262: all-recursive] Error 1 
gmake[12]: Leaving directory '/usr/ports/security/gnutls/work/gnutls-3.7.10' 
gmake[11]: *** [Makefile:2187: all] Error 2 
gmake[11]: Leaving directory '/usr/ports/security/gnutls/work/gnutls-3.7.10' 
*** Error code 1 

Stop. 
make[10]: stopped in /usr/ports/security/gnutls 
*** Error code 1 

Stop. 
make[9]: stopped in /usr/ports/security/gnutls 
*** Error code 1 

Stop. 
make[8]: stopped in /usr/ports/print/cups 
*** Error code 1 

Stop. 
make[7]: stopped in /usr/ports/print/cups 
*** Error code 1 

Stop. 
make[6]: stopped in /usr/ports/x11-toolkits/gtk30 
*** Error code 1 

Stop. 
make[5]: stopped in /usr/ports/x11-toolkits/gtk30 
*** Error code 1 

Stop. 
make[4]: stopped in /usr/ports/multimedia/gstreamer1-plugins-bad 
*** Error code 1 

Stop. 
make[3]: stopped in /usr/ports/multimedia/qt5-multimedia 
*** Error code 1 

Stop. 
make[2]: stopped in /usr/ports/multimedia/qt5-multimedia 
*** Error code 1 

Stop. 
make[1]: stopped in /usr/ports/www/otter-browser 
*** Error code 1 

Stop. 
make: stopped in /usr/ports/www/otter-browser
 
otter-browser can't be compiled correctly :
In case I was not clear here, You need to run make config and change default options.
These two options need reversal:

Look at the FreshPorts page; www/otter-browser
Configuration Options:
QTWEBENGINE=on
QTWEBKIT=off

So switch this and use Webkit backend.
See if it builds for you.

Similar instructions apply to www/falkon on Arm32. There are different backend options.
 
should I inform the maintainer ?
Well it can't hurt but this port is maintained by @gecko and I have a feeling not many FreeBSD port maintainers are willing to work on fixing it for Armv7.

I talked to jmos about SeaMonkey on Arm64 and he laughed. I understand.
It is a very weak target for the work involved. Not all port developers care about Arm or have the time.
Is a port maintainer supposed to have Arm32, Arm64, RiscV, PowerPC......ect.ect?
So many targets so little time.

You saw the port and its Mach build engine in action. It is a BEAST.

I tried a cursory SeaMonkey compile on Arm64 and it failed.
Jose helped me get through one set of errors but another cropped up. That was too much for me.

aarch64 has better ports support but it still not great.
 
----> You saw the port and its Mach build engine in action. It is a BEAST.

what's "Mach build engine" ?
 
Back
Top