mirror of
https://github.com/Fishwaldo/meta-riscv.git
synced 2025-03-15 19:41:42 +00:00
conf/machine: Add mangopi-mq-pro machine
Based on Nezha D1 machine config with addjusterd DTB configuration and added wifi module driver. Tested with core-image-(base|weston) on MangoPi MQ Pro rev 1.3: - HDMI output/weston and wifi are working. USB-C ethernet detected but not tested due to lack of HW. Signed-off-by: Pavel Zhukov <pavel@zhukoff.net>
This commit is contained in:
parent
b576fc7019
commit
f4d336cb7e
4 changed files with 85 additions and 3 deletions
15
README.md
15
README.md
|
@ -62,6 +62,7 @@ The different machines you can build for are:
|
||||||
|
|
||||||
* freedom-u540: The SiFive HiFive Unleashed board
|
* freedom-u540: The SiFive HiFive Unleashed board
|
||||||
* beaglev-starlight-jh7100: BeagleV - Based on Starlight JH7100 SOC
|
* beaglev-starlight-jh7100: BeagleV - Based on Starlight JH7100 SOC
|
||||||
|
* mangopi-mq-pro: MangoPi MQ Pro - Based on Allwinner D1 SOC
|
||||||
|
|
||||||
Note that this layer also provides improvements and features for the
|
Note that this layer also provides improvements and features for the
|
||||||
upstream qemuriscv32 and qemuriscv64 machines.
|
upstream qemuriscv32 and qemuriscv64 machines.
|
||||||
|
@ -86,6 +87,11 @@ To build an image to run on the BeagleV using Wayland run the following
|
||||||
MACHINE=beaglev-starlight-jh7100 bitbake core-image-weston
|
MACHINE=beaglev-starlight-jh7100 bitbake core-image-weston
|
||||||
```
|
```
|
||||||
|
|
||||||
|
To build an image to run on the MangoPi MQ Pro (console only has been tested so far) run the following:
|
||||||
|
```text
|
||||||
|
MACHINE=mangopi-mq-pro bitbake core-image-base
|
||||||
|
```
|
||||||
|
|
||||||
To build a full GUI equipped image running Plasma Mobile see the in-tree documentation [here](https://github.com/riscv/meta-riscv/blob/master/docs/Plasma-Mobile-on-Unleashed.md).
|
To build a full GUI equipped image running Plasma Mobile see the in-tree documentation [here](https://github.com/riscv/meta-riscv/blob/master/docs/Plasma-Mobile-on-Unleashed.md).
|
||||||
|
|
||||||
## Running in QEMU
|
## Running in QEMU
|
||||||
|
@ -132,12 +138,19 @@ $ sudo bmaptool copy --bmap image.bmap ./freedom-u540-opensbi-201812181337-mmcbl
|
||||||
|
|
||||||
### dding wic.gz
|
### dding wic.gz
|
||||||
|
|
||||||
The output of a ```freedom-u540``` or ```beaglev-starlight-jh7100``` build will be a ```<image>.wic.gz``` file. You can write this file to an sd card using:
|
The output of a ```freedom-u540```, ```beaglev-starlight-jh7100``` or ```mangopi-mq-pro``` build will be a ```<image>.wic.gz``` file. You can write this file to an sd card using:
|
||||||
|
|
||||||
```text
|
```text
|
||||||
$ zcat <image>-<machine>.wic.gz | sudo dd of=/dev/sdX bs=4M iflag=fullblock oflag=direct conv=fsync status=progress
|
$ zcat <image>-<machine>.wic.gz | sudo dd of=/dev/sdX bs=4M iflag=fullblock oflag=direct conv=fsync status=progress
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Using bmaptoop to write the image
|
||||||
|
|
||||||
|
Instead of dding wic.gz image ```bmaptool``` (available in most Linux distributions and/or pip) can be used for more reliable and faster flashing. You can write this file to an sd card using:
|
||||||
|
```text
|
||||||
|
$ sudo bmaptool copy <image>-<machine>.wic.gz /dev/sdX
|
||||||
|
```
|
||||||
|
|
||||||
## Maintainer(s)
|
## Maintainer(s)
|
||||||
|
|
||||||
* Khem Raj `<raj dot khem at gmail.com>`
|
* Khem Raj `<raj dot khem at gmail.com>`
|
||||||
|
|
69
conf/machine/mangopi-mq-pro.conf
Normal file
69
conf/machine/mangopi-mq-pro.conf
Normal file
|
@ -0,0 +1,69 @@
|
||||||
|
#@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"
|
||||||
|
PREFERRED_PROVIDER_virtual/kernel ?= "linux-nezha-dev"
|
||||||
|
PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-nezha"
|
||||||
|
|
||||||
|
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"
|
||||||
|
|
||||||
|
MACHINE_EXTRA_RRECOMMENDS += " kernel-modules"
|
||||||
|
|
||||||
|
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"
|
||||||
|
|
||||||
|
EXTRA_IMAGEDEPENDS += "u-boot-nezha"
|
||||||
|
UBOOT_MACHINE = "nezha_defconfig"
|
||||||
|
|
||||||
|
|
||||||
|
UBOOT_ENTRYPOINT = "0x40200000"
|
||||||
|
UBOOT_DTB_LOADADDRESS = "0x4FA00000"
|
||||||
|
UBOOT_DTB = "1"
|
||||||
|
UBOOT_DTB_BINARY ?= "sun20i-d1-mangopi-mq-pro.dtb"
|
||||||
|
|
||||||
|
MACHINE_ESSENTIAL_EXTRA_RDEPENDS ?= "kernel-module-rtl8723ds"
|
||||||
|
|
||||||
|
## wic default support
|
||||||
|
WKS_FILE_DEPENDS ?= " \
|
||||||
|
u-boot-nezha \
|
||||||
|
opensbi \
|
||||||
|
e2fsprogs-native \
|
||||||
|
bmap-tools-native \
|
||||||
|
"
|
||||||
|
|
||||||
|
IMAGE_BOOT_FILES ?= " \
|
||||||
|
${KERNEL_IMAGETYPE} \
|
||||||
|
boot.scr.uimg \
|
||||||
|
uEnv.txt \
|
||||||
|
"
|
||||||
|
|
||||||
|
WKS_FILE ?= "nezha.wks"
|
|
@ -44,7 +44,7 @@ do_deploy:append() {
|
||||||
install -m 644 ${WORKDIR}/uEnv-nezha.txt ${DEPLOYDIR}/uEnv.txt
|
install -m 644 ${WORKDIR}/uEnv-nezha.txt ${DEPLOYDIR}/uEnv.txt
|
||||||
}
|
}
|
||||||
|
|
||||||
COMPATIBLE_MACHINE = "(nezha-allwinner-d1)"
|
COMPATIBLE_MACHINE = "(nezha-allwinner-d1|mangopi-mq-pro)"
|
||||||
|
|
||||||
TOOLCHAIN = "gcc"
|
TOOLCHAIN = "gcc"
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,6 @@ KERNEL_FEATURES += "ktypes/standard/standard.cfg"
|
||||||
# using out-of-tree
|
# using out-of-tree
|
||||||
#KBUILD_DEFCONFIG = "nezha_defconfig"
|
#KBUILD_DEFCONFIG = "nezha_defconfig"
|
||||||
|
|
||||||
COMPATIBLE_MACHINE = "(nezha-allwinner-d1)"
|
COMPATIBLE_MACHINE = "(nezha-allwinner-d1|mangopi-mq-pro)"
|
||||||
|
|
||||||
KERNEL_VERSION_SANITY_SKIP="1"
|
KERNEL_VERSION_SANITY_SKIP="1"
|
||||||
|
|
Loading…
Add table
Reference in a new issue