On Tue, Jul 28, 2026 at 08:53:02AM +0800, Eric Chung wrote: > On Tue, Jul 28, 2026 at 1:26 AM Yao Zi <[email protected]> wrote: > > > > On Mon, Jul 27, 2026 at 02:59:11PM +0800, Eric Chung wrote: > > > Add document on how to flash images into eMMC of K1 SoC based boards. > > > > > > Signed-off-by: Eric Chung <[email protected]> > > > > > > --- > > > v3: > > > - Add document on how to flash images into SD card. > > > --- > > > board/spacemit/k1/MAINTAINERS | 2 +- > > > doc/board/spacemit/index.rst | 1 + > > > doc/board/spacemit/k1-mmc.rst | 320 > > > ++++++++++++++++++++++++++++++++++++++++++ > > > 3 files changed, 322 insertions(+), 1 deletion(-) > > > > ... > > > > > diff --git a/doc/board/spacemit/k1-mmc.rst b/doc/board/spacemit/k1-mmc.rst > > > new file mode 100644 > > > index 00000000000..b0fe78c75ce > > > --- /dev/null > > > +++ b/doc/board/spacemit/k1-mmc.rst > > > @@ -0,0 +1,320 @@ > > > > ... > > > > > +Chapter 2: SD Card Boot > > > +======================= > > > + > > > + > > > +SpacemiT K1 Bianbu SD Card Image Flashing and U-Boot Update Guide > > > +================================================================== > > > + > > > +This guide explains how to prepare a bootable SD card with Bianbu OS for > > > +SpacemiT K1 based boards and how to replace the U-Boot binary on the SD > > > +card with a custom build. > > > + > > > +Prerequisites > > > +~~~~~~~~~~~~~ > > > + > > > +- A SpacemiT K1 based development board > > > +- A microSD card (at least 8 GB capacity recommended) > > > +- A card reader for your host computer > > > +- A Linux host system (for ``dd``, ``fdisk``, ``lsblk`` commands) > > > +- The Bianbu SD card image from > > > + > > > <https://spacemit.com/community/resources-download/Images%20Collects/K1/Bianbu> > > > +- A custom ``u-boot.itb`` file (device tree blob or U-Boot FIT image) to > > > be > > > + written to the U-Boot partition > > > + > > > +Prepare the SD Card & the image > > > +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > + > > > +**1. Download the image** > > > + > > > +Download the released package from the official SpacemiT website: > > > + > > > +<https://archive.spacemit.com/image/k1/version/bianbu/v2.3.5/Bianbu-Minimal-K1-sdcard-V2.3.5-20260601180942.img.zip> > > > + > > > +**2. Extract the image** > > > + > > > +.. code-block:: console > > > + > > > + $ unzip Bianbu-Minimal-K1-sdcard-V2.3.5-20260601180942.img.zip > > > + > > > +**3. Identify the SD card device** > > > + > > > +Insert the microSD card into your card reader, then run: > > > + > > > +.. code-block:: console > > > + > > > + $ lsblk > > > + > > > +Compare the output before and after inserting the card to identify > > > +the new device. It will typically appear as ``/dev/sdb``, ``/dev/sdc``, > > > +or ``/dev/mmcblk0``. > > > + > > > +**4. Write the image to the SD card** > > > + > > > +.. code-block:: console > > > + > > > + $ sudo dd if=./Bianbu-Minimal-K1-sdcard-V2.3.5-20260601180942.img > > > of=/dev/sdb bs=1M status=progress > > > + > > > +The SD card is now ready as a bootable Bianbu system disk. > > > > This looks out of scope of describing how to create a bootable SD card > > with U-Boot. In my opinion, you'd better describe the requirements of > > parition layout and image position for SD-card booting, to allow readers > > to create their own images/bootable medium from scratch more easily, > > instead of sticking to the vendored image. > > > > Creating a bootable SD card from scratch would be valuable, but I'll address > it later due to time constraints.
In case I didn't make myself clear enough, the documentation *SHOULD* describe how to create bootable devices from scratch, instead of alternating an existing OS image to use mainline U-Boot. I don't think the current documentation helps much for downstream users/distributions to adapt U-Boot for their own use cases, or at least it could be written in a much more clear, vendor-neutral way. So here's my NAK for this patch. I'm not sure what you mean by "time constraints", but please keep submitted patches in a good shape. Thanks, Yao Zi
