[PATCH v3 00/16] Add board support for Spacemit K1 SoC in SPL
Vincent Legoll
legoll at online.fr
Thu Mar 26 19:35:37 CET 2026
Hello,
I wanted to try this series (applied to upstream u-boot, next branch),
but it failed to boot properly.
Note that I tried to follow instructions from:
Subject: [PATCH] doc: spacemit: add K1 SPL build and test guide
https://lore.kernel.org/u-boot/20260311073741.80616-1-guodong@riscstar.com/
But they looked wrong at times so I tried to guess what was intended.
Can someone see why it failed like that ?
Find the detailed description of what I did below:
## Get the repos
git clone https://github.com/u-boot/u-boot
git clone https://github.com/spacemit-com/spacemit-firmware
git clone https://gitee.com/bianbu-linux/uboot-2022.10 bianbu-uboot-2022.10
## Build u-boot
BUILD_PATH=$(pwd)
UBOOT_UPSTREAM_DIR="${BUILD_PATH}/u-boot"
UBOOT_BIANBU_DIR="${BUILD_PATH}/bianbu-uboot-2022.10"
SPACEMIT_FW_DIR="${BUILD_PATH}/spacemit-firmware"
cd "${UBOOT_UPSTREAM_DIR}"
git checkout -b spacemit-k1 upstream/next
# Grab the series link from:
#
https://patchwork.ozlabs.org/project/uboot/patch/20260325223232.1553212-2-raymondmaoca@gmail.com/
curl https://patchwork.ozlabs.org/series/497518/mbox/ >
Add-board-support-for-Spacemit-K1-SoC-in-SPL.patch
git am < Add-board-support-for-Spacemit-K1-SoC-in-SPL.patch
export CROSS_COMPILE=riscv64-linux-musl-
export ARCH=riscv
export DDR_FW_FILE="${SPACEMIT_FW_DIR}/k1/v0.2/ddr_fw.bin"
make spacemit_k1_defconfig
make -j $(nproc)
# Here the path to fsbl.json was not right
# See:
https://gitee.com/spacemit-buildroot/uboot-2022.10/blob/k1-bl-v2.2.y/board/spacemit/k1-x/configs/fsbl.json
mkdir -p "${UBOOT_BIANBU_DIR}/spl_bin/configs"
sed 's/u-boot-spl\.bin/u-boot-spl-ddr.bin/g' \
< "${UBOOT_BIANBU_DIR}/board/spacemit/k1-x/configs/fsbl.json" \
> "${UBOOT_BIANBU_DIR}/spl_bin/configs/fsbl_ddr.json"
echo "Clean binaries in ${UBOOT_BIANBU_DIR}/spl_bin"
rm -f "${UBOOT_BIANBU_DIR}/spl_bin/u-boot-spl-ddr.bin"
rm -f "${UBOOT_BIANBU_DIR}/spl_bin/u-boot-spl.bin"
cp "${UBOOT_UPSTREAM_DIR}/u-boot-spl-ddr.bin" "${UBOOT_BIANBU_DIR}/spl_bin"
python3 "${UBOOT_BIANBU_DIR}/tools/build_binary_file.py" \
-c "${UBOOT_BIANBU_DIR}/spl_bin/configs/fsbl_ddr.json" \
-o "${UBOOT_BIANBU_DIR}/spl_bin/FSBL.bin"
# This created a FSBL.bin in the specified directory.
## Setup serial console, boot with FDL button pressed, then USB upload:
FSBL="${UBOOT_BIANBU_DIR}/spl_bin/FSBL.bin"
fastboot stage "${FSBL}"
fastboot continue
## Serial console output
sys: 0x1000
bm:2
ROM: usb download handler
usb2d_initialize : enter
Controller Run
usb rst int
SETUP: 0x80 0x6 0x100
usb rst int
SETUP: 0x0 0x5 0x1
SETUP: 0x80 0x6 0x100
SETUP: 0x80 0x6 0x200
SETUP: 0x80 0x6 0x200
SETUP: 0x80 0x6 0x300
SETUP: 0x80 0x6 0x302
SETUP: 0x80 0x6 0x301
SETUP: 0x80 0x6 0x30a
SETUP: 0x0 0x9 0x1
usb_rx_bytes : len= 4096 pBuf= 0xc0838720
SETUP: 0x80 0x6 0x302
SETUP: 0x80 0x6 0x304
fastboot_handle_command: max-download-size
usb_tx_bytes : len= 65 pBuf= 0xc083fe88
usb_rx_bytes : len= 4096 pBuf= 0xc0838720
fastboot_handle_command: 0001e860
Starting download of 125024 bytes
usb_tx_bytes : len= 65 pBuf= 0xc083fe88
usb_rx_bytes : len= 125024 pBuf= 0xc0800000
usb_tx_bytes : len= 65 pBuf= 0xc083fe88
usb_rx_bytes : len= 4096 pBuf= 0xc0838720
fastboot_handle_command: continue
usb_tx_bytes : len= 65 pBuf= 0xc083fe88
j...
<debug_uart>
U-Boot SPL 2026.04-rc4-00543-g2ba03a569e61 (Mar 26 2026 - 16:48:44 +0100)
Fail to detect board:-2
vdd_core, value:900000
vdd_1v8, value:1800000
vdd_1v8_mmc, value:500000
DDR firmware: [0xc08159c0]:0xf0227179, size:0x8d98
DDR is ready
SPL: Unsupported Boot Device!
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###
## More details
[bianbu-uboot-2022.10]$ git log --oneline -1
d61c8c77 (HEAD -> k1-bl-v2.2.y, tag: k1-bl-v2.2.9-release,
origin/k1-bl-v2.2.y, origin/HEAD) Update for v2.2.9
[spacemit-firmware]$ git log --oneline -1
3eca456 (HEAD -> master, origin/master, origin/HEAD) Merge pull request
#1 from docularxu/add-readme
$ ls -la $DDR_FW_FILE
-rw-r--r-- 1 user user 36248 Mar 26 16:38
.../spacemit-firmware/k1/v0.2/ddr_fw.bin
$ sha256sum $DDR_FW_FILE
4ca729dae39580fe6d52ff6a1ead95fd18cd6394c942cc4a323882ccf2840148
.../spacemit-firmware/k1/v0.2/ddr_fw.bin
[u-boot]$ git remote -v | grep upstream
upstream https://source.denx.de/u-boot/u-boot.git (fetch)
upstream https://source.denx.de/u-boot/u-boot.git (push)
$ git log --oneline upstream/next^..HEAD
2ba03a569e6 (HEAD -> spacemit-k1) board: k1: enable pmic in spl
d4b07728ec7 power: regulator: add support for Spacemit P1 SoC
698e1dac98b power: pmic: add support for Spacemit P1 PMIC
76b9c476576 spacemit: k1: Add DDR firmware support to SPL
d8bc52c01f2 spacemit: k1: add TLV EEPROM support in SPL
06ac4c0cc55 i2c: k1: add I2C driver support
29c9f971bbe configs: k1: add default option for clock driver in SPL
66fd60bea6e board: k1: initialize clock and serial devices in SPL
1c69ee27980 dts: k1: enable clocks in SPL
fdad5fdcc0d clk: spacemit: Add support for K1 SoC
0e4f554b274 dts: k1: import dts file from upstream folder
a8cd1f828c4 dt-bindings: clock: import k1-syscon from upstream
0dd6c089190 reset: k1: remove TWSI8 reset restriction
a46bdb334d7 configs: k1: enable early timer support
052c15d331a spacemit: k1: enable SPL with debug UART
25905d01c7e spacemit: k1: support multi-board infrastructure
8813d74163e (upstream/next, upstream/WIP/25Mar2026-next, origin/next,
origin/WIP/25Mar2026-next) Merge patch series "test/py: gpio: cleanups
and improvement"
0f101dac8fb test/py: gpio: allow omitting gpio_op_pin
908db6c647c test/py: gpio: removing trailing semicolons
b02b0a0c6cb test/py: gpio: remove unused imports
Thanks
PS: I just (re-)subscribed to the list. I tried to get the email
threading right, hopefully it'll work.
More information about the U-Boot
mailing list