微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 无线和射频 > 射频无线通信设计 > RT5350使用uboot从U盘启动linux成功

RT5350使用uboot从U盘启动linux成功

时间:10-02 整理:3721RD 点击:

1、在uboot需要做的是:

①usb reset

②fatload usb 0:1 0x80c00000 root_uImage

③bootm 0x80c00000

启动内核参数

CONFIG_CMDLINE="console=ttyS1,57600n8 mem=32m ip=off noinitrd root=8:2 rw rootfstype=ext2 rootdelay=10"

在内上驱动需支持scsi,usb等

本次使用的16G的sandisk u 盘

前一个分区为8M,剩下为第二分区

第一分区格式化ewingvfat;第二分区格式化为ext2

并分别将zimage放在第一分区,rootfs放在第二分区

FAT16: entry: 0x008b = 139, offset: 0x008b = 139

FAT16: ret: 0000008c, offset: 008b

gc - clustnum: 3, startsect: 551

...........................................................................................................................................................................................................................

gc - clustnum: 140, startsect: 2743

Size: 1124654, got: 1124654

1124654 bytes read

RT5350 # bootm 0x80c00000

## Booting image at 80c00000 ...

Image Name: Linux Kernel Image

Image Type: MIPS Linux Kernel Image (lzma compressed)

Data Size: 1124590 Bytes = 1.1 MB

Load Address: 80000000

Entry Point: 8031b000

Verifying Checksum ... OK

Uncompressing Kernel Image ... OK

No initrd

## Transferring control to Linux (at address 8031b000) ...

## Giving linux memsize in MB, 32

Starting kernel ...

LINUX started...

THIS IS ASIC

Linux version 2.6.21 (root@zq) (gcc version 3.4.2) #24 Tue Jul 22 20:06:46 CST 2014

The CPU feqenuce set to 360 MHz

CPU revision is: 0001964c

Determined physical RAM map:

memory: 02000000 @ 00000000 (usable)

User-defined physical RAM map:

memory: 02000000 @ 00000000 (usable)

Initrd not found or empty - disabling initrd

Built 1 zonelists. Total pages: 8128

Kernel command line: console=ttyS1,57600n8 mem=32m ip=off noinitrd root=8:2 rw rootfstype=ext2 rootdelay=10

Primary instruction cache 32kB, physically tagged, 4-way, linesize 32 bytes.

Primary data cache 16kB, 4-way, linesize 32 bytes.

Synthesized TLB refill handler (20 instructions).

Synthesized TLB load handler fastpath (32 instructions).

Synthesized TLB store handler fastpath (32 instructions).

Synthesized TLB modify handler fastpath (31 instructions).

Cache parity protection disabled

cause = d0808060, status = 11000000

PID hash table entries: 128 (order: 7, 512 bytes)

calculating r4koff... 0015f900(1440000)

CPU frequency 360.00 MHz

Using 180.000 MHz high precision timer.

Console: colour dummy device 80x25

Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)

Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)

Memory: 29040k/32768k available (2449k kernel code, 3728k reserved, 726k data, 144k init, 0k highmem)

Mount-cache hash table entries: 512

NET: Registered protocol family 16

SCSI subsystem initialized

usbcore: registered new interface driver usbfs

usbcore: registered new interface driver hub

usbcore: registered new device driver usb

NET: Registered protocol family 2

Time: MIPS clocksource has been installed.

IP route cache hash table entries: 1024 (order: 0, 4096 bytes)

TCP established hash table entries: 1024 (order: 1, 8192 bytes)

TCP bind hash table entries: 1024 (order: 0, 4096 bytes)

TCP: Hash tables configured (established 1024 bind 1024)

TCP reno registered

deice id : 20 20 17 10 0 (20171000)

Warning: un-recognized chip ID, please update SPI driver!

AT25DF321(1f 47000000) (4096 Kbytes)

mtd .name = raspi, .size = 0x00400000 (4M) .erasesize = 0x00010000 (64K) .numeraseregions = 0

Creating 5 MTD partitions on "raspi":

0x00000000-0x00400000 : "ALL"

0x00000000-0x00030000 : "Bootloader"

0x00030000-0x00040000 : "Config"

0x00040000-0x00050000 : "Factory"

0x00050000-0x01000000 : "Kernel"

mtd: partition "Kernel" extends beyond the end of device "raspi" -- size truncated to 0x3b0000

RT3xxx EHCI/OHCI init.

squashfs: version 3.2-r2 (2007/01/15) Phillip Lougher

squashfs: LZMA suppport for slax.org by jro

fuse init (API version 7.8)

io scheduler noop registered (default)

Ralink gpio driver initialized

HDLC line discipline: version $Revision: 1.1.1.1 $, maxframe=4096

N_HDLC line discipline registered.

Serial: 8250/16550 driver $Revision: 1.7 $ 2 ports, IRQ sharing disabled

serial8250: ttyS0 at I/O 0xb0000500 (irq = 37) is a 16550A

serial8250: ttyS1 at I/O 0xb0000c00 (irq = 12) is a 16550A

RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize

loop: loaded (max 8 devices)

rdm_major = 254

MAC_ADRH -- : 0x00000000

MAC_ADRL -- : 0x00000000

Ralink APSoC Ethernet Driver Initilization. v2.0 256 rx/tx descriptors allocated, mtu = 1500!

MAC_ADRH -- : 0x0000000c

MAC_ADRL -- : 0x43305077

PROC INIT OK!

PPP generic driver version 2.4.2

PPP Deflate Compression module registered

PPP BSD Compression module registered

PPP MPPE Compression module registered

NET: Registered protocol family 24

PPPoL2TP kernel driver, V0.17

PPTP driver version 0.8.1

Linux video capture interface: v2.00

usbcore: registered new interface driver uvcvideo

USB Video Class driver (SVN r209)

block2mtd: version $Revision: 1.1.1.1 $

rt3xxx-ehci rt3xxx-ehci: Ralink EHCI Host Controller

rt3xxx-ehci rt3xxx-ehci: new USB bus registered, assigned bus number 1

rt3xxx-ehci rt3xxx-ehci: irq 18, io mem 0x101c0000

rt3xxx-ehci rt3xxx-ehci: startup error -145

rt3xxx-ehci rt3xxx-ehci: USB bus 1 deregistered

rt3xxx-ehci rt3xxx-ehci: RT3xxx EHCI init fail. -145

rt3xxx-ehci: probe of rt3xxx-ehci failed with error -145

rt3xxx-ohci rt3xxx-ohci: RT3xxx OHCI Controller

rt3xxx-ohci rt3xxx-ohci: new USB bus registered, assigned bus number 1

rt3xxx-ohci rt3xxx-ohci: irq 18, io mem 0x101c1000

usb usb1: configuration #1 chosen from 1 choice

hub 1-0:1.0: USB hub found

hub 1-0:1.0: 1 port detected

Initializing USB Mass Storage driver...

usb 1-1: new full speed USB device using rt3xxx-ohci and address 2

usb 1-1: configuration #1 chosen from 1 choice

scsi0 : SCSI emulation for USB Mass Storage devices

usbcore: registered new interface driver usb-storage

USB Mass Storage support registered.

nf_conntrack version 0.5.0 (256 buckets, 2048 max)

ip_tables: (C) 2000-2006 Netfilter Core Team, Type=Restricted Cone

arp_tables: (C) 2002 David S. Miller

TCP cubic registered

NET: Registered protocol family 1

NET: Registered protocol family 10

NET: Registered protocol family 17

802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>

All bugs added by David S. Miller <davem@redhat.com>

Waiting 10sec before mounting root device...

scsi 0:0:0:0: Direct-Access SanDisk Cruzer Facet 1.26 PQ: 0 ANSI: 5

SCSI device sda: 31266816 512-byte hdwr sectors (16009 MB)

sda: Write Protect is off

sda: assuming drive cache: write through

SCSI device sda: 31266816 512-byte hdwr sectors (16009 MB)

sda: Write Protect is off

sda: assuming drive cache: write through

sda:<7>usb-storage: queuecommand called

sda1 sda2

sd 0:0:0:0: Attached scsi removable disk sda

sd 0:0:0:0: Attached scsi generic sg0 type 0

EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended

VFS: Mounted root (ext2 filesystem).

Freeing unused kernel memory: 144k freed

init started: BusyBox v1.12.1 (2014-07-06 16:49:08 CST)

starting pid 714, tty '': '/etc_ro/rcS'

Algorithmics/MIPS FPU Emulator v1.5

devpts: called with bogus options

Welcome to

_______ _______ ___ __ ____ _ _ ___

| ___ \| __ || | |__|| \ | || | / /

| |___| || |__| || |__ __ | \| || |/ /

| _ /| _ || || || |\ || \

|__| \__\|__| |__||______||__||_| \____||_|\___\

=System Architecture Department=

starting pid 723, tty '/dev/ttyS1': '/bin/sh'

BusyBox v1.12.1 (2014-07-06 16:49:08 CST) built-in shell (ash)

Enter 'help' for a list of built-in commands.

# internet.sh

chpasswd: an error occurred updating password for admin

insmod: bridge.ko: module not found

insmod: mii.ko: module not found

insmod: raeth.ko: module not found

phy_tx_ring = 0x01e3f000, tx_ring = 0xa1e3f000

phy_rx_ring0 = 0x01e40000, rx_ring0 = 0xa1e40000

RT305x_ESW: Link Status Changed

##### disable 1st wireless interface #####

rmmod: rt2860v2_ap_net: No such file or directory

rmmod: rt2860v2_ap: No such file or directory

rmmod: rt2860v2_ap_util: No such file or directory

rmmod: rt2860v2_sta_net: No such file or directory

rmmod: rt2860v2_sta: No such file or directory

rmmod: rt2860v2_sta_util: No such file or directory

Commit crc = 19538695

insmod: rt2860v2_ap_util.ko: module not found

rt2860v2_ap: module license 'unspecified' taints kernel.

=== pAd = c001b000, size = 628392 ===

<-- RTMPAllocAdapterBlock, Status=0

insmod: rt2860v2_ap_net.ko: module not found

rmmod: nf_nat_pptp: No such file or directory

rmmod: nf_conntrack_pptp: No such file or directory

rmmod: nf_nat_proto_gre: No such file or directory

rmmod: nf_conntrack_proto_gre: No such file or directory

RX DESC a1da6000 size = 2048

<-- RTMPAllocTxRxRingMemory, Status=0

RTMP_TimerListAdd: add timer obj c00858b0!

RTMP_TimerListAdd: add timer obj c0023014!

RTMP_TimerListAdd: add timer obj c0022be4!

RTMP_TimerListAdd: add timer obj c0022fc0!

RTMP_TimerListAdd: add timer obj c0022fe8!

RTMP_TimerListAdd: add timer obj c00230cc!

RTMP_TimerListAdd: add timer obj c00230f8!

RTMP_TimerListAdd: add timer obj c00232a4!

RTMP_TimerListAdd: add timer obj c00539bc!

RTMP_TimerListAdd: add timer obj c005358c!

RTMP_TimerListAdd: add timer obj c0053968!

RTMP_TimerListAdd: add timer obj c0053990!

RTMP_TimerListAdd: add timer obj c0053a74!

RTMP_TimerListAdd: add timer obj c0053aa0!

RTMP_TimerListAdd: add timer obj c00539e8!

RTMP_TimerListAdd: add timer obj c0053a14!

RTMP_TimerListAdd: add timer obj c0053a40!

RTMP_TimerListAdd: add timer obj c0085dd0!

RTMP_TimerListAdd: add timer obj c0085da8!

RTMP_TimerListAdd: add timer obj c0085d80!

RTMP_TimerListAdd: add timer obj c005c66c!

RTMP_TimerListAdd: add timer obj c005c770!

RTMP_TimerListAdd: add timer obj c005c694!

RTMP_TimerListAdd: add timer obj c0053f84!

RTMP_TimerListAdd: add timer obj c00204d8!

RTMP_TimerListAdd: add timer obj c0053ca4!

Key1Str is Invalid key length(0) or Type(0)

Key2Str is Invalid key length(0) or Type(0)

Key3Str is Invalid key length(0) or Type(0)

Key4Str is Invalid key length(0) or Type(0)

1. Phy Mode = 9

2. Phy Mode = 9

3. Phy Mode = 9

RTMP_TimerListAdd: add timer obj c00200dc!

RT305x_ESW: Link Status Changed

MCS Set = ff 00 00 00 01

Main bssid = 00:0c:43:30:50:18

<==== rt28xx_init, Status=0

0x1300 = 00064380

vconfig: ioctl error for rem: Invalid argument

vconfig: ioctl error for rem: Invalid argument

rmmod: 8021q: No such file or directory

insmod: 8021q.ko: module not found

ifconfig: ioctl 0x8913 failed: No such device

brctl: bridge br0: No such device or address

iptables v1.3.5: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)

Perhaps iptables or your kernel needs to be upgraded.

iptables v1.3.5: can't initialize iptables table `mangle': Table does not exist (do you need to insmod?)

Perhaps iptables or your kernel needs to be upgraded.

##### config Ralink ESW vlan partition (LLLLW) #####

switch reg write offset=14, value=405555

switch reg write offset=50, value=2001

switch reg write offset=98, value=7f3f

switch reg write offset=e4, value=3f

switch reg write offset=40, value=1001

switch reg write offset=44, value=1001

switch reg write offset=48, value=1002

switch reg write offset=70, value=ffff506f

done.

device ra0 entered promiscuous mode

eth2.1: dev_set_promiscuity(master, 1)

device eth2 entered promiscuous mode

device eth2.1 entered promiscuous mode

RT305x_ESW: Link Status Changed

br0: port 2(eth2.1) entering learning state

br0: port 1(ra0) entering learning state

ifconfig: ioctl 0x8914 failed: Cannot assign requested address

ifconfig: ioctl 0x8914 failed: Cannot assign requested address

killall: udhcpd: no process killed

Set: phy[0].reg[RT305x_ESW: Link Status Changed

0] = 3900

Set: phy[1].reg[0] = 3900

Set: phy[2].reg[0] = 3900

Set: phy[3].reg[0] = 3900

Set: phy[0].reg[0] = 3100

Set: phy[1].reg[0] = 3100

Set: phy[2].reg[0] = 3100

RT305x_ESW: Link Status Changed

Set: phy[3].reg[0] = 3100

ifconfig: ioctl 0x8913 failed: No such device

udhcpc (v1.12.1) started

killall rt2860apd 1>/dev/null 2>&1

iptables -F -t filter 1>/dev/null 2>&1

iptables -D FORWARD -j macipport_filter 1>/dev/null 2>&1

iptables -F macipport_filter 1>/dev/null 2>&1

iptables -D FORWARD -j web_filter 1>/dev/null 2>&1

iptables -F web_filter 1>/dev/null 2>&1

iptables -D FORWARD -j malicious_filter 1>/dev/null 2>&1

iptables -F malicious_filter 1>/dev/null 2>&1

iptables -D INPUT -j malicious_input_filter 1>/dev/null 2>&1

iptables -F malicious_input_filter 1>/dev/null 2>&1

iptables -P INPUT ACCEPT

iptables v1.3.5: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)

Perhaps iptables or your kernel needs to be upgraded.

iptables -P OUTPUT ACCEPT

iptables v1.3.5: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)

Perhaps iptables or your kernel needs to be upgraded.

iptables -P FORWARD ACCEPT

iptables v1.3.5: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)

Perhaps iptables or your kernel needs to be upgraded.

iptables -t filter -N web_filter 1>/dev/null 2>&1

iptables -t filter -N macipport_filter 1>/dev/null 2>&1

iptables -t filter -N malicious_filter 1>/dev/null 2>&1

iptables -t filter -N synflood_filter 1>/dev/null 2>&1

iptables -t filter -N malicious_input_filter 1>/dev/null 2>&1

iptables -t filter -N synflood_input_filter 1>/dev/null 2>&1

iptables -t filter -A FORWARD -j web_filter 1>/dev/null 2>&1

iptables -t filter -A FORWARD -j macipport_filter 1>/dev/null 2>&1

iptables -t filter -A FORWARD -j malicious_filter 1>/dev/null 2>&1

iptables -t filter -A malicious_filter -p tcp --syn -j synflood_filter 1>/dev/null 2>&1

iptables -t filter -A INPUT -j malicious_input_filter 1>/dev/null 2>&1

iptables -t filter -A malicious_input_filter -p tcp --syn -j synflood_input_filter 1>/dev/null 2>&1

iptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu 1>/dev/null 2>&1

iptables -A malicious_input_filter -i eth2.2 -p tcp --dport 80 -j DROP

iptables v1.3.5: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)

Perhaps iptables or your kernel needs to be upgraded.

/bin/super_dmz -f

sh: /bin/super_dmz: not found

iptables -t nat -D PREROUTING -j port_forward 1>/dev/null 2>&1

iptables -t nat -F port_forward 1>/dev/null 2>&1; iptables -t nat -X port_forward 1>/dev/null 2>&1

iptables -t nat -D PREROUTING -j DMZ 1>/dev/null 2>&1

iptables -t nat -F DMZ 1>/dev/null 2>&1; iptables -t nat -X DMZ 1>/dev/null 2>&1

iptables -t nat -N port_forward 1>/dev/null 2>&1; iptables -t nat -I PREROUTING 1 -j port_forward 1>/dev/null 2>&1

iptables -t nat -N DMZ 1>/dev/null 2>&1; iptables -t nat -I PREROUTING 2 -j DMZ 1>/dev/null 2>&1

ntp.sh

ddns.sh

kill -9 `cat /var/run/wscd.pid.ra0`

cat: can't open '/var/run/wscd.pid.ra0': No such file or directory

kill: you need to specify whom to kill

iwpriv ra0 set WscConfMode=0 1>/dev/null 2>&1

route delete 239.255.255.250 1>/dev/null 2>&1

killall -q klogd

killall -q syslogd

syslogd -C8 1>/dev/null 2>&1

klogd 1>/dev/null 2>&1

killall -q zebra

killall -q ripd

webs: Listening for HTTP requests at address 10.10.10.254

br0: topology change detected, propagating

br0: port 2(eth2.1) entering forwarding state

br0: topology change detected, propagating

br0: port 1(ra0) entering forwarding state

#

#

#

# ps

PID USER VSZ STAT COMMAND

1 admin 1764 S init

2 admin 0 SWN [ksoftirqd/0]

3 admin 0 SW< [events/0]

4 admin 0 SW< [khelper]

5 admin 0 SW< [kthread]

32 admin 0 SW< [kblockd/0]

35 admin 0 SW< [khubd]

49 admin 0 SW< [kswapd0]

50 admin 0 SW [pdflush]

51 admin 0 SW [pdflush]

52 admin 0 SW< [aio/0]

678 admin 0 SW [mtdblockd]

701 admin 0 SW< [scsi_eh_0]

702 admin 0 SW< [usb-storage]

718 admin 1364 S nvram_daemon

719 admin 1928 S goahead

721 admin 1760 S telnetd

723 admin 1768 S /bin/sh

908 admin 0 SW [RtmpCmdQTask]

909 admin 0 SW [RtmpWscTask]

1286 admin 1764 S udhcpd /etc/udhcpd.conf

1462 admin 1760 S udhcpc -i eth2.2 -s /sbin/udhcpc.sh -p /var/run/udhcp

1603 admin 1768 S syslogd -C8

1606 admin 1760 S klogd

1615 admin 1764 R ps

# free

total used free shared buffers

Mem: 29184 11904 17280 0 128

Swap: 0 0 0

Total: 29184 11904 17280

#

搞路由器?WIFI产品?

准备玩玩啊 现在不是比较热吗

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top