Ufw on Debian10 BSP on RSB-3710 cannot work

I got the error about ufw on Debian10 BSP on RSB-3710 cannot work.
There is no problem with installing ufw. If you enable it after installation, an error will occur.
Could you please help to enable ufw on Debian with RSB-3710?

[Environment]
The image I use is here.
https://ess-wiki.advantech.com.tw/view/RSB-3710_user_guide_Debain10#.E5.BF.AB.E9.80.9F.E5.85.A5.E9.97.A8_.28Quick_Start.29

[Detail]
After getting ufw by apt, I tried to use it but it cannot be enabled by following steps.

root@linaro-alip:~# ufw reset Resetting all rules to installed defaults. This may disrupt existing ssh connections. Proceed with operation (y|n)? y Backing up ‘user.rules’ to ‘/etc/ufw/user.rules.20241108_052257’ Backing up ‘before.rules’ to ‘/etc/ufw/before.rules.20241108_052257’ Backing up ‘after.rules’ to ‘/etc/ufw/after.rules.20241108_052257’ Backing up ‘user6.rules’ to ‘/etc/ufw/user6.rules.20241108_052257’ Backing up ‘before6.rules’ to ‘/etc/ufw/before6.rules.20241108_052257’

Backing up ‘after6.rules’ to ‘/etc/ufw/after6.rules.20241108_052257’

Check the status. It is inactive.

root@linaro-alip:~# ufw status
Status: inactive

Enable it.

root@linaro-alip:~# ufw enable

Command may disrupt existing ssh connections. Proceed with operation (y| n)? y
ERROR: problem running ufw-init
modprobe: ERROR: …/libkmod/libkmod.c:514 lookup_builtin_file() could not open builtin file ‘/lib/modules/4.4.194/modules.builtin.bin’
modprobe: FATAL: Module nf_conntrack_ftp not found in directory /lib/modules/4.4.194
modprobe: ERROR: …/libkmod/libkmod.c:514 lookup_builtin_file() could not open builtin file ‘/lib/modules/4.4.194/modules.builtin.bin’
modprobe: FATAL: Module nf_nat_ftp not found in directory /lib/modules/4.4.194
modprobe: ERROR: …/libkmod/libkmod.c:514 lookup_builtin_file() could not open builtin file ‘/lib/modules/4.4.194/modules.builtin.bin’
modprobe: FATAL: Module nf_conntrack_netbios_ns not found in directory /
lib/modules/4.4.194
iptables-restore v1.8.2 (legacy): Couldn’t load match limit':No such file or directory Error occurred at line: 63 Try iptables-restore -h’ or ‘iptables-restore --help’ for more information.
iptables-restore v1.8.2 (legacy): Couldn’t load match limit':No such file or directory Error occurred at line: 8 Try iptables-restore -h’ or ‘iptables-restore --help’ for more information.
Problem loading ipv6 (skipping)
Problem running ‘/etc/ufw/before.rules’
Problem running ‘/etc/ufw/user.rules’

Hi~

Search on the website, and it needs to enable some configuration in the kernel config to support it. Could you reference the link below to take a try?
Ufw - Gentoo wiki
Linux Packet Filtering and iptables - Kernel setup

Hello Jems,

Thank you for sharing information.
In my recongnition, the debian image is only provided as binary.
In this case, how to configure kernel?
You mean, does it need to rebuild in eMMC?

Hi~

Yes, the RISC is a customized project so please reference the link to customize the image for your application.

Debian BSP User Guide for rk3399 risc series - ESS-WIKI

Best Regards,
Jems

1 Like

Hi Jems,

Thanks to your support.

Now I’m build image with procedures you shared.
https://ess-wiki.advantech.com.tw/view/Debian_BSP_User_Guide_for_rk3399_risc_series#Build_Debian_9.x_.2F_Debian_10.x

In this Build Debian 10.x session, I face the error on “mk-rootfs-buster.sh” in below command execution.
“$ sudo BUILD_IN_DOCKER=TRUE ./mk-debian.sh”

chroot: failed to run command ‘/bin/bash’: Exec format error

Could you help again to build image?

regards.

Hi~

Could you help to check if this can help?
You need to install qemu-user-static on your x86/x86_64 computer:
sudo apt-get install qemu-user-static

Hi Jems,

Thanks, it works and build image completely.
One more question.
Where is the Flash tool for rockchip device?
I don’t find this tool on your website.
https://ess-wiki.advantech.com.tw/view/RSB-3710_user_guide_Debain10#Debian.C2.A0.E7.87.92.E9.8C.84.E6.96.B9.E6.B3.95_.28.C2.A0Flash_Debian_image_into_eMMC_Method.29.C2.A0

Regards

Hi~

For Debian10 image, it can download the image from the Released Note link


Or it can click the link below to download the RSB-3710 Debian10 image.
2021-04-15 - Dropbox

The flash tool is including in the image. Copy and replace the image files with you built to the "RSB3710A2AIM20DIV251013_2021-04-15\rockdev\image" folder and follow the user guide to flash image.

Hi Jems,

Oh I missed it. Got it, thanks.

Sorry but could I ask one more?

To build driver for RSB-3710, I would like to make a environment with cross compile on host PC.
Like Yocto (–populate_sdk), how do I create a cross-compiling environment?

I thought that if I followed the customization steps by this , I would be able to use the linker settings etc., but when I did so, the Kernel Version of the RSB-3710 image was 6.5.0, and it couldn’t reference the kernel source (4.4.194). (There are no kernel sources under /lib/modules, neither for 6.5.0 nor for 4.4.194.)
image

Anyway, I would like to create a cross-compiling environment.

regards.

Hi~

If you follow the BSP user guide steps build kernel below, here will navigator to the kernel source and make the rk3399_adv_deconfig.

Here can reference the Makefile to check how to set the Cross compiler:
linux_kernel-rk/Makefile at rk3399_linux_v251_risc ¡ ADVANTECH-Rockchip/linux_kernel-rk

Here can find the “aarch64-linux-gnu-” in the prebuilts folder.
linux_prebuilts/gcc/linux-x86/aarch64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin at rk3399_linux_v251_risc ¡ ADVANTECH-Rockchip/linux_prebuilts