# Ufw on Debian10 BSP on RSB-3710 cannot work

**URL:** <https://forum.aim-linux.advantech.com/t/ufw-on-debian10-bsp-on-rsb-3710-cannot-work/897>\
**Category:** Technical Supports\
**Created:** [November 22, 2024, 10:38am UTC](https://forum.aim-linux.advantech.com/t/ufw-on-debian10-bsp-on-rsb-3710-cannot-work/897 "2024-11-22T10:38:18Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![ITMac](https://avatars.discourse-cdn.com/v4/letter/i/3ec8ea/32.png) [@ITMac](https://forum.aim-linux.advantech.com/u/ITMac)\
**Post date:** [November 22, 2024, 10:38am UTC](https://forum.aim-linux.advantech.com/t/ufw-on-debian10-bsp-on-rsb-3710-cannot-work/897/1 "2024-11-22T10:38:18Z")

</div>

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](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’

---

<div class="post-metadata">

**Author:** ![Jems\_Cheng](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@Jems\_Cheng](https://forum.aim-linux.advantech.com/u/Jems_Cheng)\
**Post date:** [December 3, 2024, 4:39am UTC](https://forum.aim-linux.advantech.com/t/ufw-on-debian10-bsp-on-rsb-3710-cannot-work/897/2 "2024-12-03T04:39:57Z")

</div>

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](https://wiki.gentoo.org/wiki/Ufw)  
[Linux Packet Filtering and iptables - Kernel setup](https://www.linuxtopia.org/Linux_Firewall_iptables/x651.html#google_vignette)

---

<div class="post-metadata">

**Author:** ![ITMac](https://avatars.discourse-cdn.com/v4/letter/i/3ec8ea/32.png) [@ITMac](https://forum.aim-linux.advantech.com/u/ITMac)\
**Post date:** [December 4, 2024, 2:08am UTC](https://forum.aim-linux.advantech.com/t/ufw-on-debian10-bsp-on-rsb-3710-cannot-work/897/3 "2024-12-04T02:08:19Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Jems\_Cheng](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@Jems\_Cheng](https://forum.aim-linux.advantech.com/u/Jems_Cheng)\
**Post date:** [December 4, 2024, 9:26am UTC](https://forum.aim-linux.advantech.com/t/ufw-on-debian10-bsp-on-rsb-3710-cannot-work/897/4 "2024-12-04T09:26:34Z")

</div>

Hi~

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

 ![image](https://us1.discourse-cdn.com/flex016/uploads/aim_linux/original/2X/e/e401cd758b3e0e2b82bed5e55c8eeaa551022100.png)

[Debian BSP User Guide for rk3399 risc series - ESS-WIKI](https://ess-wiki.advantech.com.tw/view/Debian_BSP_User_Guide_for_rk3399_risc_series)

Best Regards,  
Jems

---

<div class="post-metadata">

**Author:** ![ITMac](https://avatars.discourse-cdn.com/v4/letter/i/3ec8ea/32.png) [@ITMac](https://forum.aim-linux.advantech.com/u/ITMac)\
**Post date:** [December 11, 2024, 5:25am UTC](https://forum.aim-linux.advantech.com/t/ufw-on-debian10-bsp-on-rsb-3710-cannot-work/897/5 "2024-12-11T05:25:37Z")

</div>

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](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.

---

<div class="post-metadata">

**Author:** ![Jems\_Cheng](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@Jems\_Cheng](https://forum.aim-linux.advantech.com/u/Jems_Cheng)\
**Post date:** [December 11, 2024, 6:38am UTC](https://forum.aim-linux.advantech.com/t/ufw-on-debian10-bsp-on-rsb-3710-cannot-work/897/6 "2024-12-11T06:38:00Z")

</div>

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

> <https://askubuntu.com/questions/1006846/chroot-onto-arm-based-image>

 ![image](https://us1.discourse-cdn.com/flex016/uploads/aim_linux/original/2X/f/ff0a822900afa4d4326662f5aad0551a34797994.png)

---

<div class="post-metadata">

**Author:** ![ITMac](https://avatars.discourse-cdn.com/v4/letter/i/3ec8ea/32.png) [@ITMac](https://forum.aim-linux.advantech.com/u/ITMac)\
**Post date:** [December 11, 2024, 9:12am UTC](https://forum.aim-linux.advantech.com/t/ufw-on-debian10-bsp-on-rsb-3710-cannot-work/897/7 "2024-12-11T09:12:59Z")

</div>

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](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

---

<div class="post-metadata">

**Author:** ![Jems\_Cheng](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@Jems\_Cheng](https://forum.aim-linux.advantech.com/u/Jems_Cheng)\
**Post date:** [December 11, 2024, 9:52am UTC](https://forum.aim-linux.advantech.com/t/ufw-on-debian10-bsp-on-rsb-3710-cannot-work/897/8 "2024-12-11T09:52:32Z")

</div>

Hi~

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

 ![image](https://us1.discourse-cdn.com/flex016/uploads/aim_linux/original/2X/6/66b9917b4c2a8f1b6962b40672576b027c0833bd.png)  
Or it can click the link below to download the RSB-3710 Debian10 image.  
[2021-04-15 - Dropbox](https://www.dropbox.com/scl/fo/nxvt3t2vonqk28h1zy3hr/AN0-0gBg72TLW7Du2VbtGBI?dl=0&e=1&preview=RSB3710A2AIM20DIV251013_2021-04-15.img.tgz&rlkey=pjyz6iq7myt7uk7j4c4i8hhu3)

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.

 ![image](https://us1.discourse-cdn.com/flex016/uploads/aim_linux/original/2X/b/b5b45f5e0f9ac7b768ea1b52e3329a298f6f1faf.png)

---

<div class="post-metadata">

**Author:** ![ITMac](https://avatars.discourse-cdn.com/v4/letter/i/3ec8ea/32.png) [@ITMac](https://forum.aim-linux.advantech.com/u/ITMac)\
**Post date:** [December 12, 2024, 6:09am UTC](https://forum.aim-linux.advantech.com/t/ufw-on-debian10-bsp-on-rsb-3710-cannot-work/897/9 "2024-12-12T06:09:46Z")

</div>

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](https://ess-wiki.advantech.com.tw/view/Debian_BSP_User_Guide_for_rk3399_risc_series) , 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](https://us1.discourse-cdn.com/flex016/uploads/aim_linux/original/2X/3/3fb22787b1ab2564b7e19cda98cefe4ff1e78359.png)

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

regards.

---

<div class="post-metadata">

**Author:** ![Jems\_Cheng](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@Jems\_Cheng](https://forum.aim-linux.advantech.com/u/Jems_Cheng)\
**Post date:** [December 12, 2024, 8:18am UTC](https://forum.aim-linux.advantech.com/t/ufw-on-debian10-bsp-on-rsb-3710-cannot-work/897/10 "2024-12-12T08:18:06Z")

</div>

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.

 ![image](https://us1.discourse-cdn.com/flex016/uploads/aim_linux/original/2X/3/32d45e6fdd21851db26b16594ae3740561e14a62.png)

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](https://github.com/ADVANTECH-Rockchip/linux_kernel-rk/blob/rk3399_linux_v251_risc/Makefile)

 ![image](https://us1.discourse-cdn.com/flex016/uploads/aim_linux/original/2X/6/6d5c7b178e917e488a1d9a6151377fac699e7db9.png)

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](https://github.com/ADVANTECH-Rockchip/linux_prebuilts/tree/rk3399_linux_v251_risc/gcc/linux-x86/aarch64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin)

---

<div class="post-metadata">

**Author:** ![ITMac](https://avatars.discourse-cdn.com/v4/letter/i/3ec8ea/32.png) [@ITMac](https://forum.aim-linux.advantech.com/u/ITMac)\
**Post date:** [December 17, 2024, 2:07am UTC](https://forum.aim-linux.advantech.com/t/ufw-on-debian10-bsp-on-rsb-3710-cannot-work/897/11 "2024-12-17T02:07:08Z")

</div>

Hi Jems,

Thanks, it was all done.  
I appreciate your support.

regards.

---

<div class="post-metadata">

**Author:** ![ITMac](https://avatars.discourse-cdn.com/v4/letter/i/3ec8ea/32.png) [@ITMac](https://forum.aim-linux.advantech.com/u/ITMac)\
**Post date:** [January 22, 2025, 1:40am UTC](https://forum.aim-linux.advantech.com/t/ufw-on-debian10-bsp-on-rsb-3710-cannot-work/897/12 "2025-01-22T01:40:13Z")

</div>

Hi Jems,

Sorry but I found the kernel.img is not included file in ./mkfirmware.sh.  
(The kernel.img is not here, and I already checked mkfirmware.sh as well)

 ![image](https://us1.discourse-cdn.com/flex016/uploads/aim_linux/original/2X/0/031b1123963fd8e42ddb7dda4bc02cd9dd92aee9.png)

When I enabled some drivers on kernel config, how to include it in image?

regards,

---

<div class="post-metadata">

**Author:** ![\_Yusuke\_Kuwabara](https://avatars.discourse-cdn.com/v4/letter/_/b19c9b/32.png) [@\_Yusuke\_Kuwabara](https://forum.aim-linux.advantech.com/u/_Yusuke_Kuwabara)\
**Post date:** [February 6, 2025, 9:11am UTC](https://forum.aim-linux.advantech.com/t/ufw-on-debian10-bsp-on-rsb-3710-cannot-work/897/13 "2025-02-06T09:11:24Z")

</div>

The kernel image is boot.img.

 ![boot_img1](https://us1.discourse-cdn.com/flex016/uploads/aim_linux/original/2X/2/2e0bad1c8cf3205ffd284ed3129fa670856a927b.png)  
 ![boot_img2](https://us1.discourse-cdn.com/flex016/uploads/aim_linux/original/2X/5/5dd5c6bceff13b31930cba685de7167d1c4b10d0.png)
