前段时间在某宝上买了这个RT5350-EVB ver3.1开发板。近日发现,这些核心板都跟HLK-RM04是一样的。。。。。。

OpenWrt使用的是最新的稳定版Barrier Breaker 14.07,该版本已经支持RT5350

因为该开发板与HLK-RM04相似,所以后面的操作都是仿照它添加的

下载链接:http://download.csdn.net/detail/x901205/8055975

1.创建文件barrier_breaker/target/linux/ramips/rt305x/rt5350evb.mk

define Profile/RT5350EVB

NAME:=RT5350-EVB

PACKAGES:=\

kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-ledtrig-netdev

endef

define Profile/RT5350EVB/Description

Package set for RT5350-EVB Module

endef

$(eval $(call Profile,RT5350EVB))

2.添加如下内容到barrier_breaker/target/linux/ramips/image/Makefile:

438行处:

BuildFirmware/RT5350EVB/squashfs=$(call BuildFirmware/Default8M/squashfs,$(1),$(2),$(3),$(4))

define BuildFirmware/RT5350EVB/initramfs

$(call BuildFirmware/OF/initramfs,$(1),$(2),$(3),$(4))

#mkhilinkfw -e -i$(call imgname,$(1),$(2))-uImage.bin -o $(call imgname,$(1),$(2))-factory.bin;

endef

Image/Build/Profile/RT5350EVB=$(call BuildFirmware/RT5350EVB/$(1),$(1),rt5350-evb,RT5350EVB,RT5350-EVB)

607行处:

$(call Image/Build/Profile/RT5350EVB,$(1))

3.新建文件barrier_breaker/target/linux/ramips/dts/RT5350EVB.dts

/dts-v1/;

/include/ "rt5350.dtsi"

/ {

compatible = "RT5350EVB", "ralink,rt5350-soc";

model = "RT5350-EVB";

memory@0 {

device_type = "memory";

reg = <0x0 0x1000000>; 如果是32M的sdram,应改成0x2000000

};

palmbus@10000000 {

spi@b00 {

status = "okay";

m25p80@0 {

#address-cells = <1>;

#size-cells = <1>;

compatible = "mx25l6405d"; 此处的mx25l6405d为flash,后面会提到如何得到这个串

reg = <0 0>;

linux,modalias = "m25p80", "mx25l6405d";

spi-max-frequency = <10000000>;

partition@0 {

label = "u-boot";

reg = <0x0 0x30000>;

read-only;

};

partition@30000 {

label = "u-boot-env";

reg = <0x30000 0x10000>;

read-only;

};

factory: partition@40000 {

label = "factory";

reg = <0x40000 0x10000>;

read-only;

};

partition@50000 {

label = "firmware";

reg = <0x50000 0x7b0000>;

};

};

};

};

pinctrl {

state_default: pinctrl0 {

gpio {

ralink,group = "jtag";

ralink,function = "gpio";

};

};

};

ethernet@10100000 {

mtd-mac-address = ;

};

wmac@10180000 {

ralink,mtd-eeprom = ;

};

ehci@101c0000 {

status = "okay";

};

ohci@101c1000 {

status = "okay";

};

gpio-keys-polled {

compatible = "gpio-keys-polled";

#address-cells = <1>;

#size-cells = <0>;

poll-interval = <20>;

wps {

label = "reset";

gpios = ;

linux,code = <0x198>;

};

};

gpio-leds {

compatible = "gpio-leds";

power {

label = "rt5350-evb:red:power";

gpios = ;

};

};

};

4.添加以下到barrier_breaker/target/linux/ramips/base-files/etc/diag.sh:67

rt5350-evb)

status_led="rt5350-evb:red:power"

;;

5.添加以下到barrier_breaker/target/linux/ramips/base-files/etc/uci-defaults/01_leds:112

rt5350-evb)

set_wifi_led "rt2800pci-phy0::radio"

;;

6.添加以下到barrier_breaker/target/linux/ramips/base-files/etc/uci-defaults/02_network:225

rt5350-evb | \

7.添加以下到barrier_breaker/target/linux/ramips/base-files/lib/ramips.sh:157

*"RT5350-EVB")

name="rt5350-evb"

;;

8.添加以下到barrier_breaker/target/linux/ramips/base-files/lib/upgrade/platform.sh:55

rt5350-evb | \

9.编译,烧写(建议直接选上luci,免得后面再来做)

只要配置了正确的cpu、flash、sdram,OpenWrt就可以正常的跑起来了。

怎么得到flash串?

在uboot起动的时候会输出硬件信息,OpenWrt启动的时候也会有检测:

[ 0.470000] m25p80 spi32766.0: found mx25l6405d, expected s25fl064k

[ 0.490000] m25p80 spi32766.0: mx25l6405d (8192 Kbytes)

[ 0.500000] 4 ofpart partitions found on MTD device spi32766.0

[ 0.510000] Creating 4 MTD partitions on "spi32766.0":

[ 0.520000] 0x000000000000-0x000000030000 : "u-boot"

[ 0.530000] 0x000000030000-0x000000040000 : "u-boot-env"

[ 0.550000] 0x000000040000-0x000000050000 : "factory"

[ 0.560000] 0x000000050000-0x000000800000 : "firmware"

[ 0.580000] 0x000000144de5-0x000000800000 : "rootfs"其中第一行中,表示检测到的是mx25l6405d,而配置的时候,选用的是s25fl064k;在dts文件中改成mx25l6405d并重新编译即可。

内存的检测:

[ 0.000000] Zone ranges:

[ 0.000000] Normal [mem 0x00000000-0x01ffffff]

[ 0.000000] Movable zone start for each node

[ 0.000000] Early memory node ranges

[ 0.000000] node 0: [mem 0x00000000-0x01ffffff]

说明内存是32M

如果内存不正确的话,可能在运行的时候会出现oom-killer错误:

[ 442.120000] udhcpc invoked oom-killer: gfp_mask=0x201da, order=0, oom_score_adj=0

[ 442.130000] CPU: 0 PID: 1120 Comm: udhcpc Not tainted 3.10.49 #1

[ 442.140000] Stack : 00000000 00000000 00000000 00000000 802fa35e 00000034 80ea45d8 00000000

8025638c 8029653b 00000460 802f381c 80ea45d8 00000000 00000000 00000000

00000086 80203c54 00000000 80172928 00000006 801afca8 802579e4 80e4fb94

00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

00000000 00000000 00000000 00000000 00000000 00000000 00000000 80e4fb20

...

[ 442.210000] Call Trace:

[ 442.220000] [<801ad498>] show_stack+0x48/0x70

[ 442.230000] [<802033c4>] dump_header.isra.16+0x4c/0x13c

[ 442.240000] [<801556a8>] oom_kill_process+0xc8/0x3b0

[ 442.250000] [<801567ec>] out_of_memory+0x2ac/0x2e4

[ 442.260000] [<80024d30>] __alloc_pages_nodemask+0x5d0/0x634

[ 442.270000] [<800c93b8>] filemap_fault+0x214/0x3e4

[ 442.280000] [<8002d948>] __do_fault+0xd0/0x4fc

[ 442.290000] [<800e4be8>] handle_pte_fault+0x188/0x910

[ 442.300000] [<800e4890>] handle_mm_fault+0xa0/0xe0

[ 442.310000] [<800aa428>] do_page_fault+0x150/0x394

[ 442.320000] [<80004820>] ret_from_exception+0x0/0x10

[ 442.330000]

[ 442.330000] Mem-Info:

[ 442.330000] Normal per-cpu:

[ 442.340000] CPU 0: hi: 0, btch: 1 usd: 0

[ 442.350000] active_anon:1027 inactive_anon:50 isolated_anon:0

[ 442.350000] active_file:2 inactive_file:19 isolated_file:0

[ 442.350000] unevictable:0 dirty:0 writeback:0 unstable:0

[ 442.350000] free:114 slab_reclaimable:199 slab_unreclaimable:802

[ 442.350000] mapped:2 shmem:151 pagetables:49 bounce:0

[ 442.350000] free_cma:0

[ 442.410000] Normal free:456kB min:456kB low:568kB high:684kB active_anon:4108kB inactive_anon:200kB active_file:8kB inactive_file:76kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:16384kB mans

[ 442.490000] lowmem_reserve[]: 0 0

[ 442.500000] Normal: 0*4kB 1*8kB (U) 0*16kB 0*32kB 1*64kB (U) 1*128kB (U) 1*256kB (R) 0*512kB 0*1024kB 0*2048kB 0*4096kB = 456kB

[ 442.520000] 178 total pagecache pages

[ 442.530000] 0 pages in swap cache

[ 442.530000] Swap cache stats: add 0, delete 0, find 0/0

[ 442.540000] Free swap = 0kB

[ 442.550000] Total swap = 0kB

[ 442.560000] 4096 pages RAM

[ 442.560000] 777 pages reserved

[ 442.570000] 264046 pages shared

[ 442.580000] 2977 pages non-shared

[ 442.580000] [ pid ] uid tgid total_vm rss nr_ptes swapents oom_score_adj name

[ 442.600000] [ 329] 0 329 223 17 3 0 0 ubusd

[ 442.610000] [ 330] 0 330 372 21 3 0 0 ash

[ 442.630000] [ 674] 0 674 262 37 4 0 0 logd

[ 442.640000] [ 732] 0 732 310 41 4 0 0 odhcpd

[ 442.660000] [ 777] 0 777 369 15 5 0 0 telnetd

[ 442.680000] [ 842] 0 842 371 18 3 0 0 ntpd

[ 442.690000] [ 891] 65534 891 243 24 5 0 0 dnsmasq

[ 442.710000] [ 968] 0 968 287 19 3 0 0 dropbear

[ 442.720000] [ 1061] 0 1061 386 53 4 0 0 netifd

[ 442.740000] [ 1120] 0 1120 370 18 4 0 0 udhcpc

[ 442.760000] [ 1238] 0 1238 662 458 3 0 0 opkg

[ 442.770000] [ 1242] 0 1242 422 211 3 0 0 opkg

[ 442.790000] Out of memory: Kill process 1238 (opkg) score 134 or sacrifice child

[ 442.800000] Killed process 1242 (opkg) total-vm:1688kB, anon-rss:844kB, file-rss:0kB

关于pppoe的设置:

在 接口->wan中设置中,使用pppoe协议,输入用户密码即可,如果出现不能成功拨号,获取到ip的话,查看交换机的设置,配成如下即可(特别留心4号端口(wan口)):

也可修改配置文件/etc/config/network中的vlan配置:

config switch

option name 'rt305x'

option reset '1'

option enable_vlan '1'

config switch_vlan

option device 'rt305x'

option vlan '1'

option ports '0 1 2 3 6t'

config switch_vlan

option device 'rt305x'

option vlan '2'

option ports '4 6t'

下面是首页截图

linux m25p80 dts,OpenWrt添加开发板RT5350-EVB,并成功设置pppoe相关推荐

  1. Arduino上手动添加开发板

    最近一个在一个项目上想在树莓派3B+上使用9dof-razor-imu传感器,,搭建开发环境的时候根据其官网说明选了Arduino.然而在添加他的第三方SparkFun开发板时出了问题,因为他的开发板 ...

  2. linux开发板ftp,用ftp从linux上下载文件到开发板的方法

    用ftp从linux上下载文件到开发板的方法 1.       首先将我们的虚拟机(操作系统以fedora为例)与开发板的用网线连接. 2.       虚拟机的网卡设置为bridged (这个在vm ...

  3. linux通过以太网线上网,开发板通过以太网卡的互联网连接尝试

    8种机械键盘轴体对比 本人程序员,要买一个写代码的键盘,请问红轴和茶轴怎么选? 前言 我在Ubuntu虚拟机的开发环境中成功编译了符合iTop-4412开发板的嵌入式Linux内核的boa执行文档,放 ...

  4. 讯为开发板移植linux,迅为I.MX6ULL开发板移植Linux5.4内核教程

    4412上移植最新5.4内核的流程非常的简单,因为4412被Linux官方支持,那么我们来看一下怎么把官方5.4内核移植到我们的I.MX6ULL终结者开发板上. 平台:i.MX6ULL开发板 前言 本 ...

  5. linux内核剪裁 4412,itop4412开发板-Linux内核的编译

    本篇文章基于itop4412开发板 5.3.2.1源码目录 Linux 内核源码在光盘"06_源码_uboot 和 kernel"目录下,如下图所示. 5.3.2.2 编译器 内核 ...

  6. 电脑向linux板卡传文件,ARM 开发板嵌入式linux系统与主机PC通过串口传输文件

    ARM 开发板嵌入式linux系统与主机PC通过串口传输文件 本来以为按以下两篇文章就可以几步轻松搞定这个问题,没想到遇到两个小麻烦: 1,我用的xp虚拟机下redhat9.0做主机,按照下面第一篇文 ...

  7. linux iio 设备驱动,FS4412开发板使用Linux IIO驱动框架实现ADC驱动

    1.概述 FS4412开发板有一个4通道(0/1/2).10/12比特精度的 ADC ,其中: 1)ADCIN0: 在核心板中引出 2)ADCIN1: 在核心板中引出 3)ADCIN2: 在核心板中引 ...

  8. 赛灵思运行linux,玩转赛灵思Zedboard开发板(6):如何在Zedboard上运行linux下的应用程序?...

    描述 电子发烧友网讯:ZedBoard开发板上的Zynq是一个ARM PS(processing system, 双核A9 + 存储管理 + 外设)+ PL(programable Logic) 结构 ...

  9. at91sam9260ek开发板linux移植文档,AT91SAM9260EK开发板 Linux 移植 移植 文档

    AT91SAM9260EK开发板 Linux 移植 移植 文档 AT91SAM9260EKAT91SAM9260EKAT91SAM9260EKAT91SAM9260EK 开发板开发板开发板开发板 Li ...

最新文章

  1. 【每日一算法】移除元素
  2. day02 cssjs 基础
  3. 关闭ES动态创建type
  4. buuctf 二维码
  5. Socket模型详解
  6. Android应用的安全的攻防之战
  7. 网络工程师应该掌握的知识要点
  8. linux中禁用Root帐户的4种方法
  9. 语音识别相关书籍抖音十大先看哪一本最好
  10. Gibbs Sampling\吉布斯采样(三)
  11. YOLOv1、YOLOv2、YOLOv3、YOLOv4、YOLOv5的发展(1)
  12. 拼音四线三格图片_一年级语文必考拼音拼读+书写规则,孩子开学就会用到!...
  13. 计算机音乐演奏jojo,【FF14】诗人演奏用 il vento d'oro(动画《JOJO的奇妙冒险 黄金之风》插曲)...
  14. 20190519 ICPC西安邀请赛游记
  15. 利器 | REST Assured 实践(二):断言实现
  16. 开发与研发:区别很大(上)
  17. 机器学习---推荐系统效果评估NDCG
  18. 关于软件定时器的一些讨论
  19. mysql错误42000_mysql5.7 异常ERROR 1055 (42000)
  20. Rosalind Java| Finding a Shared Motif

热门文章

  1. Java POI 读取Excel-从开始到实例
  2. 自动填写html文本框的值,网页自动填表——文本输入框及多行文本输入框
  3. 将dll制作成控件_案例丨首例将影视作品制作成网络图片集被判侵权案 二审维持原判...
  4. oracle9可以访问8,使用Oracle9i全索引扫描快速访问数据
  5. 中介者模式php,php设计模式 Mediator (中介者模式)
  6. Find the median(线段树离散化+区间更新)
  7. Python 处理前端反调试(无限debugger)
  8. 某学校新买了一批计算机,2020年度初中信息技术考试选择题.doc
  9. 语法转换_近5年高考(2019- 2015年)语法填空词性转换使用真题汇编
  10. CSS笔记-除了a标签外的hover属性的应用