<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 16.0.10366.20016">
<TITLE>"tftp: sendto: Network is unreachable" during tftp on a virtual machine. What config should I add to kernel build?</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">Hello all,</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">I'm trying to build a minimal kernel where tftp works.  </FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">I'm using busybox for initramfs and I'll be running the kernel on an arm64 virtual machine.</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">The command for getting file is `tftp -g -r axpu_ldd_kc.ko my_ip_addr`(of course my tftp server is working). </FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">But the response is :  </FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">tftp: sendto: Network is unrea</FONT><FONT SIZE=2 FACE="Courier New">chable  </FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">So I added some network stuff in the kernel configuration (linux-5.10.0-rc5) but still doesn't work.  </FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">I can't figure out what more to add just to make tftp work</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">Could anyone tell me what is missing from the defconfig below? (using e1000 in qemu v</FONT><FONT SIZE=2 FACE="Courier New">irtual machine).</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">(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)</FONT></SPAN></P>
<UL DIR=LTR><UL DIR=LTR>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"># CONFIG_SWAP is not set</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"># CONFIG_</FONT><FONT SIZE=2 FACE="Courier New">CROSS_MEMORY_ATTACH is not set</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">CONFIG_PREEMPT=y</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"># CONFIG_CPU_ISOLATION is not set</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">CONFIG_LOG_BUF_SHIFT=12</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">CONFIG_LOG_CPU_MAX_BUF_SHIFT=10</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=10</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">CONFIG_USER_NS=y</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">CONFIG_BLK_DEV_INITRD=y</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">CONFIG_INITRAMFS_SOURCE="../../../../ab21</FONT><FONT SIZE=2 FACE="Courier New">sim/ab21tsim/busybox-1.32.1/initramfs.cpio.gz"</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"># CONFIG_RD_BZIP2 is not set</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"># CONFIG_RD_LZMA is not set</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"># CONFIG_RD_XZ is not set</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"># CONFIG_RD_LZO is not set</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"># CONFIG_RD_LZ4 is not set</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"># CONFIG_RD_ZSTD is not set</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">CONFIG_PERF_EVENTS=y</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">CONFIG_SLAB=y</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">CONFIG_NR</FONT><FONT SIZE=2 FACE="Courier New">_CPUS=2</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"># CONFIG_RODATA_FULL_DEFAULT_ENABLED is not set</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"># CONFIG_ARM64_TAGGED_ADDR_ABI is not set</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"># CONFIG_ARM64_UAO is not set</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"># CONFIG_ARM64_RAS_EXTN is not set</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"># CONFIG_ARM64_CNP is not set</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"># CONFIG_ARM64_PTR_AUTH is not set</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"># CONFIG_ARM64_AMU_EXTN is not set</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"># CONFIG_ARM64_TLB_RANGE is not set</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"># CONFIG_ARM64_BTI is not set</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"># CONFIG_ARM64_E0PD is not set</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"># CONFIG_ARCH_RANDOM is not set</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"># CONFIG_ARM64_SVE is not set</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"># CONFIG_EFI is not set</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"># CONFIG_SECCOMP is not set</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"># CONFIG_B</FONT><FONT SIZE=2 FACE="Courier New">LK_DEV_BSG is not set</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"># CONFIG_MQ_IOSCHED_DEADLINE is not set</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"># CONFIG_MQ_IOSCHED_KYBER is not set</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">CONFIG_BINFMT_MISC=y</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">CONFIG_FLATMEM_MANUAL=y</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"># CONFIG_COMPACTION is not set</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">CONFIG_NET=y</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">CONFIG_INET=y</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">CONFIG_NETFILTER=y</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">CONFIG_NF_CONNTRACK=y</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">CONFIG_NF_CON</FONT><FONT SIZE=2 FACE="Courier New">NTRACK_TFTP=y</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">CONFIG_NF_NAT=y</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">CONFIG_DEVTMPFS=y</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">CONFIG_BLK_DEV_RAM=y</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">CONFIG_BLK_DEV_RAM_COUNT=1</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">CONFIG_BLK_DEV_RAM_SIZE=65536</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">CONFIG_NETDEVICES=y</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"># CONFIG_KEYBOARD_ATKBD is not set</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"># CONFIG_INPUT_MOUSE is not set</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">CONFIG_SERIO_LIBPS2=y</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">CONFIG_VT_HW_CONSOLE_BINDING=y</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"># CONFIG_LEGACY_PTYS is not set</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">CONFIG_SERIAL_AMBA_PL011=y</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">CONFIG_SERIAL_AMBA_PL011_CONSOLE=y</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"># CONFIG_HWMON is not set</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"># CONFIG_USB_SUPPORT is not set</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">CONFIG_RTC_CLASS=y</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"># CONFIG_RTC_HCTOSYS is not set</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"># CONFIG_RTC_INTF_SYSF</FONT><FONT SIZE=2 FACE="Courier New">S is not set</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"># CONFIG_RTC_INTF_PROC is not set</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"># CONFIG_RTC_INTF_DEV is not set</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">CONFIG_RTC_DRV_M48T59=y</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"># CONFIG_VHOST_MENU is not set</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"># CONFIG_IOMMU_SUPPORT is not set</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"># CONFIG_NVMEM_SYSFS is not set</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">CONFIG_EXT2_FS=y</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">CONFIG_EXT2_FS_XATTR=y</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">CONFIG_EXT2_FS_</FONT><FONT SIZE=2 FACE="Courier New">POSIX_ACL=y</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">CONFIG_EXT2_FS_SECURITY=y</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"># CONFIG_DNOTIFY is not set</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"># CONFIG_INOTIFY_USER is not set</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">CONFIG_AUTOFS4_FS=y</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">CONFIG_ISO9660_FS=y</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">CONFIG_PROC_KCORE=y</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"># CONFIG_MISC_FILESYSTEMS is not set</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">CONFIG_LSM="lockdown,yama,loadpin,safesetid,integrity"</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">CONFIG_DEBUG_INFO=y</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">CONFIG_FRAME_WARN=1024</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">CONFIG_MAGIC_SYSRQ=y</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">CONFIG_DEBUG_FS=y</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">CONFIG_DEBUG_KERNEL=y</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">CONFIG_DETECT_HUNG_TASK=y</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"># CONFIG_SCHED_DEBUG is not set</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"># CONFIG_RCU_TRACE is not set</FONT></SPAN></P>
</UL></UL>
<P DIR=LTR><SPAN LANG="en-us"></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">By the way, the qemu command is this : /home/ckim/ProjX/QEMU/qe</FONT><FONT SIZE=2 FACE="Courier New">mu-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/boot/Image -m 2048M -nographic -netdev u</FONT><FONT SIZE=2 FACE="Courier New">s</FONT><FONT SIZE=2 FACE="Courier New">er,id=net0,tftp=/opt/tftp -device e1000,netdev=net0  -machine iommu=smmuv3 --append "root=/dev/ram init=/init nokaslr earlycon ip=dhcp hugepages=16"</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">Thanks alot!</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">Chan Kim</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"></SPAN></P>

</BODY>
</HTML>