Create Bootable SDcard for Lichee Pi Zero

First, you will partition your SDcard using your favorite partitioning tool:

  1. Create first partition as a fat16 partition, this can be a small partition as it will hold only Uboot and Kernel (/dev/sdb1)
  2. Create a second ext4 partition to be used for the system (/dev/sdb2)

Second, choose the image you will use and write it to your SDcard:

  1. From our sites main page, choose the following package that fits your need:

    • - contains kernel startup file, kernel image and programming script.
    • Rootfs-xxxx.tar.gz - is the root file system. It is packaged according to different requirements and has multiple root file systems.
    • rootfs-brmin.tar.gz - is the most streamlined root file system with only 1.5M
    • rootfs-brpy.tar.gz - Based on brmin, the python environment
    • rootfs-minmin.tar.gz - debian (including apt, network)
    • rootfs-mindb.tar.gz - debian (including apt, network, gcc, python...)
    • rootfs-minX.tar.gz - debian( Include desktop system)
  2. Unzip into a directory and put the required root file system into this directory.
    (The following uses rootfs-minX.tar.gz as an example.)

  3. Open the terminal and execute the following commands:

    • unzip
    • cp rootfs-minX.tar.gz zero_imager/
    • cd zero_imager/
  4. Write uboot to the 8k offset of the sd card:

    • sudo dd if=u-boot-sunxi-with-spl_480800.bin of=/dev/sdb bs=1024 seek=8
  5. Write the kernel file, the startup parameter file, and dtb to the first partition of the tf card:

    • sudo mount /dev/sdb1 mnt/
    • sudo cp zImage mnt/
    • sudo cp sun8i-v3s-licheepi-zero*.dtb mnt/
    • sudo cp boot.scr mnt/
    • sync
    • sudo umount /dev/sdb1
  6. Write the root file system contents to the second partition of the tf card:
    • sudo mount /dev/sdb2 mnt/
    • sudo rm -rf mnt/*
    • sudo tar xzvf rootfs-minX.tar.gz -C mnt/
    • sudo cp -r overlay_rootfs-base/* mnt/
    • sudo cp -r overlay_rootfs-minX/* mnt/
    • sudo dd if=/dev/zero of=mnt/swap bs=1M count=128
    • sudo mkswap mnt/swap
    • sudo echo "/swap swap swap defaults 0 0" >> mnt/etc/fstab
    • sync
    • sudo umount /dev/sdb2