Hi3520DV300挂载根文件系统

本文介绍了如何在Linux内核中配置NFS根文件系统,包括相关依赖项IP_PNP的详细解释及其与NFS根文件系统配置的关系。此外,还深入探讨了IP_PNP的不同配置选项。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

  make ARCH=arm CROSS_COMPILE=arm-hisiv400-linux- menuconfig

  进入fs/nfs
  vi Kconfig
  搜索root

  config ROOT_NFS
  bool "Root file system on NFS"
  depends on NFS_FS=y && IP_PNP
  help
  If you want your system to mount its root file system via NFS,
  choose Y here.  This is common practice for managing systems
  without local permanent storage.  For details, read
  <file:Documentation/filesystems/nfs/nfsroot.txt>.

  Most people say N here.

  NFS_FS必然是已经打开了
  IP_PNP是什么?
  CONFIG_IP_PNP内核级IP自动配置,即启动时通过内核命令行参数配置,如ip=192.168.0.111...
  CONFIG_IP_PNP_XXX即支持XXX协议来配置IP,如及CONFIG_IP_PNP_DHCP=y则支持启动时支持ip=dhcp来配置ip
 在当前目录下
 grep -Irn "IP_PNP" .
 没有收获
 在kernel下 net下
 grep -Irn "IP_PNP" .
./ipv4/Makefile:36:obj-$(CONFIG_IP_PNP) += ipconfig.o
./ipv4/Kconfig:110:config IP_PNP
./ipv4/Kconfig:121:config IP_PNP_DHCP
./ipv4/Kconfig:123:     depends on IP_PNP
./ipv4/Kconfig:138:config IP_PNP_BOOTP
./ipv4/Kconfig:140:     depends on IP_PNP
./ipv4/Kconfig:153:config IP_PNP_RARP
./ipv4/Kconfig:155:     depends on IP_PNP
./ipv4/ipconfig.c:77:#if defined(CONFIG_IP_PNP_DHCP)
./ipv4/ipconfig.c:80:#if defined(CONFIG_IP_PNP_BOOTP) || defined(CONFIG_IP_PNP_DHCP)
./ipv4/ipconfig.c:83:#if defined(CONFIG_IP_PNP_RARP)
./ipv4/ipconfig.c:125:#ifdef CONFIG_IP_PNP_DHCP
./ipv4/ipconfig.c:1558:#ifdef CONFIG_IP_PNP_DHCP
./ipv4/ipconfig.c:1564:#ifdef CONFIG_IP_PNP_BOOTP
./ipv4/ipconfig.c:1570:#ifdef CONFIG_IP_PNP_RARP
打开Kconfig
config IP_PNP
111     bool "IP: kernel level autoconfiguration"
112     help
113       This enables automatic configuration of IP addresses of devices and
114       of the routing table during kernel boot, based on either information
115       supplied on the kernel command line or by BOOTP or RARP protocols.
116       You need to say Y only for diskless machines requiring network
117       access to boot (in which case you want to say Y to "Root file system
118       on NFS" as well), because all other machines configure the network
119       in their startup scripts.
120
121 config IP_PNP_DHCP
122     bool "IP: DHCP support"
123     depends on IP_PNP




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值