Giter Club home page Giter Club logo

licheepi-nano's Introduction

Lichee Pi Nano Buildroot External Tree

This repo includes a Buildroot external tree to build U-Boot and Linux images for the Sipeed Lichee Pi Nano development board. It is based on Buildroot v2020.02.1.

Both booting from flash and from MMC are supported (with different Buildroot configs).

Patched U-Boot is based on v2020.01 and is available here and Linux is based on v5.4.36 and is available here.

Building

To build images start by initializing submodules to pull Buildroot source:

$ git submodule update --init

Then to start building (will take a while from a clean source tree) cd into its directory and run:

$ cd buildroot
$ make BR2_EXTERNAL=$PWD/../ licheepi_nano_defconfig
$ make

Flash images to device

To flash to the device's chip use sunxi-tools's sunxi-fel:

$ sudo ./sunxi-fel -p spiflash-write 0 output/images/flash.bin

For this to work the device must be in FEL mode (meaning the BootROM has activated a program communicating with hosts via USB using the FEL protocol). To make this happen the BootROM needs to believe it has nothing to boot in the flash memory.

This can be achieved by erasing the beginning of the device's memory if you have access to a U-Boot shell:

=> sf probe 0
=> sf erase 0 0x10000
=> reset

If you don't have access to U-Boot or it is does not allow you to erase flash memory for some reason, you can also short pins 1 and 4 of the flash chip as you connect power to your board. Once power is connected you can un-short the pins and FEL mode should be available.

Flash vs MMC

Besides the default setting for storing everything (bootloader, device tree, kernel and root filesystem) on the 16M flash memory chip you can also boot from an MMC card. To do this use the mmc config when configuring Buildroot:

$ make BR2_EXTERNAL=$PWD/../ licheepi_nano_mmc_defconfig
$ make

You will then end up with 2 images - one for the flash memory and another for the sd card.

The flash.bin image can be flashed to the device's chip as above (also, you can just flash the u-boot-sunxi-with-spl.bin file instead of flash.bin for the same effect).

The sdcard.img should be flashed to an sd card using dd or whatever method you prefer:

$ sudo dd if=output/images/sdcard.img of=/dev/mmcblkX

licheepi-nano's People

Contributors

florpor avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.