/dev/net/tun No such file or directory

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

/dev/net/tun No such file or directory

3,944件の閲覧回数
bipin_nair
Contributor II

I used QorIO-SDK-V2.0-201605027-yocto install to build fsl-image-full-t4240rdb.tar.gz.

I loaded that onto the SD card and modified the following U-boot environment variables -

setenv bootfile uImage
setenv fdtfile uImage-t4240rdb.dtb
setenv fdtaddr e00000
setenv bootcmd 'setenv bootargs root=/dev/mmcblk0p2 rw rootdelay=5 console=$consoledev,$baudrate;mmcinfo;ext2load mmc 0:2 $loadaddr /boot/$bootfile;ext2load mmc 0:2 $fdtaddr /boot/$fdtfile;bootm $loadaddr - $fdtaddr'

I am able to successfully get to a Linux command prompt and build my test application. However when I run my test executable, I am getting -

my_test.exe: -net tap,ifname=tap1,vlan=0: could not open /dev/net/tun: No such file or directory
my_test.exe: -net tap,ifname=tap1,vlan=0: Device 'tap' could not be initialized

This is a full fsl-image, why is /dev/net/tun not available? How can I get around this?

Also I need to install openVPN and the only package manager I have available on my prompt is rpm -

root@t4240rdb:=>which rpm
/usr/bin/rpm

root@t4240rdb:=> uname -a
Linux t4240rdb 4.1.8-rt8+gbd51baf #1 SMP Fri Nov 9 21:54:57 UTC 2018 ppc64 GNU/Linux

ラベル(1)
タグ(2)
0 件の賞賛
4 返答(返信)

2,802件の閲覧回数
alexander_yakov
NXP Employee
NXP Employee

Sorry for delayed response.

It looks like you do not have this /dev/net/tun device, please create it by using mknod command

https://www.kernel.org/doc/Documentation/networking/tuntap.txt

Regarding package manager - you are using yocto-based SDK, so you have to use yocto to add openvpn.


Have a great day,
Alexander
TIC

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛

2,802件の閲覧回数
bipin_nair
Contributor II

Also one more thing. On this image I am trying to compile some qemu code for ppc64, but I get this error when I try and run a single cc command -


 cc -m64 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -o config-temp/qemu-conf.exe config-temp/qemu-conf.c
/usr/lib/gcc/powerpc-fsl-linux/4.9.2/../../../../powerpc-fsl-linux/bin/ld: skipping incompatible /usr/lib/gcc/powerpc-fsl-linux/4.9.2/../../../powerpc-fsl-linux/4.9.2/libgcc.a when searching for -lgcc
/usr/lib/gcc/powerpc-fsl-linux/4.9.2/../../../../powerpc-fsl-linux/bin/ld: skipping incompatible /usr/lib/powerpc-fsl-linux/4.9.2/libgcc.a when searching for -lgcc
/usr/lib/gcc/powerpc-fsl-linux/4.9.2/../../../../powerpc-fsl-linux/bin/ld: cannot find -lgcc
/usr/lib/gcc/powerpc-fsl-linux/4.9.2/../../../../powerpc-fsl-linux/bin/ld: skipping incompatible //lib/libgcc_s.so.1 when searching for libgcc_s.so.1
/usr/lib/gcc/powerpc-fsl-linux/4.9.2/../../../../powerpc-fsl-linux/bin/ld: cannot find libgcc_s.so.1
/usr/lib/gcc/powerpc-fsl-linux/4.9.2/../../../../powerpc-fsl-linux/bin/ld: skipping incompatible /usr/lib/gcc/powerpc-fsl-linux/4.9.2/../../../powerpc-fsl-linux/4.9.2/libgcc.a when searching for -lgcc
/usr/lib/gcc/powerpc-fsl-linux/4.9.2/../../../../powerpc-fsl-linux/bin/ld: skipping incompatible /usr/lib/powerpc-fsl-linux/4.9.2/libgcc.a when searching for -lgcc
/usr/lib/gcc/powerpc-fsl-linux/4.9.2/../../../../powerpc-fsl-linux/bin/ld: cannot find -lgcc

I believe this is a problem with my toolchain. Can you please provide instructions on how to get a 64-bit gnu toolchain on fsl-image-full?

0 件の賞賛

2,802件の閲覧回数
alexander_yakov
NXP Employee
NXP Employee

If I correctly understand from the log, you have to do bitbake instruction to avoid these type errors.

Please refer to the following link for step-by-step guide for yocto, hope it will be helpful

https://community.nxp.com/docs/DOC-94849

0 件の賞賛

2,802件の閲覧回数
bipin_nair
Contributor II

Hello Alexander, I am new to Yocto based development. Do you have instructions on how use yocto to add openvpn?

0 件の賞賛