pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
fsbl-sophgo-cv180x: new package
Module Name: pkgsrc-wip
Committed By: Rui-Xiang Guo <rxg%lavabit.com@localhost>
Pushed By: rxg
Date: Thu May 28 06:42:26 2026 +0800
Changeset: 6a50aae825bce021b91c7d746e4cb1e8ad902524
Modified Files:
Makefile
Added Files:
fsbl-sophgo-cv180x/DESCR
fsbl-sophgo-cv180x/Makefile
fsbl-sophgo-cv180x/PLIST
fsbl-sophgo-cv180x/distinfo
fsbl-sophgo-cv180x/patches/patch-make__helpers_build__macros.mk
Log Message:
fsbl-sophgo-cv180x: new package
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=6a50aae825bce021b91c7d746e4cb1e8ad902524
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
Makefile | 3 ++
fsbl-sophgo-cv180x/DESCR | 2 +
fsbl-sophgo-cv180x/Makefile | 50 ++++++++++++++++++++++
fsbl-sophgo-cv180x/PLIST | 2 +
fsbl-sophgo-cv180x/distinfo | 6 +++
.../patches/patch-make__helpers_build__macros.mk | 13 ++++++
6 files changed, 76 insertions(+)
diffs:
diff --git a/Makefile b/Makefile
index f201a243f7..9f1fa58710 100644
--- a/Makefile
+++ b/Makefile
@@ -1085,6 +1085,7 @@ SUBDIR+= frp
SUBDIR+= frr10
SUBDIR+= fs2open
SUBDIR+= fs2open-git
+SUBDIR+= fsbl-sophgo-cv180x
SUBDIR+= fsel
SUBDIR+= fsharp
SUBDIR+= fslsfonts
@@ -2775,6 +2776,7 @@ SUBDIR+= openra
SUBDIR+= openrdap
SUBDIR+= openrgb
SUBDIR+= openrw-git
+SUBDIR+= opensbi-milkv-duo
SUBDIR+= openscad
SUBDIR+= openscep
SUBDIR+= openshot-qt
@@ -5864,6 +5866,7 @@ SUBDIR+= u-boot-imx23-olinuxino
SUBDIR+= u-boot-khadas-vim3
SUBDIR+= u-boot-licheepi-zero
SUBDIR+= u-boot-mangopi-mq-pro
+SUBDIR+= u-boot-milkv-duo
SUBDIR+= u-boot-nanopi-r2s
SUBDIR+= u-boot-omap4-panda
SUBDIR+= u-boot-orangepi-pc2
diff --git a/fsbl-sophgo-cv180x/DESCR b/fsbl-sophgo-cv180x/DESCR
new file mode 100644
index 0000000000..925eee88d3
--- /dev/null
+++ b/fsbl-sophgo-cv180x/DESCR
@@ -0,0 +1,2 @@
+FSBL is First Stage Boot Loader. Act as ATF BL2. This package is used for the
+Sophgo cv18xx series SoCs.
diff --git a/fsbl-sophgo-cv180x/Makefile b/fsbl-sophgo-cv180x/Makefile
new file mode 100644
index 0000000000..0c02c1f048
--- /dev/null
+++ b/fsbl-sophgo-cv180x/Makefile
@@ -0,0 +1,50 @@
+# $NetBSD$
+
+DISTNAME= ${GITHUB_PROJECT}-sophgo-4.1.6
+#PKGNAME= ${DISTNAME:S/-/-${CHIP_ARCH}-/}
+PKGNAME= ${DISTNAME:C/^([^-]*-[^-]*)-/\1-${CHIP_ARCH}-/}
+CATEGORIES= sysutils
+MASTER_SITES= ${MASTER_SITE_GITHUB:=sophgo/}
+GITHUB_PROJECT= fsbl
+GITHUB_TAG= refs/tags/v${DISTNAME:S/${GITHUB_PROJECT}-sophgo-//}
+
+MAINTAINER= port-riscv%NetBSD.org@localhost
+HOMEPAGE= https://github.com/sophgo/fsbl/
+COMMENT= First Stage Boot Loader for cv18xx series SoCs
+LICENSE= modified-bsd AND gnu-gpl-v2
+
+USE_TOOLS+= gmake pkg-config
+TOOL_DEPENDS+= coreutils-[0-9]*:../../sysutils/coreutils
+USE_LANGUAGES= c c++
+BUILD_DEPENDS+= cross-riscv64-none-elf-xuantie-gcc-[0-9]*:../../wip/riscv64-none-elf-xuantie-gcc
+
+REPLACE_PYTHON= plat/cv180x/chip_conf.py
+REPLACE_PYTHON+= plat/cv180x/fiptool.py
+
+PKGCONFIG_OVERRIDE+= lib/libtommath/libtommath.pc.in
+
+CHIP_ARCH= cv180x
+MAKE_FLAGS= ARCH=riscv CHIP_ARCH=${CHIP_ARCH} DDR_CFG=ddr2_1333_x16 \
+ MONITOR_PATH=${PREFIX}/share/opensbi/milkv-duo/fw_dynamic.bin \
+ LOADER_2ND_PATH=${PREFIX}/share/u-boot/milkv-duo/u-boot.bin \
+ CROSS_COMPILE_GLIBC_RISCV64=${PREFIX}/cross-riscv64-none-elf-xuantie/bin/riscv64-none-elf-
+
+#BUILD_TARGET= b12
+
+WRKSRC= ${WRKDIR}/${DISTNAME:S/-sophgo//}
+
+post-extract:
+ ${CP} ${PREFIX}/share/u-boot/milkv-duo/cvi_board_memmap.h \
+ ${WRKSRC}/plat/${CHIP_ARCH}/include
+
+do-build:
+ cd ${WRKSRC} && ${SETENV} ${GMAKE} ${MAKE_FLAGS}
+
+do-install:
+ ${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/fsbl/sophgo/${CHIP_ARCH}
+ ${INSTALL_DATA} ${WRKSRC}/build/${CHIP_ARCH}/fip.bin \
+ ${DESTDIR}${PREFIX}/share/fsbl/sophgo/${CHIP_ARCH}
+
+.include "../../lang/python/application.mk"
+.include "../../wip/opensbi-milkv-duo/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/fsbl-sophgo-cv180x/PLIST b/fsbl-sophgo-cv180x/PLIST
new file mode 100644
index 0000000000..c7a8994669
--- /dev/null
+++ b/fsbl-sophgo-cv180x/PLIST
@@ -0,0 +1,2 @@
+@comment $NetBSD$
+share/fsbl/sophgo/cv180x/fip.bin
diff --git a/fsbl-sophgo-cv180x/distinfo b/fsbl-sophgo-cv180x/distinfo
new file mode 100644
index 0000000000..ff714cfd34
--- /dev/null
+++ b/fsbl-sophgo-cv180x/distinfo
@@ -0,0 +1,6 @@
+$NetBSD$
+
+BLAKE2s (fsbl-sophgo-4.1.6.tar.gz) = eb8d7287c3d3161508b2ff7f65902334523b16b07f9145fd0e59e4ea7b81491d
+SHA512 (fsbl-sophgo-4.1.6.tar.gz) = e109a9d84036994a2c3ebba6ea5c03056cdb449c70e4196fe83bdcdd109f99e1d844aefb07f295dce826e8c6b90ca67bc2823305c98858d2f3b6754c6232c73c
+Size (fsbl-sophgo-4.1.6.tar.gz) = 1473645 bytes
+SHA1 (patch-make__helpers_build__macros.mk) = b2760fa5851748e98ff54988c9048efd57646704
diff --git a/fsbl-sophgo-cv180x/patches/patch-make__helpers_build__macros.mk b/fsbl-sophgo-cv180x/patches/patch-make__helpers_build__macros.mk
new file mode 100644
index 0000000000..f30a3a3ea2
--- /dev/null
+++ b/fsbl-sophgo-cv180x/patches/patch-make__helpers_build__macros.mk
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- make_helpers/build_macros.mk.orig 2026-03-24 12:34:00.253558669 +0000
++++ make_helpers/build_macros.mk
+@@ -265,7 +265,7 @@ $(ELF): $(OBJS) $(LINKERFILE) | bl$(1)_d
+
+ $(SYM): $(ELF)
+ @echo " SYM $$@"
+- $$(Q)$$(READELF) -s $$< | sort -b -r -g -k 3 > $$@
++ $$(Q)$$(READELF) -s $$< | gsort -b -r -g -k 3 > $$@
+
+ $(DUMP): $(ELF)
+ @echo " OD $$@"
Home |
Main Index |
Thread Index |
Old Index