how to check which one dts is currently used?
You see the property model here:
root@OpenWrt:~# grep machine /proc/cpuinfo
machine : Xiaomi Mi Router 3G
And the property compatible here:
root@OpenWrt:~# cat /sys/firmware/devicetree/base/compatible ; echo
xiaomi,mir3gmediatek,mt7621-soc
With this info you can easily determine the used device tree by using grep or your favorite tool.
root@OpenWrt:~# grep machine /proc/cpuinfo
machine : Unknown
root@OpenWrt:~# cat /proc/cpuinfo
system type : MT7628
machine : Unknown
processor : 0
cpu model : MIPS 24KEc V5.5
BogoMIPS : 382.46
wait instruction : yes
microsecond timers : yes
tlb_entries : 32
extra interrupt vector : yes
hardware watchpoint : yes, count: 4, address/irw mask: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb]
isa : mips1 mips2 mips32r1 mips32r2
ASEs implemented : mips16 dsp
shadow register sets : 1
kscratch registers : 0
core : 0
VCED exceptions : not available
VCEI exceptions : not available
root@OpenWrt:~# cat /sys/firmware/devicetree/base/compatible
cat: can't open '/sys/firmware/devicetree/base/compatible': No such file or directory
root@OpenWrt:~#
root@OpenWrt:~# cat /sys/firmware/devicetree/base/compatible
cat: can't open '/sys/firmware/devicetree/base/compatible': No such file or directory
root@OpenWrt:~# cd /sys/firmware/
root@OpenWrt:/sys/firmware# ls
root@OpenWrt:/sys/firmware#
i compiled it with mtk-op, but i dont know which dts it used
This is no official OpenWrt!
Can you show us the output of the first 50 lines of dmesg
, for example:
root@OpenWrt:~# dmesg | head -n 50
[ 0.000000] Linux version 5.4.80 (builder@buildhost) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r15104-451c1eb8c2)) #0 SMP Sun Nov 29 01:12:36 2020
[ 0.000000] SoC Type: MediaTek MT7621 ver:1 eco:3
[ 0.000000] printk: bootconsole [early0] enabled
[ 0.000000] CPU0 revision is: 0001992f (MIPS 1004Kc)
[ 0.000000] MIPS: machine is Xiaomi Mi Router 3G
[ 0.000000] Initrd not found or empty - disabling initrd
[ 0.000000] VPE topology {2,2} total 4
[ 0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[ 0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[ 0.000000] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[ 0.000000] Zone ranges:
[ 0.000000] Normal [mem 0x0000000000000000-0x000000000fffffff]
[ 0.000000] HighMem empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000000000-0x000000000fffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000000fffffff]
[ 0.000000] On node 0 totalpages: 65536
[ 0.000000] Normal zone: 576 pages used for memmap
[ 0.000000] Normal zone: 0 pages reserved
[ 0.000000] Normal zone: 65536 pages, LIFO batch:15
[ 0.000000] percpu: Embedded 14 pages/cpu s26768 r8192 d22384 u57344
[ 0.000000] pcpu-alloc: s26768 r8192 d22384 u57344 alloc=14*4096
[ 0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 64960
[ 0.000000] Kernel command line: console=ttyS0,115200n8 rootfstype=squashfs,jffs2
[ 0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[ 0.000000] Writing ErrCtl register=00010c4e
[ 0.000000] Readback ErrCtl register=00010c4e
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] Memory: 250404K/262144K available (5946K kernel code, 210K rwdata, 1276K rodata, 1260K init, 238K bss, 11740K reserved, 0K cma-reserved, 0K highmem)
[ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[ 0.000000] rcu: Hierarchical RCU implementation.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[ 0.000000] NR_IRQS: 256
[ 0.000000] random: get_random_bytes called from start_kernel+0x340/0x558 with crng_init=0
[ 0.000000] CPU Clock: 880MHz
[ 0.000000] clocksource: GIC: mask: 0xffffffffffffffff max_cycles: 0xcaf478abb4, max_idle_ns: 440795247997 ns
[ 0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 4343773742 ns
[ 0.000009] sched_clock: 32 bits at 440MHz, resolution 2ns, wraps every 4880645118ns
[ 0.007810] Calibrating delay loop... 583.68 BogoMIPS (lpj=1167360)
[ 0.042003] pid_max: default: 32768 minimum: 301
[ 0.046783] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.054009] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.064502] rcu: Hierarchical SRCU implementation.
[ 0.069960] smp: Bringing up secondary CPUs ...
[ 7.366328] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[ 7.366339] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[ 7.366352] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
root@OpenWrt:/# dmesg | head -n 50
[ 0.000000] Linux version 3.10.14 (james@it) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 unknown) ) #1 Wed Dec 2 19:15:23 CST 2020
[ 0.000000]
[ 0.000000] The CPU feqenuce set to 575 MHz
[ 0.000000] CPU0 revision is: 00019655 (MIPS 24KEc)
[ 0.000000] Software DMA cache coherency
[ 0.000000] Determined physical RAM map:
[ 0.000000] memory: 04000000 @ 00000000 (usable)
[ 0.000000] Initrd not found or empty - disabling initrd
[ 0.000000] Zone ranges:
[ 0.000000] Normal [mem 0x00000000-0x03ffffff]
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x00000000-0x03ffffff]
[ 0.000000] On node 0 totalpages: 16384
[ 0.000000] free_area_init_node: node 0, pgdat 80359240, node_mem_map 81000000
[ 0.000000] Normal zone: 128 pages used for memmap
[ 0.000000] Normal zone: 0 pages reserved
[ 0.000000] Normal zone: 16384 pages, LIFO batch:3
[ 0.000000] Primary instruction cache 64kB, 4-way, VIPT, linesize 32 bytes.
[ 0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[ 0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[ 0.000000] pcpu-alloc: [0] 0
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256
[ 0.000000] Kernel command line: console=ttyS1,57600n8 root=/dev/mtdblock5 rootfstype=squashfs,jffs2
[ 0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[ 0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Writing ErrCtl register=0007c952
[ 0.000000] Readback ErrCtl register=0007c952
[ 0.000000] Memory: 61084k/65536k available (2738k kernel code, 4424k reserved, 691k data, 216k init, 0k highmem)
[ 0.000000] NR_IRQS:128
[ 0.000000] console [ttyS1] enabled
[ 0.096000] Calibrating delay loop... 382.46 BogoMIPS (lpj=764928)
[ 0.128000] pid_max: default: 32768 minimum: 301
[ 0.132000] Mount-cache hash table entries: 512
[ 0.136000] NET: Registered protocol family 16
[ 0.140000] RALINK_GPIOMODE = 54050404
[ 0.144000] RALINK_GPIOMODE = 54040404
[ 0.244000] ***** Xtal 40MHz *****
[ 0.248000] start PCIe register access
[ 0.748000] RALINK_RSTCTRL = 2400000
[ 0.752000] RALINK_CLKCFG1 = fdbfffc0
[ 0.756000]
[ 0.756000] *************** MT7628 PCIe RC mode *************
[ 1.256000] PCIE0 no card, disable it(RST&CLK)
[ 1.284000] bio: create slab <bio-0> at 0
[ 1.288000] usbcore: registered new interface driver usbfs
[ 1.292000] usbcore: registered new interface driver hub
[ 1.296000] usbcore: registered new device driver usb
[ 1.300000] Switching to clocksource MIPS