Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions config/boards/gateway-dk.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# NXP LS1046A quad core Cortex-A72 8GB RAM SoC eMMC GBE SFP+
BOARD_NAME="Mono Gateway Development Kit"
BOARD_VENDOR="mono"
BOARDFAMILY="ls1046a"
BOARD_MAINTAINER="tomazzaman"
BOOTCONFIG="mono_gateway_dk_defconfig"
KERNEL_TARGET="current"
KERNEL_TEST_TARGET="current"
HAS_VIDEO_OUTPUT="no"
BOOT_FDT_FILE="freescale/mono-gateway-dk.dtb"
BOOTENV_FILE="gateway-dk.txt"

# U-Boot, ATF, and RCW — Mono forks with custom DDR4 config and SERDES
declare -g BOOTSOURCE="https://github.com/we-are-mono/u-boot"
declare -g BOOTBRANCH="commit:9f13d11658f696d4d1b4f76fa88264c52bd2e7c2"
declare -g BOOTPATCHDIR="u-boot-ls1046a"
declare -g UBOOT_TARGET_MAP=";;u-boot.bin bl2_emmc.pbl fip.bin fsl_fman_ucode_ls1046_r1.0_108_4_9.bin u-boot-env.bin"

declare -g ATFSOURCE="https://github.com/we-are-mono/atf"
declare -g ATFDIR="arm-trusted-firmware-ls1046a"
declare -g ATFBRANCH="commit:80a4fbc4d79b16549a2bad4e3532899ce7de4cef"
declare -g ATFPATCHDIR="atf-ls1046a"

declare -g LS1046A_PLAT="gateway_dk"
declare -g RCW_SOURCE="https://github.com/we-are-mono/rcw"
declare -g RCW_BRANCH="commit:a37e83067fb9496dd0be6b4bc24e85361fd2e0a2"
declare -g RCW_BIN_PATH="NN_FFSSPSNP_1133_5A06/rcw_2100_emmcboot.bin"

# ASK hardware offloading (disable with ENABLE_ASK=no for a basic networking image)
[[ "${ENABLE_ASK:-yes}" == "yes" ]] && enable_extension "gateway-dk-ask"

# Board-specific kernel modules auto-load
function post_family_tweaks_bsp__gateway_dk_board() {
mkdir -p "${destination}/etc/modules-load.d"
printf '%s\n' sfp-led leds-lp5812 > "${destination}/etc/modules-load.d/gateway-dk-leds.conf"

# Boot LED indicator (green off, white on = Linux booted)
install -Dm 755 "${SRC}/packages/bsp/gateway-dk/gateway-dk-leds.sh" \
"${destination}/usr/local/bin/gateway-dk-leds.sh"
install -Dm 644 "${SRC}/packages/bsp/gateway-dk/gateway-dk-leds.service" \
"${destination}/etc/systemd/system/gateway-dk-leds.service"

# Fan control — EMC2305 driven by cluster_thermal CPU temperature
install -Dm 755 "${SRC}/packages/bsp/gateway-dk/generate-fancontrol-conf" \
"${destination}/usr/local/bin/generate-fancontrol-conf"
install -Dm 644 "${SRC}/packages/bsp/gateway-dk/generate-fancontrol-conf.service" \
"${destination}/etc/systemd/system/generate-fancontrol-conf.service"
}

function post_family_tweaks__gateway_dk_services() {
# IP forwarding
echo "net.ipv4.ip_forward=1" > "${SDCARD}/etc/sysctl.d/99-ls1046a-forwarding.conf"

# Fan control and sensor packages
display_alert "Installing fancontrol" "emc2305 + cluster_thermal" "info"
chroot_sdcard_apt_get_install fancontrol lm-sensors

chroot_sdcard systemctl enable gateway-dk-leds.service
chroot_sdcard systemctl enable generate-fancontrol-conf.service
chroot_sdcard systemctl enable fancontrol.service
}
26 changes: 26 additions & 0 deletions config/bootenv/gateway-dk.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Base settings duplicated from ls1046a.txt (no include mechanism in bootenv)
baudrate=115200
stderr=serial@21c0500
stdin=serial@21c0500
stdout=serial@21c0500

scriptaddr=0x80000000
fdt_addr_r=0x88000000
kernel_addr_r=0x82000000
kernel_comp_addr_r=0x90000000
kernel_comp_size=0x1600000
ramdisk_addr_r=0x88080000
load_addr=0xa0000000
loadaddr=0xa0000000

# NOR flash partition layout (passed to kernel for /dev/mtd awareness even when booting from eMMC)
mtdparts=1550000.spi:1M(rcw-bl2),2M(uboot),1M(uboot-env),1M(fman-ucode),1M(recovery-dtb),4M(unallocated),-(kernel-initramfs)

bootargs_console=console=ttyS0,115200 earlycon=uart8250,mmio,0x21c0500 mtdparts=${mtdparts} pstore.backend=mtdoops mtdoops.mtddev=backup
bootdelay=3

bootcmd=sysboot mmc 0:1 any ${scriptaddr} /boot/extlinux/extlinux.conf

# Default Ethernet — fm1-mac5 is the first 1GbE SGMII port (SERDES lane H)
ethact=fm1-mac5
ethprime=fm1-mac5
18 changes: 18 additions & 0 deletions config/bootenv/ls1046a.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
baudrate=115200
stderr=serial@21c0500
stdin=serial@21c0500
stdout=serial@21c0500

scriptaddr=0x80000000
fdt_addr_r=0x88000000
kernel_addr_r=0x82000000
kernel_comp_addr_r=0x90000000
kernel_comp_size=0x1600000
ramdisk_addr_r=0x88080000
load_addr=0xa0000000
loadaddr=0xa0000000

bootargs_console=console=ttyS0,115200 earlycon=uart8250,mmio,0x21c0500
bootdelay=3

bootcmd=sysboot mmc 0:1 any ${scriptaddr} /boot/extlinux/extlinux.conf
1 change: 1 addition & 0 deletions config/kernel/linux-ls1046a-ask-current.config
Loading
Loading