Hi3520DV300挂载根文件系统

版权声明: https://blog.csdn.net/hecong129/article/details/73649941
  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




猜你喜欢

转载自blog.csdn.net/hecong129/article/details/73649941