<div dir="ltr"><div><a href="https://forum.openwrt.org/t/support-for-mikrotik-rb3011uias-rm/4064/412">https://forum.openwrt.org/t/support-for-mikrotik-rb3011uias-rm/4064/412</a> </div><div> <br></div><div>I've been working on the hAP AC2 port, and haven't tested with SMP yet.</div><div><br></div><div>I posted the DTS files I came up with on the RB3011 thread as we were all working on Mikrotik IPQ40XX boards.</div><div><br></div><div>I'm stuck on decompressing the WiFi radio calibration data , I can't seem to figure out how to get the LZO / RLE portion to work. <br></div><div>I know exactly where the LZO / RLE data is as well.</div><div><br></div><div>If you want, I'll try to enable SMP and see if my board boots.</div><div>If you have any insight on WiFi, please let me know.</div><div><br></div><div>I'd like to help where I can.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jul 29, 2019 at 4:10 PM Baptiste Jonglez <<a href="mailto:baptiste@bitsofnetworks.org">baptiste@bitsofnetworks.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 29-07-19, Hauke Mehrtens wrote:<br>
> On 7/29/19 11:25 AM, Baptiste Jonglez wrote:<br>
> > Is there something obviously wrong in the DTS? As far as I know, other<br>
> > ipq40xx devices don't have an issue with SMP.<br>
> <br>
> Did you try to revert this commit:<br>
> <a href="https://github.com/mmaker/openwrt/commit/481615d2f5e4bb053af805dccb901050e1e7a4ed" rel="noreferrer" target="_blank">https://github.com/mmaker/openwrt/commit/481615d2f5e4bb053af805dccb901050e1e7a4ed</a><br>
> <br>
> The vendor dts file uses these 3 blocks, I do not know if they are<br>
> loaded to these regions by some boot loader or later by some driver. If<br>
> they are loaded there by the boot loader we should probably not use this<br>
> memory in Linux and let it run there.<br>
<br>
Yes, this commit is just a recent attempt to fix a warning during boot.<br>
The upstream DTS (qcom-ipq4019.dtsi) already reserves a memory region,<br>
exactly for the reasons you mention: <a href="https://patchwork.kernel.org/patch/10347459/" rel="noreferrer" target="_blank">https://patchwork.kernel.org/patch/10347459/</a><br>
<br>
This reserved region in the dtsi is overlapping with the one in the DTS,<br>
and there was a warning during boot ("OVERLAP DETECTED" below). The<br>
commit did fix the warning, but did not change anything about the initial<br>
problem with SMP.<br>
<br>
> I attached the vendor.dts file we extracted from the flash of the board.<br>
<br>
Thanks, could you spot anything interesting in it? It looks very verbose.<br>
<br>
Baptiste<br>
<br>
> > PS: here is the failing bootlog, getting stuck after "Testing write buffer coherency":<br>
> > <br>
> > [ 0.000000] Booting Linux on physical CPU 0x0<br>
> > [ 0.000000] Linux version 4.19.57 (bjonglez@gcc14) (gcc version 7.4.0 (OpenWrt GCC 7.4.0 r10506-a0c97101d6)) #0 SMP Mon Jul 29 08:51:07 2019<br>
> > [ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d<br>
> > [ 0.000000] CPU: div instructions available: patching division code<br>
> > [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache<br>
> > [ 0.000000] OF: fdt: Machine model: Mikrotik RouterBOARD RBD52G-5HacD2HnD (hAP ac²)<br>
> > [ 0.000000] bootconsole [earlycon0] enabled<br>
> > [ 0.000000] Memory policy: Data cache writealloc<br>
> > [ 0.000000] OF: reserved mem: OVERLAP DETECTED!<br>
> > [ 0.000000] rsvd2@87B00000 (0x87b00000--0x88000000) overlaps with smem@87e00000 (0x87e00000--0x87e80000)<br>
> > [ 0.000000] random: get_random_bytes called from start_kernel+0x7c/0x438 with crng_init=0<br>
> > [ 0.000000] percpu: Embedded 15 pages/cpu s29964 r8192 d23284 u61440<br>
> > [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 60864<br>
> > [ 0.000000] Kernel command line: earlyprintk<br>
> > [ 0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)<br>
> > [ 0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)<br>
> > [ 0.000000] Memory: 232420K/245760K available (4720K kernel code, 168K rwdata, 1288K rodata, 3072K init, 231K bss, 13340K reserved, 0K cma-reserved, 0K highmem)<br>
> > [ 0.000000] Virtual kernel memory layout:<br>
> > [ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)<br>
> > [ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB)<br>
> > [ 0.000000] vmalloc : 0xd0800000 - 0xff800000 ( 752 MB)<br>
> > [ 0.000000] lowmem : 0xc0000000 - 0xd0000000 ( 256 MB)<br>
> > [ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)<br>
> > [ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)<br>
> > [ 0.000000] .text : 0x(ptrval) - 0x(ptrval) (5713 kB)<br>
> > [ 0.000000] .init : 0x(ptrval) - 0x(ptrval) (3072 kB)<br>
> > [ 0.000000] .data : 0x(ptrval) - 0x(ptrval) ( 168 kB)<br>
> > [ 0.000000] .bss : 0x(ptrval) - 0x(ptrval) ( 232 kB)<br>
> > [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1<br>
> > [ 0.000000] rcu: Hierarchical RCU implementation.<br>
> > [ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16<br>
> > [ 0.000000] arch_timer: cp15 timer(s) running at 48.00MHz (virt).<br>
> > [ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0xb11fd3bfb, max_idle_ns: 440795203732 ns<br>
> > [ 0.000007] sched_clock: 56 bits at 48MHz, resolution 20ns, wraps every 4398046511096ns<br>
> > [ 0.007985] Switching to timer-based delay loop, resolution 20ns<br>
> > [ 0.014242] Calibrating delay loop (skipped), value calculated using timer frequency.. 96.00 BogoMIPS (lpj=480000)<br>
> > [ 0.024315] pid_max: default: 32768 minimum: 301<br>
> > [ 0.029081] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)<br>
> > [ 0.035524] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)<br>
> > [ 0.043539] CPU: Testing write buffer coherency: ok<br>
> > <br>
> > <br>
> > Here is a working bootlog, same image but with "nosmp":<br>
> > <br>
> > [ 0.000000] Booting Linux on physical CPU 0x0<br>
> > [ 0.000000] Linux version 4.19.57 (bjonglez@gcc14) (gcc version 7.4.0 (OpenWrt GCC 7.4.0 r10506-a0c97101d6)) #0 SMP Mon Jul 29 08:13:02 2019<br>
> > [ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d<br>
> > [ 0.000000] CPU: div instructions available: patching division code<br>
> > [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache<br>
> > [ 0.000000] OF: fdt: Machine model: Mikrotik RouterBOARD RBD52G-5HacD2HnD (hAP ac²)<br>
> > [ 0.000000] bootconsole [earlycon0] enabled<br>
> > [ 0.000000] Memory policy: Data cache writealloc<br>
> > [ 0.000000] OF: reserved mem: OVERLAP DETECTED!<br>
> > [ 0.000000] rsvd2@87B00000 (0x87b00000--0x88000000) overlaps with smem@87e00000 (0x87e00000--0x87e80000)<br>
> > [ 0.000000] random: get_random_bytes called from start_kernel+0x7c/0x438 with crng_init=0<br>
> > [ 0.000000] percpu: Embedded 15 pages/cpu s29964 r8192 d23284 u61440<br>
> > [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 60864<br>
> > [ 0.000000] Kernel command line: earlyprintk nosmp<br>
> > [ 0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)<br>
> > [ 0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)<br>
> > [ 0.000000] Memory: 232420K/245760K available (4720K kernel code, 168K rwdata, 1288K rodata, 3072K init, 231K bss, 13340K reserved, 0K cma-reserved, 0K highmem)<br>
> > [ 0.000000] Virtual kernel memory layout:<br>
> > [ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)<br>
> > [ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB)<br>
> > [ 0.000000] vmalloc : 0xd0800000 - 0xff800000 ( 752 MB)<br>
> > [ 0.000000] lowmem : 0xc0000000 - 0xd0000000 ( 256 MB)<br>
> > [ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)<br>
> > [ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)<br>
> > [ 0.000000] .text : 0x(ptrval) - 0x(ptrval) (5713 kB)<br>
> > [ 0.000000] .init : 0x(ptrval) - 0x(ptrval) (3072 kB)<br>
> > [ 0.000000] .data : 0x(ptrval) - 0x(ptrval) ( 168 kB)<br>
> > [ 0.000000] .bss : 0x(ptrval) - 0x(ptrval) ( 232 kB)<br>
> > [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1<br>
> > [ 0.000000] rcu: Hierarchical RCU implementation.<br>
> > [ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16<br>
> > [ 0.000000] arch_timer: cp15 timer(s) running at 48.00MHz (virt).<br>
> > [ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0xb11fd3bfb, max_idle_ns: 440795203732 ns<br>
> > [ 0.000008] sched_clock: 56 bits at 48MHz, resolution 20ns, wraps every 4398046511096ns<br>
> > [ 0.007985] Switching to timer-based delay loop, resolution 20ns<br>
> > [ 0.014242] Calibrating delay loop (skipped), value calculated using timer frequency.. 96.00 BogoMIPS (lpj=480000)<br>
> > [ 0.024315] pid_max: default: 32768 minimum: 301<br>
> > [ 0.029087] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)<br>
> > [ 0.035521] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)<br>
> > [ 0.043529] CPU: Testing write buffer coherency: ok<br>
> > [ 0.048493] Setting up static identity map for 0x80300000 - 0x80300060<br>
> > [ 0.054162] rcu: Hierarchical SRCU implementation.<br>
> > [ 0.059609] smp: Bringing up secondary CPUs ...<br>
> > [ 0.063282] smp: Brought up 1 node, 1 CPU<br>
> > [ 0.067274] SMP: Total of 1 processors activated (96.00 BogoMIPS).<br>
> > [ 0.073476] CPU: All CPU(s) started in SVC mode.<br>
> > [ 0.082314] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5<br>
> > [ 0.089157] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns<br>
> > [ 0.098782] futex hash table entries: 1024 (order: 4, 65536 bytes)<br>
> > [ 0.105261] pinctrl core: initialized pinctrl subsystem<br>
> > [ 0.111253] NET: Registered protocol family 16<br>
> > [ 0.115162] DMA: preallocated 256 KiB pool for atomic coherent allocations<br>
> > [ 0.122468] cpuidle: using governor ladder<br>
> > [ 0.125641] cpuidle: using governor menu<br>
> > [ 0.147920] usbcore: registered new interface driver usbfs<br>
> > [ 0.152432] usbcore: registered new interface driver hub<br>
> > [ 0.157828] usbcore: registered new device driver usb<br>
> > [ 0.162751] pps_core: LinuxPPS API ver. 1 registered<br>
> > [ 0.167657] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <<a href="mailto:giometti@linux.it" target="_blank">giometti@linux.it</a>><br>
> > [ 0.176824] PTP clock support registered<br>
> > [ 0.182206] clocksource: Switched to clocksource arch_sys_counter<br>
> > [ 0.188356] NET: Registered protocol family 2<br>
> > [ 0.192405] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes)<br>
> > [ 0.199346] TCP established hash table entries: 2048 (order: 1, 8192 bytes)<br>
> > [ 0.206336] TCP bind hash table entries: 2048 (order: 2, 16384 bytes)<br>
> > [ 0.212745] TCP: Hash tables configured (established 2048 bind 2048)<br>
> > [ 0.219173] UDP hash table entries: 256 (order: 1, 8192 bytes)<br>
> > [ 0.224904] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)<br>
> > [ 0.231351] NET: Registered protocol family 1<br>
> > [ 2.746607] No memory allocated for crashlog<br>
> > [ 2.750141] workingset: timestamp_bits=14 max_order=16 bucket_order=2<br>
> > [ 2.761295] squashfs: version 4.0 (2009/01/31) Phillip Lougher<br>
> > [ 2.766200] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.<br>
> > [ 2.782649] io scheduler noop registered<br>
> > [ 2.785548] io scheduler deadline registered (default)<br>
> > [ 2.793099] bam-dma-engine 8e04000.dma: num-channels unspecified in dt<br>
> > [ 2.798599] bam-dma-engine 8e04000.dma: num-ees unspecified in dt<br>
> > [ 2.806057] tcsr 1949000.tcsr: setting wifi_glb_cfg = 41000000<br>
> > [ 2.810931] tcsr 194b000.tcsr: setting usb hs phy mode select = e700e7<br>
> > [ 2.817492] tcsr 1953000.ess_tcsr: setting ess interface select = 0<br>
> > [ 2.823714] tcsr 1957000.tcsr: setting wifi_noc_memtype_m0_m2 = 2222222<br>
> > [ 2.830473] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled<br>
> > [ 2.837172] msm_serial 78af000.serial: msm_serial: detected port #0<br>
> > [ 2.842873] msm_serial 78af000.serial: uartclk = 1843200<br>
> > [ 2.848133] 78af000.serial: ttyMSM0 at MMIO 0x78af000 (irq = 25, base_baud = 115200) is a MSM<br>
> > [ 2.856646] msm_serial: console setup �[ 2.861276] console [ttyMSM0] enabled<br>
> > [ 2.861276] console [ttyMSM0] enabled<br>
> > [ 2.867570] bootconsole [earlycon0] disabled<br>
> > [ 2.867570] bootconsole [earlycon0] disabled<br>
> > [ 2.876309] msm_serial: driver initialized<br>
> > [ 2.881720] loop: module loaded<br>
> > [ 2.883175] spi_qup 78b5000.spi: IN:block:16, fifo:64, OUT:block:16, fifo:64<br>
> > [ 2.892706] random: fast init done<br>
> > [ 2.893893] m25p80 spi0.0: w25q128jv (16384 Kbytes)<br>
> > [ 2.895046] 6 fixed-partitions partitions found on MTD device spi0.0<br>
> > [ 2.899777] Creating 6 MTD partitions on "spi0.0":<br>
> > [ 2.906415] 0x000000000000-0x000000023000 : "Qualcomm-boot1"<br>
> > [ 2.911807] 0x000000023000-0x000000080000 : "Qualcomm-boot2"<br>
> > [ 2.917503] 0x000000080000-0x00000008e000 : "RouterBoot"<br>
> > [ 2.923117] 0x00000008e000-0x00000008f000 : "hard_config"<br>
> > [ 2.928336] 0x000000090000-0x0000000a0000 : "dts_config"<br>
> > [ 2.933724] 0x0000000bd000-0x0000000be000 : "soft_config"<br>
> > [ 2.939783] libphy: ipq40xx_mdio: probed<br>
> > [ 3.021986] ESS reset ok!<br>
> > [ 3.054970] ESS reset ok!<br>
> > [ 3.473002] libphy: Fixed MDIO Bus: probed<br>
> > [ 3.474006] EDMA using MAC@ - using<br>
> > [ 3.474026] be:cf:22:8f:ab:1b<br>
> > [ 3.480289] EDMA using MAC@ - using<br>
> > [ 3.480301] ba:b5:bb:8b:4c:13<br>
> > [ 3.582352] i2c /dev entries driver<br>
> > [ 3.589076] NET: Registered protocol family 10<br>
> > [ 3.590761] Segment Routing with IPv6<br>
> > [ 3.592617] NET: Registered protocol family 17<br>
> > [ 3.596483] 8021q: 802.1Q VLAN Support v1.8<br>
> > [ 3.600563] Registering SWP/SWPB emulation handler<br>
> > [ 3.611201] �[ 3.617293] Freeing unused kernel memory: 3072K<br>
> > [ 3.632992] Run /init as init process<br>
> > [ 3.658087] init: Console is alive<br>
> > [ 3.658335] init: - watchdog -<br>
> > [ 3.670018] kmodloader: loading kernel modules from /etc/modules-boot.d/*<br>
> > [ 3.682835] kmodloader: done loading kernel modules from /etc/modules-boot.d/*<br>
> > [ 3.693606] init: - preinit -<br>
> > [ 3.871306] random: jshn: uninitialized urandom read (4 bytes read)<br>
> > [ 3.904673] random: jshn: uninitialized urandom read (4 bytes read)<br>
> > [ 3.966511] random: jshn: uninitialized urandom read (4 bytes read)<br>
> > /bin/board_detect: line 10: Unsupported: not found<br>
> > Press the [f] key and hit [enter] to enter failsafe mode<br>
> > Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level<br>
> > [ 7.223677] procd: - early -<br>
> > [ 7.223795] procd: - watchdog -<br>
> > [ 7.769990] procd: - watchdog -<br>
> > [ 7.773940] procd: - ubus -<br>
> > [ 7.788514] urandom_read: 5 callbacks suppressed<br>
> > [ 7.788528] random: ubusd: uninitialized urandom read (4 bytes read)<br>
> > [ 7.824888] random: ubusd: uninitialized urandom read (4 bytes read)<br>
> > [ 7.828410] procd: - init -<br>
> > Please press Enter to activate this console.<br>
> > [ 8.109693] urngd: v1.0.0 started.<br>
> > [ 8.151387] kmodloader: loading kernel modules from /etc/modules.d/*<br>
> > [ 8.183371] input: beeper as /devices/platform/beeper/input/input0<br>
> > [ 8.194497] Loading modules backported from Linux version v4.19.32-0-g3a2156c839c7<br>
> > [ 8.194532] Backport generated by backports.git v4.19.32-1-0-g1c4f7569<br>
> > [ 8.224703] xt_time: kernel timezone is -0000<br>
> > [ 8.263888] random: crng init done<br>
> > [ 8.270731] usbcore: registered new interface driver mt7601u<br>
> > [ 8.296351] PPP generic driver version 2.4.2<br>
> > [ 8.298086] NET: Registered protocol family 24<br>
> > [ 8.312402] usbcore: registered new interface driver mt76x0u<br>
> > [ 8.316366] kmodloader: done loading kernel modules from /etc/modules.d/*<br>
> > <br>
> <br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
openwrt-devel mailing list<br>
<a href="mailto:openwrt-devel@lists.openwrt.org" target="_blank">openwrt-devel@lists.openwrt.org</a><br>
<a href="https://lists.openwrt.org/mailman/listinfo/openwrt-devel" rel="noreferrer" target="_blank">https://lists.openwrt.org/mailman/listinfo/openwrt-devel</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><br></div><div dir="ltr"><div dir="ltr"><span style="color:rgb(0,0,0);font-family:-webkit-standard"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12pt;font-family:Arial;background-color:transparent;font-weight:700;vertical-align:baseline;white-space:pre-wrap">Davey </span><span style="font-size:12pt;font-family:Arial;background-color:transparent;vertical-align:baseline;white-space:pre-wrap">Hutchison</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:3pt"><span style="font-size:9pt;font-family:Arial;background-color:transparent;vertical-align:baseline;white-space:pre-wrap">CTO</span></p><p dir="ltr" style="line-height:1.2;margin-top:0.75pt;margin-bottom:0.75pt"><span style="font-size:9pt;font-family:Arial;background-color:transparent;vertical-align:baseline;white-space:pre-wrap">p: 208.342.1789 ext. 03 ︳</span><a href="http://linora.com/" style="text-decoration:none" target="_blank"><span style="font-size:9pt;font-family:Arial;color:rgb(17,85,204);background-color:transparent;text-decoration:underline;vertical-align:baseline;white-space:pre-wrap">LinOra.com</span></a></p><p dir="ltr" style="line-height:1.8;margin-top:6pt;margin-bottom:0.75pt"><span style="font-size:11pt;font-family:Arial;background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><img src="https://lh6.googleusercontent.com/HXE7Qc8j24Nwnt4TMr8XpxFo4OCq0_qZHpAiEfZPNFITrLHNZQCZDovubwGNc0sXfFDDy8ojggMN0MjxUnj3OxQZaBB4XPr4OS7rOmUBvJQJaaMLoQ8N7Oq9X7DRj3hbVK-i0mYW" width="104" height="24" style="border: none;"></span></p></span></div></div></div></div></div></div></div></div></div></div>