君正X系列开发14---添加板级配置文件

分析命令:
source  ./build/envsetup.sh
including device/halley2/norflash/model1/vendorsetup.sh
including device/halley2/spinand/model1/vendorsetup.sh


将原有板级文件拷贝至新板级文件
cd device
mkdir br1600
cp -r halley2/* br1600/


修改板级文件device.mk


ifeq ($(strip $(TARGET_BUILD_VARIANT)),eng) UBOOT_BUILD_CONFIG := halley2_nor_config
UBOOT_BUILD_CONFIG := br1600debug_nor_config
else
UBOOT_BUILD_CONFIG := br1600_nor_config
endif


KERNEL_BUILD_CONFIG := br1600_nor_v10_linux_defconfig KERNEL_BUILD_CONFIG := halley2_nor_v10_linux_defconfig
KERNEL_BUILD_CONFIG := br1600_nor_v10_linux_defconfig




分析halley2_nor_v10_linux_defconfig在哪里?
grep "halley2_nor_v10_linux_defconfig" * -R
device/halley2/device.mk:KERNEL_BUILD_CONFIG := halley2_nor_v10_linux_defconfig


find . -name "halley2_nor_v10_linux_defconfig"
./kernel/arch/mips/configs/halley2_nor_v10_linux_defconfig
内核的默认配置文档
lunch 后会将该配置文件生成.config


需要增加该配置文件
cd kernel/arch/mips/configs/
cp halley2_nor_v10_linux_defconfig halley2_br1600_nor_V10_linux_defconfig
//该文件需要根据实际情况配置




grep "halley2_nor_config" * -R
bootable/bootloader/x-loader/README: make halley2_nor_config
bootable/bootloader/x-loader/Makefile:halley2_nor_config: unconfig
device/halley2/device.mk:UBOOT_BUILD_CONFIG := halley2_nor_config




find . -name "halley2_nor_config"
nothing


查看指导性文件bootable/bootloader/x-loader/README
1、添加板级文件
cd bootable/bootloader/x-loader/boards/
mkdir br1600debug
mkdir br1600
cp halley2/* br1600debug/
cp halley2/* br1600/


看下板级文档下都有什么东西
ls
board.c  board.mk  board.o  partitions.tab
都是共性的东西 不需要修改


打开Makefile添加新板极编译目标
388 halley2_br1600_nor_config: unconfig
389         @./mkconfig $(@:_config) br1600 nor
390 
391 halley2_br1600debug_nor_config: unconfig
392         @./mkconfig $(@:_config) br1600debug nor


板极配置文件在哪里?
==============
在include/configs/BOARD_NAME.h
cd include/configs/
ls
boards_common.h  burner.h  halley2.h  media.h  phoenix.h  qrcode.h  skyworth.h  speaker.h  yak.h  zlm60.h
cp halley2.h br1600debug.h
cp halley2.h br1600.h


在文档中br1600.h添加
// disable uart printk
#ifdef CONFIG_CONSOLE_ENABLE
#undef CONFIG_CONSOLE_ENABLE
#endif


将波特率改为115200


xburst中测试是否OK
pwd
bootable/bootloader/x-loader
make halley2_br1600debug_nor_config
make


success***


经过上面操作lunch后有目标出现
cui@cui-vir:~/ingenic/ingenic_shenzhen_Halley2base$ lunch


You're building on Linux


Lunch menu... pick a combo:
     1. halley2_norflash-eng
     2. halley2_norflash-user
     3. halley2_spinand-eng
     4. halley2_spinand-user
     5. halley2_br1600_norflash-eng
     6. halley2_br1600_norflash-user


Which would you like? [phoenix_nor_userdebug] 5
selection is halley2_br1600_norflash-eng
product is halley2_br1600_norflash
variant is eng
PATH=/home/cui/ingenic/ingenic_shenzhen_Halley2base/prebuilts/toolchains/mips-gcc472-glibc216/bin:/home/cui/ingenic/ingenic_shenzhen_Halley2base/bootable/bootloader/u-boot/tools:/opt/allwiner_compiler/external-toolchain/bin:/opt/qtcreator-4.2.2/bin:/opt/Trolltech/bin:/home/cui/arm-2013.11/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/work/tools/gcc-3.4.5-glibc-2.3.6/bin
PATH=/home/cui/ingenic/ingenic_shenzhen_Halley2base/prebuilts/toolchains/mips-gcc472-glibc216/bin:/home/cui/ingenic/ingenic_shenzhen_Halley2base/bootable/bootloader/u-boot/tools:/opt/allwiner_compiler/external-toolchain/bin:/opt/qtcreator-4.2.2/bin:/opt/Trolltech/bin:/home/cui/arm-2013.11/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/work/tools/gcc-3.4.5-glibc-2.3.6/bin
halley2
br1600
norflash
============================================
TARGET_PRODUCT=halley2_br1600_norflash
TARGET_DEVICE=halley2 //有问题
TARGET_STORAGE_MEDIUM=br1600
TARGET_EXT_SUPPORT=norflash
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
HOST_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.2.0-27-generic-x86_64-with-Ubuntu-14.04-trusty
HOST_BUILD_TYPE=release
OUT_DIR=out
============================================




#### make completed successfully  ####




回到kernel的板级目录
修改文件/device/br1600/device.mk
23 else #for x-loader
 24 ifeq ($(strip $(TARGET_BUILD_VARIANT)),eng)
 25 UBOOT_BUILD_CONFIG := halley2_br1600debug_nor_config
 26 else
 27 UBOOT_BUILD_CONFIG := halley2_br1600_nor_config
 28  endif


cd device/br1600/norflash/model1
gedit system_patch.sh
将halley2替换成br1600




在/kernel/arch/mips/xburst/soc-x1000/chip-x1000/halley2/下添加板级文件
mkdir halley2_br1600
cp -r halley2/* halley2_br1600


修改halley2目录下的Makefile;添加
obj-$(CONFIG_BOARD_X1000_HALLEY2_BR1600)      += $(CONFIG_BOARD_NAME)/


OK

猜你喜欢

转载自blog.csdn.net/cyf15238622067/article/details/80215915