THIS REPO MOVED TO https://github.com/Calculinux/meta-calculinux
This is a Yocto Project meta-layer for building a Linux image for the ClockworkPi PicoCalc running on the Luckfox Lyra board. The layer uses KAS for configuration management and reproducible builds, and includes RAUC support for over-the-air (OTA) updates using a dual rootfs setup.
- Pre-configured for the Clockwork PicoCalc hardware. The system runs read-only on the internal MMC with an Overlay-FS on the external SD-Card.
- Luckfox Lyra board support.
- KAS-based build setup for reproducible builds.
- RAUC OTA update support with dual root filesystem (A/B).
- Ready-to-use shell environment entry after build.
- Extensible - In the future additional boards can be supported.
Make sure you have the following installed on your build host:
- Docker
-
Clone this repository:
mkdir picocalc-buildsystem && cd picocalc-buildsystem git clone https://github.com/0xd61/meta-picocalc.git
-
Run the build with KAS:
./meta-picocalc/kas-container --ssh-dir ~/.ssh build --update meta-picocalc/kas-luckfox-lyra-bundle.yamlThis will:
- Download the Yocto sources.
- Apply the configurations for the PicoCalc with the Luckfox Lyra.
- Build the image.
-
Find the output image After the build completes, the image (picocalc-image-luckfox-lyra.rootfs.wic) will be located in:
build/tmp/deploy/images/luckfox-lyra/ -
Install Install the image with dd on a Micro-SD card.
dd if=build/tmp/deploy/images/luckfox-lyra/picocalc-image-luckfox-lyra.rootfs.wic of=/dev/mmcblk0 bs=4MCreate a ext4 partition on the external Picocalc SD-Card which will be mounted at
/dataon the system.
To drop into the Yocto build shell environment (for custom builds, debugging, or running bitbake commands manually):
./meta-picocalc/kas-container --ssh-dir ~/.ssh shell meta-picocalc/kas-luckfox-lyra-bundle.yamlInside this shell, you can run commands like:
bitbake virtual/kernelThis meta-layer configures RAUC for robust A/B dual rootfs OTA updates.
The device has two root partitions (rootfsA and rootfsB). During an update:
- RAUC installs the new system image to the inactive rootfs.
- The bootloader is updated to boot from the new rootfs.
- If the new system boots successfully, it is marked as “good”; otherwise, the system falls back to the previous version.
The system uses a dual-rootfs for proper rollbacks if a update failed. Updates can be installed with rauc.
Copy the .raucb file onto the SD-Card and install it with:
rauc install picocalc-bundle-luckfox-lyra.raucb
reboot
RAUC will automatically boot into the updated rootfs. If the boot fails, the device will revert to the previous rootfs.
More on RAUC: https://rauc.readthedocs.io/
KAS does not natively support aarch64 hosts. To build on an aarch64 system, additional packages are required in the Docker image. These can be included by manually rebuilding the image.
Use the following command to build the image:
docker build -t ghcr.io/siemens/kas/kas:4.7 -f meta-picocalc/Dockerfile.aarch64 meta-picocalc
This command must be run before starting the build. Note: It will overwrite the local KAS container. If you need to rebuild the image, you must first remove the existing one:
docker rmi ghcr.io/siemens/kas/kas:4.7
Special thanks to hisptoot for providing the kernel drivers for keyboard, display, and audio support.