⋊> hack@morise ⋊> ~/k/u-boot on k1-dave-mmc ↑ git log --oneline origin/next..HEAD                                                                                              21:36:15
6b4af8b1dd8 (HEAD -> k1-dave-mmc) mmc: k1: do not release the shared AXI clock and reset on probe failure
4114764d716 mmc: k1: let the SPL read SD cards more than one block at a time
6676ce89521 mmc: k1: handle a missing max-frequency and clk_set_rate()'s return value
6427189ef33 spacemit: k1: fall back to the other boot devices in SPL
b58a31797d7 spacemit: k1: do not require a PMIC or an SPI controller in SPL
⋊> hack@morise ⋊> ~/k/u-boot on k1-dave-mmc ↑ export CROSS_COMPILE=riscv64-linux-gnu- ARCH=riscv                                                                               21:36:28
                                              export DDR=/home/hack/k1/spacemit-firmware/k1/v0.2/ddr_fw.bin
                                              export SBI=/home/hack/k1/opensbi/build/platform/generic/firmware/fw_dynamic.bin
⋊> hack@morise ⋊> ~/k/u-boot on k1-dave-mmc ↑ make O=build-fix spacemit_k1_defconfig                                                                                           21:36:41
                                              make O=build-fix DDR_FW_FILE=$DDR OPENSBI=$SBI DEVICE_TREE=spacemit/k1-bananapi-f3 -j"$(nproc)"
  GEN     Makefile
#
# configuration written to .config
#
  GEN     Makefile
scripts/kconfig/conf  --syncconfig Kconfig
  CFG     u-boot.cfg
  GEN     include/autoconf.mk.dep
  CFG     spl/u-boot.cfg
  GEN     include/autoconf.mk
  GEN     spl/include/autoconf.mk
  GEN     Makefile
  UPD     include/generated/timestamp_autogenerated.h
  ENVC    include/generated/env.txt
  Using .. as source for U-Boot
  ENVP    include/generated/env.in
  ENVT    include/generated/environment.h
  PYMOD   rebuild
  LDS     u-boot.lds
  CC      common/version.o
  AR      common/built-in.a
  CC      env/common.o
  AR      env/built-in.a
  LD      u-boot
  OBJCOPY u-boot.srec
  OBJCOPY u-boot-nodtb.bin
  SYM     u-boot.sym
  MKIMAGE fit-dtb.blob
  MKIMAGE u-boot.img
  CC      spl/common/spl/spl.o
  MKIMAGE u-boot-dtb.img
  CAT     u-boot-fit-dtb.bin
  COPY    u-boot.bin
  AR      spl/common/spl/built-in.a
  LD      spl/u-boot-spl
  OBJCOPY spl/u-boot-spl-nodtb.bin
  SYM     spl/u-boot-spl.sym
  CAT     spl/u-boot-spl-dtb.bin
  COPY    spl/u-boot-spl.bin
  BINMAN  .binman_stamp
  OFCHK   .config
⋊> hack@morise ⋊> ~/k/u-boot on k1-dave-mmc ↑ cd ~/k1/uboot-2022.10/                                                                                                           21:36:50
⋊> hack@morise ⋊> ~/k/uboot-2022.10 on k1-bl-v2.2.y ◦ cat mainline-fsbl.sh                                                                                                     21:36:59
SPL=$1
FSBL=$2
cd /home/hack/k1/uboot-2022.10
cp "$SPL" board/spacemit/k1-x/
python3 tools/build_binary_file.py \
    -c board/spacemit/k1-x/configs/fsbl_ddr.json \
    -o "$FSBL"
rm -f board/spacemit/k1-x/u-boot-spl-ddr.bin
echo "Mainline SPL is included in $FSBL"
⋊> hack@morise ⋊> ~/k/uboot-2022.10 on k1-bl-v2.2.y ◦ bash mainline-fsbl.sh /home/hack/k1/u-boot/build-fix/u-boot-spl-ddr.bin /home/hack/k1/uboot-2022.10/mainline-spl/FSBL-dave.bin
(2026-10-09 21:37:10,279) arch : RISCV64
(2026-10-09 21:37:10,279) description : spacemit k1x fsbl image
writing RSA key
writing RSA key
Mainline SPL is included in /home/hack/k1/uboot-2022.10/mainline-spl/FSBL-dave.bin
⋊> hack@morise ⋊> ~/k/uboot-2022.10 on k1-bl-v2.2.y ◦ lsblk /dev/mmcblk0                                                                                                       21:37:10
NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
mmcblk0     179:0    0 29.7G  0 disk 
├─mmcblk0p1 179:1    0  256K  0 part 
├─mmcblk0p2 179:2    0   64K  0 part 
├─mmcblk0p3 179:3    0    1M  0 part 
├─mmcblk0p4 179:4    0    2M  0 part 
├─mmcblk0p5 179:5    0  256M  0 part 
└─mmcblk0p6 179:6    0 29.5G  0 part 
⋊> hack@morise ⋊> ~/k/uboot-2022.10 on k1-bl-v2.2.y ◦ sudo dd if=/home/hack/k1/flash-dir/factory/bootinfo_sd.bin of=/dev/mmcblk0 bs=512 seek=0 count=1 conv=notrunc status=progress
[sudo] password for hack: 
0+1 records in
0+1 records out
80 bytes copied, 0.685238 s, 0.1 kB/s
⋊> hack@morise ⋊> ~/k/uboot-2022.10 on k1-bl-v2.2.y ◦ sudo dd if=/home/hack/k1/uboot-2022.10/mainline-spl/FSBL-dave.bin of=/dev/mmcblk0 bs=512 seek=256 conv=notrunc status=progress
304+1 records in
304+1 records out
156128 bytes (156 kB, 152 KiB) copied, 0.72263 s, 216 kB/s
⋊> hack@morise ⋊> ~/k/uboot-2022.10 on k1-bl-v2.2.y ◦ sudo dd if=/home/hack/k1/u-boot/build-fix/u-boot.itb of=/dev/mmcblk0 bs=512 seek=4096 conv=notrunc status=progress       21:38:30
1953+1 records in
1953+1 records out
1000145 bytes (1.0 MB, 977 KiB) copied, 0.818001 s, 1.2 MB/s
⋊> hack@morise ⋊> ~/k/uboot-2022.10 on k1-bl-v2.2.y ◦ sync                                                                                                                     21:38:37
⋊> hack@morise ⋊> ~/k/uboot-2022.10 on k1-bl-v2.2.y ◦ picocom -b 115200 /dev/ttyUSB1                                                                                           21:38:46
picocom v3.1

port is        : /dev/ttyUSB1
flowcontrol    : none
baudrate is    : 115200
parity is      : none
databits are   : 8
stopbits are   : 1
escape is      : C-a
local echo is  : no
noinit is      : no
noreset is     : no
hangup is      : no
nolock is      : no
send_cmd is    : sz -vv
receive_cmd is : rz -vv -E
imap is        : 
omap is        : 
emap is        : crcrlf,delbs,
logfile is     : none
initstring     : none
exit_after is  : not set
exit is        : no

Type [C-a] [C-h] to see available commands
Terminal ready
sys: 0x0
try sd...
bm:3
j...

<debug_uart>

U-Boot SPL 2026.10-rc5-00639-g6b4af8b1dd89 (Oct 09 2026 - 21:36:48 +0800)
Fail to detect board:-2
vdd_core, value:900000
vdd_1v8, value:1800000
vdd_1v8_mmc, value:1800000
DDR firmware: [0xc081d340]:0xf0227179, size:0x8d98
DDR is ready
No SPI controller (-19)
Trying to boot from MMC2
spl: partition error
Error: -38
SPL: Unsupported Boot Device!
Trying to boot from MMC1
alloc space exhausted ptr 104380 limit 100000
Aligned buffer alloc failed
spl: could not find mmc device 0. error: -19
Error: -19
SPL: Unsupported Boot Device!
Trying to boot from SPI
Invalid bus 0 (err=-19)
SPI probe failed.
Error: -19
SPL: Unsupported Boot Device!
SPL: Unsupported Boot Device!
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###
