[BPI-R64] loading OpenWRT built files into the board

I stuck on a loading compiled OpenWRT files into the board. Reading threads this forum just don’t realize how to do it.

How to load kernel and squashfs rootfs files into the board?

What I have already done:

  1. cloned OpenWRT project (openmptcprouter),
  2. set parametres via “make menuconfig” Target System (MediaTek Ralink ARM) Subtarget (MT7622) Target Profile (Banana Pi R64)
  3. built project by (make)

So I have got files:

ls bin/targets/mediatek/mt7622/

config.buildinfo
feeds.buildinfo
openmptcprouter-v0.52.3-5-g6f9cd2d-r0+11006-713561a-mediatek-mt7622-BPI-R64-initramfs-kernel.bin
openmptcprouter-v0.52.3-5-g6f9cd2d-r0+11006-713561a-mediatek-mt7622-bpi-r64.manifest
openmptcprouter-v0.52.3-5-g6f9cd2d-r0+11006-713561a-mediatek-mt7622-BPI-R64-squashfs-sysupgrade.bin
packages
sha256sums
version.buildinfo

ls build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_mt7622/

BPI-R64-kernel.bin.its
image-mt7622-bananapi-bpi-r64.dtb
vmlinux-initramfs.elf
vmlinux.elf
vmlinux-initramfs.debug
Image
Image-initramfs
vmlinux-initramfs
BPI-R64-kernel.bin
image-mt7622-rfb1.dtb
vmlinux.debug
vmlinux
root.squashfs
image-mt7622-lynx-rfb1.dtb

Using instructions from this thread:

I have managed to load the kernel (file BPI-R64-kernel.bin from my previous post) into the emmc. Just loaded it by “SD card image” from the thread above. But now I get this error for a while loading my kernel:

[   17.223731] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[   17.231463] Please append a correct "root=" boot option; here are the available partitions:
[   17.240101] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[   17.248622] SMP: stopping secondary CPUs
[   17.252661] Kernel Offset: disabled
[   17.256252] CPU features: 0x0,20002000
[   17.260111] Memory Limit: none
[   17.263255] Rebooting in 1 seconds..

So I guess the kernel need root file system that I have got it in file root.squashfs.

How can I do it? How the all build files OpenWRT’s project can be load into the emmc?

looks you have forgotten root= option in your kernels cmdline…as second line suggests…but i don’t know how to specify squashfs (and maybe underlying ro-rootfs)

Yes, @frank-w, you quite right! A “root” option has to be set. But I don’t understand what this “option” have to has and how to put into the board the thing the “option” will point. User @rainfall83 started the thread:

and leave there emmc image file link at Google Drive. As he said the file contains all components need to boot LEDE (OpenWRT) at bpi-r64 successfully: But I completely confused. I do not understand how to put together all compiled OpenWRT files into a single image that can be flashed to the emmc at the board…

We making first steps with emmc on r64 so please wait a bit for this and try sdcard instead. The root option needs to be set in uboot (buildin/uenv.txt) or kernel (force cmdline).

This depends on how openwrt-image for r64 is build (how rootfs is defined). Maybe other users can explain this because my knowledge about openwrt is very limited

I also have problem to burn OpenWRT (OpenMPTCProuter) kernel image into R64 EMMC.

I follow these steps:

  1. Use SD card downloader to write SD card image into SD card.
  2. Insert the written-image SD card into bpi-r64 board, and power on it.
  3. In U-Boot Menu, choose ‘ (2). System Load Linux Kernel then write to Flash via TFTP.’ to download openmptcprouter-**-mt7622-BPI-R64-initramfs-kernel.bin and write it to eMMC.
  4. In U-Boot Menu, choose ‘ 7. System Load Preloader then write to Flash via TFTP ’ to download eMMC preloader and write it to eMMC.
  5. After eMMC preloader is written to eMMC, power off bpi-r64 board, remove SD card, and power on it.

After do that, it have problem to boot, following errors:

mmc0 is current device
mmc0 operation
dev_num = 0

MMC read: dev # 0, block # 4096, count 1 ... 1 blocks read: OK
[do_read_image_blks] This is a FIT image,img_size = 0x1b6a3ec
mmc0 operation
dev_num = 0

MMC read: dev # 0, block # 4096, count 56146 ... 56146 blocks read: OK
bootm flag=0, states=70f
## Loading kernel from FIT Image at 4007ff28 ...
   Using 'config@1' configuration
   Trying 'kernel@1' kernel subimage
     Description:  ARM64 OpenWrt Linux-4.19.72
     Type:         Kernel Image
     Compression:  lzma compressed
     Data Start:   0x40080010
     Data Size:    28721781 Bytes = 27.4 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x41080000
     Entry Point:  0x41080000
     Hash algo:    crc32
     Hash value:   7c909f83
     Hash algo:    sha1
     Hash value:   2691ade7c88ca3c820c2cfae5a23ec58b131a9b1
   Verifying Hash Integrity ... crc32+ sha1+ OK
## Loading fdt from FIT Image at 4007ff28 ...
   Using 'config@1' configuration
   Trying 'fdt@1' fdt subimage
     Description:  ARM64 OpenWrt BPI-R64 device tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x41be43c0
     Data Size:    23070 Bytes = 22.5 KiB
     Architecture: AArch64
     Hash algo:    crc32
     Hash value:   6f50902d
     Hash algo:    sha1
     Hash value:   a45cf7ff90b8c1baa5e7680293643f6d156ddda2
   Verifying Hash Integrity ... crc32+ sha1+ OK
   Booting using the fdt blob at 0x41be43c0
   Uncompressing Kernel Image ... LZMA: uncompress or overwrite error 1 - must RESET board to recover
resetting ...
mtk_arch_reset at pre-loader!

Here is printenv

    MT7622> printenv
    arch=arm
    atf_filename=trustzone.bin
    baudrate=115200
    board=mt7622_evb
    board_name=mt7622_evb
    boot0=download_setting kernel;tftpboot ${loadaddr} ${kernel_filename}; bootm
    boot1=download_setting kernel;tftpboot ${loadaddr} ${kernel_filename};run boot_wr_img;run boot_rd_img;bootm
    boot10=download_setting flashimage;tftpboot ${loadaddr} ${flashimage_filename};run wr_flashimage;invaild_env
    boot11=download_setting gpt;tftpboot ${loadaddr} ${gpt_filename};run wr_gpt
    boot2=run boot_rd_img;bootm
    boot3=download_setting uboot;tftpboot ${loadaddr} ${uboot_filename};run wr_uboot;invaild_env
    boot4=loadb;run wr_uboot;invaild_env
    boot5=download_setting atf;tftpboot ${loadaddr} ${atf_filename};run wr_atf
    boot6=download_setting preloader;tftpboot ${loadaddr} ${preloader_filename};run wr_pl
    boot7=download_setting hdr;tftpboot ${loadaddr} ${hdr_filename};run wr_rom_hdr
    boot8=download_setting ctp;tftpboot ${loadaddr} ${ctp_filename};run wr_ctp
    boot9=run boot_rd_ctp;boot_to_ctp
    boot_rd_ctp=mmc device 0;mmc read ${loadaddr} 0x1000 0xa000
    boot_rd_img=mmc device 0;mmc read ${loadaddr} 0x1000 1;image_blks 512;mmc read ${loadaddr} 0x1000 ${img_blks}
    boot_wr_img=filesize_check 0x1E00000;if test ${filesize_result} = good; then image_blks 512  ${filesize};mmc device 0;mmc write ${loadaddr} 0x1000 0x18000;fi
    bootcmd=No
    bootdelay=3
    bootfile=iverson_uImage
    bootmenu_0=1. System Load Linux to SDRAM via TFTP.=run boot0
    bootmenu_1=2. System Load Linux Kernel then write to Flash via TFTP.=run boot1
    bootmenu_10=b. System Load flashimage then write to Flash via TFTP.=run boot10
    bootmenu_11=c. System Load partition table then write to Flash via TFTP.=run boot11
    bootmenu_2=3. Boot system code via Flash.=run boot2
    bootmenu_3=4. System Load U-Boot then write to Flash via TFTP.=run boot3
    bootmenu_4=5. System Load U-Boot then write to Flash via Serial.=run boot4
    bootmenu_5=6. System Load ATF then write to Flash via TFTP.=run boot5
    bootmenu_6=7. System Load Preloader then write to Flash via TFTP.=run boot6
    bootmenu_7=8. System Load ROM header then write to Flash via TFTP.=run boot7
    bootmenu_8=9. System Load CTP then write to Flash via TFTP.=run boot8
    bootmenu_9=a. System Load CTP then Boot to CTP (via Flash).=run boot9
    bootmenu_delay=30
    cpu=armv7
    ctp_filename=ctp.bin
    ethact=mtk_eth
    ethaddr=00:0C:E7:11:22:33
    fdt_high=0x6c000000
    flashimage_filename=flashimage.bin
    gpt_filename=GPT_EMMC
    hdr_filename=hdr.binary
    invaild_env=no
    ipaddr=10.10.10.254
    kernel_filename=iverson_uImage
    loadaddr=0x4007FF28
    preloader_filename=preloader_fpga7622_64_ldvt.bin
    serverip=10.10.10.3
    soc=mt7622
    stderr=serial
    stdin=serial
    stdout=serial
    uboot_filename=u-boot-mtk.bin
    vendor=mediatek
    wr_atf=filesize_check 0x40000;if test ${filesize_result} = good; then mmc device 0;mmc write ${loadaddr} 0x400 0x200;fi
    wr_ctp=filesize_check 0x1400000;if test ${filesize_result} = good; then ctp_check;if test ${ctp_result} = good; then mmc device 0;mmc write ${loadaddr} 0x1000 0xa000;reset; fi;fi
    wr_flashimage=filesize_check 0x1400000;if test ${filesize_result} = good; then mmc device 0;mmc write ${loadaddr} 0x0 0xa000;fi
    wr_gpt=filesize_check 0x4400;if test ${filesize_result} = good; then mmc device 0;mmc write ${loadaddr} 0x0 0x22;fi
    wr_pl=filesize_check 0x40000;if test ${filesize_result} = good; then mmc device 0; mmc write ${loadaddr} 0x0 0x200 emmc_preloader;fi
    wr_rom_hdr=filesize_check 0xA000;if test ${filesize_result} = good; then mmc device 0;mmc write ${loadaddr} 0x0 0x50;fi
    wr_uboot=filesize_check 0x80000;if test ${filesize_result} = good; then mmc device 0;mmc write ${loadaddr} 0x600 0x400;fi
Environment size: 3699/4092 bytes
MT7622>

BTW, It’s ok for download and boot the openwrt kernel bin build from the master of openwrt github.

@bourne_hlm, I encountered the same. I guess something wrong with imagebuilder. If you try to load ONLY kernel without initramfs/squashfs it starts loading, faces the empty of the root fs and goes reboot. Kernel file: bin/targets/mediatek/mt7622/BPI-R64-kernel.bin

I think the problem is the kernel mtd partition too small to fit the initramfs/squashfs. OMR R64 build initramfs/squashfs is huge, 28MB. If i reduce to 9MB, it’s working. I’m trying to modify the kernel mtd partition size now.

@bourne_hlm, could you please tell how you build OMR? Step by step.

@bourne_hlm, have you managed out with modifying mtd partition size?

Just run make menuconfig set the build platform to Mediatek mt7622. I have try some method to adjusted the partition size, but failed, I also need help.:pensive:

@bourne_hlm, I managed to load OMR from emmc!

Download “eMMC all-in-one single image” from this:

Next do this:

cp emmc_singleimage.img emmc_openmptcprouter.img
dd if=/dev/zero of=emmc_openmptcprouter.img bs=1k seek=2048 count=65536

File emmc_openmptcprouter.img contains u-boot and gpt (gdisk emmc_openmptcprouter.img, “p”):

Number  Start (sector)    End (sector)  Size       Code  Name
   1            1024            1535   256.0 KiB   8300  tee1
   2            1536            2559   512.0 KiB   8300  lk
   3            2560            3583   512.0 KiB   8300  nvram
   4            3584            4095   256.0 KiB   8300  rf
   5            4096           45055   20.0 MiB    8300  boot

Extend “boot” from 20M to 64M using gdisk:

Number  Start (sector)    End (sector)  Size       Code  Name
   1            1024            1535   256.0 KiB   8300  tee1
   2            1536            2559   512.0 KiB   8300  lk
   3            2560            3583   512.0 KiB   8300  nvram
   4            3584            4095   256.0 KiB   8300  rf
   5            4096          135167   64.0 MiB    8300  boot

Insert *-squashfs-sysupgrade.bin image into the “emmc_openmptcprouter.img”:

dd if=openmptcprouter-v0.52.3-5-g6f9cd2d-r0+11006-713561a-mediatek-mt7622-BPI-R64-squashfs-sysupgrade.bin of=emmc_openmptcprouter.img bs=1k seek=2048

Boot the board into the u-boot and change script “wr_flashimage”:

setenv wr_flashimage 'filesize_check 0x5000000;if test ${filesize_result} = good; then mmc device 0;mmc write ${loadaddr} 0x0 0x18000;fi'

From bootmenu use “b. System Load flashimage then write to Flash via TFTP.” and flash “emmc_openmptcprouter.img”

Add “bootargs” in u-boot and do “saveenv”:

setenv bootargs 'console=ttyS0,115200n1 rootfstype=squashfs earlyprintk block2mtd.block2mtd=/dev/mmcblk0,65536,eMMC,5 mtdparts=eMMC:768k(mbr)ro,512k(uboot),512k(Config),256k(Factory),64M(Kernel),2048M(usrdata)'
saveenv

That’s great, I will try it, Thank you very much!

@Ivan_Revyakin I follow your steps to modify the GPT partition size, and flash the modified image to R64, It seems still have problem at boot time. The error is :

[   17.240156] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[   17.247869] Please append a correct "root=" boot option; here are the available partitions:

Here is the full boot log

mmc0 is current device
mmc0 operation
dev_num = 0

MMC read: dev # 0, block # 4096, count 1 ... 1 blocks read: OK
[do_read_image_blks] This is a FIT image,img_size = 0x2af388
mmc0 operation
dev_num = 0

MMC read: dev # 0, block # 4096, count 5498 ... 5498 blocks read: OK
bootm flag=0, states=70f
## Loading kernel from FIT Image at 4007ff28 ...
   Using 'config@1' configuration
   Trying 'kernel@1' kernel subimage
     Description:  ARM64 OpenWrt Linux-4.19.72
     Type:         Kernel Image
     Compression:  lzma compressed
     Data Start:   0x40080010
     Data Size:    2789906 Bytes = 2.7 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x41080000
     Entry Point:  0x41080000
     Hash algo:    crc32
     Hash value:   5cfc30ab
     Hash algo:    sha1
     Hash value:   733f3a06467f3cbf46c6bbad37a314c6a3031ac9
   Verifying Hash Integrity ... crc32+ sha1+ OK
## Loading fdt from FIT Image at 4007ff28 ...
   Using 'config@1' configuration
   Trying 'fdt@1' fdt subimage
     Description:  ARM64 OpenWrt BPI-R64 device tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x4032935c
     Data Size:    23070 Bytes = 22.5 KiB
     Architecture: AArch64
     Hash algo:    crc32
     Hash value:   6f50902d
     Hash algo:    sha1
     Hash value:   a45cf7ff90b8c1baa5e7680293643f6d156ddda2
   Verifying Hash Integrity ... crc32+ sha1+ OK
   Booting using the fdt blob at 0x4032935c
   Uncompressing Kernel Image ... OK
   Loading Device Tree to 6bff7000, end 6bfffa1d ... OK

Starting kernel ...

[ATF][   259.460075]save kernel info
[ATF][   259.463011]Kernel_EL2
[ATF][   259.465681]Kernel is 64Bit
[ATF][   259.468769]pc=0x41080000, r0=0x6bff7000, r1=0x0
INFO:    BL3-1: Preparing for EL3 exit to normal world, Kernel
INFO:    BL3-1: Next image address = 0x41080000
INFO:    BL3-1: Next image spsr = 0x3c9
[ATF][   259.486467]el3_exit
[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 4.19.72 (ubuntu@ip-172-31-2-8) (gcc version 7.4.0 (OpenWrt GCC 7.4.0 r0+11006-713561a10b)) #0 SMP Fri Sep 13 14:40:29 2019
[    0.000000] Machine model: Bananapi BPI-R64
[    0.000000] On node 0 totalpages: 262096
[    0.000000]   DMA32 zone: 4096 pages used for memmap
[    0.000000]   DMA32 zone: 0 pages reserved
[    0.000000]   DMA32 zone: 262096 pages, LIFO batch:63
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv0.2 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: Trusted OS migration not required
[    0.000000] random: get_random_bytes called from start_kernel+0x84/0x3f8 with crng_init=0
[    0.000000] percpu: Embedded 21 pages/cpu s46872 r8192 d30952 u86016
[    0.000000] pcpu-alloc: s46872 r8192 d30952 u86016 alloc=21*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 258000
[    0.000000] Kernel command line: console=ttyS0,115200n1 rootfstype=squashfs earlyprintk block2mtd.block2mtd=/dev/mmcblk0,65536,eMMC,5 mtdparts=eMMC:768k(mbr)ro,512k(uboot),512k(Config),256k(Factory),64M(Kernel),2048M(usrdata)
[    0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes)
[    0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes)
[    0.000000] Memory: 1021484K/1048384K available (5758K kernel code, 398K rwdata, 1604K rodata, 320K init, 301K bss, 26900K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu:     CONFIG_RCU_FANOUT set to non-default value of 32.
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] GIC: GICv2 detected, but range too small and irqchip.gicv2_force_probe not set
[    0.000000] arch_timer: cp15 timer(s) running at 12.50MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x2e2049cda, max_idle_ns: 440795202628 ns
[    0.000003] sched_clock: 56 bits at 12MHz, resolution 80ns, wraps every 4398046511080ns
[    0.000171] Calibrating delay loop (skipped), value calculated using timer frequency.. 25.00 BogoMIPS (lpj=125000)
[    0.000179] pid_max: default: 32768 minimum: 301
[    0.000251] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes)
[    0.000262] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes)
[    0.001084] ASID allocator initialised with 65536 entries
[    0.001137] rcu: Hierarchical SRCU implementation.
[    0.001490] smp: Bringing up secondary CPUs ...
[    0.001792] Detected VIPT I-cache on CPU1
[    0.001828] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[    0.001887] smp: Brought up 1 node, 2 CPUs
[    0.001894] SMP: Total of 2 processors activated.
[    0.001900] CPU features: detected: 32-bit EL0 Support
[    0.001965] CPU: All CPU(s) started at EL2
[    0.001974] alternatives: patching kernel code
[    0.002344] devtmpfs: initialized
[    0.005000] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.005013] futex hash table entries: 512 (order: 3, 32768 bytes)
[    0.005096] pinctrl core: initialized pinctrl subsystem
[    0.005278] reg-dummy reg-dummy: no of_node; not parsing pinctrl DT
[    0.005650] NET: Registered protocol family 16
[    0.006135] vdso: 2 pages (1 code @ (____ptrval____), 1 data @ (____ptrval____))
[    0.006259] DMA: preallocated 256 KiB pool for atomic allocations
[    0.014825] mtk-pinctrl 10211000.pinctrl: try to register 103 pins ...
[    0.014839] pinctrl core: registered pin 0 (GPIO_A) on pinctrl_mt7622
[    0.014844] pinctrl core: registered pin 1 (I2S1_IN) on pinctrl_mt7622
[    0.014848] pinctrl core: registered pin 2 (I2S1_OUT) on pinctrl_mt7622
[    0.014852] pinctrl core: registered pin 3 (I2S_BCLK) on pinctrl_mt7622
[    0.014856] pinctrl core: registered pin 4 (I2S_WS) on pinctrl_mt7622
[    0.014860] pinctrl core: registered pin 5 (I2S_MCLK) on pinctrl_mt7622
[    0.014864] pinctrl core: registered pin 6 (TXD0) on pinctrl_mt7622
[    0.014869] pinctrl core: registered pin 7 (RXD0) on pinctrl_mt7622
[    0.014873] pinctrl core: registered pin 8 (SPI_WP) on pinctrl_mt7622
[    0.014876] pinctrl core: registered pin 9 (SPI_HOLD) on pinctrl_mt7622
[    0.014881] pinctrl core: registered pin 10 (SPI_CLK) on pinctrl_mt7622
[    0.014885] pinctrl core: registered pin 11 (SPI_MOSI) on pinctrl_mt7622
[    0.014889] pinctrl core: registered pin 12 (SPI_MISO) on pinctrl_mt7622
[    0.014893] pinctrl core: registered pin 13 (SPI_CS) on pinctrl_mt7622
[    0.014897] pinctrl core: registered pin 14 (I2C_SDA) on pinctrl_mt7622
[    0.014901] pinctrl core: registered pin 15 (I2C_SCL) on pinctrl_mt7622
[    0.014907] pinctrl core: registered pin 16 (I2S2_IN) on pinctrl_mt7622
[    0.014911] pinctrl core: registered pin 17 (I2S3_IN) on pinctrl_mt7622
[    0.014915] pinctrl core: registered pin 18 (I2S4_IN) on pinctrl_mt7622
[    0.014919] pinctrl core: registered pin 19 (I2S2_OUT) on pinctrl_mt7622
[    0.014923] pinctrl core: registered pin 20 (I2S3_OUT) on pinctrl_mt7622
[    0.014927] pinctrl core: registered pin 21 (I2S4_OUT) on pinctrl_mt7622
[    0.014931] pinctrl core: registered pin 22 (GPIO_B) on pinctrl_mt7622
[    0.014935] pinctrl core: registered pin 23 (MDC) on pinctrl_mt7622
[    0.014940] pinctrl core: registered pin 24 (MDIO) on pinctrl_mt7622
[    0.014943] pinctrl core: registered pin 25 (G2_TXD0) on pinctrl_mt7622
[    0.014947] pinctrl core: registered pin 26 (G2_TXD1) on pinctrl_mt7622
[    0.014951] pinctrl core: registered pin 27 (G2_TXD2) on pinctrl_mt7622
[    0.014955] pinctrl core: registered pin 28 (G2_TXD3) on pinctrl_mt7622
[    0.014959] pinctrl core: registered pin 29 (G2_TXEN) on pinctrl_mt7622
[    0.014964] pinctrl core: registered pin 30 (G2_TXC) on pinctrl_mt7622
[    0.014968] pinctrl core: registered pin 31 (G2_RXD0) on pinctrl_mt7622
[    0.014972] pinctrl core: registered pin 32 (G2_RXD1) on pinctrl_mt7622
[    0.014975] pinctrl core: registered pin 33 (G2_RXD2) on pinctrl_mt7622
[    0.014979] pinctrl core: registered pin 34 (G2_RXD3) on pinctrl_mt7622
[    0.014983] pinctrl core: registered pin 35 (G2_RXDV) on pinctrl_mt7622
[    0.014987] pinctrl core: registered pin 36 (G2_RXC) on pinctrl_mt7622
[    0.014991] pinctrl core: registered pin 37 (NCEB) on pinctrl_mt7622
[    0.014995] pinctrl core: registered pin 38 (NWEB) on pinctrl_mt7622
[    0.014999] pinctrl core: registered pin 39 (NREB) on pinctrl_mt7622
[    0.015004] pinctrl core: registered pin 40 (NDL4) on pinctrl_mt7622
[    0.015008] pinctrl core: registered pin 41 (NDL5) on pinctrl_mt7622
[    0.015012] pinctrl core: registered pin 42 (NDL6) on pinctrl_mt7622
[    0.015015] pinctrl core: registered pin 43 (NDL7) on pinctrl_mt7622
[    0.015019] pinctrl core: registered pin 44 (NRB) on pinctrl_mt7622
[    0.015023] pinctrl core: registered pin 45 (NCLE) on pinctrl_mt7622
[    0.015027] pinctrl core: registered pin 46 (NALE) on pinctrl_mt7622
[    0.015031] pinctrl core: registered pin 47 (NDL0) on pinctrl_mt7622
[    0.015037] pinctrl core: registered pin 48 (NDL1) on pinctrl_mt7622
[    0.015041] pinctrl core: registered pin 49 (NDL2) on pinctrl_mt7622
[    0.015045] pinctrl core: registered pin 50 (NDL3) on pinctrl_mt7622
[    0.015049] pinctrl core: registered pin 51 (MDI_TP_P0) on pinctrl_mt7622
[    0.0150mt7622
[    0.015065] pinctrl core: registered pin 55 (MDI_TP_P1) on pinctrl_mt7622
[    0.015069] pinctrl core: registered pin 56 (MDI_TN_P1) on pinctrl_mt7622
[    0.015073] pinctrl core: registered pin 57 (MDI_RP_P1) on pinctrl_mt7622
[    0.015078] pinctrl core: registered pin 58 (MDI_RN_P1) on pinctrl_mt7622
[    0.015081] pinctrl core: registered pin 59 (MDI_RP_P2) on pinctrl_mt7622
[    0.015085] pinctrl core: registered pin 60 (MDI_RN_P2) on pinctrl_mt7622
[    0.015089] pinctrl core: registered pin 61 (MDI_TP_P2) on pinctrl_mt7622
[    0.015093] pinctrl core: registered pin 62 (MDI_TN_P2) on pinctrl_mt7622
[    0.015097] pinctrl core: registered pin 63 (MDI_TP_P3) on pinctrl_mt7622
[    0.015102] pinctrl core: registered pin 64 (MDI_TN_P3) on pinctrl_mt7622
[    0.015106] pinctrl core: registered pin 65 (MDI_RP_P3) on pinctrl_mt7622pinctrl_mt7622
[    0.015139] pinctrl core: registered pin 73 (SPIC1_CLK) on pinctrl_mt7622
[    0.015143] pinctrl core: registered pin 74 (SPIC1_MOSI) on pinctrl_mt7622
[    0.015147] pinctrl core: registered pin 75 (SPIC1_MISO) on pinctrl_mt7622
[    0.015151] pinctrl core: registered pin 76 (SPIC1_CS) on pinctrl_mt7622
[    0.015155] pinctrl core: registered pin 77 (GPIO_D) on pinctrl_mt7622
[    0.015159] pinctrl core: registered pin 78 (WATCHDOG) on pinctrl_mt7622
[    0.015163] pinctrl core: registered pin 79 (RTS3_N) on pinctrl_mt7622
[    0.015168] pinctrl core: registered 015192] pinctrl core: registered pin 86 (EPHY_LED0_N) on pinctrl_mt7622
[    0.015196] pinctrl core: registered pin 87 (AUXIN0) on pinctrl_mt7622
[    0.015200] pinctrl core: registered pin 88 (AUXIN1) on pinctrl_mt7622
[    0.015204] pinctrl core: registered pin 89 (AUXIN2) on pinctrl_mt7622
[    0.015208] pinctrl core: registered pin 90 (AUXIN3) on pinctrl_mt7622
[    0.015212] pinctrl core: registered pin 91 (TXD4) on pinctrl_mt7622
[    0.015216] pinctrl core: registered pin 92 (RXD4) on pinctrl_mt7622
[    0.015220] pinctrl core: registered pin 93 (RTS4_N) on pinctrl_mt7622
[    0.015224] pinctrl core: registered pin 94 (CTS4_N) on pinctrl_mt7622
[    0.015228] pinctrl core: registered pin 95 (PWM1) on pinctrl_mt7622
[    0.015232] pinctrl core: registered pin 96 (PWM2) on pinctrl_mt7622
[    0.015236] pinctrl core: registered pin 97 (PWM3) on pin17262] mtk-pinctrl 10211000.pinctrl: request pin 90 (AUXIN3) for pinctrl_mt7622:499
[    0.017274] gpio gpiochip0: Persistence not supported for GPIO 90
[    0.017283] GPIO line 499 (asm_sel) hogged as output/high
[    0.017424] gpio gpiochip0: (pinctrl_mt7622): added GPIO chardev (254:0)
[    0.017430] gpiochip_setup_dev: registered GPIOs 409 to 511 on device: gpiochip0 (pinctrl_mt7622)
[    0.026230] of_get_named_gpiod_flags: can't parse 'gpio' property of node '/regulator-1p8v[0]'
[    0.026401] of_get_named_gpiod_flags: can't parse 'gpio' property of node '/regulator-3p3v[0]'
[    0.026533] of_get_named_gpiod_flags: can't parse 'gpio' property of node '/regulator-5v[0]'
[    0manager initialized
[    0.027663] Bluetooth: HCI socket layer initialized
[    0.027671] Bluetooth: L2CAP socket layer initialized
[    0.027701] Bluetooth: SCO socket layer initialized
[    0.028153] clocksource: Switched to clocksource arch_sys_counter
[    0.029137] NET: Registered protocol family 2
[    0.029565] default registered
[    0.029570] default registered
[    0.029573] MPTCP: Stable release v0.95
[    0.029583] tcp_listen_portaddr_hash hash table entries: 512 (order: 1, 8192 bytes)
[    0.029602] TCP established hash table entries: 8192 (order: 4, 65536 bytes)
[    0.029652] TCP bind hash table entries: 8192 (order: 5, 131072 bytes)
[    0.029758] TCP: Hash t22] workingset: timestamp_bits=46 max_order=18 bucket_order=0
[    0.033816] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.033828] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.036206] io scheduler noop registered (default)
[    0.036582] mtk-tphy 1a0c4000.usb-phy: failed to get ref_clk(id-1)
[    0.036855] pinctrl core: add 1 pinctrl maps
[    0.036884] mtk-pinctrl 10211000.pinctrl: found group selector 70 for pwm_ch7_2
[    0.036894] mtk-pinctrl 10211000.pinctrl: request pin 101 (PWM7) for 11006000.pwm
[    0.036902] mtk-pinctrl 10211000.pinctrl: enable fu] mtk-pinctrl 10211000.pinctrl: found group selector 42 for pcie1_0_waken
[    0.037239] mtk-pinctrl 10211000.pinctrl: found group selector 43 for pcie1_0_clkreq
[    0.037246] mtk-pinctrl 10211000.pinctrl: request pin 83 (PERST0_N) for 1a140000.pcie
[    0.037252] mtk-pinctrl 10211000.pinctrl: enable function pcie group pcie0_pad_perst
[    0.037260] mtk-pinctrl 10211000.pinctrl: request pin 79 (RTS3_N) for 1a140000.pcie
[    0.037265] mtk-pinctrl 10211000.pinctrl: enable function pcie group pcie0_1_waken
[    0.037271] mtk-pinctrl 10211000.pinctrl: request pin 80 (CTS3_N) for 1a140000.pcie
[    0.037277] mtk-pinctrl 10211000.pinctrl: enable function pcie group pcie0_1_clkreq
[    0.037284] mtk-pinctrl 10211000.pinctrl: request pin 84 (PERST1_N) for 1a140000.pcie
[    0.037289] mtk-pinctrl 10211000.pinctrl: enable function pcie group pcie1_pad_perst
[    0.037296] mtk-pinctrl 10211000.pinctrl: request pin 14 (I2C_SDA) for 1a14 71 (PMIC_SCL) for 10001000.pwrap
[    0.039722] mtk-pinctrl 10211000.pinctrl: request pin 72 (PMIC_SDA) for 10001000.pwrap
[    0.039728] mtk-pinctrl 10211000.pinctrl: enable function pmic group pmic_bus
[    0.039842] mt-pmic-pwrap 10001000.pwrap: unexpected interrupt int=0x1
[    0.053816] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.056074] serial8250 serial8250: no of_node; not parsing pinctrl DT
[    0.056194] pinctrl core: add 1 pinctrl maps
[    0.056225] mtk-pinctrl 10211000.pinctrl: found group selector 89 for uart0_0_tx_rx
[    0.056236] mtk-pinctrl 10211000.pinctrl: request pin 6 (TXD0) for 11002000.serial
[    0.056243] mtk-pinctrl 10211000.pinctrl: request pin 7 (RXD0) for 11002000.serial
[    0.056249] mtk-pinctrl 10211000.pinctrl: enable function uart group uart0_0_tx_rx
[    0.056427] console [ttyS0] disabled
[    0.076792] 11002000.seri[    1.715508] 11004000.serial: ttyS1 at MMIO 0x11004000 (irq = 117, base_baud = 1562500) is a ST16650V2
[    1.725557] 1100c000.serial: ttyS2 at MMIO 0x1100c000 (irq = 123, base_baud = 17499995) is a MediaTek BTIF
[    1.735616] serial serial0: tty port ttyS2 registered
[    1.741160] mtk_rng 1020f000.rng: registered RNG driver
[    1.741290] random: fast init done
[    1.750204] random: crng init done
[    1.754204] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    1.762794] loop: module loaded
[    1.766721] pinctrl core: add 1 pinctrl maps
[    1.771178] mtk-pinctrl 10211000.pinctrl: found group selector 75 for spic0_0
[    1.778567] mtk-pinctrl 10211000.pinctrl: request pin 63 (MDI_TP_P3) for 1100a000.spi
[    1.786641] mtk-pinctrl 10211000.pinctrl: request pin 64 (MDI_TN_P3) for 1100a000.spi
[    1.794720] mtk-pinctrl 10211000.pinctrl: request pin 65 (MDI_RP_P3) for 1100a000.spi
[    1.802797] mtk-pinctrl 10211000.pinctrl: request pin 66 (MDI_RN_P3) for 1100a000.spi
[    1.810875] mtk-pinctrl 10211000.por 11016000.spi
[    1.838355] mtk-pinctrl 10211000.pinctrl: request pin 68 (MDI_RN_P4) for 11016000.spi
[    1.846427] mtk-pinctrl 10211000.pinctrl: request pin 69 (MDI_TP_P4) for 11016000.spi
[    1.854514] mtk-pinctrl 10211000.pinctrl: request pin 70 (MDI_TN_P4) for 11016000.spi
[    1.862594] mtk-pinctrl 10211000.pinctrl: enable function spi group spic1_0
[    1.870321] mdio_bus fixed-0: GPIO lookup for consumer reset
[    1.876155] mdio_bus fixed-0: using lookup tables for GPIO lookup
[    1.882447] mdio_bus fixed-0: No GPIO consumer reset found
[    1.888114] libphy: Fixed MDIO Bus: probed
[    1.892770] sean debug physpeed = 2500
[    1.919291] mdio_bus mdio-bus: GPIO lookup for consumer reset
[    1.925214] mdio_bus mdio-bus: using device tree for GPIO lookup
[    1.931439] of_get_named_gpiod_flags: can't parse 'reset-gpio2530] mdio_bus mdio-bus: using lookup tables for GPIO lookup
[    1.958906] mdio_bus mdio-bus: No GPIO consumer reset found
[    1.964646] libphy: mdio: probed
[    1.967984] mtk_soc_eth 1b100000.ethernet: generated random MAC address 72:c3:f3:7c:1b:db
[    1.976429] of_get_named_gpiod_flags: can't parse 'link-gpios' property of node '/ethernet@1b100000/mac@0/fixed-link[0]'
[    1.987736] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ethernet@1b100000/mac@0[0]'
[    1.998144] mtk_soc_eth 1b100000.ethernet: path gmac1_sgmii in set_mux_gdm1_to_gmac1_esw updated =id=00000000, driver=Generic PHY]
[    2.055721] mtk_soc_eth 1b100000.ethernet eth0: mediatek frame engine at 0xffffff80092c0000, irq 131
[    2.065160] mtk_soc_eth 1b100000.ethernet: generated random MAC address 42:74:f8:9c:96:88
[    2.073604] of_get_named_gpiod_flags: can't parse 'link-gpios' property of node '/ethernet@1b100000/mac@1/fixed-link[0]'
[    2.084899] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ethernet@1b100000/mac@1[0]'
[    2.095287] mtk_soc_eth 1b100000.ethernet: path gmac2_rgmii in set_mux_gdm1_to_gmac1_esw updated = 0
[    2.104713] mtk_soc_eth 1b100000.ethernet: mux mux_gmac2_gmac0_to_gephy isn't present on the SoC
[    2.113777] mtk_soc_eth 1b100000.ethernet: mux mux_u3_gmac2_to_qphy isn't present on the SoC
[    2.122484] mtk_soc_eth 1b100000.ethernet: path gmac2_rgmii in set_mux_gmac1_gmac2_to_sgmii_rgmii updated = 0
[    2.132712] mtk_soc_e    2.182232] xhci-mtk 1a0c0000.usb: Dropping the link to regulator.2
[    2.188751] xhci-mtk 1a0c0000.usb: Dropping the link to regulator.3
[    2.195516] rtc_mt7622 10212800.rtc: rtc core: registered 10212800.rtc as rtc0
[    2.203295] pinctrl core: add 1 pinctrl maps
[    2.207722] mtk-pinctrl 10211000.pinctrl: found group selector 109 for watchdog
[    2.215282] mtk-pinctrl 10211000.pinctrl: request pin 78 (WATCHDOG) for 10212000.watchdog
[    2.223721] mtk-pinctrl 10211000.pinctrl: enable function watchdog group watchdog
[    2.231457] MTK_WDT_NONRST_REG(20000000)
[    2.235498] RGU oadcom registered
[    2.265889] Bluetooth: HCI UART protocol QCA registered
[    2.271406] mtk-cpufreq mtk-cpufreq: no of_node; not parsing pinctrl DT
[    2.271909] bluetooth hci0: Direct firmware load for mediatek/mt7622pr2h.bin failed with error -2
[    2.278346] cpu cpu0: Linked as a consumer to regulator.4
[    2.287390] bluetooth hci0: Falling back to syfs fallback for: mediatek/mt7622pr2h.bin
[    2.293011] cpu cpu0: Linked as a consumer to regulator.7
[    2.307340] generic pinconfig core: found bias-pull-up with value 1
[    2.313809] generic pinconfig core: found input-enable with value 1
[    2.320281] generic pinconfig core: found bias-pull-down with value 1
[    2.326923] pinctrl core: add 11 pinctrl maps
[    2.331429] generic pinconfig core: found bias-pull-up with value 1
[    2.337889] .pinctrl: request pin 40 (NDL4) for 11230000.mmc
[    2.390499] mtk-pinctrl 10211000.pinctrl: request pin 41 (NDL5) for 11230000.mmc
[    2.398128] mtk-pinctrl 10211000.pinctrl: request pin 42 (NDL6) for 11230000.mmc
[    2.405752] mtk-pinctrl 10211000.pinctrl: request pin 43 (NDL7) for 11230000.mmc
[    2.413381] mtk-pinctrl 10211000.pinctrl: request pin 44 (NRB) for 11230000.mmc
[    2.420920] mtk-pinctrl 10211000.pinctrl: request pin 45 (NCLE) for 11230000.mmc
[    2.428548] mtk-pinctrl 10211000.pinctrl: request pin 47 (NDL0) for 11230000.mmc
[    2.436172] mtk-pinctrl 10211000.pinctrl: request pin 48 (NDL1) for 11230000.mmc
[    2.443800] mtk-pinctrl 10211000.pinctrl: request pin 49 (NDL2) for 11230000.mmc
[    2.451428] mtk-pinctrl 10211000.pinctrl: request pin 50 (NDL3) for 11230000.mmc
[    2.459057] mtk-pinctrl 10211000.pinctrl: enablund
[    2.509426] mtk-msdc 11230000.mmc: Linked as a consumer to regulator.2
[    2.516179] mtk-msdc 11230000.mmc: Linked as a consumer to regulator.1
[    2.522940] mtk-msdc 11230000.mmc: obtain a copy of previously claimed pinctrl
[    2.530647] mtk-pinctrl 10211000.pinctrl: request pin 40 (NDL4) for 11230000.mmc
[    2.538279] mtk-pinctrl 10211000.pinctrl: request pin 41 (NDL5) for 11230000.mmc
[    2.545903] mtk-pinctrl 10211000.pinctrl: request pin 42 (NDL6) for 11230000.mmc
[    2.553531] mtk-pinctrl 10211000.pinctrl: request pin 43 (NDL7) for 11230000.mmc
[    2.561159] mtk-pinctrl 10211000.pinctrl: request pin 44 (NRB) for 11230000.mmc
[    2.568698] mtk-pinctrl 10211000.pinctrl: request pin 45 (NCLE) for 11230000.mmc
[    2.576321] mtk-pinctrl 10211000.pinctrl: request pin 47 (NDL0) f[    2.638174] generic pinconfig core: found bias-pull-up with value 1
[    2.644633] generic pinconfig core: found drive-strength with value 8
[    2.651282] generic pinconfig core: found input-enable with value 1
[    2.657748] generic pinconfig core: found bias-pull-down with value 1
[    2.664391] generic pinconfig core: found drive-strength with value 12
[    2.671127] generic pinconfig core: found bias-pull-up with value 1
[    2.677590] pinctrl core: add 8 pinctrl maps
[    2.682006] generic pinconfig core: found bias-pull-up with value 1
[    2.688470] generic pinconfig core: found input-enable with value 1
[    2.694933] generic pinconfig core: found bias-pull-down with value 1
[    2.701581] pinctrl core: add 7 pinctrl maps
[    2.706001] mtk-pinctrl 10211000.pinctrl: found group selector 71 for sd_0
[    2.713125] mtk-pinctrl 10211000.pinctrl: found group selector 71 for sd_0
[    2.720230] mtk-pinctrl 10211000.pinctrl: request pin 16 (I2S2_IN) for 11240000.mmc
[    2.728129] mtk-pinctrl 10211000.pinctrl: request pin lookup for consumer cd
[    2.780837] mtk-msdc 11240000.mmc: using device tree for GPIO lookup
[    2.787400] of_get_named_gpiod_flags: parsed 'cd-gpios' property of node '/mmc@11240000[0]' - status (0)
[    2.797186] mtk-pinctrl 10211000.pinctrl: request pin 81 (TXD3) for pinctrl_mt7622:490
[    2.805358] gpio gpiochip0: Persistence not supported for GPIO 81
[    2.811647] mtk-msdc 11240000.mmc: Got CD GPIO
[    2.816226] mtk-msdc 11240000.mmc: GPIO lookup for consumer wp
[    2.822241] mtk-msdc 11240000.mmc: using device tree for GPIO lookup
[    2.828798] of_get_named_gpiod_flags: can't parse 'wp-gpios' property of node '/mmc@11240000[0]'
[    2.837859] of_get_named_gpiod_flags: can't parse 'wp-gpio' property of node '/mmc@11240000[0]'
[    2.846832] mtk-msdc 11240000.mmc: using lookup tables for GPIO lookup
[    2.853564] mtk-msdc 112400[    2.899874] NET: Registered protocol family 10
[    2.905005] Segment Routing with IPv6
[    2.908877] fullmesh registered
[    2.912121] ndiffports registered
[    2.915544] binder registered
[    2.918634] netlink registered
[    2.921786] roundrobin registered
[    2.925209] redundant registered
[    2.928536] blest registered
[    2.931501] NET: Registered protocol family 17
[    2.936110] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    2.949604] 8021q: 802.1Q VLAN Support v1.8
[    2.960911] mtk-msdc 11230000.mmc: phase: [map:8fffffff] [maxlen:28] [final:9]
[    2.963725] pinctrl core: add 3 pinctrl maps
[    2.972854] pinctrl core: add 3 pinctrl maps
[    2.977312] mtk-pinctrl 10211000.pinctrl: found group selector 44 for pcie0_pad_perst
[    2.985492] mtk-pinctrl 10211000.pinctrl: found group selector 40 for pcie0_1_waken
[    2.993408] mtk-pinctrl 10211000.pinctrl: found group selector 41 for pcie0_1_clkreq
[    3.001424] mtk-p00.pinctrl: enable function pcie group pcie0_1_waken
[    3.057321] mtk-pinctrl 10211000.pinctrl: request pin 80 (CTS3_N) for 1a140000.pcie
[    3.065241] mtk-pinctrl 10211000.pinctrl: enable function pcie group pcie0_1_clkreq
[    3.073164] mtk-pinctrl 10211000.pinctrl: request pin 84 (PERST1_N) for 1a140000.pcie
[    3.081263] mtk-pinctrl 10211000.pinctrl: enable function pcie group pcie1_pad_perst
[    3.089275] mtk-pinctrl 10211000.pinctrl: request pin 14 (I2C_SDA) for 1a140000.pcie
[    3.097269] mtk-pinctrl 10211000.pinctrl: enable function pcie group pcie1_0_waken
[    3.105112] mtk-pinctrl 10211000.pinctrl: request pin 15 (I2C_SCL) for 1a140000.pcie
[    3.113121] mtk-pinctrl 10211000.pinctrl: enable function pcie group pcie1_0_clkreq
[    3.121897] mtk-msdc 11230000.mmc: phase: [map:83ffffff] [maxlen:26] [final:8]
[    3.130118] mmc0: new HS200 MMC card at address 0001
[    3.221278] mtk-pcie 1a140000.pcie: Port0 link down
[    3.326337] mtk-pcie 1a140000.pcie: Port1 link down
[    3.331499] mtk-pcie 1a140000.pcie: PCI host bridge to bus 0000:00
[    3.337872] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    3.344880] pci_bus 0000:00: root bus resource [mem 0x20000000-0x2fffffff]
[    3.351972] pci_bus 0000:00: root bus resource [bus 00-ff]
[    3.357625] pci_bus 0000:00: scanning bus
[    3.362859] pci_bus 0000:00: fixups for bus
[    3.367169] pci_bus 0000:00: bus scan returning with max=00
[    3.373038] mtk_hsdma 1b007000.dma-controller: Using 3 as missing dma-requests property
[    3.381474] mtk_hsdma 1b007000.dma-controller: MediaTek HSDMA driver registered
[    3.389153] of_get_named_gpiod_flags: parsed 'reset-gpios' property of node '/gsw@0[0]' - status (0)
[    3.398586] mtk-pinctrl 10211000.pinctrl: request pin 54 (MDI_RN_P0) for pinctrl_mt7622:463
[    3.968153] mt753x gsw@0: LAN/WAN VLAN setting=wllll
[    3.973741] mt753x gsw@0: Switch is MediaTek MT7531BE rev 0
[    6.648675] mt753x gsw@0: >>>>>>>>>>>>>>>>>>>>>>>>>>>>> START CALIBRATION:
[    6.657749] mt753x gsw@0: -------- gephy-calbration (port:0) --------
[    6.680885] CALDLY = 40
[    7.025183]  GE Rext AnaCal Saturation!
[    7.029408] GE Rxet cal something wrong2
[    7.318635]  GE R50 AnaCal Saturation!
[    7.322764]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[    7.604141]  GE R50 AnaCal Saturation!
[    7.608277]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[    7.889652]  GE R50 AnaCal Saturation!
[    7.893780]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[    8.175210]  GE R50 AnaCal Saturation!
[    8.179349]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[    8.189565]  GE 1e_174(0x8080), 1e_175(0x8080)
[    8.285195]  GE Tx offset AnaCal Done! (pair-0)(6)(0x25) 0x1e_172=0x2520
[    8.357089]  GE Tx offset AnaCal Done! (pair-1)(6)(0x25) 0x1e_172=0x2525
[    8.388347]  GE Tx offset AnaCal Done! (pair-2)(1)(0x1) 0x1e_173=0x120
[    8.443784]  GE Tx offset AnaCal Done! (pair-3)(4)(0x23) 0x1e_173=0x123
[    8.612583]  GE Tx amp AnaCal Done! (pair-0)(1e_12 = 0x3c0f)
[    8.676227]  GE Tx amp AnaCal Done! (pair-1)(1e_17 = 0x1515)
[    8.756194]  GE Tx amp AnaCal Done! (pair-2)(1e_19 = 0x121a)
[    8.815898]  GE Tx amp AnaCal Done! (pair-3)(1e_21 = 0x151d)
[    8.911188] PORT 0 RX_DC_OFFSET
[    8.931447] before pairA output = 1d
[    8.938267] after pairA output = 0
[    8.944819] before pairB output = e
[    8.951548] after pairB output = 1
[    8.958101] before pairC output = d
[    8.964832] after pairC output = 0
[    8.971394] before pairD output = 1e
[    8.978211] after pairD output = fe
[    8.982262] mt753x gsw@0: -------- gephy-calbration (port:1) --------
[    9.005405] CALDLY = 40
[    9.285220]  GE R50 AnaCal Saturation!
[    9.289355]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[    9.570720]  GE R50 AnaCal Saturation!
[    9.574849]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[    9.856290]  GE R50 AnaCal Saturation!
[    9.860426]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[   10.141810]  GE R50 AnaCal Saturation!
[   10.145939]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[   10.156161]  GE 1e_174(0x8080), 1e_175(0x8080)
[   10.259925]  GE Tx offset AnaCal Done! (pair-0)(7)(0x26) 0x1e_172=0x2620
[   10.331828]  GE Tx offset AnaCal Done! (pair-1)(6)(0x25) 0x1e_172=0x2625
[   10.419993]  GE Tx offset AnaCal Done! (pair-2)(8)(0x27) 0x1e_173=0x2720
[   10.483774]  GE Tx offset AnaCal Done! (pair-3)(5)(0x24) 0x1e_173=0x2724
[   10.672823]  GE Tx amp AnaCal Done! (pair-0)(1e_12 = 0x380e)
[   10.726351]  GE Tx amp AnaCal Done! (pair-1)(1e_17 = 0x1717)
[   10.786044]  GE Tx amp AnaCal Done! (pair-2)(1e_19 = 0x1921)
[   10.835617]  GE Tx amp AnaCal Done! (pair-3)(1e_21 = 0x161e)
[   10.930898] PORT 1 RX_DC_OFFSET
[   10.951155] before pairA output = e
[   10.957878] after pairA output = ff
[   10.964530] before pairB output = f
[   10.971260] after pairB output = 1
[   10.977814] before pairC output = 1e
[   10.984633] after pairC output = fe
[   10.991281] before pairD output = f
[   10.998004] after pairD output = ff
[   11.002063] mt753x gsw@0: -------- gephy-calbration (port:2) --------
[   11.025189] CALDLY = 40
[   11.304873]  GE R50 AnaCal Saturation!
[   11.309010]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[   11.590281]  GE R50 AnaCal Saturation!
[   11.594409]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[   11.875692]  GE R50 AnaCal Saturation!
[   11.879830]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[   12.161169]  GE R50 AnaCal Saturation!
[   12.165297]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[   12.175517]  GE 1e_174(0x8080), 1e_175(0x8080)
[   12.263006]  GE Tx offset AnaCal Done! (pair-0)(5)(0x24) 0x1e_172=0x2420
[   12.326794]  GE Tx offset AnaCal Done! (pair-1)(5)(0x24) 0x1e_172=0x2424
[   12.390608]  GE Tx offset AnaCal Done! (pair-2)(5)(0x24) 0x1e_173=0x2420
[   12.462501]  GE Tx offset AnaCal Done! (pair-3)(6)(0x25) 0x1e_173=0x2425
[   12.580818]  GE Tx amp AnaCal Done! (pair-0)(1e_12 = 0x5816)
[   12.644452]  GE Tx amp AnaCal Done! (pair-1)(1e_17 = 0x1515)
[   12.704133]  GE Tx amp AnaCal Done! (pair-2)(1e_19 = 0x1a22)
[   12.763810]  GE Tx amp AnaCal Done! (pair-3)(1e_21 = 0x151d)
[   12.859055] PORT 2 RX_DC_OFFSET
[   12.879305] before pairA output = f
[   12.886028] after pairA output = 0
[   12.892593] before pairB output = d
[   12.899322] after pairB output = 0
[   12.905875] before pairC output = f
[   12.912607] after pairC output = 1
[   12.919162] before pairD output = f
[   12.925885] after pairD output = 1
[   12.929855] mt753x gsw@0: -------- gephy-calbration (port:3) --------
[   12.952975] CALDLY = 40
[   13.232651]  GE R50 AnaCal Saturation!
[   13.236780]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[   13.518141]  GE R50 AnaCal Saturation!
[   13.522270]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[   13.803504]  GE R50 AnaCal Saturation!
[   13.807633]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[   14.088934]  GE R50 AnaCal Saturation!
[   14.093063]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[   14.103252]  GE 1e_174(0x8080), 1e_175(0x8080)
[   14.182566]  GE Tx offset AnaCal Done! (pair-0)(4)(0x23) 0x1e_172=0x2320
[   14.246343]  GE Tx offset AnaCal Done! (pair-1)(5)(0x24) 0x1e_172=0x2324
[   14.301977]  GE Tx offset AnaCal Done! (pair-2)(4)(0x23) 0x1e_173=0x2320
[   14.381980]  GE Tx offset AnaCal Done! (pair-3)(7)(0x26) 0x1e_173=0x2326
[   14.500238]  GE Tx amp AnaCal Done! (pair-0)(1e_12 = 0x5816)
[   14.614422]  GE Tx amp AnaCal Done! (pair-1)(1e_17 = 0x1111)
[   14.694317]  GE Tx amp AnaCal Done! (pair-2)(1e_19 = 0x141c)
[   14.774213]  GE Tx amp AnaCal Done! (pair-3)(1e_21 = 0x141c)
[   14.869459] PORT 3 RX_DC_OFFSET
[   14.889714] before pairA output = e
[   14.896438] after pairA output = 0
[   14.903000] before pairB output = 1e
[   14.909814] after pairB output = 0
[   14.916365] before pairC output = e
[   14.923096] after pairC output = 1
[   14.929651] before pairD output = 1e
[   14.936463] after pairD output = 1
[   14.940432] mt753x gsw@0: -------- gephy-calbration (port:4) --------
[   14.963553] CALDLY = 40
[   15.243238]  GE R50 AnaCal Saturation!
[   15.247367]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[   15.528710]  GE R50 AnaCal Saturation!
[   15.532838]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[   15.814094]  GE R50 AnaCal Saturation!
[   15.818230]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[   16.099474]  GE R50 AnaCal Saturation!
[   16.103603]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[   16.113825]  GE 1e_174(0x8080), 1e_175(0x8080)
[   16.185059]  GE Tx offset AnaCal Done! (pair-0)(3)(0x22) 0x1e_172=0x2220
[   16.256961]  GE Tx offset AnaCal Done! (pair-1)(6)(0x25) 0x1e_172=0x2225
[   16.345080]  GE Tx offset AnaCal Done! (pair-2)(8)(0x27) 0x1e_173=0x2720
[   16.392585]  GE Tx offset AnaCal Done! (pair-3)(3)(0x22) 0x1e_173=0x2722
[   16.561382]  GE Tx amp AnaCal Done! (pair-0)(1e_12 = 0x4411)
[   16.736160]  GE Tx amp AnaCal Done! (pair-1)(1e_17 = 0xa0a)
[   16.856361]  GE Tx amp AnaCal Done! (pair-2)(1e_19 = 0x1018)
[   16.966580]  GE Tx amp AnaCal Done! (pair-3)(1e_21 = 0x1119)
[   17.061811] PORT 4 RX_DC_OFFSET
[   17.082061] before pairA output = 1e
[   17.088874] after pairA output = 0
[   17.095428] before pairB output = f
[   17.102159] after pairB output = 1
[   17.108712] before pairC output = f
[   17.115433] after pairC output = 0
[   17.121993] before pairD output = 1e
[   17.128807] after pairD output = ff
[   17.136267] xhci-mtk 1a0c0000.usb: Linked as a consumer to regulator.3
[   17.143030] xhci-mtk 1a0c0000.usb: Linked as a consumer to regulator.2
[   17.149942] xhci-mtk 1a0c0000.usb: xHCI Host Controller
[   17.155341] xhci-mtk 1a0c0000.usb: new USB bus registered, assigned bus number 1
[   17.163824] mt753x gsw@0: Port 0 Link is Up - 1Gbps/Full
[   17.169399] xhci-mtk 1a0c0000.usb: hcc params 0x01403198 hci version 0x96 quirks 0x0000000000210010
[   17.178759] xhci-mtk 1a0c0000.usb: irq 127, io mem 0x1a0c0000
[   17.185187] hub 1-0:1.0: USB hub found
[   17.189077] hub 1-0:1.0: 2 ports detected
[   17.193423] xhci-mtk 1a0c0000.usb: xHCI Host Controller
[   17.198824] xhci-mtk 1a0c0000.usb: new USB bus registered, assigned bus number 2
[   17.206453] xhci-mtk 1a0c0000.usb: Host supports USB 3.0 SuperSpeed
[   17.212959] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[   17.221600] hub 2-0:1.0: USB hub found
[   17.225476] hub 2-0:1.0: 1 port detected
[   17.230150] rtc_mt7622 10212800.rtc: setting system clock to 2000-01-01 00:00:15 UTC (946684815)
[   17.240156] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[   17.247869] Please append a correct "root=" boot option; here are the available partitions:
[   17.256497] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[   17.265017] SMP: stopping secondary CPUs
[   17.269057] Kernel Offset: disabled
[   17.272648] CPU features: 0x0,20002000
[   17.276506] Memory Limit: none
[   17.279650] Rebooting in 1 seconds.. 

Here is image partition table:

    gdisk emmc_openmptcprouter.img 
    Number  Start (sector)    End (sector)  Size       Code  Name
       1            1024            1535   256.0 KiB   8300  tee1
       2            1536            2559   512.0 KiB   8300  lk
       3            2560            3583   512.0 KiB   8300  nvram
       4            3584            4095   256.0 KiB   8300  rf
       5            4096          135167   64.0 MiB    8300  boot

Here is the printenv

MT7622> printenv
arch=arm
atf_filename=trustzone.bin
baudrate=115200
board=mt7622_evb
board_name=mt7622_evb
boot0=download_setting kernel;tftpboot ${loadaddr} ${kernel_filename}; bootm
boot1=download_setting kernel;tftpboot ${loadaddr} ${kernel_filename};run boot_wr_img;run boot_rd_img;bootm
boot10=download_setting flashimage;tftpboot ${loadaddr} ${flashimage_filename};run wr_flashimage;invaild_env
boot11=download_setting gpt;tftpboot ${loadaddr} ${gpt_filename};run wr_gpt
boot2=run boot_rd_img;bootm
boot3=download_setting uboot;tftpboot ${loadaddr} ${uboot_filename};run wr_uboot;invaild_env
boot4=loadb;run wr_uboot;invaild_env
boot5=download_setting atf;tftpboot ${loadaddr} ${atf_filename};run wr_atf
boot6=download_setting preloader;tftpboot ${loadaddr} ${preloader_filename};run wr_pl
boot7=download_setting hdr;tftpboot ${loadaddr} ${hdr_filename};run wr_rom_hdr
boot8=download_setting ctp;tftpboot ${loadaddr} ${ctp_filename};run wr_ctp
boot9=run boot_rd_ctp;boot_to_ctp
boot_rd_ctp=mmc device 0;mmc read ${loadaddr} 0x1000 0xa000
boot_rd_img=mmc device 0;mmc read ${loadaddr} 0x1000 1;image_blks 512;mmc read ${loadaddr} 0x1000 ${img_blks}
boot_wr_img=filesize_check 0x1E00000;if test ${filesize_result} = good; then image_blks 512  ${filesize};mmc device 0;mmc write ${loadaddr} 0x1000 0x18000;fi
bootargs=console=ttyS0,115200n1 rootfstype=squashfs earlyprintk block2mtd.block2mtd=/dev/mmcblk0,65536,eMMC,5 mtdparts=eMMC:768k(mbr)ro,512k(uboot),512k(Config),256k(Factory),64M(Kernel),2048M(usrdata)
bootcmd=No
bootdelay=3
bootfile=iverson_uImage
bootmenu_0=1. System Load Linux to SDRAM via TFTP.=run boot0
bootmenu_1=2. System Load Linux Kernel then write to Flash via TFTP.=run boot1
bootmenu_10=b. System Load flashimage then write to Flash via TFTP.=run boot10
bootmenu_11=c. System Load partition table then write to Flash via TFTP.=run boot11
bootmenu_2=3. Boot system code via Flash.=run boot2
bootmenu_3=4. System Load U-Boot then write to Flash via TFTP.=run boot3
bootmenu_4=5. System Load U-Boot then write to Flash via Serial.=run boot4
bootmenu_5=6. System Load ATF then write to Flash via TFTP.=run boot5
bootmenu_6=7. System Load Preloader then write to Flash via TFTP.=run boot6
bootmenu_7=8. System Load ROM header then write to Flash via TFTP.=run boot7
bootmenu_8=9. System Load CTP then write to Flash via TFTP.=run boot8
bootmenu_9=a. System Load CTP then Boot to CTP (via Flash).=run boot9
bootmenu_delay=30
cpu=armv7
ctp_filename=ctp.bin
ethact=mtk_eth
ethaddr=00:0C:E7:11:22:33
fdt_high=0x6c000000
fileaddr=4007ff28
filesize=2540218
filesize_result=good
flashimage_filename=emmc_openmptcprouter.img
gpt_filename=GPT_EMMC
hdr_filename=hdr.binary
invaild_env=yes
ipaddr=192.168.100.254
kernel_filename=iverson_uImage
loadaddr=0x4007FF28
preloader_filename=preloader_fpga7622_64_ldvt.bin
serverip=192.168.100.2
soc=mt7622
stderr=serial
stdin=serial
stdout=serial
uboot_filename=u-boot-mtk.bin
vendor=mediatek
wr_atf=filesize_check 0x40000;if test ${filesize_result} = good; then mmc device 0;mmc write ${loadaddr} 0x400 0x200;fi
wr_ctp=filesize_check 0x1400000;if test ${filesize_result} = good; then ctp_check;if test ${ctp_result} = good; then mmc device 0;mmc write ${loadaddr} 0x1000 0xa000;reset; fi;fi
wr_flashimage=filesize_check 0x5000000;if test ${filesize_result} = good; then mmc device 0;mmc write ${loadaddr} 0x0 0x12000;fi
wr_gpt=filesize_check 0x4400;if test ${filesize_result} = good; then mmc device 0;mmc write ${loadaddr} 0x0 0x22;fi
wr_pl=filesize_check 0x40000;if test ${filesize_result} = good; then mmc device 0; mmc write ${loadaddr} 0x0 0x200 emmc_preloader;fi
wr_rom_hdr=filesize_check 0xA000;if test ${filesize_result} = good; then mmc device 0;mmc write ${loadaddr} 0x0 0x50;fi
wr_uboot=filesize_check 0x80000;if test ${filesize_result} = good; then mmc device 0;mmc write ${loadaddr} 0x600 0x400;fi

And i found if i reboot the R64 board, the saved wr_flashimage and bootarg env disappear.

your bootargs do not contain a root= option, only rootfstype

You have to add MTD support to your Kernel (make kernel_menuconfig) before make world. OpenWRT uses block devices to work with a flash.

As I understand that u-boot uses config saved in the flash and if you write image as “all-in-one single image” you rewrite u-boot config as well.

“Device Drivers”–>“Memory Technology Device (MTD) support” already selected. Need select “Device Drivers”–>“MMC/SD/SDIO card support”–>“MMC block device driver”?

This is cut of my .config for the Kernel. But I don’t remember if all this is necessary.

CONFIG_MISC_FILESYSTEMS=y
CONFIG_MMC=y
CONFIG_MMC_BLOCK=y
CONFIG_MMC_BLOCK_BOUNCE=y
CONFIG_MMC_BLOCK_MINORS=8
CONFIG_MMC_MTK=y
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_PLTFM=y
CONFIG_MTD=y
CONFIG_MTD_BLKDEVS=y
CONFIG_MTD_BLOCK=y
CONFIG_MTD_BLOCK2MTD=y
CONFIG_MTD_CFI=y
CONFIG_MTD_CFI_AMDSTD=y
CONFIG_MTD_CFI_I1=y
CONFIG_MTD_CFI_I2=y
CONFIG_MTD_CFI_INTELEXT=y
CONFIG_MTD_CFI_NOSWAP=y
CONFIG_MTD_CFI_UTIL=y
CONFIG_MTD_CMDLINE_PARTS=y
CONFIG_MTD_COMPLEX_MAPPINGS=y
CONFIG_MTD_GEN_PROBE=y
CONFIG_MTD_M25P80=y
CONFIG_MTD_MAP_BANK_WIDTH_1=y
CONFIG_MTD_MAP_BANK_WIDTH_2=y
CONFIG_MTD_MAP_BANK_WIDTH_4=y
CONFIG_MTD_MT81xx_NOR=y
CONFIG_MTD_NAND=y
CONFIG_MTD_NAND_CORE=y
CONFIG_MTD_NAND_DENALI_SCRATCH_REG_ADDR=0xff108018
CONFIG_MTD_NAND_ECC=y
CONFIG_MTD_NAND_IDS=y
CONFIG_MTD_NAND_MTK=y
CONFIG_MTD_OF_PARTS=y
CONFIG_MTD_PHYSMAP_OF=y
CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
CONFIG_MTD_ROOTFS_ROOT_DEV=y
CONFIG_MTD_SPI_NAND=y
CONFIG_MTD_SPI_NOR=y
CONFIG_MTD_SPI_NOR_USE_4K_SECTORS_LIMIT=4096
CONFIG_MTD_SPLIT=y
CONFIG_MTD_SPLIT_FIRMWARE=y
CONFIG_MTD_SPLIT_FIRMWARE_NAME="Kernel"
CONFIG_MTD_SPLIT_FIT_FW=y
CONFIG_MTD_SPLIT_SQUASHFS_ROOT=y
CONFIG_MTD_SPLIT_SUPPORT=y
CONFIG_MTD_SPLIT_UIMAGE_FW=y
CONFIG_MTD_UBI=y
CONFIG_MTD_UBI_BEB_LIMIT=20
CONFIG_MTD_UBI_BLOCK=y
CONFIG_MTD_UBI_WL_THRESHOLD=4096
CONFIG_NETWORK_FILESYSTEMS=y
CONFIG_SQUASHFS=y
CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y
CONFIG_SQUASHFS_EMBEDDED=y
CONFIG_SQUASHFS_FILE_DIRECT=y
CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
CONFIG_SQUASHFS_XZ=y
CONFIG_UBIFS_FS=y
CONFIG_UBIFS_FS_FORMAT4=y
CONFIG_UBIFS_FS_LZO=y
CONFIG_UBIFS_FS_ZLIB=y

I have enabled the kernel options you provide, but the build squashfs-sysupgrade.bin and the modified emmc_openmptcprouter.img still have problem, the same error:

[   17.227882] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[   17.235624] Please append a correct "root=" boot option; here are the available partitions:
[   17.244247] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

It maybe not the MTD problem. Could you share your emmc_openmptcprouter.img to me, let me try to load and boot.

Can you post your cmdline (one of the first lines after “booting kernel” for comparing it with the one from @Ivan_Revyakin

Before the vfs-message there are the available partitions listed and maybe an error (something that cannot be used like mtd or similar). So please share full bootlog after uboot