linux-armv7-xe303c12-only
linux-armv7-xe303c12-only copied to clipboard
How to regenerate modules for the 5.4.244 kernel recompiled with the bridge enabled.
Helllo.
At the end I've been able to boot FreeBSD 13.2 for armv7 as guest OS on my ARM Chromebook using these qemu parameters :
EFICODE=/home/marietto/Dati/Si/AAVMF32_CODE.fd
UEFIVARS=/home/marietto/Dati/Si/AAVMF32_VARS.fd
CD=/home/marietto/Dati/Si/FreeBSD-13.2-RELEASE-arm-armv7-GENERICSD.img
DISK=/home/marietto/Dati/Si/FreeBSD.img
qemu-system-arm \
-enable-kvm -serial stdio \
-m 512 -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=$CD,media=disk,format=raw \
-drive file=$DISK,format=raw \
-device i82559er,netdev=net0,mac="52:54:00:12:34:55" \
-netdev tap,ifname=tap0,script=no,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
I've recompiled kernel 5.4.244 because I need to create a qemu bridged or tun tapped connection and I realized that in the config file the parameter bridge was disabled (CONFIG_BRIDGE not set) as well as the IP TABLES (CONFIG_NF_TABLES not set). I have also recompiled the kernel modules like follows :
root@devuan:/home/marietto/Dati/No/linux-5.4.244# make modules
no errors
and :
root@devuan:/home/marietto/Dati/No/linux-5.4.244# make modules install
LD [M] sound/usb/snd-usbmidi-lib.ko
sh ./arch/arm/boot/install.sh "5.4.244" \
arch/arm/boot/Image System.map "/boot"
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 5.4.244 /boot/vmlinuz-5.4.244
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 5.4.244 /boot/vmlinuz-5.4.244
update-initramfs: Generating /boot/initrd.img-5.4.244
cryptsetup: ERROR: Couldn't resolve device /dev/root
cryptsetup: WARNING: Couldn't determine root device
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 5.4.244 /boot/vmlinuz-5.4.244
But mouse,keyboard and trackpad does not work.
i do not install anything in that way so do not know what the issue could be.
When i build kernel, i use something like that:
make zImage modules dtbs uImage LOADADDR=0x80008000
## create deb-pkg dirs
mkdir ${basedir}/kernel_pkg
mkdir ${basedir}/kernel_pkg/boot
mkdir ${basedir}/kernel_pkg/boot/dtbs
mkdir ${basedir}/kernel_pkg/boot/reflash
mkdir ${basedir}/kernel_pkg/DEBIAN
make modules_install INSTALL_MOD_PATH=${basedir}/kernel_pkg
cp -f arch/arm/boot/dts/exynos5250-snow.dtb ${basedir}/kernel_pkg/boot/dtbs/exynos5250-snow.dtb
cp -f arch/arm/boot/dts/exynos5250-snow-rev5.dtb ${basedir}/kernel_pkg/boot/dtbs/exynos5250-snow-rev5.dtb
cp -f arch/arm/boot/zImage ${basedir}/kernel_pkg/boot/zImage
cp -f arch/arm/boot/zImage ${basedir}/zImage
cp -f arch/arm/boot/uImage ${basedir}/kernel_pkg/boot/uImage
where ${basedir} is a build folder then I build deb package
By the way kernel ver. 5.4.254 is available at kernel.org
Ok thanks. Are you able to recompile kernel 5.4.244 with bridge,iptables and nftables enabled ? If yes,can you do it and can you provide to me the whole package as you did for the 5.4.244 ? (including the deb file and the kernel config file ?. I'm working on these points from some time without being able. Those options are necessary to configure the network to allow qemu to give a proper connection inside the guest os (in my case FreeBSD) ; I find very strange that they are disabled,anyway,but they are. In the meantime I continue to try to reach that goal following a not traditional approach,because I failed too much times with this.
If I get the kernel 5.4 config file of Ubuntu for armhf and then I use it with the devuan 4,can this approach work ? I know that Ubuntu has a release,more or less it is 20.04,that I can install on a different sd card and then I can extract the kernel config file and I should hope that it is already configured for the bridge / iptables and / or the nftables. For sure that kernel conf. file will not be configured to enable kvm,but this step is easier.
I've got the kernel config file of Debian (running with the kernel 5.4) for armhf on the github of hexdump0815,here :
https://github.com/hexdump0815/imagebuilder/releases/download/200206-01/chromebook_snow-armv7l-debian.img.gz
and I have enabled all the KVM entries,hoping that the entries for iptables or nftables were all selected and...I've been lucky :
root@devuan:~# iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
ok
The iptables now work. KVM works. But the tuptap network interface does not work. So,there are further missing entries on the kernel file.
root@devuan:~# ip tuntap add tap0 mode tap
open: No such file or directory
root@devuan:~# modprobe tun
modprobe: FATAL: Module tun not found in directory /lib/modules/5.4.244-stb-cbe