diff --git a/buildroot-2021.05/configs/milkv-duo256m_musl_riscv64_defconfig b/buildroot-2021.05/configs/milkv-duo256m_musl_riscv64_defconfig index dec4927adb..bad2b30707 100644 --- a/buildroot-2021.05/configs/milkv-duo256m_musl_riscv64_defconfig +++ b/buildroot-2021.05/configs/milkv-duo256m_musl_riscv64_defconfig @@ -253,6 +253,7 @@ BR2_PACKAGE_DUO_PINMUX=y # BR2_PACKAGE_DUO_PINMUX_DUO is not set BR2_PACKAGE_DUO_PINMUX_DUO256M=y # BR2_PACKAGE_DUO_PINMUX_DUOS is not set +BR2_PACKAGE_DUO_WIRINGX=y BR2_PACKAGE_SKELETON=y BR2_PACKAGE_HAS_SKELETON=y BR2_PACKAGE_PROVIDES_SKELETON="skeleton-init-sysv" diff --git a/buildroot-2021.05/configs/milkv-duo_musl_riscv64_defconfig b/buildroot-2021.05/configs/milkv-duo_musl_riscv64_defconfig index 176d2b10ef..72f8faa131 100644 --- a/buildroot-2021.05/configs/milkv-duo_musl_riscv64_defconfig +++ b/buildroot-2021.05/configs/milkv-duo_musl_riscv64_defconfig @@ -275,6 +275,7 @@ BR2_PACKAGE_DUO_PINMUX=y BR2_PACKAGE_DUO_PINMUX_DUO=y # BR2_PACKAGE_DUO_PINMUX_DUO256M is not set # BR2_PACKAGE_DUO_PINMUX_DUOS is not set +BR2_PACKAGE_DUO_WIRINGX=y BR2_PACKAGE_SKELETON=y BR2_PACKAGE_HAS_SKELETON=y BR2_PACKAGE_PROVIDES_SKELETON="skeleton-init-sysv" diff --git a/buildroot-2021.05/configs/milkv-duos-emmc_musl_riscv64_defconfig b/buildroot-2021.05/configs/milkv-duos-emmc_musl_riscv64_defconfig index 40c9421577..f82348ab23 100644 --- a/buildroot-2021.05/configs/milkv-duos-emmc_musl_riscv64_defconfig +++ b/buildroot-2021.05/configs/milkv-duos-emmc_musl_riscv64_defconfig @@ -253,6 +253,7 @@ BR2_PACKAGE_DUO_PINMUX=y # BR2_PACKAGE_DUO_PINMUX_DUO is not set # BR2_PACKAGE_DUO_PINMUX_DUO256M is not set BR2_PACKAGE_DUO_PINMUX_DUOS=y +BR2_PACKAGE_DUO_WIRINGX=y BR2_PACKAGE_SKELETON=y BR2_PACKAGE_HAS_SKELETON=y BR2_PACKAGE_PROVIDES_SKELETON="skeleton-init-sysv" diff --git a/buildroot-2021.05/configs/milkv-duos-sd_musl_riscv64_defconfig b/buildroot-2021.05/configs/milkv-duos-sd_musl_riscv64_defconfig index c2f0457430..74f0c1e2b8 100644 --- a/buildroot-2021.05/configs/milkv-duos-sd_musl_riscv64_defconfig +++ b/buildroot-2021.05/configs/milkv-duos-sd_musl_riscv64_defconfig @@ -253,6 +253,7 @@ BR2_PACKAGE_DUO_PINMUX=y # BR2_PACKAGE_DUO_PINMUX_DUO is not set # BR2_PACKAGE_DUO_PINMUX_DUO256M is not set BR2_PACKAGE_DUO_PINMUX_DUOS=y +BR2_PACKAGE_DUO_WIRINGX=y BR2_PACKAGE_SKELETON=y BR2_PACKAGE_HAS_SKELETON=y BR2_PACKAGE_PROVIDES_SKELETON="skeleton-init-sysv" diff --git a/buildroot-2021.05/dl/duo-wiringx/.lock b/buildroot-2021.05/dl/duo-wiringx/.lock new file mode 100644 index 0000000000..e69de29bb2 diff --git a/buildroot-2021.05/dl/duo-wiringx/duo-wiringx-1.0.1.tar.gz b/buildroot-2021.05/dl/duo-wiringx/duo-wiringx-1.0.1.tar.gz new file mode 100644 index 0000000000..a7fbcfa92b Binary files /dev/null and b/buildroot-2021.05/dl/duo-wiringx/duo-wiringx-1.0.1.tar.gz differ diff --git a/buildroot-2021.05/package/Config.in b/buildroot-2021.05/package/Config.in index 3883348e2d..fe480395eb 100644 --- a/buildroot-2021.05/package/Config.in +++ b/buildroot-2021.05/package/Config.in @@ -3,6 +3,7 @@ menu "Target packages" source "package/busybox/Config.in" source "package/cvi-pinmux/Config.in" source "package/duo-pinmux/Config.in" + source "package/duo-wiringx/Config.in" source "package/skeleton/Config.in" source "package/skeleton-custom/Config.in" source "package/skeleton-init-common/Config.in" diff --git a/buildroot-2021.05/package/duo-wiringx/0001-fix-time_t.patch b/buildroot-2021.05/package/duo-wiringx/0001-fix-time_t.patch new file mode 100644 index 0000000000..e0def565b5 --- /dev/null +++ b/buildroot-2021.05/package/duo-wiringx/0001-fix-time_t.patch @@ -0,0 +1,26 @@ +From 027658db506ccc0097ad9c1d2cd4f7c9d8210edb Mon Sep 17 00:00:00 2001 +From: carbon +Date: Wed, 17 Apr 2024 15:09:26 +0800 +Subject: [PATCH] fix time_t + +--- + src/wiringx.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/wiringx.c b/src/wiringx.c +index 034674a..4171a75 100644 +--- a/src/wiringx.c ++++ b/src/wiringx.c +@@ -113,6 +113,9 @@ static struct spi_t spi[2] = { + } while(0) + #endif + ++typedef time_t __time_t; ++typedef suseconds_t __suseconds_t; ++ + /* Both the delayMicroseconds and the delayMicrosecondsHard + are taken from wiringPi */ + static void delayMicrosecondsHard(unsigned int howLong) { +-- +2.25.1 + diff --git a/buildroot-2021.05/package/duo-wiringx/Config.in b/buildroot-2021.05/package/duo-wiringx/Config.in new file mode 100644 index 0000000000..73d2619126 --- /dev/null +++ b/buildroot-2021.05/package/duo-wiringx/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_DUO_WIRINGX + bool "wiringX" + help + wiringX for Milk-V Duo + + https://github.com/milkv-duo/duo-wiringx diff --git a/buildroot-2021.05/package/duo-wiringx/duo-wiringx.hash b/buildroot-2021.05/package/duo-wiringx/duo-wiringx.hash new file mode 100644 index 0000000000..3a2a593a0a --- /dev/null +++ b/buildroot-2021.05/package/duo-wiringx/duo-wiringx.hash @@ -0,0 +1,4 @@ +# From https://github.com/milkv-duo/duo-wiringx +sha256 3309970f0e6d69f27e6a35ae006ccb12939c25dd223391aa24db450b08978068 duo-wiringx-1.0.1.tar.gz +# Locally calculated +sha256 fab3dd6bdab226f1c08630b1dd917e11fcb4ec5e1e020e2c16f83a0a13863e85 LICENSE diff --git a/buildroot-2021.05/package/duo-wiringx/duo-wiringx.mk b/buildroot-2021.05/package/duo-wiringx/duo-wiringx.mk new file mode 100644 index 0000000000..21101ec117 --- /dev/null +++ b/buildroot-2021.05/package/duo-wiringx/duo-wiringx.mk @@ -0,0 +1,7 @@ +DUO_WIRINGX_VERSION = 1.0.1 +DUO_WIRINGX_SITE = $(call github,milkv-duo,duo-wiringx,$(DUO_WIRINGX_VERSION)) +DUO_WIRINGX_LICENSE = MPL-2.0 +DUO_WIRINGX_LICENSE_FILES = COPYING +DUO_WIRINGX_INSTALL_STAGING = YES + +$(eval $(cmake-package))