准备工作:
1.搭建adbwireless 环境
参考:https://blog.csdn.net/Chhjnavy/article/details/97643584
https://blog.csdn.net/Chhjnavy/article/details/98845930
目标板:rk3288 android
编译环境:android7.1.2
编译路径:源码根目录u-boot/ 以及 /u-boot/tools/env
2.产生fw_printenv 执行文件并下载到目标版中
1)u-boot/目录下make env 可能会出错如下:
解决办法:添加交叉编译工具: make CROSS_COMPILE=arm-linux-gnueabihf- env
编译通过后,产生fw_printenv 以及fw_env.config 文件。
2)根据目标版属性修改fw_env.config 文件
fw_env.config 文件如下:
# Configuration file for fw_(printenv/setenv) utility.
# Up to two entries are valid, in this case the redundant
# environment sector is assumed present.
# Notice, that the "Number of sectors" is not required on NOR and SPI-dataflash.
# Futhermore, if the Flash sector size is ommitted, this value is assumed to
# be the same as the Environment size, which is valid for NOR and SPI-dataflash
# NOR example
# MTD device nameDevice offsetEnv. sizeFlash sector sizeNumber of sectors
#/dev/mtd10x00000x40000x4000
#/dev/mtd20x00000x40000x4000
# MTD SPI-dataflash example
# MTD device nameDevice offsetEnv. sizeFlash sector sizeNumber of sectors
#/dev/mtd50x42000x4200
#/dev/mtd60x42000x4200
# NAND example
#/dev/mtd00x40000x40000x200002
# Block device example
/dev/block/mmcblk00xc00000x20000
通过目标版终端查询:使用的是 /dev/block/mmcblk0 ,因此在fw_env.config 文件中将开启Block device
该文件对应的设备一定要修改对,否则会出现:Cannot access MTD device /dev/mtd1: No such file