Advertisement
Guest User

#mipslinux R6700v2 4.9.44 MT7621 +{glibc,bash}/-{bZbox,musl}

a guest
Aug 30th, 2017
1,474
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 12.18 KB | None | 0 0
  1. 1 https://pastebin.com/gyzLGKEs first successful mips32 compile
  2. 2 https://pastebin.com/nHzYRDps copied over missing libc files/tidied up (missed copying c++ over in this one)
  3. 3 https://pastebin.com/AzFHxnPD libqmi (glib 2.52 and util-linux 2.29 upgraded as well)
  4. 4 https://pastebin.com/Cyh8eivj minidlna update
  5. 5 https://pastebin.com/L9w8arvC gudev added
  6. 6 https://pastebin.com/h2xFLf2V php7 updates etc
  7. 7 https://pastebin.com/bHPpZrRx updated ar71xx for 4.9 (also did it for ar934x platform ["wasp"--mips74k])
  8. 8 https://pastebin.com/zsdTjjKQ status update on the firmware (not really exclusive to the AC55U, just packing it using mkimage vs lzma-loader etc).
  9. 9 https://pastebin.com/qNMiWkD9 failure of AC55U due to sensitive MTD flash partitioning (likely due to shoe-horning of AR7134 devicetree file for QCA9558)
  10. 10 https://pastebin.com/1BPUmMzx just an update to glibc 2.29 and using the latest 4.9 committed by brainslayer to ensure we're all on teh same page.
  11. 11 https://pastebin.com/9jrT1gkP raw bootlog from the r6700v2/r6800/r6900v2. included so people can observe how the u-boot and "stage  code seem to be "together"; that is, the u-boot seems to be customised to deal with the sercomm utilities (no mtdparts, but there is an sc_nand).
  12. 12 https://pastebin.com/TJHeu9VC discussing the sercomm boot tools and such.
  13. 13 https://pastebin.com/uadhgmvS just showing the boot log (without initramfs enabled).
  14. 14 https://pastebin.com/jNmY4y9D was just sharing the observation about initrd that wasn't really useful to the problem
  15. 15 https://pastebin.com/EUeDuLHZ briefly discussing the boot and problem with the dtb (device tree binary) not being "seen" by the kernel
  16. 16 https://pastebin.com/K7yuBYfv just a nothingness update (talking about clocksource driver being picked up when disabling the devicetree node calls in mt7621.c)
  17. 17 https://pastebin.com/LAewauYh discussing the devicetree hack created by The oh-so-clever Crispy One John Crispin (blogic), and how it must be used instead of the "appended_dtb" kernel configuration options. also pointed out the resulting file system driver issue
  18.  
  19. good day.
  20.  
  21. below i present a nearly-functional bootlog of an MT7621 (Netgear R6700v2/R6800/R6900v2) SoC with 256 MB ram and a 128MB Macronix NAND flash. the remaining issue seems to be, and i suspected this wouldn't be trivial as i started out, how to initialise the kernel.
  22.  
  23. i have a statically-linked bash executable in the /bin/ directory, as well as an 'init' (presumably created by dd-wrt) in the /sbin directory. i will have to see what options are available to me in order to debug the panic, as the files are there, but i am being asked to pass an argument to init=.
  24.  
  25. will do more digging. i believe everything else looks good though. keen observers may note the lack of initialisation of the pci/usb busses, but i am not worried about that at this time. my focus at this time is fixing the init issue, and if i can get past that, i *hope* (key word) that whatever has not been "seen" will get picked up.
  26.  
  27. ugh, seems this init problem may be annoying as hell. have little room for an initrd and i can't see it being helpful here, in light of mtd being able to create partitions that i can read/write to.
  28.  
  29. #mipslinux#mipslinux#mipslinux#mipslinux#mipslinux#mipslinux#mipslinux#mipslinux#mipslinux#mipslinux#mipslinux
  30.  
  31. Starting kernel ...
  32.  
  33. Linux version 4.9.44 (Gagan@GagansMacPro) (gcc version 7.2.0 (GCC) ) #277 SMP Wed Aug 30 11:26:20 MDT 2017
  34. SoC Type: MediaTek MT7621 ver:1 eco:3
  35. bootconsole [early0] enabled
  36. CPU0 revision is: 0001992f (MIPS 1004Kc)
  37. MIPS: machine is Mediatek MT7621
  38. Determined physical RAM map:
  39.  memory: 10000000 @ 00000000 (usable)
  40. VPE topology {2,2} total 4
  41. Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
  42. Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
  43. MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
  44. Zone ranges:
  45.   Normal   [mem 0x0000000000000000-0x000000000fffffff]
  46.   HighMem  empty
  47. Movable zone start for each node
  48. Early memory node ranges
  49.   node   0: [mem 0x0000000000000000-0x000000000fffffff]
  50. Initmem setup node 0 [mem 0x0000000000000000-0x000000000fffffff]
  51. percpu: Embedded 13 pages/cpu @817f6000 s23376 r8192 d21680 u53248
  52. Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 65024
  53. Kernel command line: console=ttyS0,57600 root=/dev/mtdblock3 rw rootfstype=squashfs rootdelay=5 init=/bin/bash
  54. log_buf_len individual max cpu contribution: 4096 bytes
  55. log_buf_len total cpu_extra contributions: 12288 bytes
  56. log_buf_len min size: 16384 bytes
  57. log_buf_len: 32768 bytes
  58. early log buf free: 14336(87%)
  59. PID hash table entries: 1024 (order: 0, 4096 bytes)
  60. Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
  61. Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
  62. Writing ErrCtl register=00000071
  63. Readback ErrCtl register=00000071
  64. Memory: 237152K/262144K available (4687K kernel code, 257K rwdata, 652K rodata, 280K init, 140K bss, 24992K reserved, 0K cma-reserved, 0K highmem)
  65. Hierarchical RCU implementation.
  66.         Build-time adjustment of leaf fanout to 32.
  67. NR_IRQS:256
  68. clocksource: GIC: mask: 0xffffffffffffffff max_cycles: 0xcaf478abb4, max_idle_ns: 440795247997 ns
  69. clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 4343773742 ns
  70. sched_clock: 32 bits at 440MHz, resolution 2ns, wraps every 4880645118ns
  71. Calibrating delay loop... 586.13 BogoMIPS (lpj=2930688)
  72. pid_max: default: 4096 minimum: 301
  73. Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
  74. Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
  75. Performance counters: mips/1004K PMU enabled, 2 32-bit counters available to each CPU, irq 17
  76. Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
  77. Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
  78. MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
  79. CPU1 revision is: 0001992f (MIPS 1004Kc)
  80. Synchronize counters for CPU 1:
  81. done.
  82. Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
  83. Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
  84. MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
  85. CPU2 revision is: 0001992f (MIPS 1004Kc)
  86. Synchronize counters for CPU 2:
  87. done.
  88. Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
  89. Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
  90. MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
  91. CPU3 revision is: 0001992f (MIPS 1004Kc)
  92. Synchronize counters for CPU 3:
  93. done.
  94. Brought up 4 CPUs
  95. devtmpfs: initialized
  96. clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
  97. pinctrl core: initialized pinctrl subsystem
  98. NET: Registered protocol family 16
  99. Can't analyze schedule() prologue at 81011348
  100. mt7621_gpio 1e000600.gpio: registering 32 gpios
  101. mt7621_gpio 1e000600.gpio: registering 32 gpios
  102. mt7621_gpio 1e000600.gpio: registering 32 gpios
  103. vgaarb: loaded
  104. SCSI subsystem initialized
  105. clocksource: Switched to clocksource GIC
  106. NET: Registered protocol family 2
  107. TCP established hash table entries: 2048 (order: 1, 8192 bytes)
  108. TCP bind hash table entries: 2048 (order: 2, 16384 bytes)
  109. TCP: Hash tables configured (established 2048 bind 2048)
  110. UDP hash table entries: 128 (order: 0, 4096 bytes)
  111. UDP-Lite hash table entries: 128 (order: 0, 4096 bytes)
  112. NET: Registered protocol family 1
  113. 4 CPUs re-calibrate udelay(lpj = 2924544)
  114. workingset: timestamp_bits=30 max_order=16 bucket_order=0
  115. squashfs: version 4.0 (2009/01/31) Phillip Lougher
  116. jffs2: version 2.2. (NAND) (SUMMARY)  (ZLIB) (LZMA) (RTIME) (CMODE_PRIORITY) © 2001-2006 Red Hat, Inc.
  117. fuse init (API version 7.26)
  118. io scheduler noop registered
  119. io scheduler deadline registered (default)
  120. random: fast init done
  121. serial8250_init
  122. Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
  123. console [ttyS0] disabled
  124. 1e000c00.uartlite: ttyS0 at MMIO 0x1e000c00 (irq = 19, base_baud = 3125000) is a 16550A
  125. console [ttyS0] enabled
  126. console [ttyS0] enabled
  127. bootconsole [early0] disabled
  128. bootconsole [early0] disabled
  129. Ralink gpio driver initialized
  130. MediaTek Nand driver init, version v2.1 Fix AHB virt2phys error
  131. Allocate 16 byte aligned buffer: 815d96d0
  132. Enable NFI Clock
  133. # MTK NAND # : Use HW ECC
  134. Device found in MTK table, ID: c2f1, EXT_ID: 809502
  135. Support this Device in MTK table! c2f1
  136. [NAND]select ecc bit:4, sparesize :64 spare_per_sector=16
  137. nand: device found, Manufacturer ID: 0xc2, Chip ID: 0xf1
  138. nand: Macronix NAND 128MiB 3,3V 8-bit
  139. nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
  140. Scanning device for bad blocks
  141. Bad eraseblock 640 at 0x000005000000
  142. Bad eraseblock 641 at 0x000005020000
  143. Bad eraseblock 642 at 0x000005040000
  144. Bad eraseblock 643 at 0x000005060000
  145. Bad eraseblock 644 at 0x000005080000
  146. Bad eraseblock 645 at 0x0000050a0000
  147. Bad eraseblock 646 at 0x0000050c0000
  148. Bad eraseblock 647 at 0x0000050e0000
  149. Bad eraseblock 648 at 0x000005100000
  150. Bad eraseblock 649 at 0x000005120000
  151. Bad eraseblock 650 at 0x000005140000
  152. Bad eraseblock 651 at 0x000005160000
  153. Bad eraseblock 652 at 0x000005180000
  154. Bad eraseblock 653 at 0x0000051a0000
  155. Bad eraseblock 654 at 0x0000051c0000
  156. Bad eraseblock 655 at 0x0000051e0000
  157. Bad eraseblock 656 at 0x000005200000
  158. Bad eraseblock 657 at 0x000005220000
  159. Bad eraseblock 658 at 0x000005240000
  160. Bad eraseblock 659 at 0x000005260000
  161. Bad eraseblock 660 at 0x000005280000
  162. Bad eraseblock 661 at 0x0000052a0000
  163. Bad eraseblock 662 at 0x0000052c0000
  164. Bad eraseblock 663 at 0x0000052e0000
  165. 29 ofpart partitions found on MTD device MT7621-NAND
  166. Creating 29 MTD partitions on "MT7621-NAND":
  167. 0x000000000000-0x000000100000 : "boot"
  168. 0x000000100000-0x000000200000 : "part_map"
  169. 0x000000200000-0x000000600000 : "kernel"
  170. 0x000000600000-0x000002e00000 : "rootfs"
  171. mtd: partition "rootfs" set to be root filesystem
  172. magic 73717368 vs 73717368
  173. mtd: partition "ddwrt" created automatically, ofs=22C0000, len=B40000
  174. 0x0000022c0000-0x000002e00000 : "ddwrt"
  175. 0x000002e00000-0x000003000000 : "english_ui"
  176. 0x000003000000-0x000003200000 : "ml1"
  177. 0x000003200000-0x000003400000 : "ml2"
  178. 0x000003400000-0x000003600000 : "ml3"
  179. 0x000003600000-0x000003800000 : "ml4"
  180. 0x000003800000-0x000003a00000 : "ml5"
  181. 0x000003a00000-0x000003c00000 : "ml6"
  182. 0x000003c00000-0x000003e00000 : "ml7"
  183. 0x000003e00000-0x000004000000 : "ml8"
  184. 0x000004000000-0x000004200000 : "ml9"
  185. 0x000004200000-0x000004400000 : "ml10"
  186. 0x000004400000-0x000004600000 : "ml11"
  187. 0x000004600000-0x000004800000 : "factory"
  188. 0x000004800000-0x000004a00000 : "sc_private"
  189. 0x000004a00000-0x000004c00000 : "pop"
  190. 0x000004c00000-0x000004e00000 : "traffic meter"
  191. 0x000004e00000-0x000005000000 : "sc_pid"
  192. 0x000005000000-0x000005200000 : "sc_nvram"
  193. 0x000005200000-0x000005400000 : "ralink_nvram"
  194. 0x000005400000-0x000005600000 : "reserved1"
  195. 0x000005600000-0x000005800000 : "reserved2"
  196. 0x000005800000-0x000005a00000 : "reserved3"
  197. 0x000005a00000-0x000005c00000 : "reserved4"
  198. 0x000005c00000-0x000005e00000 : "reserved5"
  199. 0x000005e00000-0x000007f80000 : "reserved6"
  200. [mtk_nand] probe successfully!
  201. Signature matched and data read!
  202. load_fact_bbt success 1023
  203. libphy: Fixed MDIO Bus: probed
  204. tun: Universal TUN/TAP device driver, 1.6
  205. tun: (C) 1999-2004 Max Krasnyansky <[email protected]>
  206. netif_napi_add() called with weight 128 on device eth%d
  207. mtk_soc_eth 1e100000.ethernet: generated random MAC address d6:d7:f3:ac:70:a7
  208. libphy: mdio: probed
  209. mtk_soc_eth 1e100000.ethernet: loaded mt7530 driver
  210. mtk_soc_eth 1e100000.ethernet eth0: mediatek frame engine at 0xbe100000, irq 22
  211. u32 classifier
  212.    Performance counters on
  213.    Actions configured
  214. Netfilter messages via NETLINK v0.30.
  215. nf_conntrack version 0.5.0 (4096 buckets, 16384 max)
  216. ctnetlink v0.93: registering with nfnetlink.
  217. ipip: IPv4 and MPLS over IPv4 tunneling driver
  218. ip_tables: (C) 2000-2006 Netfilter Core Team
  219. ipt_CLUSTERIP: ClusterIP Version 0.8 loaded successfully
  220. NET: Registered protocol family 17
  221. Bridge firewalling registered
  222. 8021q: 802.1Q VLAN Support v1.8
  223. Waiting 5 sec before mounting root device...
  224. mtk_soc_eth 1e100000.ethernet eth0: port 3 link up
  225. VFS: Mounted root (squashfs filesystem) readonly on device 31:3.
  226. devtmpfs: mounted
  227. Freeing unused kernel memory: 280K
  228. This architecture does not have kernel memory protection.
  229. Kernel panic - not syncing: No init found.  Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
  230. Rebooting in 1 seconds..
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement