您的位置:首页 > 运维架构

Porting openwrt on MT7688 Log

2015-09-25 15:49 363 查看
About the Bootargs:

MTK提供的openwrt的SDK中,内核启动参数被固定在linux的代码中,这样调试起来很不方便。

Fix it:

直接修改内核源码:

(1)在文件

mt7688a\openwrt-3.10.14\build_dir\target-mipsel_24kec+dsp_uClibc-0.9.33.2\linux-ramips_mt7628\linux-3.10.14-p112871\arch\mips\ralink\cmdline.c 中增加以下红色字体行:

#include <asm/bootinfo.h>

#define CONFIG_UBOOT_CMDLINE (1)

(2)在文件

mt7688a\openwrt-3.10.14\build_dir\target-mipsel_24kec+dsp_uClibc-0.9.33.2\linux-ramips_mt7628\linux-3.10.14-p112871\arch\mips\ralink\init.c 中增加以下红色字体行:

#define CONFIG_UBOOT_CMDLINE (1)

#ifdef CONFIG_UBOOT_CMDLINE

prom_argc = (int)fw_arg0;

_prom_argv = (int *)fw_arg1;

_prom_envp = (int *)fw_arg2;

#endif

(3)make kernel_menuconfig 进入内核配置界面,取消选择Built-in kernel command line

Kernel hacking —>

[ ] Built-in kernel command line

(4)给uboot添加启动参数:

setenv bootargs ‘console=ttyS1,57600n8 root=/dev/mtdblock6 rootfstype=squashfs,jffs2′
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: