Merge pull request #1397 from kernelkit/sama7g54

Add support for Microchip SamA7G54 Eval Kit

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2026-02-06 14:49:50 +01:00
committed by GitHub
26 changed files with 631 additions and 66 deletions
+2
View File
@@ -24,6 +24,8 @@ jobs:
- nanopi_r2s_boot - nanopi_r2s_boot
- rpi2_boot - rpi2_boot
- rpi64_boot - rpi64_boot
- sama7g54_ek_emmc_boot
- sama7g54_ek_sd_boot
env: env:
MAKEFLAGS: -j5 MAKEFLAGS: -j5
steps: steps:
+7
View File
@@ -12,6 +12,7 @@ on:
- raspberrypi-rpi64 - raspberrypi-rpi64
- bananapi-bpi-r3 - bananapi-bpi-r3
- friendlyarm-nanopi-r2s - friendlyarm-nanopi-r2s
- microchip-sama7g54-ek
default: 'raspberrypi-rpi64' default: 'raspberrypi-rpi64'
jobs: jobs:
@@ -71,6 +72,12 @@ jobs:
echo "ARCH=aarch64" >> $GITHUB_ENV echo "ARCH=aarch64" >> $GITHUB_ENV
echo "BUILD_EMMC=false" >> $GITHUB_ENV echo "BUILD_EMMC=false" >> $GITHUB_ENV
;; ;;
microchip-sama7g54-ek)
echo "BOOTLOADER_SD=sama7g54-ek-sd-boot" >> $GITHUB_ENV
echo "BOOTLOADER_EMMC=sama7g54-ek-emmc-boot" >> $GITHUB_ENV
echo "ARCH=arm" >> $GITHUB_ENV
echo "BUILD_EMMC=true" >> $GITHUB_ENV
;;
*) *)
echo "Error: Unknown board ${{ inputs.board }}" echo "Error: Unknown board ${{ inputs.board }}"
exit 1 exit 1
+1
View File
@@ -1,5 +1,6 @@
if BR2_arm if BR2_arm
source "$BR2_EXTERNAL_INFIX_PATH/board/arm/microchip-sama7g54-ek/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/board/arm/raspberrypi-rpi2/Config.in" source "$BR2_EXTERNAL_INFIX_PATH/board/arm/raspberrypi-rpi2/Config.in"
endif endif
@@ -0,0 +1,7 @@
config BR2_PACKAGE_MICROCHIP_SAMA7G54_EK
bool "Microchip SAMA7G54-EK Evaluation Kit"
depends on BR2_arm
select SDCARD_AUX
help
Support for the Microchip SAMA7G54 Evaluation Kit featuring
a Cortex-A7 processor with MACB Gigabit Ethernet and MMC storage.
+13
View File
@@ -0,0 +1,13 @@
Copyright (c) 2026 The KernelKit Authors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+116
View File
@@ -0,0 +1,116 @@
Microchip SAMA7G54-EK
=====================
The [SAMA7G54-EK][1] is an evaluation kit for the Microchip SAMA7G5 series,
featuring an ARM Cortex-A7 processor @ 800 MHz with 512 MB DDR3L RAM.
The board features:
- 2x MACB Gigabit Ethernet ports
- 8 GB eMMC (SDMMC0) + microSD card slot (SDMMC1)
- QSPI NOR flash
- USB 2.0 host ports
- CAN bus interfaces
- Flexcom serial ports (UART, SPI, I2C)
How to Build
------------
Since there are no pre-built images for ARM 32-bit, you need to build
both Infix and the bootloader from source.
### SD Card
1. Build the bootloader
make O=x-boot-sama7g54 sama7g54_ek_sd_boot_defconfig
make O=x-boot-sama7g54
2. Build Infix
make O=x-arm arm_defconfig
make O=x-arm
3. Create the SD card image
./utils/mkimage.sh -b x-boot-sama7g54 -r x-arm microchip-sama7g54-ek
### eMMC
1. Build the bootloader
make O=x-boot-sama7g54-emmc sama7g54_ek_emmc_boot_defconfig
make O=x-boot-sama7g54-emmc
2. Build Infix (same as above, skip if already built)
make O=x-arm arm_defconfig
make O=x-arm
3. Create the eMMC image
./utils/mkimage.sh -b x-boot-sama7g54-emmc -r x-arm -t emmc microchip-sama7g54-ek
Flashing to SD Card
-------------------
[Flash the image][0] to a microSD card (at least 2 GB):
```bash
sudo dd if=x-boot-sama7g54/images/infix-arm-sdcard.img of=/dev/sdX \
bs=1M status=progress oflag=direct
```
You can also use `bmaptool` for faster writes:
```bash
sudo bmaptool copy x-boot-sama7g54/images/infix-arm-sdcard.img /dev/sdX
```
> [!WARNING]
> Ensure `/dev/sdX` is the correct device for your SD card and not used
> by the host system! Use `lsblk` to verify.
Flashing to eMMC
-----------------
The SAMA7G5EK has an on-board 8 GB eMMC (SDMMC0/mmc0). Jumper J22
controls if booting from onboard storage is allowed or not; open means
allowed. When open, the SW4 button can also prevent booting from eMMC
if held at power on.
The easiest method is to flash from a running SD card system:
1. Boot the board from SD card
2. Transfer the eMMC image to the board (USB drive, network, etc.)
3. Flash the eMMC:
sudo bmaptool copy emmc.img /dev/mmcblk0
4. Power off, remove SD card, and boot from eMMC
Booting the Board
-----------------
1. Insert the flashed SD card (or ensure eMMC is flashed)
2. Connect an Ethernet cable
3. Power up the board
4. Find the assigned IP and SSH in, default login: `admin` / `admin`
Console Port
------------
The debug console is on Flexcom3 (active by default):
- Baud rate: 115200
- Data bits: 8
- Parity: None
- Stop bits: 1
Connect a USB-to-serial adapter to the board's debug UART header.
> [!WARNING]
> Use only 3.3V serial adapters.
[0]: https://kernelkit.org/posts/flashing-sdcard/
[1]: https://www.microchip.com/en-us/development-tool/EV21H18A
@@ -0,0 +1 @@
dtb-y += microchip/at91-sama7g5ek.dtb
@@ -0,0 +1,18 @@
// SPDX-License-Identifier: GPL-2.0
/*
* Infix OS device tree for Microchip SAMA7G5 Evaluation Kit
*/
#include <arm/microchip/at91-sama7g5ek.dts>
#include "infix.dtsi"
/ {
chosen {
stdout-path = "serial0:115200n8";
};
};
/* Thermal sensor disabled until OTP is calibrated */
&thermal_sensor {
status = "disabled";
};
@@ -0,0 +1,13 @@
// SPDX-License-Identifier: GPL-2.0
/*
* Common Infix OS defaults
*/
/ {
chosen {
infix {
/* Default admin user password: 'admin' */
factory-password-hash = "$5$mI/zpOAqZYKLC2WU$i7iPzZiIjOjrBF3NyftS9CCq8dfYwHwrmUK097Jca9A";
};
};
};
@@ -0,0 +1,85 @@
# Disk image for Microchip SAMA7G5EK (sama7g5 evaluation kit)
image boot.vfat {
vfat {
files = {
"boot.bin",
"u-boot.bin"
}
}
size = 16M
}
image cfg.ext4 {
empty = true
temporary = true
size = 16M
ext4 {
label = "cfg"
use-mke2fs = true
features = "uninit_bg"
extraargs = "-m 0 -i 4096"
}
}
# The /var partition will be expanded automatically at first boot
# to use the full size of the SD-card or eMMC media.
image var.ext4 {
empty = true
temporary = true
size = 128M
ext4 {
label = "var"
use-mke2fs = true
features = "uninit_bg"
extraargs = "-m 0 -i 4096"
}
}
image #INFIX_ID##VERSION#-sama7g54-ek-#TARGET#.img {
hdimage {
partition-table-type = "hybrid"
}
partition boot {
partition-type = 0xC
bootable = "true"
image = "boot.vfat"
offset = 1M
}
partition aux {
partition-uuid = D4EF35A0-0652-45A1-B3DE-D63339C82035
image = "aux.ext4"
}
partition primary {
partition-type-uuid = 0FC63DAF-8483-4772-8E79-3D69D8477DE4
bootable = true
size = 250M
image = "rootfs.squashfs"
}
partition secondary {
partition-type-uuid = 0FC63DAF-8483-4772-8E79-3D69D8477DE4
bootable = true
size = 250M
image = "rootfs.squashfs"
}
partition cfg {
partition-uuid = 7aa497f0-73b5-47e5-b2ab-8752d8a48105
image = "cfg.ext4"
}
partition var {
partition-uuid = 8046A06A-E45A-4A14-A6AD-6684704A393F
image = "var.ext4"
}
}
# Silence genimage warnings
config {}
@@ -0,0 +1,69 @@
# Microchip SAMA7G54-EK kernel configuration fixups
define MICROCHIP_SAMA7G54_EK_LINUX_CONFIG_FIXUPS
# AT91/Microchip SoC
$(call KCONFIG_ENABLE_OPT,CONFIG_ARCH_AT91)
$(call KCONFIG_ENABLE_OPT,CONFIG_SOC_SAMA7G5)
$(call KCONFIG_ENABLE_OPT,CONFIG_ATMEL_CLOCKSOURCE_TCB)
# Serial console (FLEXCOM)
# Use ttyAT naming to avoid major/minor conflict with the
# 8250 driver (needed by Raspberry Pi 2 in the shared ARM config)
$(call KCONFIG_ENABLE_OPT,CONFIG_SERIAL_ATMEL)
$(call KCONFIG_ENABLE_OPT,CONFIG_SERIAL_ATMEL_CONSOLE)
$(call KCONFIG_ENABLE_OPT,CONFIG_SERIAL_ATMEL_TTYAT)
$(call KCONFIG_ENABLE_OPT,CONFIG_MFD_ATMEL_FLEXCOM)
# Network: MACB Ethernet
$(call KCONFIG_ENABLE_OPT,CONFIG_NET_VENDOR_MICROCHIP)
$(call KCONFIG_ENABLE_OPT,CONFIG_MACB)
$(call KCONFIG_ENABLE_OPT,CONFIG_MICREL_PHY)
# MMC/SD
$(call KCONFIG_ENABLE_OPT,CONFIG_MMC_SDHCI)
$(call KCONFIG_ENABLE_OPT,CONFIG_MMC_SDHCI_PLTFM)
$(call KCONFIG_ENABLE_OPT,CONFIG_MMC_SDHCI_OF_AT91)
# Pin control and GPIO
$(call KCONFIG_ENABLE_OPT,CONFIG_PINCTRL_AT91)
$(call KCONFIG_ENABLE_OPT,CONFIG_PINCTRL_AT91PIO4)
$(call KCONFIG_ENABLE_OPT,CONFIG_GPIO_SYSFS)
# I2C and SPI
$(call KCONFIG_ENABLE_OPT,CONFIG_I2C_AT91)
$(call KCONFIG_ENABLE_OPT,CONFIG_SPI_ATMEL)
$(call KCONFIG_ENABLE_OPT,CONFIG_SPI_ATMEL_QUADSPI)
# Power management and reset
$(call KCONFIG_ENABLE_OPT,CONFIG_POWER_RESET)
$(call KCONFIG_ENABLE_OPT,CONFIG_POWER_RESET_AT91_RESET)
$(call KCONFIG_ENABLE_OPT,CONFIG_POWER_RESET_AT91_SAMA5D2_SHDWC)
# Watchdog
$(call KCONFIG_ENABLE_OPT,CONFIG_WATCHDOG)
$(call KCONFIG_ENABLE_OPT,CONFIG_SAMA5D4_WATCHDOG)
# DMA and RTC
$(call KCONFIG_ENABLE_OPT,CONFIG_AT_XDMAC)
$(call KCONFIG_ENABLE_OPT,CONFIG_RTC_CLASS)
$(call KCONFIG_ENABLE_OPT,CONFIG_RTC_DRV_AT91SAM9)
# Crypto hardware acceleration
$(call KCONFIG_ENABLE_OPT,CONFIG_CRYPTO_DEV_ATMEL_AES)
$(call KCONFIG_ENABLE_OPT,CONFIG_CRYPTO_DEV_ATMEL_TDES)
$(call KCONFIG_ENABLE_OPT,CONFIG_CRYPTO_DEV_ATMEL_SHA)
# USB Host
$(call KCONFIG_ENABLE_OPT,CONFIG_USB_EHCI_HCD)
$(call KCONFIG_ENABLE_OPT,CONFIG_USB_OHCI_HCD)
# Regulators
$(call KCONFIG_ENABLE_OPT,CONFIG_REGULATOR)
$(call KCONFIG_ENABLE_OPT,CONFIG_REGULATOR_FIXED_VOLTAGE)
$(call KCONFIG_ENABLE_OPT,CONFIG_REGULATOR_MCP16502)
# NVMEM for OTP
$(call KCONFIG_ENABLE_OPT,CONFIG_NVMEM_MICROCHIP_OTPC)
endef
$(eval $(ix-board))
$(eval $(generic-package))
@@ -0,0 +1,12 @@
[system]
compatible=infix-sama7g54-ek
bootloader=uboot
statusfile=/mnt/aux/rauc.status
[slot.rootfs.0]
device=/dev/disk/by-partlabel/primary
bootname=primary
[slot.rootfs.1]
device=/dev/disk/by-partlabel/secondary
bootname=secondary
@@ -0,0 +1,5 @@
{
"@ethtool:driver=macb": {
"broken-flow-control": true
}
}
@@ -0,0 +1 @@
CONFIG_DEVICE_TREE_INCLUDES="infix-env.dtsi infix-key.dtsi sama7g54-ek-env-emmc.dtsi"
@@ -0,0 +1,13 @@
# Common U-Boot extras for SAMA7G54-EK
CONFIG_EFI_PARTITION=y
CONFIG_ENV_IMPORT_FDT=y
CONFIG_FIT=y
CONFIG_FIT_SIGNATURE=y
CONFIG_RSA=y
CONFIG_RSA_VERIFY=y
CONFIG_BLKMAP=y
CONFIG_LZ4=y
CONFIG_LZMA=y
CONFIG_CMD_UNLZ4=y
CONFIG_CMD_UNZIP=y
CONFIG_CMD_IMI=y
@@ -0,0 +1,19 @@
/ {
config {
environment {
vendor = "Microchip";
bootcmd = "run ixboot";
boot_targets = "mmc0";
fdtfile = "microchip/at91-sama7g5ek.dtb";
fdt_addr_r = "0x62000000";
kernel_addr_r = "0x63000000";
scriptaddr = "0x68000000";
ramdisk_addr_r = "0x69000000";
ixbootdelay = "0.5";
bootdelay = "-2";
bootmenu_delay = "10";
ixbtn-devmode = "setenv dev_mode yes; echo Enabled";
ixbtn-factory = "echo \"No button, use bootmenu\"";
};
};
};
@@ -0,0 +1,19 @@
/ {
config {
environment {
vendor = "Microchip";
bootcmd = "run ixboot";
boot_targets = "mmc1";
fdtfile = "microchip/at91-sama7g5ek.dtb";
fdt_addr_r = "0x62000000";
kernel_addr_r = "0x63000000";
scriptaddr = "0x68000000";
ramdisk_addr_r = "0x69000000";
ixbootdelay = "0.5";
bootdelay = "-2";
bootmenu_delay = "10";
ixbtn-devmode = "setenv dev_mode yes; echo Enabled";
ixbtn-factory = "echo \"No button, use bootmenu\"";
};
};
};
@@ -0,0 +1 @@
CONFIG_DEVICE_TREE_INCLUDES="infix-env.dtsi infix-key.dtsi sama7g54-ek-env-sd.dtsi"
@@ -0,0 +1,4 @@
label Infix (arm)
kernel /boot/zImage
fdtdir /boot
append ${bootargs_root} ${bootargs_log} usbcore.authorized_default=2 -- ${bootargs_user}
+1
View File
@@ -24,5 +24,6 @@ BR2_TARGET_UBOOT_FORMAT_DTB=y
BR2_PACKAGE_HOST_UBOOT_TOOLS=y BR2_PACKAGE_HOST_UBOOT_TOOLS=y
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT=y BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT=y
BR2_PACKAGE_HOST_UBOOT_TOOLS_FDT_ADD_PUBKEY=y
TRUSTED_KEYS=y TRUSTED_KEYS=y
TRUSTED_KEYS_DEVELOPMENT=y TRUSTED_KEYS_DEVELOPMENT=y
+1
View File
@@ -135,6 +135,7 @@ BR2_PACKAGE_HOST_MTOOLS=y
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT=y BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT=y
BR2_PACKAGE_HOST_UBOOT_TOOLS_FDT_ADD_PUBKEY=y BR2_PACKAGE_HOST_UBOOT_TOOLS_FDT_ADD_PUBKEY=y
BR2_PACKAGE_MICROCHIP_SAMA7G54_EK=y
BR2_PACKAGE_RASPBERRYPI_RPI2=y BR2_PACKAGE_RASPBERRYPI_RPI2=y
INFIX_VENDOR_HOME="https://kernelkit.org" INFIX_VENDOR_HOME="https://kernelkit.org"
INFIX_DESC="Infix is an immutable, friendly, and secure operating system that turns any ARM or x86 device into a powerful, manageable network appliance. Deploy on anything from $35 Raspberry Pi boards to enterprise switches as routers, IoT gateways, or edge devices. Infix models Linux networking features using YANG so you can manage your devices using NETCONF/RESTCONF APIs and focus on your business logic running in isolated containers." INFIX_DESC="Infix is an immutable, friendly, and secure operating system that turns any ARM or x86 device into a powerful, manageable network appliance. Deploy on anything from $35 Raspberry Pi boards to enterprise switches as routers, IoT gateways, or edge devices. Infix models Linux networking features using YANG so you can manage your devices using NETCONF/RESTCONF APIs and focus on your business logic running in isolated containers."
+1
View File
@@ -117,6 +117,7 @@ BR2_PACKAGE_HOST_MTOOLS=y
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT=y BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT=y
BR2_PACKAGE_HOST_UBOOT_TOOLS_FDT_ADD_PUBKEY=y BR2_PACKAGE_HOST_UBOOT_TOOLS_FDT_ADD_PUBKEY=y
BR2_PACKAGE_MICROCHIP_SAMA7G54_EK=y
BR2_PACKAGE_RASPBERRYPI_RPI2=y BR2_PACKAGE_RASPBERRYPI_RPI2=y
INFIX_VENDOR_HOME="https://kernelkit.org" INFIX_VENDOR_HOME="https://kernelkit.org"
INFIX_DESC="Infix is an immutable, friendly, and secure operating system that turns any ARM or x86 device into a powerful, manageable network appliance. Deploy on anything from $35 Raspberry Pi boards to enterprise switches as routers, IoT gateways, or edge devices. Infix models Linux networking features using YANG so you can manage your devices using NETCONF/RESTCONF APIs and focus on your business logic running in isolated containers." INFIX_DESC="Infix is an immutable, friendly, and secure operating system that turns any ARM or x86 device into a powerful, manageable network appliance. Deploy on anything from $35 Raspberry Pi boards to enterprise switches as routers, IoT gateways, or edge devices. Infix models Linux networking features using YANG so you can manage your devices using NETCONF/RESTCONF APIs and focus on your business logic running in isolated containers."
+38
View File
@@ -0,0 +1,38 @@
BR2_arm=y
BR2_cortex_a7=y
BR2_ARM_FPU_NEON_VFPV4=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV7_EABIHF_GLIBC_STABLE=y
BR2_DL_DIR="$(BR2_EXTERNAL_INFIX_PATH)/dl"
BR2_CCACHE=y
BR2_CCACHE_DIR="$(BR2_EXTERNAL_INFIX_PATH)/.ccache"
BR2_PACKAGE_OVERRIDE_FILE="$(BR2_EXTERNAL_INFIX_PATH)/local.mk"
BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL_INFIX_PATH)/patches"
BR2_SSP_NONE=y
BR2_INIT_NONE=y
BR2_SYSTEM_BIN_SH_NONE=y
# BR2_PACKAGE_BUSYBOX is not set
# BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set
# BR2_TARGET_ROOTFS_TAR is not set
BR2_TARGET_AT91BOOTSTRAP3=y
BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL=y
BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL_LOCATION="$(call github,linux4sam,at91bootstrap,v4.0.9)/at91bootstrap-v4.0.9.tar.gz"
BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG="sama7g5ekemmc_uboot"
BR2_TARGET_UBOOT=y
BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
BR2_TARGET_UBOOT_CUSTOM_TARBALL=y
BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="$(call github,linux4sam,u-boot-at91,linux4microchip-2025.04)/u-boot-at91-linux4microchip-2025.04.tar.gz"
BR2_TARGET_UBOOT_BOARD_DEFCONFIG="sama7g5ek_mmc"
BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_INFIX_PATH)/board/common/uboot/extras.config $(BR2_EXTERNAL_INFIX_PATH)/board/arm/microchip-sama7g54-ek/uboot/extras.config $(BR2_EXTERNAL_INFIX_PATH)/board/arm/microchip-sama7g54-ek/uboot/emmc-extras.config"
BR2_TARGET_UBOOT_NEEDS_DTC=y
BR2_TARGET_UBOOT_CUSTOM_DTS_PATH="$(BR2_EXTERNAL_INFIX_PATH)/board/arm/microchip-sama7g54-ek/uboot/sama7g54-ek-env-emmc.dtsi"
BR2_PACKAGE_HOST_BMAP_TOOLS=y
BR2_PACKAGE_HOST_GENIMAGE=y
BR2_PACKAGE_HOST_RAUC=y
BR2_PACKAGE_HOST_UBOOT_TOOLS=y
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT=y
BR2_PACKAGE_HOST_UBOOT_TOOLS_FDT_ADD_PUBKEY=y
TRUSTED_KEYS=y
TRUSTED_KEYS_DEVELOPMENT=y
+38
View File
@@ -0,0 +1,38 @@
BR2_arm=y
BR2_cortex_a7=y
BR2_ARM_FPU_NEON_VFPV4=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV7_EABIHF_GLIBC_STABLE=y
BR2_DL_DIR="$(BR2_EXTERNAL_INFIX_PATH)/dl"
BR2_CCACHE=y
BR2_CCACHE_DIR="$(BR2_EXTERNAL_INFIX_PATH)/.ccache"
BR2_PACKAGE_OVERRIDE_FILE="$(BR2_EXTERNAL_INFIX_PATH)/local.mk"
BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL_INFIX_PATH)/patches"
BR2_SSP_NONE=y
BR2_INIT_NONE=y
BR2_SYSTEM_BIN_SH_NONE=y
# BR2_PACKAGE_BUSYBOX is not set
# BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set
# BR2_TARGET_ROOTFS_TAR is not set
BR2_TARGET_AT91BOOTSTRAP3=y
BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL=y
BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL_LOCATION="$(call github,linux4sam,at91bootstrap,v4.0.9)/at91bootstrap-v4.0.9.tar.gz"
BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG="sama7g5eksd_uboot"
BR2_TARGET_UBOOT=y
BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
BR2_TARGET_UBOOT_CUSTOM_TARBALL=y
BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="$(call github,linux4sam,u-boot-at91,linux4microchip-2025.04)/u-boot-at91-linux4microchip-2025.04.tar.gz"
BR2_TARGET_UBOOT_BOARD_DEFCONFIG="sama7g5ek_mmc1"
BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_INFIX_PATH)/board/common/uboot/extras.config $(BR2_EXTERNAL_INFIX_PATH)/board/arm/microchip-sama7g54-ek/uboot/extras.config $(BR2_EXTERNAL_INFIX_PATH)/board/arm/microchip-sama7g54-ek/uboot/sd-extras.config"
BR2_TARGET_UBOOT_NEEDS_DTC=y
BR2_TARGET_UBOOT_CUSTOM_DTS_PATH="$(BR2_EXTERNAL_INFIX_PATH)/board/arm/microchip-sama7g54-ek/uboot/sama7g54-ek-env-sd.dtsi"
BR2_PACKAGE_HOST_BMAP_TOOLS=y
BR2_PACKAGE_HOST_GENIMAGE=y
BR2_PACKAGE_HOST_RAUC=y
BR2_PACKAGE_HOST_UBOOT_TOOLS=y
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT=y
BR2_PACKAGE_HOST_UBOOT_TOOLS_FDT_ADD_PUBKEY=y
TRUSTED_KEYS=y
TRUSTED_KEYS_DEVELOPMENT=y
+12 -1
View File
@@ -3,6 +3,17 @@ Change Log
All notable changes to the project are documented in this file. All notable changes to the project are documented in this file.
[v26.01.0][UNRELEASED]
-------------------------
### Changes
- Add support for Microchip SAMA7G54-EK Evaluation Kit, Arm Cortex-A7
### Fixes
N/A
[v26.01.0][] - 2026-02-03 [v26.01.0][] - 2026-02-03
------------------------- -------------------------
@@ -1907,7 +1918,7 @@ Supported YANG models in addition to those used by sysrepo and netopeer:
- N/A - N/A
[buildroot]: https://buildroot.org/ [buildroot]: https://buildroot.org/
[UNRELEASED]: https://github.com/kernelkit/infix/compare/v25.11.0...HEAD [UNRELEASED]: https://github.com/kernelkit/infix/compare/v26.01.0...HEAD
[v26.01.0]: https://github.com/kernelkit/infix/compare/v25.11.0...v26.01.0 [v26.01.0]: https://github.com/kernelkit/infix/compare/v25.11.0...v26.01.0
[v25.11.0]: https://github.com/kernelkit/infix/compare/v25.10.0...v25.11.0 [v25.11.0]: https://github.com/kernelkit/infix/compare/v25.10.0...v25.11.0
[v25.10.0]: https://github.com/kernelkit/infix/compare/v25.09.0...v26.10.0 [v25.10.0]: https://github.com/kernelkit/infix/compare/v25.09.0...v26.10.0
+134 -65
View File
@@ -12,13 +12,14 @@ fi
usage() usage()
{ {
cat <<EOF cat <<EOF
Create SD card image from build artifacts for any supported board. Create SD card/eMMC image from build artifacts for any supported board.
Usage: Usage:
$0 [OPTIONS] <board-name> $0 [OPTIONS] <board-name>
Options: Options:
-b boot-dir Path to bootloader build directory (default: O= or output/) -b boot-dir Path to bootloader build directory (default: O= or output/)
-B Boot-only image (no rootfs, for bootloader testing)
-d Download bootloader files from latest-boot release -d Download bootloader files from latest-boot release
-f Force re-download of bootloader even if cached -f Force re-download of bootloader even if cached
-h This help text -h This help text
@@ -56,6 +57,9 @@ Examples:
# Create eMMC image instead of SD card: # Create eMMC image instead of SD card:
$0 -t emmc bananapi-bpi-r3 $0 -t emmc bananapi-bpi-r3
# Create boot-only image for bootloader testing:
$0 -B -b build-boot microchip-sama7g54-ek
EOF EOF
} }
@@ -111,7 +115,7 @@ run_genimage()
--config "$genimage_cfg" --config "$genimage_cfg"
if command -v bmaptool >/dev/null 2>&1; then if command -v bmaptool >/dev/null 2>&1; then
for img in "${BINARIES_DIR}"/*-sdcard.img "${BINARIES_DIR}"/*-emmc.img; do for img in "${BINARIES_DIR}"/*-sdcard*.img "${BINARIES_DIR}"/*-emmc*.img; do
[ -f "$img" ] || continue [ -f "$img" ] || continue
log "Generating block map for $(basename "$img")..." log "Generating block map for $(basename "$img")..."
bmaptool create -o "${img}.bmap" "$img" bmaptool create -o "${img}.bmap" "$img"
@@ -185,6 +189,13 @@ get_bootloader_name()
friendlyarm-nanopi-r2s) friendlyarm-nanopi-r2s)
echo "nanopi_r2s_boot" echo "nanopi_r2s_boot"
;; ;;
microchip-sama7g54-ek)
if [ "$target" = "emmc" ]; then
echo "sama7g54_ek_emmc_boot"
else
echo "sama7g54_ek_sd_boot"
fi
;;
*) *)
err "Unknown bootloader for board: $board" err "Unknown bootloader for board: $board"
return 1 return 1
@@ -286,12 +297,41 @@ discover_rpi_boot_files()
echo "$files" echo "$files"
} }
while getopts "hldfob:r:t:" opt; do # Filter genimage.cfg.in for boot-only image
# Removes rootfs-related blocks: image cfg.ext4, image var.ext4,
# and partitions: aux, primary, secondary, cfg, var
filter_bootonly_genimage()
{
awk '
BEGIN { skip=0; depth=0 }
/^image cfg\.ext4/ || /^image var\.ext4/ {
skip=1; depth=1; next
}
/^[[:space:]]*partition (aux|primary|secondary|cfg|var)[[:space:]]*\{/ {
skip=1; depth=1; next
}
skip==1 {
# Count braces on this line to track nesting depth
n = gsub(/{/, "{")
m = gsub(/}/, "}")
depth = depth + n - m
if (depth <= 0) { skip=0; depth=0 }
next
}
{ print }
'
}
while getopts "hldfoBb:r:t:" opt; do
case $opt in case $opt in
b) b)
BOOT_DIR="$OPTARG" BOOT_DIR="$OPTARG"
STANDALONE=1 STANDALONE=1
;; ;;
B)
BOOT_ONLY=1
STANDALONE=1
;;
d) d)
DOWNLOAD_BOOT=1 DOWNLOAD_BOOT=1
STANDALONE=1 STANDALONE=1
@@ -353,6 +393,11 @@ if [ -n "$STANDALONE" ]; then
default_dir=$(find_build_dir) || die "Could not find build directory. Set O= or use -b/-r option" default_dir=$(find_build_dir) || die "Could not find build directory. Set O= or use -b/-r option"
: "${BOOT_DIR:=$default_dir}" : "${BOOT_DIR:=$default_dir}"
: "${ROOT_DIR:=$default_dir}" : "${ROOT_DIR:=$default_dir}"
elif [ -n "$BOOT_ONLY" ]; then
# Boot-only mode: only need bootloader directory
if [ -z "$BOOT_DIR" ]; then
BOOT_DIR=$(find_build_dir) || die "Could not find boot directory. Use -b option"
fi
else else
if [ -z "$BOOT_DIR" ]; then if [ -z "$BOOT_DIR" ]; then
BOOT_DIR=$(find_build_dir) || die "Could not find boot directory. Use -b option" BOOT_DIR=$(find_build_dir) || die "Could not find boot directory. Use -b option"
@@ -372,51 +417,54 @@ if [ -n "$STANDALONE" ]; then
# Add host tools to PATH (for genimage, bmaptool, etc.) # Add host tools to PATH (for genimage, bmaptool, etc.)
for dir in "$BOOT_DIR" "$ROOT_DIR"; do for dir in "$BOOT_DIR" "$ROOT_DIR"; do
[ -n "$dir" ] || continue
if [ -d "$dir/host/bin" ]; then if [ -d "$dir/host/bin" ]; then
export PATH="$dir/host/bin:$PATH" export PATH="$dir/host/bin:$PATH"
break break
fi fi
done done
# Copy rootfs and partition images to BINARIES_DIR (skip if same directory) # Copy rootfs and partition images to BINARIES_DIR (skip in boot-only mode)
mkdir -p "$BINARIES_DIR" mkdir -p "$BINARIES_DIR"
# Normalize paths for comparison if [ -z "$BOOT_ONLY" ]; then
boot_images=$(cd "$BOOT_DIR" && pwd)/images # Normalize paths for comparison
root_images="" boot_images=$(cd "$BOOT_DIR" && pwd)/images
root_images=""
if [ -f "$ROOT_DIR" ]; then if [ -f "$ROOT_DIR" ]; then
# Direct path to rootfs.squashfs file # Direct path to rootfs.squashfs file
log "Copying rootfs from $ROOT_DIR to $BINARIES_DIR/rootfs.squashfs" log "Copying rootfs from $ROOT_DIR to $BINARIES_DIR/rootfs.squashfs"
cp "$ROOT_DIR" "$BINARIES_DIR/rootfs.squashfs" cp "$ROOT_DIR" "$BINARIES_DIR/rootfs.squashfs"
elif [ -f "$ROOT_DIR/images/rootfs.squashfs" ]; then elif [ -f "$ROOT_DIR/images/rootfs.squashfs" ]; then
root_images=$(cd "$ROOT_DIR" && pwd)/images root_images=$(cd "$ROOT_DIR" && pwd)/images
# Only copy if different directories # Only copy if different directories
if [ "$boot_images" != "$root_images" ]; then if [ "$boot_images" != "$root_images" ]; then
# Build directory with images/ - copy rootfs and partition images # Build directory with images/ - copy rootfs and partition images
log "Copying artifacts from $ROOT_DIR/images/ to $BINARIES_DIR/" log "Copying artifacts from $ROOT_DIR/images/ to $BINARIES_DIR/"
cp "$ROOT_DIR/images/rootfs.squashfs" "$BINARIES_DIR/" cp "$ROOT_DIR/images/rootfs.squashfs" "$BINARIES_DIR/"
# Copy partition images if they exist
for img in aux.ext4 cfg.ext4 var.ext4; do
if [ -f "$ROOT_DIR/images/$img" ]; then
cp "$ROOT_DIR/images/$img" "$BINARIES_DIR/"
fi
done
else
log "Rootfs already in place at $BINARIES_DIR/"
fi
elif [ -f "$ROOT_DIR/rootfs.squashfs" ]; then
# Directory directly containing rootfs.squashfs
log "Copying rootfs from $ROOT_DIR/rootfs.squashfs"
cp "$ROOT_DIR/rootfs.squashfs" "$BINARIES_DIR/"
# Copy partition images if they exist # Copy partition images if they exist
for img in aux.ext4 cfg.ext4 var.ext4; do for img in aux.ext4 cfg.ext4 var.ext4; do
if [ -f "$ROOT_DIR/images/$img" ]; then if [ -f "$ROOT_DIR/$img" ]; then
cp "$ROOT_DIR/images/$img" "$BINARIES_DIR/" cp "$ROOT_DIR/$img" "$BINARIES_DIR/"
fi fi
done done
else else
log "Rootfs already in place at $BINARIES_DIR/" die "Could not find rootfs.squashfs in $ROOT_DIR"
fi fi
elif [ -f "$ROOT_DIR/rootfs.squashfs" ]; then
# Directory directly containing rootfs.squashfs
log "Copying rootfs from $ROOT_DIR/rootfs.squashfs"
cp "$ROOT_DIR/rootfs.squashfs" "$BINARIES_DIR/"
# Copy partition images if they exist
for img in aux.ext4 cfg.ext4 var.ext4; do
if [ -f "$ROOT_DIR/$img" ]; then
cp "$ROOT_DIR/$img" "$BINARIES_DIR/"
fi
done
else
die "Could not find rootfs.squashfs in $ROOT_DIR"
fi fi
else else
# Export for Buildroot genimage.sh wrapper # Export for Buildroot genimage.sh wrapper
@@ -443,29 +491,31 @@ if [ -n "$DOWNLOAD_BOOT" ]; then
# Now use the temporary directory for composition # Now use the temporary directory for composition
BINARIES_DIR="$SDCARD_TEMP_DIR" BINARIES_DIR="$SDCARD_TEMP_DIR"
log "Linking rootfs files to $BINARIES_DIR..." # Link rootfs and partition images to temp directory (skip in boot-only mode)
# Link rootfs and partition images to temp directory if [ -z "$BOOT_ONLY" ]; then
if [ -f "$ROOT_DIR" ]; then log "Linking rootfs files to $BINARIES_DIR..."
# Direct path to rootfs.squashfs file if [ -f "$ROOT_DIR" ]; then
ln -sf "$(realpath "$ROOT_DIR")" "$BINARIES_DIR/rootfs.squashfs" # Direct path to rootfs.squashfs file
elif [ -f "$ROOT_DIR/images/rootfs.squashfs" ]; then ln -sf "$(realpath "$ROOT_DIR")" "$BINARIES_DIR/rootfs.squashfs"
ln -sf "$(realpath "$ROOT_DIR/images/rootfs.squashfs")" "$BINARIES_DIR/rootfs.squashfs" elif [ -f "$ROOT_DIR/images/rootfs.squashfs" ]; then
# Link partition images if they exist ln -sf "$(realpath "$ROOT_DIR/images/rootfs.squashfs")" "$BINARIES_DIR/rootfs.squashfs"
for img in aux.ext4 cfg.ext4 var.ext4; do # Link partition images if they exist
if [ -f "$ROOT_DIR/images/$img" ]; then for img in aux.ext4 cfg.ext4 var.ext4; do
ln -sf "$(realpath "$ROOT_DIR/images/$img")" "$BINARIES_DIR/$img" if [ -f "$ROOT_DIR/images/$img" ]; then
fi ln -sf "$(realpath "$ROOT_DIR/images/$img")" "$BINARIES_DIR/$img"
done fi
elif [ -f "$ROOT_DIR/rootfs.squashfs" ]; then done
ln -sf "$(realpath "$ROOT_DIR/rootfs.squashfs")" "$BINARIES_DIR/rootfs.squashfs" elif [ -f "$ROOT_DIR/rootfs.squashfs" ]; then
# Link partition images if they exist ln -sf "$(realpath "$ROOT_DIR/rootfs.squashfs")" "$BINARIES_DIR/rootfs.squashfs"
for img in aux.ext4 cfg.ext4 var.ext4; do # Link partition images if they exist
if [ -f "$ROOT_DIR/$img" ]; then for img in aux.ext4 cfg.ext4 var.ext4; do
ln -sf "$(realpath "$ROOT_DIR/$img")" "$BINARIES_DIR/$img" if [ -f "$ROOT_DIR/$img" ]; then
fi ln -sf "$(realpath "$ROOT_DIR/$img")" "$BINARIES_DIR/$img"
done fi
else done
die "Could not find rootfs.squashfs in $ROOT_DIR" else
die "Could not find rootfs.squashfs in $ROOT_DIR"
fi
fi fi
fi fi
@@ -489,13 +539,28 @@ if { [ "$BOARD" = "raspberrypi-rpi2" ] || [ "$BOARD" = "raspberrypi-rpi64" ]; }
GENIMAGE_TEMPLATE="${GENIMAGE_CFG}.tmp" GENIMAGE_TEMPLATE="${GENIMAGE_CFG}.tmp"
fi fi
# Epxand template variables # Filter for boot-only mode if requested
sed "s|#VERSION#|${RELEASE}|" "$GENIMAGE_TEMPLATE" | \ if [ -n "$BOOT_ONLY" ]; then
sed "s|#INFIX_ID#|${INFIX_ID}|" | \ log "Filtering genimage config for boot-only image..."
sed "s|#TARGET#|${TARGET}|" > "$GENIMAGE_CFG" filter_bootonly_genimage < "$GENIMAGE_TEMPLATE" > "${GENIMAGE_CFG}.filtered"
GENIMAGE_TEMPLATE="${GENIMAGE_CFG}.filtered"
fi
# Clean up temp file if created # Expand template variables
rm -f "${GENIMAGE_CFG}.tmp" # For boot-only mode, append "-boot" to the target name in the image filename
if [ -n "$BOOT_ONLY" ]; then
sed "s|#VERSION#|${RELEASE}|" "$GENIMAGE_TEMPLATE" | \
sed "s|#INFIX_ID#|${INFIX_ID}|" | \
sed "s|#TARGET#|${TARGET}|" | \
sed "s|-${TARGET}\.img|-${TARGET}-boot.img|" > "$GENIMAGE_CFG"
else
sed "s|#VERSION#|${RELEASE}|" "$GENIMAGE_TEMPLATE" | \
sed "s|#INFIX_ID#|${INFIX_ID}|" | \
sed "s|#TARGET#|${TARGET}|" > "$GENIMAGE_CFG"
fi
# Clean up temp files if created
#rm -f "${GENIMAGE_CFG}.tmp" "${GENIMAGE_CFG}.filtered"
# Find and set up for calling genimage/genimage.sh # Find and set up for calling genimage/genimage.sh
if [ -z "$BR2_CONFIG" ]; then if [ -z "$BR2_CONFIG" ]; then
@@ -525,7 +590,7 @@ if [ -n "$DOWNLOAD_BOOT" ]; then
log "Moving $TARGET images to $ORIGINAL_BINARIES_DIR..." log "Moving $TARGET images to $ORIGINAL_BINARIES_DIR..."
mkdir -p "$ORIGINAL_BINARIES_DIR" mkdir -p "$ORIGINAL_BINARIES_DIR"
for img in "${BINARIES_DIR}"/*-sdcard.img* "${BINARIES_DIR}"/*-emmc.img*; do for img in "${BINARIES_DIR}"/*-sdcard*.img* "${BINARIES_DIR}"/*-emmc*.img*; do
if [ -f "$img" ]; then if [ -f "$img" ]; then
mv "$img" "$ORIGINAL_BINARIES_DIR/" mv "$img" "$ORIGINAL_BINARIES_DIR/"
log " $(basename "$img")" log " $(basename "$img")"
@@ -539,8 +604,12 @@ if [ -n "$DOWNLOAD_BOOT" ]; then
BINARIES_DIR="$ORIGINAL_BINARIES_DIR" BINARIES_DIR="$ORIGINAL_BINARIES_DIR"
fi fi
log "$TARGET image created successfully:" if [ -n "$BOOT_ONLY" ]; then
for img in "${BINARIES_DIR}"/*-sdcard.img* "${BINARIES_DIR}"/*-emmc.img*; do log "$TARGET boot-only image created successfully:"
else
log "$TARGET image created successfully:"
fi
for img in "${BINARIES_DIR}"/*-sdcard*.img* "${BINARIES_DIR}"/*-emmc*.img*; do
if [ -f "$img" ]; then if [ -f "$img" ]; then
if [ -n "$STANDALONE" ]; then if [ -n "$STANDALONE" ]; then
# Show relative path in standalone mode # Show relative path in standalone mode