以下方法来自WRTnode罗老师
Html code here! Replace this with any non empty text and that's it.
以下方法来自WRTnode罗老师
百度音乐盒M-100和小度路由一样也是用的MT7620A,也可以刷openwrt,不过还加了一个音频IC,当然我也用不到。
好的是,百度音乐盒里面的7620A是一个模块,只要把GPIO引脚弄清楚,就可以控制其他东西。
其启动信息如下:
本人所著的《Arduino程序设计基础》正式发售啦~
Html code here! Replace this with any non empty text and that's it.
Image Name: Linux Kernel Image
Created: Sat Mar 1 03:13:04 2014
Image Type: MIPS Linux Kernel Image (gzip compressed)
Data Size: 5978519 Bytes = 5838.40 kB = 5.70 MB
Load Address: 0x80000000
Entry Point: 0x8000C310
Kernel Size: 0x00000000
不知道为何kernel大小为0
最最最最最最最最最最最最最最最最最最最最最最最最靠谱的Arduino教材面世啦!
严重推荐本书,国内最好Arduino书籍,唯一一本提供售后社区支持的Arduino书籍。
为什么要无节操这样吹捧这书?因为是我写的……
LAN | IP Address | 10.10.10.254 |
Subnet | 255.255.255.0 | |
WAN | IP Address | DHCP |
[/vc_toggle][vc_toggle title=”串口设置” open=”false”]UART Setting
Item | Value |
Baud Rate | 57600 |
Data bits | 8 |
Parity | None |
Stop Bit | 1 |
Flow Control | None |
[/vc_toggle][vc_toggle title=”Web设置” open=”false”]Web Setting
Item | Default Value |
User Name: | admin |
Password: | admin |
[/vc_toggle]
过程在Ralink SDK User Manual中有,这里只记录我的研究过程。
Ralink SDK User Manual: http://wenku.baidu.com/view/0c728d32ba1aa8114431d9e3.html
readelf版本问题 可用的readelf
交叉工具链(toolchain)解压到opt即可。
LZMA和mksquashfs,貌似可以不装。LZMA用作压缩kernel,mksquashfs-lzma用作压缩rootfs。没装时默认使用gzip压缩。可以在RT288x_SDK/source/vendors/Ralink/{Platform}/Makefile 中修改压缩方式[/vc_toggle][vc_toggle title=”添加一个新的库” open=”false”]1. #/ cp -r libtest to RT288x_SDK/source/lib
2. modify RT288x_SDK/source/lib/libtest/Makefile
[you can reference to libnvram/Makefile]
3. modify RT288x_SDK/source/lib/Makefile
ifeq ($(CONFIG_LIB_LIBTEST_FORCE),y)
DIRS += libtest
endif
ifeq ($(CONFIG_LIB_LIBTEST_FORCE),y)
@$(MAKE) -C libtest shared
endif
4. modify RT288x_SDK/source/config/config.in
bool ‘Build libtest’ CONFIG_LIB_LIBTEST_FORCE
#/ make menuconfig
You can see the “Build libtest” on the menu.
5.Compile your new library
#make dep
#make lib_only[/vc_toggle][vc_toggle title=”编译用户库” open=”false”]# cd RT288x_SDK/source
# make lib_only
# make romfs
………….
The shared libraries are shown in RT288x_SDK /source/romfs/lib[/vc_toggle][vc_toggle title=”接入新的内核模块” open=”false”]Example: Port the hello networking module to the RT2880 platform
1. Add the source code to the rt2880 directory
# mkdir RT288x_SDK/source/linux-2.4.x/drivers/net/hello
#vi RT288x_SDK/source/linux-2.4.x/drivers/net/hello/Makefile
O_TARGET := hello.o
obj-y := main.o
obj-m := $(O_TARGET)
include $(TOPDIR)/Rules.make
#vi RT288x_SDK/source/linux-2.4.x/drivers/net/hello/main.c
#include <linux/init.h>
#include <linux/module.h>
static int hello_init(void)
{
printk(“hello world\n”);
return 0;
}
static void hello_exit(void)
{
printk(“goodbye\n”);
}
module_init(hello_init);
module_exit(hello_exit);
MODULE_LICENSE(“GPL”);
~
2. Modify RT288x_SDK/source/linux-2.4.x/drivers/net/Makefile
subdir-$(CONFIG_RT2880_HELLO) += hello
3. Modify Config.in
tristate ‘ Ralink hello module’ CONFIG_RT2880_HELLO
4. Turn on the hello module
#make menuconfig
<M> Ralink hello module
5. Compile the source code
#make dep
#make
6. Test
/ # insmod hello
hello world
/ #[/vc_toggle][vc_toggle title=”添加启动运行命令” open=”false”]Edit RT288x_SDK/source/vendors/Ralink/RT2880/rcS
#!/bin/sh
mount –a
goahead& <– add new command here[/vc_toggle][vc_toggle title=”向Rootfs中添加文件” open=”false”]If you execute the “make clean” script, it will delete RT288x_SDK/source/romfs directory.
You cannot copy the file to RT288x_SDK/source/romfs manually because it will disappear after executing “make clean”.
Example: add xxx.bin to rootfs
a. copy xxx.bin to RT288x_SDK/source/vendors/Ralink/{RT2880/RT3052/RT3883/RT3352/RT5350}
b. edit RT288x_SDK/source/vendors/Ralink/{RT2880/RT3052/RT3883/RT3352/RT5350}/Makefile
romfs:
$(ROMFSINST) /etc_ro/xxx.bin
The script will copy xxx.bin to RT288x_SDK/source/romfs/etc_ro after executing “make romfs”[/vc_toggle]
之前尝试编译ralink sdk一直没有成功,今天得James解惑:
Ubuntu的 shell 默认安装的是 dash,而不是 bash(GNU Bourne-Again Shell)。
dash更轻更快,但bash更通用。编译不通正是因为ubuntu使用的dash。于是乎将dash更换成bash后,ralink sdk便可以编译了。
启动优先级:
05 defconfig //加载默认参数
10 boot //启动
39 usb // 加载usbfs
40 network // 设置网卡参数
45 firewall // 防火墙
50 dropbear // sshd server
50 cron // …..
50 telnet // 如果没有修改root密码,则启动telnet server
60 dnsmasq // DHCP 和 DNS 服务端
95 done // …
96 led // 指示灯
97 watchdog // …
99 sysctl // 最后,进行必要的内核参数调整
待续…