4 Buildroot Build System
We will first generate the Buildroot SD card image and then boot the target.
- Generate the SD card image:
- Install the software packages
required for the host development
system:
sudo apt-get install wget sed make binutils build-essential diffutils gcc g++ bash patch gzip bzip2 perl tar cpio unzip rsync file bc findutils gawk libgnutls28-dev - Export the
cross-tool:
export PATH=/home/administrator/Buildroot/buildroot-mchp/output/host/usr/bin:$PATHNote: Replace /home/administrator/Buildroot/ with the path where Buildroot has been cloned or installed.export CC=arm-buildroot-linux-gnueabihf-gcc - Create an empty directory
that will serve as your
workspace:
mkdir buildroot-dev cd buildroot-dev - Clone the required
repositories:
git clone https://github.com/linux4microchip/buildroot-mchp.git git clone https://github.com/linux4microchip/buildroot-external-microchip.git - Check out the following
release branch:
cd buildroot-external-microchip/ git checkout linux4microchip-2025.10 -b linux4microchip-2025.10 cd ../buildroot-mchp/ git checkout linux4microchip-2025.10 -b linux4microchip-2025.10 - Unzip the demo_linux_ocpp_v1.6_certification.zip sample application into the buildroot-dev folder.
- Copy the ocpp16-demo folder located in the demo_linux_ocpp_v1.6_certification/ocpp16-demo package into the buildroot-external-microchip/package folder.
- Add the following line to
buildroot-external-microchip/Config.in:
source "$BR2_EXTERNAL_MCHP_PATH/package/ocpp16-demo/Config.in" - Navigate to the
buildroot-mchp directory and set up
BR2_EXTERNAL:
export BR2_EXTERNAL=../buildroot-external-microchip/ - Run defconfig for the
board:
make sama5d27_wlsom1_ek_headless_defconfig - Open the buildroot
configuration
menu:
make menuconfig - Enable the OCPP support as
follows:
- Go to External Options>Ocpp 1.6 Demo and press y. This displays the Ocpp repo path or the URL option.
- Press Enter on the
string Ocpp demo source path and enter the absolute path to
the demo_linux_ocpp_v1.6_certification/src folder (this
source can be located anywhere in the system and does not need to be
placed in the buildroot folder).
Figure 4-1. Buildroot Menuconfig Configuration
- Save and exit the configuration.
- Build the
project:
Once the build is successful, the SD card OS image (sdcard.img) can be found in the buildroot-mchp/output/images/ folder.make - Program the SD card using the balenaEtcher tool. Refer to SAMA5D27WLSOM1-EK in the Linux4SAM Developer Help.
- Install the software packages
required for the host development
system:
- Boot the target:
- Press the RESET push button
to boot the device using the SD card. The following is a snippet of the boot
logs:
[ OK ] Started Notify NFS peers of a restart. Welcome to the Microchip SAMA5D27 Wireless SOM1 Evaluation Kit Demo sama5 login: root (automatic login) [root@sama5 ~]$ - Run the OCPP demo
application:
[root@sama5 ~]$cd ocpp16 [root@sama5 ocpp16]$./ocpp1.6_WD 2025-12-10 08:47:03 [DEBUG]: [APP_LOG] Options: Reboot the application: 0: Reboot the applicationCore: A: Authorize B: Boot Notification c: Change Configuration D: Data Transfer H: Heart Beat M: Meter Values R: Reset S: StartTransaction N: StatusNotification Z: StopTransaction - Go to OCPP Compliance Test Tool (OCTT) Server Setup.
- Press the RESET push button
to boot the device using the SD card. The following is a snippet of the boot
logs:
