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′
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′
相关文章推荐
- KB:Exchange控制台打开缓慢
- Porting openwrt on MT7688 Log
- Linux单机连接发起28232个连接
- Linux查看系统版本信息的
- cdoj 84 Binary Operations
- Windows下搭建git服务器,简洁版,服务器端msysgit加copssh,客户端msysgit(转载)
- 获取当前IP地址,跳转到对应城市网站。
- Linux系统初级优化
- CentOS 6.6 源码安装MySQL
- 三个监控小脚本
- arm64 linux 学习笔记一
- setfacl和chmod有什么区别
- 用nginx搭建一个简单的代理服务器
- Linux c 通过domain获取IP地址
- 设计与实现简单而经常使用的权限系统(四):无需维护level,递归构建树
- LinuxSystemProgramming-vi
- opencv2-2渐变过渡各种图形滤波并输出文字
- apache 目录认证
- linuxshell中"2>&1"含义
- linux下mycat读写分离的配置