SCP firmware for Allwinner ARM SoCs.

ok jca@
This commit is contained in:
kettenis
2024-02-20 12:25:23 +00:00
parent 6f80e186d4
commit 1f907da7d0
6 changed files with 113 additions and 0 deletions
+58
View File
@@ -0,0 +1,58 @@
PKG_ARCH= *
COMMENT= libre SCP firmware for Allwinner sunxi SoCs
GH_ACCOUNT= crust-firmware
GH_PROJECT= crust
GH_TAGNAME= v0.6
CATEGORIES= sysutils
# BSD
PERMIT_PACKAGE= Yes
BUILD_DEPENDS= devel/or1k-elf/gcc
MAKE_ENV= CROSS_COMPILE="or1k-unknown-elf-"
MAKE_FLAGS= V=1
NO_TEST= Yes
USE_GMAKE= Yes
BOARDS=\
a64-olinuxino \
nanopi_a64 \
orangepi_pc2 \
orangepi_win \
orangepi_zero_plus \
pine64-lts \
pine64_plus \
pine_h64 \
pinebook
do-build:
.for BOARD in ${BOARDS}
cd ${WRKSRC} && \
mkdir -p build/${BOARD} && \
${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} \
OBJ="build/${BOARD}" \
-f ${MAKE_FILE} "${BOARD}"_defconfig
cd ${WRKSRC} && \
${SETENV} ${MAKE_ENV} \
${MAKE_PROGRAM} ${MAKE_FLAGS} OBJ="build/${BOARD}" \
-f ${MAKE_FILE} ${ALL_TARGET}
.endfor
do-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/crust
.for BOARD in ${BOARDS}
@[ -d ${WRKSRC}/build/${BOARD}/scp ] && \
echo ${INSTALL_DATA_DIR} ${PREFIX}/share/crust/${BOARD} && \
${INSTALL_DATA_DIR} ${PREFIX}/share/crust/${BOARD} && \
echo cd ${WRKSRC}/build/${BOARD}/scp && \
cd ${WRKSRC}/build/${BOARD}/scp && \
echo ${INSTALL_DATA} scp.bin ${PREFIX}/share/crust/${BOARD}/; \
${INSTALL_DATA} scp.bin ${PREFIX}/share/crust/${BOARD}/
.endfor
.include <bsd.port.mk>
+2
View File
@@ -0,0 +1,2 @@
SHA256 (crust-0.6.tar.gz) = Q7iVhd17bwIiAL14ipeoWoMf7/qYiv/AS8oYdXoTPv0=
SIZE (crust-0.6.tar.gz) = 193461
@@ -0,0 +1,12 @@
Index: 3rdparty/kconfig/confdata.c
--- 3rdparty/kconfig/confdata.c.orig
+++ 3rdparty/kconfig/confdata.c
@@ -71,7 +71,7 @@ static bool is_same(const char *file1, const char *fil
if (map2 == MAP_FAILED)
goto close2;
- if (bcmp(map1, map2, st1.st_size))
+ if (memcmp(map1, map2, st1.st_size))
goto close2;
ret = true;
+11
View File
@@ -0,0 +1,11 @@
Index: Makefile
--- Makefile.orig
+++ Makefile
@@ -27,7 +27,6 @@ COMMON_CFLAGS = -Os -pipe -std=c11 \
-ffunction-sections \
-fno-builtin \
-fno-common \
- -fvar-tracking-assignments \
-g$(if $(CONFIG_DEBUG_INFO),gdb,0) \
-Wall -Wextra -Wformat=2 -Wpedantic -Wshadow \
-Werror=implicit-function-declaration \
+11
View File
@@ -0,0 +1,11 @@
Libre SCP firmware for Allwinner sunxi SoCs.
Crust improves battery life and thermal performance by implementing a
deep sleep state. During deep sleep, the CPU cores, the DRAM
controller, and most onboard peripherals are powered down, reducing
power consumption by 80% or more compared to an idle device. On boards
without a PMIC, Crust is also responsible for orderly power-off and
power-on of the device.
This package provides SCP firware builds for boards supported by
OpenBSD.
+19
View File
@@ -0,0 +1,19 @@
share/crust/
share/crust/a64-olinuxino/
share/crust/a64-olinuxino/scp.bin
share/crust/nanopi_a64/
share/crust/nanopi_a64/scp.bin
share/crust/orangepi_pc2/
share/crust/orangepi_pc2/scp.bin
share/crust/orangepi_win/
share/crust/orangepi_win/scp.bin
share/crust/orangepi_zero_plus/
share/crust/orangepi_zero_plus/scp.bin
share/crust/pine64-lts/
share/crust/pine64-lts/scp.bin
share/crust/pine64_plus/
share/crust/pine64_plus/scp.bin
share/crust/pine_h64/
share/crust/pine_h64/scp.bin
share/crust/pinebook/
share/crust/pinebook/scp.bin