szemzoa / awboot

small linux bootloader for Allwinner T113-S3 and V851s
72 stars 33 forks source link

SPI NAND boot not working with attached kernel and dtb #28

Closed wuzhongjie1997 closed 5 months ago

wuzhongjie1997 commented 10 months ago

I tried to compile & run the bootloader along with the attached kernel zImage and dtb, but was never able to get any logs from the kernel.

Related Hardware

LCTechPi-PC-F133-v1.2 (schematic + info)

Steps to reproduce:

  1. clone repo
  2. make spi-boot.img
  3. boot connected board to FEL mode
  4. xfel spinand write 0 spi-boot.img
  5. xfel spinand write 262144 linux/boot/sun8i-t113-mangopi-dual.dtb
  6. xfel spinand write 524288 linux/boot/zImage

    Output

[I] AWBoot r6160 starting...
[I] SMHC: sdhci0 controller v50310 initialized
[W] SMHC: error 0x100 status 0x0
[W] SMHC: cmd timeout
[W] SMHC: error 0x100 status 0x0
[W] SMHC: cmd timeout
[W] SMHC: error 0x100 status 0x0
[W] SMHC: cmd timeout
[W] SMHC: error 0x100 status 0x0
[W] SMHC: cmd timeout
[W] SMHC: error 0x100 status 0x0
[W] SMHC: cmd timeout
[W] SMHC: error 0x100 status 0x0
[W] SMHC: cmd timeout
[W] SMHC: error 0x100 status 0x0
[W] SMHC: cmd timeout
[W] SMHC: error 0x100 status 0x0
[W] SMHC: cmd timeout
[W] SMHC: error 0x100 status 0x0
[W] SMHC: cmd timeout
[W] SMHC: error 0x100 status 0x0
[W] SMHC: cmd timeout
[W] SMHC: error 0x100 status 0x0
[W] SMHC: cmd timeout
[W] SMHC: error 0x100 status 0x0
[W] SMHC: cmd timeout
[W] SMHC: error 0x100 status 0x0
[W] SMHC: cmd timeout
[W] SMHC: error 0x100 status 0x0
[W] SMHC: cmd timeout
[W] SMHC: error 0x100 status 0x0
[W] SMHC: cmd timeout
[W] SMHC: error 0x100 status 0x0
[W] SMHC: cmd timeout
[W] SMHC: error 0x100 status 0x0
[W] SMHC: cmd timeout
[W] SMHC: error 0x100 status 0x0
[W] SMHC: cmd timeout
[W] SMHC: error 0x100 status 0x0
[W] SMHC: cmd timeout
[W] SMHC: error 0x100 status 0x0
[W] SMHC: cmd timeout
[W] SMHC: error 0x100 status 0x0
[W] SMHC: cmd timeout
[W] SMHC: error 0x100 status 0x0
[W] SMHC: cmd timeout
[W] SMHC: init failed, trying SPI
[I] SPI-NAND: MT29F2G01ABAGD detected
[I] SPI-NAND: read dt blob of size 25265 at 23.00MB/S
[I] SPI-NAND: read Image of size 5539584 at 24.00MB/S
[I] booting linux...

... Nothing comes out from the serial pins after 'booting linux...', as confirmed by watching pins B4-B7 using logic analyzer

Questions

  1. From what I learned, not getting any kernel console output on the serial port means either 1) the serial port is not properly configured & used in the dts/dtb or 2) the kernel did not load at all. Could you suggest some first steps I should try? All I want is the kernel to print serial logs so I can make sure the kernel is up and running.
  2. Is the attached dtb and zImage only valid for MangoPi and not for my board? The schematics don't present a significant difference.
  3. I noticed the bootlog and tried git checkout f7c248c, following the readme.md in that commit didn't work either: if I flash the awboot-boot.bin, it complains about not finding an SD card (there is none, I'm using SPI nand); if i flash the awboot-boot-spi.bin, same result as above: nothing appears after the 'booting linux'. If possible, could you explain a little about the setup with which you obtained the bootlog?

Any help much appreciated!

szemzoa commented 10 months ago

with the last commit, I was able to boot from spi-nand, rootfs on mmc:

[I] AWBoot r6165 starting... [D] DRAM BOOT DRIVE INFO: V0.24 [D] DRAM CLK = 792 MHz [D] DRAM Type = 3 (2:DDR2,3:DDR3) [D] DRAMC read ODT off [D] ZQ value = 0x2f [D] DDR efuse: 0xa [D] chip id efuse: 0x6000 [D] single rank and full DQ [D] DDR efuse: 0xa [D] chip id efuse: 0x6000 [D] rank 0 row = 13 [D] para->dram_para1 = 0x10d2 [D] rank 0 bank = 8 [D] para->dram_para1 = 0x10d2 [D] rank 0 page size = 2 KB [D] para->dram_para1 = 0x10d2 [D] DRAM ODT value: 0x42 [D] DDR efuse: 0xa [D] chip id efuse: 0x6000 [D] DRAM: size = 128MB [D] DRAM: simple test OK [D] DMA: init [D] DMA: test OK in 24ms [D] SPI: init [D] SPI: set clock asked=100MHz actual=100MHz mclk=200MHz [D] SPI-NAND: enable Gigadevice Quad mode [I] SPI-NAND: GD5F2GQ5UExxG detected [D] SPI-NAND: dt blob: Copy from 0x00040000 to 0x44000000 size:0x00006132 [I] SPI-NAND: read dt blob of size 24882 at 20.00MB/S [D] SPI-NAND: Image: Copy from 0x00080000 to 0x44800000 size:0x004b9118 [I] SPI-NAND: read Image of size 4952344 at 21.00MB/S [I] booting linux... [ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Linux version 6.5.0 (root@devel) (arm-linux-gnueabihf-gcc (Linaro GCC 6.4-2017.11) 6.4.1 20171012, GNU ld (Linaro_Binutils-2017.11) 2.27.0.20161229) #17 SMP Mon Sep 4 11:31:05 CEST 2023 [ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d [ 0.000000] CPU: div instructions available: patching division code [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache [ 0.000000] OF: fdt: Machine model: MangoPi MQ-Dual [ 0.000000] Memory policy: Data cache writealloc [ 0.000000] OF: reserved mem: 0x42000000..0x420fffff (1024 KiB) nomap non-reusable dsp0@42000000 [ 0.000000] cma: Reserved 8 MiB at 0x47800000 [ 0.000000] Zone ranges: [ 0.000000] Normal [mem 0x0000000040000000-0x0000000047ffffff] [ 0.000000] Movable zone start for each node [ 0.000000] Early memory node ranges [ 0.000000] node 0: [mem 0x0000000040000000-0x0000000041ffffff] [ 0.000000] node 0: [mem 0x0000000042000000-0x00000000420fffff] [ 0.000000] node 0: [mem 0x0000000042100000-0x0000000047ffffff] [ 0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x0000000047ffffff] [ 0.000000] percpu: Embedded 11 pages/cpu s13652 r8192 d23212 u45056 [ 0.000000] Kernel command line: mem=128M cma=4M init=/sbin/init console=ttyS5,115200 root=/dev/mmcblk0p2 rw rootwait ...

szemzoa commented 10 months ago

try with the new binaries

wuzhongjie1997 commented 10 months ago

Hi, thanks for the reply. Tried again with no dice:

(connected board + LA & switched to FEL mode)

hl@hl-3440sff:~/shm$ rm -rf awboot/
hl@hl-3440sff:~/shm$ gitpr clone https://github.com/szemzoa/awboot
Cloning into 'awboot'...
remote: Enumerating objects: 876, done.
remote: Counting objects: 100% (871/871), done.
remote: Compressing objects: 100% (304/304), done.
remote: Total 876 (delta 575), reused 819 (delta 542), pack-reused 5
Receiving objects: 100% (876/876), 17.35 MiB | 17.83 MiB/s, done.
Resolving deltas: 100% (575/575), done.
hl@hl-3440sff:~/shm$ alias gitpr
alias gitpr='git -c "http.proxy=192.168.10.182:9443"'
hl@hl-3440sff:~/shm$ make clean
make: *** No rule to make target 'clean'.  Stop.
hl@hl-3440sff:~/shm$ cd awboot/
hl@hl-3440sff:~/shm/awboot$ make clean
make[1]: Entering directory '/home/hl/shm/awboot/tools'
rm -rf build
rm -f mksunxi
make[1]: Leaving directory '/home/hl/shm/awboot/tools'
hl@hl-3440sff:~/shm/awboot$ make LOG_LEVEL=40 -j spi-boot.img
  CC    arch/arm32/mach-t113s3/start.S
  CC    arch/arm32/mach-t113s3/memcpy.S
  CC    main.c
  CC    board.c
  CC    lib/debug.c
  CC    lib/xformat.c
  CC    lib/fdt.c
  CC    lib/string.c
  CC    arch/arm32/mach-t113s3/dram.c
  CC    arch/arm32/mach-t113s3/sunxi_usart.c
  CC    arch/arm32/mach-t113s3/arch_timer.c
  CC    arch/arm32/mach-t113s3/sunxi_spi.c
  CC    arch/arm32/mach-t113s3/sunxi_dma.c
  CC    arch/arm32/mach-t113s3/sunxi_gpio.c
  CC    arch/arm32/mach-t113s3/sdmmc.c
  CC    arch/arm32/mach-t113s3/sunxi_sdhci.c
  CC    arch/arm32/mach-t113s3/sunxi_clk.c
  CC    arch/arm32/mach-t113s3/exception.c
  CC    lib/fatfs/ff.c
  CC    lib/fatfs/diskio.c
  CC    lib/fatfs/ffsystem.c
  CC    lib/fatfs/ffunicode.c
arch/arm32/mach-t113s3/sunxi_sdhci.c: In function 'sdhci_set_width':
arch/arm32/mach-t113s3/sunxi_sdhci.c:583:14: warning: variable 'mode' set but not used [-Wunused-but-set-variable]
  583 |  const char *mode = "1 bit";
      |              ^~~~
make[1]: Entering directory '/home/hl/shm/awboot/tools'
mkdir -p /home/hl/shm/awboot/tools/build
echo "  CC    mksunxi.c"
  CC    mksunxi.c
cc -O2 -std=gnu99 -I includes -I ../lib -c mksunxi.c -o /home/hl/shm/awboot/tools/build/mksunxi.o
lib/fatfs/ff.c:909:13: warning: 'put_utf' defined but not used [-Wunused-function]
  909 | static UINT put_utf(/* Returns number of encoding units written (0:buffer overflow or wrong encoding) */
      |             ^~~~~~~
lib/fatfs/ff.c:799:12: warning: 'dbc_2nd' defined but not used [-Wunused-function]
  799 | static int dbc_2nd(BYTE c)
      |            ^~~~~~~
lib/fatfs/ff.c:775:12: warning: 'dbc_1st' defined but not used [-Wunused-function]
  775 | static int dbc_1st(BYTE c)
      |            ^~~~~~~
cc -O2 -std=gnu99 -I includes -I ../lib /home/hl/shm/awboot/tools/build/mksunxi.o -o mksunxi
make[1]: Leaving directory '/home/hl/shm/awboot/tools'
  LD    awboot-boot.elf
  LD    awboot-fel.elf
OBJCOPY awboot-boot.bin
OBJCOPY awboot-fel.bin
   text    data     bss     dec     hex filename
  37476     781    7488   45745    b2b1 awboot-boot.elf
   text    data     bss     dec     hex filename
  37476     781    7488   45745    b2b1 awboot-fel.elf
padding: 8192
len: 38264
The bootloader head has been fixed, spl size is 40960 bytes.
padding: 8192
len: 38264
The bootloader head has been fixed, spl size is 40960 bytes.
padding: 512
len: 38264
The bootloader head has been fixed, spl size is 38400 bytes.
20+0 records in
20+0 records out
40960 bytes (41 kB, 40 KiB) copied, 5.5885e-05 s, 733 MB/s
20+0 records in
20+0 records out
40960 bytes (41 kB, 40 KiB) copied, 5.1241e-05 s, 799 MB/s
20+0 records in
20+0 records out
40960 bytes (41 kB, 40 KiB) copied, 5.0047e-05 s, 818 MB/s
hl@hl-3440sff:~/shm/awboot$ xfel spinand write 0 spi-boot.img
100% [================================================] 168.000 KB, 573.455 KB/s        
hl@hl-3440sff:~/shm/awboot$ xfel spinand write 262144 linux/boot/sun8i-t113-mangopi-dual.dtb 
100% [================================================] 24.299 KB, 741.315 KB/s         
hl@hl-3440sff:~/shm/awboot$ xfel spinand write 524288 linux/boot/zImage 
100% [================================================] 4.723 MB, 543.737 KB/s         
hl@hl-3440sff:~/shm/awboot$ 

(pressed RESET) output from UART decoder in LA:

[I] AWBoot r6160 starting...
[D] DRAM BOOT DRIVE INFO: V0.24
[D] DRAM CLK = 792 MHz
[D] DRAM Type = 3 (2:DDR2,3:DDR3)
[D] DRAMC read ODT off
[D] ZQ value = 0x32
[D] DDR efuse: 0xa
[D] chip id efuse: 0x6000
[D] single rank and full DQ
[D] DDR efuse: 0xa
[D] chip id efuse: 0x6000
[D] rank 0 row = 13 
[D] para->dram_para1 = 0x10d2
[D] rank 0 bank = 8 
[D] para->dram_para1 = 0x10d2
[D] rank 0 page size = 2 KB 
[D] para->dram_para1 = 0x10d2
[D] DRAM ODT value: 0x42
[D] DDR efuse: 0xa
[D] chip id efuse: 0x6000
[D] DRAM: size = 128MB
[D] DRAM: simple test OK
[I] SMHC: sdhci0 controller v50310 initialized
[W] SMHC: error 0x100 status 0x0
[W] SMHC: cmd timeout
[W] SMHC: error 0x100 status 0x0
[W] SMHC: cmd timeout
[D] SMHC: SD/MMC detect failed
[W] SMHC: error 0x100 status 0x0
[W] SMHC: cmd timeout
[W] SMHC: error 0x100 status 0x0
[W] SMHC: cmd timeout
[D] SMHC: SD/MMC detect failed
[W] SMHC: error 0x100 status 0x0
[W] SMHC: cmd timeout
[W] SMHC: error 0x100 status 0x0
[W] SMHC: cmd timeout
[D] SMHC: SD/MMC detect failed
[W] SMHC: error 0x100 status 0x0
[W] SMHC: cmd timeout
[W] SMHC: error 0x100 status 0x0
[W] SMHC: cmd timeout
[D] SMHC: SD/MMC detect failed
[W] SMHC: error 0x100 status 0x0
[W] SMHC: cmd timeout
[W] SMHC: error 0x100 status 0x0
[W] SMHC: cmd timeout
[D] SMHC: SD/MMC detect failed
[W] SMHC: error 0x100 status 0x0
[W] SMHC: cmd timeout
[W] SMHC: error 0x100 status 0x0
[W] SMHC: cmd timeout
[D] SMHC: SD/MMC detect failed
[W] SMHC: error 0x100 status 0x0
[W] SMHC: cmd timeout
[W] SMHC: error 0x100 status 0x0
[W] SMHC: cmd timeout
[D] SMHC: SD/MMC detect failed
[W] SMHC: error 0x100 status 0x0
[W] SMHC: cmd timeout
[W] SMHC: error 0x100 status 0x0
[W] SMHC: cmd timeout
[D] SMHC: SD/MMC detect failed
[W] SMHC: error 0x100 status 0x0
[W] SMHC: cmd timeout
[W] SMHC: error 0x100 status 0x0
[W] SMHC: cmd timeout
[D] SMHC: SD/MMC detect failed
[W] SMHC: error 0x100 status 0x0
[W] SMHC: cmd timeout
[W] SMHC: error 0x100 status 0x0
[W] SMHC: cmd timeout
[D] SMHC: SD/MMC detect failed
[W] SMHC: error 0x100 status 0x0
[W] SMHC: cmd timeout
[W] SMHC: error 0x100 status 0x0
[W] SMHC: cmd timeout
[D] SMHC: SD/MMC detect failed
[W] SMHC: init failed, trying SPI
[D] DMA: init
[D] DMA: test OK in 21ms
[D] SPI: init
[D] SPI: set clock asked=100MHz actual=100MHz mclk=200MHz
[I] SPI-NAND: MT29F2G01ABAGD detected
[D] SPI-NAND: dt blob: Copy from 0x00040000 to 0x44000000 size:0x00006132
[I] SPI-NAND: read dt blob of size 24882 at 23.00MB/S
[D] SPI-NAND: Image: Copy from 0x00080000 to 0x44800000 size:0x004b9118
[I] SPI-NAND: read Image of size 4952344 at 24.00MB/S
[I] booting linux...

Not sure if not removing SD and MMC support had anything to do here... If you spot something I've been doing wrong, please kindly tell me. If otherwise, the problem is probably with my hardware; i'll get a MangoPi to test everything again just in case.

Thanks again!

wuzhongjie1997 commented 10 months ago

As a quick test before my MangoPi arrives, would you recommend me to replace the Micron flash to a Gigadevice one, like the one you are using?

dave4445 commented 8 months ago

I had issues with my micron nand flash:

cheofusi commented 5 months ago

Hi,

If anyone is experiencing the same problems as @wuzhongjie1997, It's probably because the upstream device tree is incomplete, as it lacks appropriate memory & chosen nodes that are usually filled in by U-Boot.

With the following device nodes,

...

chosen {
    bootargs = "earlycon rootwait root=/dev/mmcblk0p2 ro rootfstype=ext4 init=/sbin/init";
    stdout-path = "serial3:115200n8";
};

memory {
    device_type = "memory";
    reg = <0x40000000 0x8000000>;
};

...

I successfully reach a getty prompt on the T113-s3 using mainline v6.6.20

[I] AWBoot r6206 starting...
[I] SMHC: sdhci0 controller v50310 initialized
[I] SHMC: SD card detected
[I] FATFS: cache: 67108864 bytes in 2048 chunks
[I] FATFS: read sun8i-t113s-mangopi-mq-r-t113.dtb addr=44000000
[I] FATFS: read zImage addr=44800000
[I] booting linux...
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 6.6.20-dirty (brandon@himore221) (arm-buildroot-linux-gnueabihf-gcc.br_real (Buildroot 2023.11.2) 12.3.0, GNU ld (GNU Binutils) 2.40) #3 SMP Tue Mar  5 11:20:08 WAT 2024
[    0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: MangoPi MQ-R-T113
[    0.000000] earlycon: uart0 at MMIO32 0x02500c00 (options '115200n8')
[    0.000000] printk: bootconsole [uart0] enabled
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] cma: Reserved 16 MiB at 0x47000000 on node -1
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000040000000-0x0000000047ffffff]
[    0.000000]   HighMem  empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000040000000-0x0000000047ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x0000000047ffffff]
[    0.000000] percpu: Embedded 12 pages/cpu s17108 r8192 d23852 u49152
[    0.000000] Kernel command line: earlycon rootwait root=/dev/mmcblk0p2 ro rootfstype=ext4 init=/sbin/init
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32512
[    0.000000] mem auto-init: stack:all(zero), heap alloc:off, heap free:off
[    0.000000] Memory: 99872K/131072K available (8192K kernel code, 901K rwdata, 2256K rodata, 1024K init, 258K bss, 14816K reserved, 16384K cma-reserved, 0K highmem)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=2.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[    0.000000] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (virt).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.000001] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.008397] Switching to timer-based delay loop, resolution 41ns
[    0.014953] Console: colour dummy device 80x30
[    0.019636] printk: console [tty0] enabled
[    0.023935] printk: bootconsole [uart0] disabled
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 6.6.20-dirty (brandon@himore221) (arm-buildroot-linux-gnueabihf-gcc.br_real (Buildroot 2023.11.2) 12.3.0, GNU ld (GNU Binutils) 2.40) #3 SMP Tue Mar  5 11:20:08 WAT 2024
[    0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: MangoPi MQ-R-T113
[    0.000000] earlycon: uart0 at MMIO32 0x02500c00 (options '115200n8')
[    0.000000] printk: bootconsole [uart0] enabled
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] cma: Reserved 16 MiB at 0x47000000 on node -1
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000040000000-0x0000000047ffffff]
[    0.000000]   HighMem  empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000040000000-0x0000000047ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x0000000047ffffff]
[    0.000000] percpu: Embedded 12 pages/cpu s17108 r8192 d23852 u49152
[    0.000000] Kernel command line: earlycon rootwait root=/dev/mmcblk0p2 ro rootfstype=ext4 init=/sbin/init
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32512
[    0.000000] mem auto-init: stack:all(zero), heap alloc:off, heap free:off
[    0.000000] Memory: 99872K/131072K available (8192K kernel code, 901K rwdata, 2256K rodata, 1024K init, 258K bss, 14816K reserved, 16384K cma-reserved, 0K highmem)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=2.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 100jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[    0.000000] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (virt).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.000001] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.008397] Switching to timer-based delay loop, resolution 41ns
[    0.014953] Console: colour dummy device 80x30
[    0.019636] printk: console [tty0] enabled
[    0.023935] printk: bootconsole [uart0] disabled
[    0.028831] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[    0.028860] CPU: Testing write buffer coherency: ok
[    0.028915] pid_max: default: 32768 minimum: 301
[    0.029064] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.029093] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.029857] /cpus/cpu@0 missing clock-frequency property
[    0.029910] /cpus/cpu@1 missing clock-frequency property
[    0.029928] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.030958] Setting up static identity map for 0x40100000 - 0x40100060
[    0.031177] rcu: Hierarchical SRCU implementation.
[    0.031198] rcu:     Max phase no-delay instances is 1000.
[    0.031755] smp: Bringing up secondary CPUs ...
[    0.032340] smp: Brought up 1 node, 1 CPU
[    0.032371] SMP: Total of 1 processors activated (48.00 BogoMIPS).
[    0.032386] CPU: All CPU(s) started in SVC mode.
[    0.032919] devtmpfs: initialized
[    0.036445] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    0.036687] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.036725] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
[    0.037319] pinctrl core: initialized pinctrl subsystem
[    0.039012] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.039927] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.040832] thermal_sys: Registered thermal governor 'step_wise'
[    0.040988] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.041035] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.044075] platform 2001000.clock-controller: Fixed dependency cycle(s) with /soc/rtc@7090000
[    0.047529] platform 7010000.clock-controller: Fixed dependency cycle(s) with /soc/clock-controller@2001000
[    0.047637] platform 7010000.clock-controller: Fixed dependency cycle(s) with /soc/rtc@7090000
[    0.047761] platform 7010000.clock-controller: Fixed dependency cycle(s) with /soc/rtc@7090000
[    0.047900] platform 2001000.clock-controller: Fixed dependency cycle(s) with /soc/rtc@7090000
[    0.048034] platform 7090000.rtc: Fixed dependency cycle(s) with /soc/clock-controller@7010000
[    0.051488] SCSI subsystem initialized
[    0.053161] usbcore: registered new interface driver usbfs
[    0.053219] usbcore: registered new interface driver hub
[    0.053276] usbcore: registered new device driver usb
[    0.053490] mc: Linux media interface: v0.10
[    0.053584] videodev: Linux video capture interface: v2.00
[    0.053674] pps_core: LinuxPPS API ver. 1 registered
[    0.053691] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.053721] PTP clock support registered
[    0.054202] Advanced Linux Sound Architecture Driver Initialized.
[    0.055243] clocksource: Switched to clocksource arch_sys_counter
[    0.063621] NET: Registered PF_INET protocol family
[    0.063852] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.064420] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.064472] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.064499] TCP mstablished hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.064532] TCP bind hash table entries: 1024 (order: 2, 16384 bytes, linear)
[    0.064578] TCP: Hash tables configured (established 1024 bind 1024)
[    0.064677] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.064726] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.064898] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.065693] RPC: Registered named UNIX socket transport module.
[    0.065735] RPC: Registered udp transport module.
[    0.065749] RPC: Registered tcp transport module.
[    0.065761] RPC: Registered tcp-with-tls transport module.
[    0.065774] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.066631] hw perfevents: enabled with armv7_cortex_a7 PMU driver, 5 counters available
[    0.067781] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    0.068489] NFS: Registering the id_resolver key type
[    0.068560] Key type id_resolver registered
[    0.068576] Key type id_legacy registered
[    0.068699] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[    0.068725] io scheduler mq-deadline registered
[    0.068741] io scheduler kyber registered
[    0.068770] io scheduler bfq registered
[    0.080957] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.089770] CAN device driver interface
[    0.092690] sun6i-rtc 7090000.rtc: registered as rtc0
[    0.092839] sun6i-rtc 7090000.rtc: setting system clock to 1970-01-02T00:00:01 UTC (86401)
[    0.093169] i2c_dev: i2c /dev entries driver
[    0.095195] sun8i-ce 3040000.crypto: Set mod clock to 300000000 (300 Mhz) from 400000000 (400 Mhz)
[    0.095828] sun8i-ce 3040000.crypto: will run requests pump with realtime priority
[    0.096185] sun8i-ce 3040000.crypto: will run requests pump with realtime priority
[    0.096406] sun8i-ce 3040000.crypto: will run requests pump with realtime priority
[    0.096609] sun8i-ce 3040000.crypto: will run requests pump with realtime priority
[    0.096779] sun8i-ce 3040000.crypto: Register cbc(aes)
[    0.096810] sun8i-ce 3040000.crypto: Register ecb(aes)
[    0.096828] sun8i-ce 3040000.crypto: Register cbc(des3_ede)
[    0.096946] sun8i-ce 3040000.crypto: Register ecb(des3_ede)
[    0.096883] sun8i-ce 3040000.crypto: CryptoEngine Die ID 0
[    0.097735] usbcore: registered new interface driver usbhid
[    0.097768] usbhid: USB HID core driver
[    0.100059] NET: Registered PF_PACKET protocol family
[    0.100101] can: controller area network core
[    0.100169] NET: Registered PF_CAN protocol family
[    0.100188] can: raw protocol
[    0.100203] can: broadcast manager protocol
[    0.100221] can: netlink gateway - max_hops=1
[    0.100404] Key type dns_resolver registered
[    0.100594] Registering SWP/SWPB emulation handler
[    0.122365] gpio gpiochip0: Static allocation of GPIO base is deprecated, use dynamic allocation.
[    0.129132] sun20i-d1-pinctrl 2000000.pinctrl: initialized sunXi PIO driver
[    0.151031] 2500c00.serial: ttyS3 at MMIO 0x2500c00 (irq = 233, base_baud = 1500000) is a 16550A
[    0.151128] printk: console [ttyS3] enabled
[    0.984725] usb_phy_generic usb_phy_generic.1.auto: dummy supplies not allowed for exclusive requests
[    0.998839] ehci-platform 4200000.usb: EHCI Host Controller
[    1.004472] ehci-platform 4200000.usb: new USB bus registered, assigned bus number 1
[    1.013332] ohci-platform 4200400.usb: Generic Platform OHCI controller
[    1.020068] ohci-platform 4200400.usb: new USB bus registered, assigned bus number 2
[    1.029433] ehci-platform 4200000.usb: irq 235, io mem 0x04200000
[    1.037403] sunxi-mmc 4020000.mmc: Got CD GPIO
[    1.042290] ohci-platform 4200400.usb: irq 236, io mem 0x04200400
[    1.048721] sunxi-mmc 4021000.mmc: allocated mmc-pwrseq
[    1.054512] clk: Disabling unused clocks
[    1.058718] ALSA device list:
[    1.061699]   No soundcards found.
[    1.065434] ehci-platform 4200000.usb: USB 2.0 started, EHCI 1.00
[    1.072614] hub 1-0:1.0: USB hub found
[    1.076570] sunxi-mmc 4021000.mmc: initialized, max. request size: 2048 KB, uses new timings mode
[    1.085884] sunxi-mmc 4020000.mmc: initialized, max. request size: 2048 KB, uses new timings mode
[    1.094922] hub 1-0:1.0: 1 port detected
[    1.105882] sunxi-mmc 4021000.mmc: card claims to support voltages below defined range
[    1.120009] hub 2-0:1.0: USB hub found
[    1.123850] hub 2-0:1.0: 1 port detected
[    1.129133] Waiting for root device /dev/mmcblk0p2...
[    1.149355] mmc1: new high speed SDIO card at address 0001
[    1.172324] mmc0: new high speed SDHC card at address 0001
[    1.178709] mmcblk0: mmc0:0001 SD 7.38 GiB
[    1.185628]  mmcblk0: p1 p2 p3
[    1.220374] EXT4-fs (mmcblk0p2): INFO: recovery required on readonly filesystem
[    1.227779] EXT4-fs (mmcblk0p2): write access will be enabled during recovery
[    1.282791] EXT4-fs (mmcblk0p2): recovery complete
[    1.301365] EXT4-fs (mmcblk0p2): mounted filesystem 5177420e-fa06-4763-888a-88afae70d4e8 ro with ordered data mode. Quota mode: disabled.
[    1.313829] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
[    1.330353] devtmpfs: mounted
[    1.334489] Freeing unused kernel image (ynitmem) memory: 1024K
[    1.340617] Run /sbin/init as init process
[    1.594697] EXT4-fs (mmcblk0p2): re-mounted 5177420e-fa06-4763-888a-88afae70d4e8 r/w. Quota mode: disabled.
Seeding 256 bits without crediting
Saving 256 bits of non-creditable seed for next boot
Starting syslogd: OK
Starting klogd: OK
Running sysctl: OK
Starting network: OK

Welcome to HiMOS
buildroot login: 

Great work @szemzoa.

cheofusi commented 5 months ago

Also for those considering U-Boot, support for the T113-s3 is now upstreamed as of U-Boot v2024.01

wuzhongjie1997 commented 5 months ago

Closing as not problem of this project, thanks & great work @szemzoa