46 lines
3.1 KiB
Plaintext
46 lines
3.1 KiB
Plaintext
# Mediatek MT8395 quad core 4GB 8GB 16GB
|
|
BOARD_NAME="Radxa Nio 12L"
|
|
BOARD_VENDOR="radxa"
|
|
BOARDFAMILY="genio"
|
|
BOARD_MAINTAINER="HeyMeco"
|
|
KERNEL_TARGET="edge"
|
|
KERNEL_TEST_TARGET="edge"
|
|
BOOT_FDT_FILE="mediatek/mt8395-radxa-nio-12l.dtb" # automatically patched by u-boot with autodetected memory size
|
|
SERIALCON="ttyS0:921600"
|
|
SRC_CMDLINE="splash plymouth.ignore-serial-consoles console=ttyS0,921600 console=tty0" # for extlinux/EXT=u-boot-menu
|
|
HAS_VIDEO_OUTPUT="yes"
|
|
declare -g BOARD_FIRMWARE_INSTALL="-full"
|
|
declare -g BOOTCONFIG="genio_1200_radxa_nio_12l_d8_defconfig" # d4/d8/d16 are irrelevant, since we've patches to autodetect, for both u-boot and kernel
|
|
declare -g BOOT_SOC="mt8395" # the NIO-12L is a MT8395, but everything is named mt8195 in OPTEE/TF-A/Libbase/etc.
|
|
declare -g MEDIATEK_GENIO_SOC_PLATFORM="mt8195" # The actual PLAT= for TF-A, libbase, etc.
|
|
# blobs live at https://github.com/armbian/mtkbin/tree/main/radxa-nio-12l
|
|
|
|
# Important: we change u-boot's env offset to half-way through the UFS LUN, so we don't conflict or inherit env from
|
|
# vendor or Collabora version of u-boot, in case the user had ran `saveenv` previously. It would conflict
|
|
# with Armbian's version ("env default -f -a" to clean), which boots OS from SD cards first, Eth last, etc.
|
|
function post_config_uboot_target__nio_12l_armbian_specific_environment_location() {
|
|
display_alert "u-boot for ${BOARD}/${BRANCH}" "u-boot: board-specific configs" "info"
|
|
run_host_command_logged scripts/config --set-val CONFIG_ENV_OFFSET "0x200000"
|
|
|
|
display_alert "u-boot for ${BOARD}/${BRANCH}" "u-boot: extra cmdline commands" "info"
|
|
run_host_command_logged scripts/config --enable CONFIG_CMD_ITEST # itest expects integers on both sides, whereas regular test assumes strings
|
|
run_host_command_logged scripts/config --enable CONFIG_CMD_BOOTZ # bootz allows booting zImages
|
|
run_host_command_logged scripts/config --enable CONFIG_CMD_MEMINFO # meminfo shows memory info in u-boot
|
|
run_host_command_logged scripts/config --enable CONFIG_CMD_SETEXPR # setexpr allows arithmetic expressions in setenv
|
|
}
|
|
|
|
# Include fw_setenv, configured to point to the correct spot on the UFS LUN number
|
|
declare -g PACKAGE_LIST_BOARD="libubootenv-tool" # libubootenv-tool provides fw_printenv and fw_setenv, for talking to U-Boot environment
|
|
function post_family_tweaks__config_radxa_nio_12l_fwenv() {
|
|
display_alert "Configuring fw_printenv and fw_setenv" "for ${BOARD}" "info"
|
|
# Addresses below come from CONFIG_ENV_OFFSET and CONFIG_ENV_SIZE in defconfig
|
|
cat <<- 'FW_ENV_CONFIG' > "${SDCARD}"/etc/fw_env.config
|
|
# UFS LUN 2 (scsi 1 in u-boot) u-boot env for the ${BOARD_NAME}
|
|
# The correct way to access the device would be /dev/disk/by-path/platform-11270000.ufshci-scsi-0:0:0:1
|
|
# but unfortunately libubootenv-tool can't handle the colons in that path; so use /dev/sdb instead
|
|
# ATTENTION: Offset is set to 0x200000 to avoid conflict with Collabora/vendor build u-boot env area
|
|
# Device name Device offset Env. size Flash sector size Number of sectors
|
|
/dev/sdb 0x200000 0x2000
|
|
FW_ENV_CONFIG
|
|
}
|