Advertisement
Guest User

MZK-WNH

a guest
Jun 2nd, 2013
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 11.39 KB | None | 0 0
  1. http://ll.ly/2yra4
  2.  
  3. /trunk/build_dir/target-mipsel_dsp_uClibc-0.9.33.2/linux-ramips_rt305x/linux-3.8.13/drivers/mtd/mtdpart.c
  4.  
  5. static unsigned long find_uimage_size(struct mtd_info *mtd,
  6.                                       unsigned long offset)
  7. {
  8. #define UBOOT_MAGIC     0x53595343
  9.         unsigned long magic = 0;
  10.         unsigned long temp;
  11.         size_t len;
  12.         int ret;
  13.  
  14.         ret = mtd_read(mtd, offset, 4, &len, (void *)&magic);
  15.         if (ret || len != sizeof(magic))
  16.                 return 0;
  17.  
  18.         if (le32_to_cpu(magic) != UBOOT_MAGIC)
  19.                 return 0;
  20.  
  21.         ret = mtd_read(mtd, offset + 32, 4, &len, (void *)&temp);
  22.         if (ret || len != sizeof(temp))
  23.                 return 0;
  24.  
  25.         return be32_to_cpu(temp) + 0x54;
  26. }
  27.  
  28. ================================================================
  29.  
  30. U-Boot 1.1.3 (Nov 25 2008 - 16:46:30)
  31.  
  32. Board: Ralink APSoC DRAM:  16 MB
  33. relocate_code Pointer at: 80fa8000
  34. ****************************
  35. Init GPIO Pin****************************
  36. flash_protect ON: from 0xBFC00000 to 0xBFC26213
  37. protect on 0
  38. protect on 1
  39. protect on 2
  40. protect on 3
  41. protect on 4
  42. protect on 5
  43. protect on 6
  44. protect on 7
  45. protect on 8
  46. protect on 9
  47. flash_protect ON: from 0xBFC30000 to 0xBFC3FFFF
  48. protect on 10
  49. *** Warning - bad CRC, using default environment
  50.  
  51. ============================================
  52. Ralink UBoot Version: 3.1
  53. --------------------------------------------
  54. ASIC 3052_MP1 (MAC to GigaMAC Mode)
  55. DRAM COMPONENT: 64Mbits
  56. DRAM BUS: 32BIT
  57. Total memory: 16 MBytes
  58. Flash: 4 MBytes
  59. Date:Nov 25 2008  Time:16:46:30
  60. ============================================
  61. icache: sets:256, ways:4, linesz:32 ,total:32768
  62. dcache: sets:128, ways:4, linesz:32 ,total:16384
  63.  
  64.  ##### The CPU freq = 384 MHZ ####
  65.  
  66.  SDRAM bus set to 32 bit
  67.  SDRAM size =16 Mbytes
  68.  
  69. Please choose the operation:
  70.    0: Load ucos code to SDRAM via TFTP Client.
  71.    1: Load system code to SDRAM via TFTP.
  72.    2: Load system code then write to Flash via TFTP.
  73.    3: Boot system code via Flash (default).
  74.    4: Entr boot command line interface.
  75.    9: Load Boot Loader code then write to Flash via TFTP.                     0
  76.  
  77. 3: System Boot system code via Flash.
  78. ## Booting image at bfc50000 ...
  79. Bad Magic Number,43535953
  80.    Image Name:   MIPS OpenWrt Linux-3.8.13
  81.    Created:      2013-06-02  14:32:30 UTC
  82.  
  83.  System Control Status = 0x01040000
  84.    Image Type:   MIPS Linux Kernel Image (lzma compressed)
  85.    Data Size:    884379 Bytes = 863.7 kB
  86.    Load Address: 80000000
  87.    Entry Point:  80000000
  88.    Verifying Checksum ... OK
  89.    Uncompressing Kernel Image ... OK
  90. No initrd
  91. ## Transferring control to Linux (at address 80000000) ...
  92. ## Giving linux memsize in MB, 16
  93.  
  94. Starting kernel ...
  95.  
  96. [    0.000000] Linux version 3.8.13 (mizuho@colinux) (gcc version 4.6.4 (OpenWrt/Linaro GCC 4.6-2012.12 r36754) ) #4 Sun Jun 2 23:28:53 JST 2013
  97. [    0.000000] SoC Type: Ralink RT3052 id:1 rev:3
  98. [    0.000000] bootconsole [early0] enabled
  99. [    0.000000] CPU revision is: 0001964c (MIPS 24KEc)
  100. [    0.000000] MIPS: machine is Planex MZK-W300NH2
  101. [    0.000000] Determined physical RAM map:
  102. [    0.000000]  memory: 01000000 @ 00000000 (usable)
  103. [    0.000000] Initrd not found or empty - disabling initrd
  104. [    0.000000] Zone ranges:
  105. [    0.000000]   Normal   [mem 0x00000000-0x00ffffff]
  106. [    0.000000] Movable zone start for each node
  107. [    0.000000] Early memory node ranges
  108. [    0.000000]   node   0: [mem 0x00000000-0x00ffffff]
  109. [    0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
  110. [    0.000000] Primary data cache 16kB, 4-way, VIPT, no aliases, linesize 32 bytes
  111. [    0.000000] Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 4064
  112. [    0.000000] Kernel command line: console=ttyS0,57600 rootfstype=squashfs,jffs2
  113. [    0.000000] PID hash table entries: 64 (order: -4, 256 bytes)
  114. [    0.000000] Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
  115. [    0.000000] Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
  116. [    0.000000] __ex_table already sorted, skipping sort
  117. [    0.000000] Writing ErrCtl register=0002fa63
  118. [    0.000000] Readback ErrCtl register=0002fa63
  119. [    0.000000] Memory: 13376k/16384k available (2088k kernel code, 3008k reserved, 361k data, 172k init, 0k highmem)
  120. [    0.000000] SLUB: Genslabs=9, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
  121. [    0.000000] NR_IRQS:128
  122. [    0.000000] CPU Clock: 384MHz
  123. [    0.000000] Calibrating delay loop... 255.59 BogoMIPS (lpj=1277952)
  124. [    0.070000] pid_max: default: 32768 minimum: 301
  125. [    0.080000] Mount-cache hash table entries: 512
  126. [    0.090000] NET: Registered protocol family 16
  127. [    0.120000] bio: create slab <bio-0> at 0
  128. [    0.130000] rt2880_gpio 10000600.gpio: registering 24 gpios
  129. [    0.140000] Switching to clocksource MIPS
  130. [    0.150000] NET: Registered protocol family 2
  131. [    0.160000] TCP established hash table entries: 512 (order: 0, 4096 bytes)
  132. [    0.170000] TCP bind hash table entries: 512 (order: -1, 2048 bytes)
  133. [    0.190000] TCP: Hash tables configured (established 512 bind 512)
  134. [    0.200000] TCP: reno registered
  135. [    0.210000] UDP hash table entries: 256 (order: 0, 4096 bytes)
  136. [    0.220000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
  137. [    0.230000] NET: Registered protocol family 1
  138. [    0.240000] rt-timer 10000100.timer: maximum frequncy is 7812Hz
  139. [    0.280000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
  140. [    0.290000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
  141. [    0.310000] msgmni has been set to 26
  142. [    0.320000] io scheduler noop registered
  143. [    0.330000] io scheduler deadline registered (default)
  144. [    0.340000] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
  145. [    0.350000] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 20) is a 16550A
  146. [    0.370000] console [ttyS0] enabled, bootconsole disabled
  147. [    0.370000] console [ttyS0] enabled, bootconsole disabled
  148. [    0.390000] 1f000000.cfi: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x0000c2 Chip ID 0x0022a8
  149. [    0.410000] Amd/Fujitsu Extended Query Table at 0x0040
  150. [    0.420000]   Amd/Fujitsu Extended Query version 1.1.
  151. [    0.430000] number of CFI chips: 1
  152. [    0.440000] 5 ofpart partitions found on MTD device 1f000000.cfi
  153. [    0.450000] Creating 5 MTD partitions on "1f000000.cfi":
  154. [    0.460000] 0x000000000000-0x000000030000 : "u-boot"
  155. [    0.480000] 0x000000030000-0x000000040000 : "u-boot-env"
  156. [    0.490000] 0x000000040000-0x000000050000 : "factory"
  157. [    0.500000] 0x0000003e0000-0x000000400000 : "cimage"
  158. [    0.520000] 0x000000050000-0x0000003e0000 : "firmware"
  159. [    0.530000] found squashfs behind kernel
  160. [    0.540000] Creating 2 MTD partitions on "1f000000.cfi":
  161. [    0.550000] 0x000000050000-0x000000127eef : "kernel"
  162. [    0.560000] mtd: partition "kernel" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
  163. [    0.590000] 0x000000127eef-0x0000003e0000 : "rootfs"
  164. [    0.600000] mtd: partition "rootfs" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
  165. [    0.620000] mtd: partition "rootfs" set to be root filesystem
  166. [    0.640000] mtd: partition "rootfs_data" created automatically, ofs=340000, len=A0000
  167. [    0.650000] 0x000000340000-0x0000003e0000 : "rootfs_data"
  168. [    0.670000] rt305x-esw 10110000.esw: link changed 0x02
  169. [    0.680000] eth0: done loading
  170. [    0.690000] TCP: cubic registered
  171. [    0.700000] NET: Registered protocol family 17
  172. [    0.710000] 8021q: 802.1Q VLAN Support v1.8
  173. [    0.720000] VFS: Mounted root (squashfs filesystem) readonly on device 31:6.
  174. [    0.740000] Freeing unused kernel memory: 172k freed
  175. [    3.100000] input: gpio-keys-polled.2 as /devices/gpio-keys-polled.2/input/input0
  176. [    3.250000] Button Hotplug driver version 0.4.1
  177. - preinit -
  178. Press the [f] key and hit [enter] to enter failsafe mode
  179. - regular preinit -
  180. [    6.660000] jffs2: notice: (405) jffs2_build_xattr_subsystem: complete building xattr subsystem, 1 of xdatum (0 unchecked, 0 orphan) and 8 of xref (0 dead, 2 orphan) found.
  181. switching to jffs2
  182. - init -
  183.  
  184. Please press Enter to activate this console. [    7.970000] compat-drivers backport release: compat-drivers-2013-03-28-5
  185. [    7.990000] Backport based on wireless-testing.git master-2013-04-16
  186. [    8.000000] compat.git: wireless-testing.git
  187. [    8.080000] cfg80211: Calling CRDA to update world regulatory domain
  188. [    8.090000] cfg80211: World regulatory domain updated:
  189. [    8.100000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
  190. [    8.120000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
  191. [    8.140000] cfg80211:   (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
  192. [    8.150000] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
  193. [    8.170000] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
  194. [    8.180000] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
  195. [    8.450000] NET: Registered protocol family 10
  196. [    9.140000] PPP generic driver version 2.4.2
  197. [    9.190000] tun: Universal TUN/TAP device driver, 1.6
  198. [    9.200000] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
  199. [    9.250000] sit: IPv6 over IPv4 tunneling driver
  200. [    9.430000] ip_tables: (C) 2000-2006 Netfilter Core Team
  201. [    9.610000] xt_time: kernel timezone is -0000
  202. [    9.770000] NET: Registered protocol family 24
  203. [    9.810000] nf_conntrack version 0.5.0 (211 buckets, 844 max)
  204. [   10.540000] ip6_tables: (C) 2000-2006 Netfilter Core Team
  205. [   11.120000] u32 classifier
  206. [   11.120000]     Performance counters on
  207. [   11.130000]     input device check on
  208. [   11.140000]     Actions configured
  209. [   11.280000] Mirror/redirect action on
  210. [   16.550000] device eth0.1 entered promiscuous mode
  211. [   16.560000] device eth0 entered promiscuous mode
  212. [   16.570000] br-lan: port 1(eth0.1) entered forwarding state
  213. [   16.580000] br-lan: port 1(eth0.1) entered forwarding state
  214. [   17.560000] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.1: link becomes ready
  215. [   18.580000] br-lan: port 1(eth0.1) entered forwarding state
  216. [   18.800000] ralink-wdt: timeout value 60 must be 0 < timeout <= 33, using 30
  217.  
  218.  
  219.  
  220. BusyBox v1.19.4 (2013-06-02 23:22:36 JST) built-in shell (ash)
  221. Enter 'help' for a list of built-in commands.
  222.  
  223.   _______                     ________        __
  224.  |       |.-----.-----.-----.|  |  |  |.----.|  |_
  225.  |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
  226.  |_______||   __|_____|__|__||________||__|  |____|
  227.           |__| W I R E L E S S   F R E E D O M
  228.  -----------------------------------------------------
  229.  BARRIER BREAKER (Bleeding Edge, r36817)
  230.  -----------------------------------------------------
  231.   * 1/2 oz Galliano         Pour all ingredients into
  232.   * 4 oz cold Coffee        an irish coffee mug filled
  233.   * 1 1/2 oz Dark Rum       with crushed ice. Stir.
  234.   * 2 tsp. Creme de Cacao
  235.  -----------------------------------------------------
  236. root@OpenWrt:/# df
  237. Filesystem           1K-blocks      Used Available Use% Mounted on
  238. rootfs                     640       212       428  33% /
  239. /dev/root                 2304      2304         0 100% /rom
  240. tmpfs                     6776        68      6708   1% /tmp
  241. tmpfs                      512         0       512   0% /dev
  242. /dev/mtdblock7             640       212       428  33% /overlay
  243. overlayfs:/overlay         640       212       428  33% /
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement