Closed mixmid closed 2 years ago
armbian login: [ 234.915496] kvm: exiting hardware virtualization [ 234.952516] pwrseq_simple sdio-pwrseq: Turning off mmc [ 234.955323] kexec_core: Starting new kernel [ 234.971860] Bye!
This part was solved by increasing crashkernel=512M in the kernel command line. See it:
[ 347.695632] SMP: stopping secondary CPUs
[ 347.699559] Starting crashdump kernel...
[ 347.703390] Bye!
[ 0.000000] Booting Linux on physical CPU 0x0000000100 [0x411fd050]
[ 0.000000] Linux version 5.15.59-mxdbg (root@ed84223eb023) (clang version 14.0.0, LLD 14.0.0) #8 SMP PREEMPT Sun Aug 7 15:40:07 MSK 2022
[ 0.000000] random: crng init done
[ 0.000000] Machine model: AMedia X96 Max+
[ 0.000000] efi: UEFI not found.
[ 0.000000] Reserved memory: created CMA memory pool at 0x00000000d0400000, size 256 MiB
[ 0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[ 0.000000] OF: fdt: elfcorehdr is overlapped
Look to kdumps:
root@armbian:/var/crash/202208301753# ls -l
total 45912
-rw------- 1 root root 40843 Aug 30 17:53 dmesg.202208301753
-rw-r--r-- 1 root root 46969389 Aug 30 17:53 dump.202208301753
[ 20.959437] meson8b-dwmac ff3f0000.ethernet eth0: no phy at addr -1 [ 20.967352] meson8b-dwmac ff3f0000.ethernet eth0: stmmac_open: Cannot attach to PHY (error: -19) [ 32.808649] meson8b-dwmac ff3f0000.ethernet eth0: no phy at addr -1 [ 32.819560] meson8b-dwmac ff3f0000.ethernet eth0: stmmac_open: Cannot attach to PHY (error: -19) [ 33.142282] meson8b-dwmac ff3f0000.ethernet eth0: no phy at addr -1 [ 33.163931] meson8b-dwmac ff3f0000.ethernet eth0: stmmac_open: Cannot attach to PHY (error: -19)
was fixed by the string
compatible = "ethernet-phy-id001c.c916", "ethernet-phy-ieee802.3-c22";
&ext_mdio {
external_phy: ethernet-phy@0 {
/*
* Realtek RTL8211F (0x001cc916)
* JLSemi JL2101 (0x937c4032)
*/
compatible = "ethernet-phy-id001c.c916", "ethernet-phy-ieee802.3-c22";
reg = <0>;
max-speed = <1000>;
reset-assert-us = <30000>;
reset-deassert-us = <80000>;
reset-gpios = <&gpio GPIOZ_15 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>;
interrupt-parent = <&gpio_intc>;
/* MAC_INTR on GPIOZ_14 */
interrupts = <26 IRQ_TYPE_LEVEL_LOW>;
};
};
Preface
A friend of mine brought this tv box "X96 Max+" complaining of kernel panics the device catches when runs in the pure Linux mode not Android. I successfully used kdump on my Raspberry Pi 4 to debug kernel panics. But i still cannot run kdump & kexec on this Amlogic device, but first things first.
Main part
The full name of the tv box is Droidlogic X96Max_Plus2_T and the ethernet chip is Realtek RTL8211F as it's seen on Android by Device Info HW app. Device is Amlogic s905x3, kernel 5.15.60 (compiled with debug info)
I used meson-sm1-x96-max-plus-100m.dtb after installation and the triple of:
meson-sm1-hk1box-vontar-x3.dtb meson-sm1-x96-max-plus-100m.dtb *meson-sm1-x96-max-plus.dtb
and
dd if=/tmp/hk1box-bootloader.img of=/dev/mmcblk0 bs=1 count=442 dd if=/tmp/hk1box-bootloader.img of=/dev/mmcblk0 bs=512 skip=1 seek=1
and after all meson-sm1-x96-max-plus.dtb from flippy's post at ->
https://forum.armbian.com/topic/15376-methods-to-fix-x96-max-pluss905x3-gigabit-ethernet-problem.
Now that the device enters kexec reboot only with the flag 'kexec -s'
kexec -l /var/lib/kdump/vmlinuz --initrd=/var/lib/kdump/initrd.img --dtb=/boot/dtb/amlogic/meson-sm1-x96-max-plus.dtb --reuse-cmdline -s
Ethernet part
The First issue is that after kexec reboot ethernet doesn't work, but wi-fi works good. The normal boot of ethernet:
After a kexec reboot:
The second issue is that the second kernel for kdump doesn't start, it just stops after these lines:
armbian login: [ 234.915496] kvm: exiting hardware virtualization [ 234.952516] pwrseq_simple sdio-pwrseq: Turning off mmc [ 234.955323] kexec_core: Starting new kernel [ 234.971860] Bye!
I think this post belongs to the topic of kernel debugging. Thanks in advance.