2023-02-04 19:45:43 +01:00
|
|
|
#@TYPE: Machine
|
|
|
|
#@NAME: mangopi-mq-pro
|
|
|
|
#@SOC: Allwinner D1
|
|
|
|
#@DESCRIPTION: Machine configuration for MangoPi MQ Pro
|
|
|
|
|
|
|
|
require conf/machine/include/riscv/tune-riscv.inc
|
|
|
|
|
|
|
|
MACHINE_FEATURES = "screen keyboard ext2 ext3 serial wifi bluetooth"
|
|
|
|
|
|
|
|
KERNEL_CLASSES = "kernel-fitimage"
|
|
|
|
KERNEL_IMAGETYPE = "fitImage"
|
|
|
|
UBOOT_ENV ?= "boot"
|
|
|
|
UBOOT_ENV_SUFFIX = "scr.uimg"
|
2023-02-07 19:02:25 +01:00
|
|
|
PREFERRED_PROVIDER_virtual/kernel ?= "linux-allwinnerd1-dev"
|
2023-02-07 19:03:50 +01:00
|
|
|
PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-allwinnerd1"
|
2023-02-04 19:45:43 +01:00
|
|
|
|
|
|
|
PREFERRED_VERSION_openocd-native = "riscv"
|
|
|
|
PREFERRED_VERSION_openocd = "riscv"
|
|
|
|
|
|
|
|
EXTRA_IMAGEDEPENDS += "opensbi"
|
|
|
|
RISCV_SBI_PLAT = "generic"
|
|
|
|
|
|
|
|
## This sets u-boot as the default OpenSBI payload
|
|
|
|
### Nezha board uses TOC1 images loaded by SPL and containing U-Boot, DTB, and
|
|
|
|
### OpenSBI so 'RISCV_SBI_PAYLOAD' isn't used.
|
|
|
|
### 'RISCV_SBI_FDT' isn't used because the DTB is loaded from RAM at
|
|
|
|
### ${fdtcontroladdr}
|
|
|
|
#RISCV_SBI_PAYLOAD ?= "u-boot.bin"
|
|
|
|
#RISCV_SBI_FDT ?= "sun20i-d1-nezha.dtb"
|
|
|
|
|
|
|
|
SERIAL_CONSOLES = "115200;ttyS0"
|
|
|
|
|
2023-02-07 19:06:55 +01:00
|
|
|
MACHINE_EXTRA_RRECOMMENDS += " kernel-modules kernel-module-rtl8723ds"
|
|
|
|
# FIXME the license situation of the firmware is unclear at the moment of
|
|
|
|
# writing this. Once rtl8723ds_fw is properly licensed (ideally put into
|
|
|
|
# linux-firmware this should be added to MACHINE_EXTRA_RRECOMMENDS:
|
|
|
|
# linux-firmware-rtl8723ds \
|
|
|
|
# For more details see:
|
|
|
|
# https://bugs.launchpad.net/ubuntu/+source/rtl8723bt-firmware/+bug/1995462
|
2023-02-04 19:45:43 +01:00
|
|
|
|
|
|
|
IMAGE_FSTYPES += "wic.gz wic.bmap ext4"
|
|
|
|
|
|
|
|
### 'KERNEL_DEVICETREE' isn't used because the DTB is loaded from RAM
|
|
|
|
### at address ${fdtcontroladdr}
|
|
|
|
#KERNEL_DEVICETREE ?= "allwinner/sun20i-d1-nezha.dtb"
|
|
|
|
|
|
|
|
## Do not update fstab file when using wic images
|
|
|
|
WIC_CREATE_EXTRA_ARGS ?= "--no-fstab-update"
|
|
|
|
|
2023-02-07 19:03:50 +01:00
|
|
|
EXTRA_IMAGEDEPENDS += "u-boot-allwinnerd1"
|
2023-02-07 19:06:55 +01:00
|
|
|
UBOOT_MACHINE = "mangopi_mq_pro_defconfig"
|
2023-02-04 19:45:43 +01:00
|
|
|
|
|
|
|
|
|
|
|
UBOOT_ENTRYPOINT = "0x40200000"
|
|
|
|
UBOOT_DTB_LOADADDRESS = "0x4FA00000"
|
|
|
|
UBOOT_DTB = "1"
|
|
|
|
UBOOT_DTB_BINARY ?= "sun20i-d1-mangopi-mq-pro.dtb"
|
|
|
|
|
|
|
|
## wic default support
|
|
|
|
WKS_FILE_DEPENDS ?= " \
|
2023-02-07 19:03:50 +01:00
|
|
|
u-boot-allwinnerd1\
|
2023-02-04 19:45:43 +01:00
|
|
|
opensbi \
|
|
|
|
e2fsprogs-native \
|
|
|
|
bmap-tools-native \
|
|
|
|
"
|
|
|
|
|
|
|
|
IMAGE_BOOT_FILES ?= " \
|
|
|
|
${KERNEL_IMAGETYPE} \
|
|
|
|
boot.scr.uimg \
|
|
|
|
uEnv.txt \
|
|
|
|
"
|
|
|
|
|
|
|
|
WKS_FILE ?= "nezha.wks"
|
2023-02-07 19:02:25 +01:00
|
|
|
|
|
|
|
KERNEL_MODULE_AUTOLOAD:append = " hci_uart 8723ds "
|
|
|
|
|
|
|
|
# FIXME
|
|
|
|
# TODO Should be changed to
|
|
|
|
# https://github.com/smaeul/u-boot/commit/528ae9bc6c55edd3ffe642734b4132a8246ea777#diff-7a77df959a917850f0b29cd98afe6c3ca6de627a0c52dd9983cd42fede7a0e34
|
|
|
|
# once it's is merged into kernel too
|
|
|
|
# mangopi_mq_pro_defconfig
|
|
|
|
KBUILD_DEFCONFIG = "nezha_defconfig"
|
2023-02-08 00:11:54 +01:00
|
|
|
UBOOT_MACHINE = "mangopi_mq_pro_defconfig"
|