mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2026-12-04 15:03:29 +01:00
refactor(nxp): parameterize i.MX platform builders to reduce duplication
This refactoring reduces code duplication across i.MX93, i.MX8MP, and i.MX8MQ platforms by extracting common build logic into parameterized shared builders. This makes it easier to maintain and add new i.MX platforms while ensuring consistency across all platforms.
This commit is contained in:
1 parent
8b405e9c6d
commit
688ee555de
14 files changed
+398
-598
No files matched your search
@@ -0,0 +1,29 @@
|
||||
# Shared kernel configuration for i.MX platforms
|
||||
# This configuration is used across i.MX93, i.MX8MP, i.MX8MQ and similar platforms
|
||||
{
|
||||
# Common kernel extra configuration for i.MX platforms
|
||||
# Includes: virtualization support, EFI boot, RAID, USB/IP, framebuffer settings
|
||||
imxCommonKernelConfig = ''
|
||||
CRYPTO_TLS m
|
||||
TLS y
|
||||
MD_RAID0 m
|
||||
MD_RAID1 m
|
||||
MD_RAID10 m
|
||||
MD_RAID456 m
|
||||
DM_VERITY m
|
||||
LOGO y
|
||||
FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER n
|
||||
FB_EFI n
|
||||
EFI_STUB y
|
||||
EFI y
|
||||
VIRTIO y
|
||||
VIRTIO_PCI y
|
||||
VIRTIO_BLK y
|
||||
DRM_VIRTIO_GPU y
|
||||
EXT4_FS y
|
||||
USBIP_CORE m
|
||||
USBIP_VHCI_HCD m
|
||||
USBIP_HOST m
|
||||
USBIP_VUDC m
|
||||
'';
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
# Shared U-Boot configuration for i.MX platforms
|
||||
# This configuration is used across i.MX93, i.MX8MP, i.MX8MQ and similar platforms
|
||||
{
|
||||
# Generate common U-Boot extra configuration for i.MX platforms
|
||||
# ramdiskAddr and fdtAddr are platform-specific memory addresses
|
||||
imxCommonUbootConfig =
|
||||
{ ramdiskAddr, fdtAddr }:
|
||||
''
|
||||
CONFIG_USE_BOOTCOMMAND=y
|
||||
CONFIG_BOOTCOMMAND="setenv ramdisk_addr_r ${ramdiskAddr}; setenv fdt_addr_r ${fdtAddr}; run distro_bootcmd; "
|
||||
CONFIG_CMD_BOOTEFI_SELFTEST=y
|
||||
CONFIG_CMD_BOOTEFI=y
|
||||
CONFIG_EFI_LOADER=y
|
||||
CONFIG_BLK=y
|
||||
CONFIG_PARTITIONS=y
|
||||
CONFIG_DM_DEVICE_REMOVE=n
|
||||
CONFIG_CMD_CACHE=y
|
||||
'';
|
||||
|
||||
# Common U-Boot native build inputs for i.MX platforms
|
||||
imxCommonUbootNativeBuildInputs = [
|
||||
"bison"
|
||||
"flex"
|
||||
"openssl"
|
||||
"which"
|
||||
"ncurses"
|
||||
"libuuid"
|
||||
"gnutls"
|
||||
"openssl"
|
||||
"perl"
|
||||
"efitools"
|
||||
];
|
||||
}
|
||||
Reference in new issue
Block a user