Добавляем overlayfs на чистый образ в buildroot:
1. Необходим патч на ядро. Выполняем:
make menuconfig2. Добавляем поддержку overlayfs:
Kernel->Custom Kernel Patches
Добавляем https://github.com/altera-opensource/linux-socfpga/commit/ec497e866a22c9b90e8600177a5a6b0c2dec6938.patch
3. Сохраняемся, собираем образ, закидываем на SD карту
make linux-menuconfig
File systems->Overlay Filesystem Support
(Можно включить все опции)
Device Drivers-> Device Tree and Open Firmware support -> Device tree overlays + Device tree Overlay ConfigFS interface
Получаем configfs
mount x /sys/kernel/config -t configfs
mkdir /sys/kernel/config/device-tree/overlays/foo
Источники:
https://joshis1.github.io/embedded_linux/2020/04/01/Linux-Device-tree-overlay.html
https://gist.github.com/mkresin/b987b98c41793143c4b0a49da60b275b#file-of-overlay-L4
https://github.com/altera-opensource/linux-socfpga/commit/ec497e866a22c9b90e8600177a5a6b0c2dec6938.patch