组网:ubuntu双网卡搭建
- 虚拟机设置中添加第二个网卡,设置为自定义:vmnet1
现在虚拟机中有两个虚拟网卡net0 net1
2.编辑->虚拟机网络编辑器中将net0 和net1 分别桥接至有线网卡和无线网卡
- 在网络管理器中分别配置两个网卡的ip
下图第一个是有线连接 和开发板都设置在 .1 网段
第二个为 wifi:hqyj-office 在 .0 网段
2.分析make <board_name>_defconfig 中的board_name的如何书写
方式1 随便给board_name一个名字,根据错误信息决定board_name
1> 在u-boot源码目录下执行make fsmp1a_defconfig,查看错误信息
***
*** Can't find default configuration "arch/../configs/fsmp1a_defconfig"!
***
make[1]: *** [scripts/kconfig/Makefile:110: fsmp1a_defconfig] Error 1
2> 根据以上错误信息的分析,错误为在arch/../configs/目录下,
没有fsmp1a_defconfig, 进入arch/../configs/目录下,查看
有哪些配置文件是关于stm32mp1芯片的。
ls configs/stm32mp*_defconfig
得到以下内容:
configs/stm32mp15_basic_defconfig
configs/stm32mp15_trusted_defconfig
stm32mp15_basic_defconfig : u-boot源码的基本的默认配置文件,
在后续的u-boot移植中先移植basic版本的u-boot
stm32mp15_trusted_defconfig : u-boot源码的可信任的默认配置文件,
在后续的u-boot移植中,根据basic版本移植trusted版本
3> 通过以上的分析可以确定板子的名字为
stm32mp15_basic 或者 stm32mp15_trusted
方式2,分析make <board_name>_defconfig命令的执行过程
1> 打开u-boot源码目录下的Makefile文件,搜索config字符串
得到以下信息:
563 %config: scripts_basic outputmakefile FORCE
564 $(Q)$(MAKE) $(build)=scripts/kconfig $@
如何确定变量的值,可以使用echo命令将这些个变量的值都输出一下。
重新执行make fsmp1a_defconfig,打印以下信息:
$(Q) ---》 @
$(MAKE) ---》 make
$(build) ----》 -f ./scripts/Makefile.build obj
$@ -- 》 fsmp1a_defconfig
或者去掉规则命令中$(@),重新执行make fsmp1a_defconfig,打印以下信息
make -f ./scripts/Makefile.build obj=scripts/kconfig fsmp1a_defconfig
2> 通过对规则中的命令的解析
以上命令的最终结果为,在scripts/kconfig目录下继续执行
make fsmp1a_defconfig
3> 打开scripts/kconfig目录下makefile文件,搜索defconfig
109 %_defconfig: $(obj)/conf
110 $(Q)$< $(silent) --defconfig=arch/$(SRCARCH)/configs/$@ $(Kconfig)
去掉命令前边的$(Q),重新执行make fsmp1a_defconfig,得到以下信息:
scripts/kconfig/conf --defconfig=arch/../configs/fsmp1a_defconfig Kconfig
使用file命令查看scripts/kconfig/conf属性可知conf是一个elf的可执行文件,
--defconfig=arch/../configs/fsmp1a_defconfig和Kconfig作为参数传递给
conf程序,conf程序解析arch/../configs/fsmp1a_defconfig和u-boot源码目录下
的Kconfig文件,在u-boot源码目录下生成.config的板子的配置文件
4> 根据--defconfig=arch/../configs/fsmp1a_defconfig这个信息
进入arch/../configs/目录下,查看有哪些配置文件是关于stm32mp1芯片的。
ls configs/stm32mp*_defconfig
得到以下内容:
configs/stm32mp15_basic_defconfig
configs/stm32mp15_trusted_defconfig
stm32mp15_basic_defconfig : u-boot源码的基本的默认配置文件,
在后续的u-boot移植中先移植basic版本的u-boot
stm32mp15_trusted_defconfig : u-boot源码的可信任的默认配置文件,
在后续的u-boot移植中,根据basic版本移植trusted版本
5> 通过以上的分析可以确定板子的名字为
stm32mp15_basic 或者 stm32mp15_trusted