编译fw_printenv工具:
make ARCH=arm CROSS_COMPILE=arm-hisiv300-linux- hi3521a_config
make ARCH=arm CROSS_COMPILE=arm-hisiv300-linux-
make ARCH=arm CROSS_COMPILE=arm-hisiv300-linux- env
编译会出现问题:只需进入u-boot目录
vi include/linux/types.h +154
//typedef u_int32_t uintmax_t;
//typedef int32_t intmax_t;
因为在arm-hisiv300-linux/target/usr/include/stdint.h 已经定已过了
2.安装fw_printenv工具
到/tools/env目录中,将编译好的fw_printenv拷贝到目标机的文件系统中,并通过"ln -s fw_printenv fw_setenv",创建一个fw_setenv到fw_printenv的软链。
注意可以用:
arm-hisiv300-linux-strip fw_printenv
来去掉相应的符号来减少空间的浪费
3.这个工具还需要一个配置文件,以获取uboot的ENV区域的位置信息。默认状态下,请将fw_env.config文件拷贝到目标机的文件系统的/etc目录下。然后结合uboot配置中定义的ENV区和Linux下mtd分区的情况修改配置文件。具体的修改方法见fw_env.config文件中的说明及/tools/env/README文件。
移植ppp相关:
1: 配置编译内核
在内核原代码主目录下make menuconfig内核加入了ppp,socket 等选项
Device Drivers -> Network device support -> PPP (point-to-point protocol)中,选中所有ppp选项:
Device Drivers ->
Network Device Support->
PPP (point-to-point protocol) support
[*] PPP multilink support
PPP support for async serial ports
PPP support for sync tty ports
SLIP (serial line) support
[*] CSLIP compressed headers
Device Drivers -> Network device support -> Universal TUN/TAP device driver support
退出,保存配置,重新执行make ARCH=arm CROSS_COMPILE=arm-hisiv300-lin