From fe8f95a61ec9c4d2a1416d3f1dd327ad063beb4e Mon Sep 17 00:00:00 2001 From: Giulio Benetti Date: Fri, 15 Dec 2023 22:30:19 +0100 Subject: [PATCH] configs/mangopi_mq1rdw1_defconfig: new defconfig Add support for MangoPi MQ1RDW2: https://mangopi.org/mqr An Allwinner T113-S3(2xCortex-A7+128MB DDR3-1600 embedded) based SBC with: * USB-OTG Type-C socket * USB-HOST Type-C socket * 2x 18 pin GPIO headers * TF card slot * RTL8723DS WiFi module with ext. antenna connector * 40 pin RGB FPC connector * 6 pin CTP FPC connector * 24 pin DVP FPC connector * onboard mic * onboard audio amplifier * FEL,reset button Signed-off-by: Giulio Benetti Signed-off-by: Thomas Petazzoni --- DEVELOPERS | 2 + board/mangopi/mq1rdw2/genimage.cfg | 16 +++++++ board/mangopi/mq1rdw2/readme.txt | 46 +++++++++++++++++++ .../boot/extlinux/extlinux.conf | 4 ++ .../rootfs_overlay/etc/network/interfaces | 6 +++ .../rootfs_overlay/etc/wpa_supplicant.conf | 8 ++++ configs/mangopi_mq1rdw2_defconfig | 40 ++++++++++++++++ 7 files changed, 122 insertions(+) create mode 100644 board/mangopi/mq1rdw2/genimage.cfg create mode 100644 board/mangopi/mq1rdw2/readme.txt create mode 100644 board/mangopi/mq1rdw2/rootfs_overlay/boot/extlinux/extlinux.conf create mode 100644 board/mangopi/mq1rdw2/rootfs_overlay/etc/network/interfaces create mode 100644 board/mangopi/mq1rdw2/rootfs_overlay/etc/wpa_supplicant.conf create mode 100644 configs/mangopi_mq1rdw2_defconfig diff --git a/DEVELOPERS b/DEVELOPERS index 26868f74fe..0d12c3abcb 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -1211,6 +1211,7 @@ N: Giulio Benetti F: board/bananapi/bananapi-m2-ultra/ F: board/freescale/imx6ullevk/ F: board/freescale/imxrt1050evk/ +F: board/mangopi/mq1rdw2/ F: board/olimex/a* F: board/pine64/rockpro64 F: configs/amarula_vyasa_rk3288_defconfig @@ -1220,6 +1221,7 @@ F: configs/bananapi_m2_ultra_defconfig F: configs/freescale_imx6ullevk_defconfig F: configs/imx6ullevk_defconfig F: configs/imxrt1050-evk_defconfig +F: configs/mangopi_mq1rdw2_defconfig F: configs/olimex_a* F: configs/rockpro64_defconfig F: package/at/ diff --git a/board/mangopi/mq1rdw2/genimage.cfg b/board/mangopi/mq1rdw2/genimage.cfg new file mode 100644 index 0000000000..92c8677545 --- /dev/null +++ b/board/mangopi/mq1rdw2/genimage.cfg @@ -0,0 +1,16 @@ +image sdcard.img { + hdimage { + } + + partition u-boot { + in-partition-table = "no" + image = "u-boot-sunxi-with-spl.bin" + offset = 8K + size = 1016K # 1MB - 8KB + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/board/mangopi/mq1rdw2/readme.txt b/board/mangopi/mq1rdw2/readme.txt new file mode 100644 index 0000000000..fd37f63154 --- /dev/null +++ b/board/mangopi/mq1rdw2/readme.txt @@ -0,0 +1,46 @@ +MangoPi MQ1RDW2 +=============== + +MangoPi MQ1RDW2 is a tiny ARM Cortex-A7 based single board computer. +It's built around Allwinner T113-S3 dual core 1GHz CPU with integrated +128MB DDR3-1600 RAM. +Board features: +- USB-OTG Type-C socket +- USB-HOST Type-C socket +- 2x 18 pin GPIO headers +- TF card slot +- RTL8723DS WiFi module with ext. antenna connector +- 40 pin RGB FPC connector +- 6 pin CTP FPC connector +- 24 pin DVP FPC connector +- onboard mic +- onboard audio amplifier +- FEL,reset button + +How to build +============ + +$ make mangopi_mq1rdw2_defconfig +$ make + +Wifi +========== + +Edit board/mangopi/mq1rdw2/overlay/etc/wpa_supplicant.conf or +/etc/wpa_supplicant.conf once connected to the board: + +* Replace YOURSSID with your AP ssid +* Replace YOURPASSWD with your AP password + +How to write the SD card +======================== + +Once the build process is finished you will have an image called "sdcard.img" +in the output/images/ directory. + +Copy the bootable "sdcard.img" onto an SD card with "dd": + + $ sudo dd if=output/images/sdcard.img of=/dev/sdX + +Connect a TTL UART to the UART3 on P8 header (unpopulated), insert the microSD card and +plug in a USB-C cable to the OTG or HOST connector to boot the system. diff --git a/board/mangopi/mq1rdw2/rootfs_overlay/boot/extlinux/extlinux.conf b/board/mangopi/mq1rdw2/rootfs_overlay/boot/extlinux/extlinux.conf new file mode 100644 index 0000000000..c190ff7659 --- /dev/null +++ b/board/mangopi/mq1rdw2/rootfs_overlay/boot/extlinux/extlinux.conf @@ -0,0 +1,4 @@ +label MANGOPI-MQ1RDW2 + kernel /boot/zImage + devicetree /boot/sun8i-t113s-mangopi-mq-r-t113.dtb + append console=ttyS3,115200 root=/dev/mmcblk0p1 rootwait panic=10 ${extra} diff --git a/board/mangopi/mq1rdw2/rootfs_overlay/etc/network/interfaces b/board/mangopi/mq1rdw2/rootfs_overlay/etc/network/interfaces new file mode 100644 index 0000000000..89e7d74aff --- /dev/null +++ b/board/mangopi/mq1rdw2/rootfs_overlay/etc/network/interfaces @@ -0,0 +1,6 @@ +auto lo +iface lo inet loopback + +auto wlan0 +iface wlan0 inet dhcp +wpa-conf /etc/wpa_supplicant.conf diff --git a/board/mangopi/mq1rdw2/rootfs_overlay/etc/wpa_supplicant.conf b/board/mangopi/mq1rdw2/rootfs_overlay/etc/wpa_supplicant.conf new file mode 100644 index 0000000000..b43292b0a7 --- /dev/null +++ b/board/mangopi/mq1rdw2/rootfs_overlay/etc/wpa_supplicant.conf @@ -0,0 +1,8 @@ +ap_scan=1 + +network={ + ssid="YOURSSID" + scan_ssid=1 + key_mgmt=WPA-PSK + psk="YOURPASSWD" +} diff --git a/configs/mangopi_mq1rdw2_defconfig b/configs/mangopi_mq1rdw2_defconfig new file mode 100644 index 0000000000..a2f8a1299b --- /dev/null +++ b/configs/mangopi_mq1rdw2_defconfig @@ -0,0 +1,40 @@ +BR2_arm=y +BR2_cortex_a7=y +BR2_ARM_FPU_VFPV4=y +BR2_TARGET_GENERIC_HOSTNAME="mangopi-mq1rdw2" +BR2_TARGET_GENERIC_ISSUE="Welcome to MangoPI MQ1RDW2" +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyS3" +BR2_SYSTEM_DHCP="eth0" +BR2_ROOTFS_OVERLAY="board/mangopi/mq1rdw2/rootfs_overlay" +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/mangopi/mq1rdw2/genimage.cfg" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.5" +BR2_LINUX_KERNEL_DEFCONFIG="sunxi" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="allwinner/sun8i-t113s-mangopi-mq-r-t113" +BR2_LINUX_KERNEL_INSTALL_TARGET=y +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y +BR2_PACKAGE_RTL8723DS=y +BR2_PACKAGE_WIRELESS_TOOLS=y +BR2_PACKAGE_WPA_SUPPLICANT=y +BR2_PACKAGE_WPA_SUPPLICANT_AUTOSCAN=y +BR2_PACKAGE_WPA_SUPPLICANT_CLI=y +BR2_PACKAGE_WPA_SUPPLICANT_WPA_CLIENT_SO=y +BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +# BR2_TARGET_ROOTFS_TAR is not set +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2024.01-rc4" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="mangopi_mq_r" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y +BR2_TARGET_UBOOT_NEEDS_OPENSSL=y +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin" +BR2_PACKAGE_HOST_GENIMAGE=y