"tftp: sendto: Network is unreachable" during tftp on a virtual machine. What config should I add to kernel build?
Chan Kim
ckim at etri.re.kr
Thu Mar 24 22:02:58 EDT 2022
Hello all,
I'm trying to build a minimal kernel where tftp works.
I'm using busybox for initramfs and I'll be running the kernel on an arm64
virtual machine.
The command for getting file is `tftp -g -r axpu_ldd_kc.ko my_ip_addr`(of
course my tftp server is working).
But the response is :
tftp: sendto: Network is unreachable
So I added some network stuff in the kernel configuration (linux-5.10.0-rc5)
but still doesn't work.
I can't figure out what more to add just to make tftp work
Could anyone tell me what is missing from the defconfig below? (using e1000
in qemu virtual machine).
(As you can see, I added CONFIG_NF_CONNTRACK_TFTP for which the menuconfig
says it's TFTP support. And the .config file has CONFIG_NF_NAT_TFTP set to
=y. I show the defconfig because .config is too long)
# CONFIG_SWAP is not set
# CONFIG_CROSS_MEMORY_ATTACH is not set
CONFIG_PREEMPT=y
# CONFIG_CPU_ISOLATION is not set
CONFIG_LOG_BUF_SHIFT=12
CONFIG_LOG_CPU_MAX_BUF_SHIFT=10
CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=10
CONFIG_USER_NS=y
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE="../../../../ab21sim/ab21tsim/busybox-1.32.1/initram
fs.cpio.gz"
# CONFIG_RD_BZIP2 is not set
# CONFIG_RD_LZMA is not set
# CONFIG_RD_XZ is not set
# CONFIG_RD_LZO is not set
# CONFIG_RD_LZ4 is not set
# CONFIG_RD_ZSTD is not set
CONFIG_PERF_EVENTS=y
CONFIG_SLAB=y
CONFIG_NR_CPUS=2
# CONFIG_RODATA_FULL_DEFAULT_ENABLED is not set
# CONFIG_ARM64_TAGGED_ADDR_ABI is not set
# CONFIG_ARM64_UAO is not set
# CONFIG_ARM64_RAS_EXTN is not set
# CONFIG_ARM64_CNP is not set
# CONFIG_ARM64_PTR_AUTH is not set
# CONFIG_ARM64_AMU_EXTN is not set
# CONFIG_ARM64_TLB_RANGE is not set
# CONFIG_ARM64_BTI is not set
# CONFIG_ARM64_E0PD is not set
# CONFIG_ARCH_RANDOM is not set
# CONFIG_ARM64_SVE is not set
# CONFIG_EFI is not set
# CONFIG_SECCOMP is not set
# CONFIG_BLK_DEV_BSG is not set
# CONFIG_MQ_IOSCHED_DEADLINE is not set
# CONFIG_MQ_IOSCHED_KYBER is not set
CONFIG_BINFMT_MISC=y
CONFIG_FLATMEM_MANUAL=y
# CONFIG_COMPACTION is not set
CONFIG_NET=y
CONFIG_INET=y
CONFIG_NETFILTER=y
CONFIG_NF_CONNTRACK=y
CONFIG_NF_CONNTRACK_TFTP=y
CONFIG_NF_NAT=y
CONFIG_DEVTMPFS=y
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_COUNT=1
CONFIG_BLK_DEV_RAM_SIZE=65536
CONFIG_NETDEVICES=y
# CONFIG_KEYBOARD_ATKBD is not set
# CONFIG_INPUT_MOUSE is not set
CONFIG_SERIO_LIBPS2=y
CONFIG_VT_HW_CONSOLE_BINDING=y
# CONFIG_LEGACY_PTYS is not set
CONFIG_SERIAL_AMBA_PL011=y
CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
# CONFIG_HWMON is not set
# CONFIG_USB_SUPPORT is not set
CONFIG_RTC_CLASS=y
# CONFIG_RTC_HCTOSYS is not set
# CONFIG_RTC_INTF_SYSFS is not set
# CONFIG_RTC_INTF_PROC is not set
# CONFIG_RTC_INTF_DEV is not set
CONFIG_RTC_DRV_M48T59=y
# CONFIG_VHOST_MENU is not set
# CONFIG_IOMMU_SUPPORT is not set
# CONFIG_NVMEM_SYSFS is not set
CONFIG_EXT2_FS=y
CONFIG_EXT2_FS_XATTR=y
CONFIG_EXT2_FS_POSIX_ACL=y
CONFIG_EXT2_FS_SECURITY=y
# CONFIG_DNOTIFY is not set
# CONFIG_INOTIFY_USER is not set
CONFIG_AUTOFS4_FS=y
CONFIG_ISO9660_FS=y
CONFIG_PROC_KCORE=y
# CONFIG_MISC_FILESYSTEMS is not set
CONFIG_LSM="lockdown,yama,loadpin,safesetid,integrity"
CONFIG_DEBUG_INFO=y
CONFIG_FRAME_WARN=1024
CONFIG_MAGIC_SYSRQ=y
CONFIG_DEBUG_FS=y
CONFIG_DEBUG_KERNEL=y
CONFIG_DETECT_HUNG_TASK=y
# CONFIG_SCHED_DEBUG is not set
# CONFIG_RCU_TRACE is not set
By the way, the qemu command is this :
/home/ckim/ProjX/QEMU/qemu-6.2.0/build-baremetal/aarch64-softmmu/qemu-system
-aarch64 -machine ab21q,gic-version=max,secure=off,virtualization=true -cpu
max -kernel
/home/ckim/ProjX/LinuxDevDrv/kernel-release-RD-INFRA-2020.11.30/arch/arm64/b
oot/Image -m 2048M -nographic -netdev user,id=net0,tftp=/opt/tftp -device
e1000,netdev=net0 -machine iommu=smmuv3 --append "root=/dev/ram init=/init
nokaslr earlycon ip=dhcp hugepages=16"
Thanks alot!
Chan Kim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20220325/a455138d/attachment.html>
More information about the Kernelnewbies
mailing list