include uboot linux-kernel msp
This repository is a Buildroot BR2_EXTERNAL
tree dedicated to
supporting the M5Stack
AX630C
platforms. Using this project is not strictly necessary as Buildroot
itself has support for AX630C, but this BR2_EXTERNAL
tree provide
example configurations demonstrating how to use the different features
of the AX630C platforms.
This BR2_EXTERNAL
tree provides ten example Buildroot
configurations:
-
m5stack_module_llm_4_19_defconfig
, which is a minimal configuration to support the AX630C LLM Discovery Kit board. It builds the U-Boot bootloader, Linux kernel and a minimal user-space composed of just Busybox. -
m5stack_ax630c_lite_4_19_defconfig
, which is a minimal configuration to support the AX630C Kit Discovery Kit board. It builds the U-Boot bootloader, Linux kernel and a minimal user-space composed of just Busybox.
Note that upstream Buildroot also contains pre-defined configurations
for AX630C platforms, but they use the upstream versions of U-Boot and Linux,
while the configurations in this BR2_EXTERNAL
tree
use the versions provided and supported by M5STACK.
If want to use Buildroot on AX630C platforms without building everything yourself from source, we provide below a Starter Package. For each release and each Buildroot configuration, we provide:
-
A README file that documents how the Starter Package has been built
-
A pre-built image, ready to flash on an SD card, together with a Block map (which can be used with
bmaptool
to optimize the flashing process). This image contains a fully working system, with Linux kernel and root filesystem. Look at the flash and boot section to discover how to use the prebuilt images. -
A Software Development Kit (SDK) that contains a cross-compiler and set of libraries that allow you to build applications for the target. See the Buildroot advanced usage documentation to find out how to use the SDK.
-
The complete list of open-source licenses and complete source code of all software components included in the pre-built image, for license compliance.
In order to use Buildroot, you need to have a Linux distribution installed on your workstation. Any reasonably recent Linux distribution (Ubuntu, Debian, Fedora, Redhat, OpenSuse, etc.) will work fine.
Then, you need to install a small set of packages, as described in the Buildroot manual System requirements section.
For Debian/Ubuntu distributions, the following command allows to install the necessary packages:
$ sudo apt install debianutils sed make binutils build-essential gcc g++ bash patch gzip bzip2 perl tar cpio unzip rsync file bc git
There are also optional dependencies if you want to use Buildroot features like interface configuration, legal information or documentation. Please see the corresponding manual section.
This BR2_EXTERNAL
tree is designed to work with the 2023.02.x
LTS
version of Buildroot. However, we needed a few changes on top of
upstream Buildroot, so you need to use our own Buildroot fork together
with this BR2_EXTERNAL
tree, and more precisely its st/2023.02.10
branch.
$ git clone -b st/2023.02.10 https://github.com/bootlin/buildroot.git
See our documentation on internal details for more information about the changes we have compared to upstream Buildroot.
Now, clone the matching branch of the BR2_EXTERNAL
tree:
$ git clone https://github.com/m5stack/LLM_buildroot-external-m5stack.git
You now have side-by-side a buildroot
directory and a
buildroot-external-st
directory.
Go to the Buildroot directory:
$ cd buildroot/
And then, configure the system you want to build by using one of the 4
defconfigs provided in this BR2_EXTERNAL
tree. For example:
buildroot/ $ make BR2_EXTERNAL=../LLM_buildroot-external-m5stack m5stack_module_llm_4_19_defconfig
We are passing two informations to make
:
-
The path to
BR2_EXTERNAL
tree, which we have cloned side-by-side to the Buildroot repository -
The name of the Buildroot configuration we want to build.
If you want to further customize the Buildroot configuration, you can
now run make menuconfig
, but for your first build, we recommend you
to keep the configuration unchanged so that you can verify that
everything is working for you.
Start the build:
buildroot/ $ make
This will automaticaly download and build the entire Linux system for your AX630C platform: cross-compilation toolchain, firmware, bootloader, Linux kernel, root filesystem. It might take between 30 and 60 minutes depending on the configuration you have chosen and how powerful your machine is.
The Buildroot configurations generate a compressed ready-to-use SD card
image, available as output/M5_LLM_buildroot_20241214.axp
. You can also use the
prebuilt images downloaded from the starter package section.
Flash this image on LLM:https://docs.m5stack.com/en/guide/llm/llm/image
- Buildroot
- Buildroot reference manual
- Buildroot system development training course, with freely available training materials
You can contact Bootlin at [email protected] for commercial support on using Buildroot on AX630C platforms.