本文主要是介绍OK6410A 开发板 (三) 7 u-boot-2021.01 boot 解析 u-boot 与linux配置部分,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
U-boot配置
make O=output ok6410a_mini_defconfig
// 在配置的时候 不需要指定 ARCH(因为defconfig有写) 与 CROSS_COMPILE(因为现在并不需要,build的时候才需要)
// 如果写了CROSS_COMPILE,会去检查CROSS_COMPILE , 然后build的时候还是需要写
// 第一次用arm-gcc 的时刻, 编译时 的 CC lib/asm-offsets.s
make[1]: Entering directory '/home/suws/ok6410/system-new/u-boot/output'HOSTCC scripts/basic/fixdepcc -Wp,-MD,scripts/basic/.fixdep.d -Iscripts/basic -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu11 -o scripts/basic/fixdep ../scripts/basic/fixdep.cGEN ./Makefilerm -f .tmp_quiet_recordmcountln -fsn .. source/bin/bash ../scripts/mkmakefile \.. . 2021 01GEN ./MakefileHOSTCC scripts/kconfig/conf.occ -Wp,-MD,scripts/kconfig/.conf.o.d -Iscripts/kconfig -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu11 -c -o scripts/kconfig/conf.o ../scripts/kconfig/conf.cYACC scripts/kconfig/zconf.tab.cbison -oscripts/kconfig/zconf.tab.c -t -l ../scripts/kconfig/zconf.yLEX scripts/kconfig/zconf.lex.cflex -oscripts/kconfig/zconf.lex.c -L ../scripts/kconfig/zconf.lHOSTCC scripts/kconfig/zconf.tab.occ -Wp,-MD,scripts/kconfig/.zconf.tab.o.d -Iscripts/kconfig -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu11 -I../scripts/kconfig -c -o scripts/kconfig/zconf.tab.o scripts/kconfig/zconf.tab.cHOSTLD scripts/kconfig/confcc -o scripts/kconfig/conf scripts/kconfig/conf.o scripts/kconfig/zconf.tab.oscripts/kconfig/conf --defconfig=arch/../configs/ok6410a_mini_defconfig Kconfig
#
# configuration written to .config
#
make[1]: Leaving directory '/home/suws/ok6410/system-new/u-boot/output'
linux配置
HOSTCC scripts/basic/fixdepgcc -Wp,-MMD,scripts/basic/.fixdep.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89 -o scripts/basic/fixdep scripts/basic/fixdep.c HOSTCC scripts/kconfig/conf.ogcc -Wp,-MMD,scripts/kconfig/.conf.o.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89 -c -o scripts/kconfig/conf.o scripts/kconfig/conf.cHOSTCC scripts/kconfig/confdata.ogcc -Wp,-MMD,scripts/kconfig/.confdata.o.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89 -c -o scripts/kconfig/confdata.o scripts/kconfig/confdata.cHOSTCC scripts/kconfig/expr.ogcc -Wp,-MMD,scripts/kconfig/.expr.o.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89 -c -o scripts/kconfig/expr.o scripts/kconfig/expr.cLEX scripts/kconfig/lexer.lex.cflex -oscripts/kconfig/lexer.lex.c -L scripts/kconfig/lexer.lYACC scripts/kconfig/parser.tab.[ch]bison -o scripts/kconfig/parser.tab.c --defines=scripts/kconfig/parser.tab.h -t -l scripts/kconfig/parser.yHOSTCC scripts/kconfig/lexer.lex.ogcc -Wp,-MMD,scripts/kconfig/.lexer.lex.o.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89 -I ./scripts/kconfig -c -o scripts/kconfig/lexer.lex.o scripts/kconfig/lexer.lex.cHOSTCC scripts/kconfig/parser.tab.ogcc -Wp,-MMD,scripts/kconfig/.parser.tab.o.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89 -I ./scripts/kconfig -c -o scripts/kconfig/parser.tab.o scripts/kconfig/parser.tab.cHOSTCC scripts/kconfig/preprocess.ogcc -Wp,-MMD,scripts/kconfig/.preprocess.o.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89 -c -o scripts/kconfig/preprocess.o scripts/kconfig/preprocess.cHOSTCC scripts/kconfig/symbol.ogcc -Wp,-MMD,scripts/kconfig/.symbol.o.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89 -c -o scripts/kconfig/symbol.o scripts/kconfig/symbol.cHOSTCC scripts/kconfig/util.ogcc -Wp,-MMD,scripts/kconfig/.util.o.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89 -c -o scripts/kconfig/util.o scripts/kconfig/util.cHOSTLD scripts/kconfig/confgcc -o scripts/kconfig/conf scripts/kconfig/conf.o scripts/kconfig/confdata.o scripts/kconfig/expr.o scripts/kconfig/lexer.lex.o scripts/kconfig/parser.tab.o scripts/kconfig/preprocess.o scripts/kconfig/symbol.o scripts/kconfig/util.oscripts/kconfig/conf --defconfig=arch/arm/configs/ok6410A_sdboot_mini_defconfig Kconfig
#
# configuration written to .config
#
u-boot 和 linux 配置 的区别
- 配置需要填充的环境变量
u-boot 配置不需要填充 ARCH 与 CROSS_COMPILE
u-boot 编译需要配置 CROSS_COMPILE
linux 配置需要填充 ARCH(这样才能找到defconfig) 与 CROSS_COMPILE (填充后会改变生成的.config,.config中会填充CROSS_COMPILE 的信息CONFIG_CC_VERSION_TEXT)
linux 编译也需要配置 ARCH 与 CROSS_COMPILE
- 配置运行过程
相同点:都是生成 scripts/kconfig/conf并用命令 scripts/kconfig/conf --defconfig=/path_to_defconfig/ok6410a_mini_defconfig Kconfig 生成 .config
不同点u-boot 的 scripts/kconfig/conf 比较简单 cc -o scripts/kconfig/conf scripts/kconfig/conf.o scripts/kconfig/zconf.tab.olinux的 scripts/kconfig/conf 比较复杂gcc -o scripts/kconfig/conf scripts/kconfig/conf.o scripts/kconfig/confdata.o scripts/kconfig/expr.o scripts/kconfig/lexer.lex.o scripts/kconfig/parser.tab.o scripts/kconfig/preprocess.o scripts/kconfig/symbol.o scripts/kconfig/util.o
这篇关于OK6410A 开发板 (三) 7 u-boot-2021.01 boot 解析 u-boot 与linux配置部分的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!