public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-embedded/sunxi-tools/files/, dev-embedded/sunxi-tools/
@ 2022-01-14 23:43 Steve Arnold
  0 siblings, 0 replies; 2+ messages in thread
From: Steve Arnold @ 2022-01-14 23:43 UTC (permalink / raw
  To: gentoo-commits

commit:     53bf6b05947281d0f4b4c2191f86b513819bc5a5
Author:     Steve Arnold <nerdboy <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 14 18:04:10 2022 +0000
Commit:     Steve Arnold <nerdboy <AT> gentoo <DOT> org>
CommitDate: Fri Jan 14 22:48:30 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=53bf6b05

dev-embedded/sunxi-tools: bump to newer version with flash builder

* required to build flash images for CHIP devices

Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Steve Arnold <nerdboy <AT> gentoo.org>

 dev-embedded/sunxi-tools/Manifest                  |   1 +
 ...-tools-1.4.1-fix-strncpy-compiler-warning.patch |  42 ++++++
 ...-tools-1.4.1-respect-user-supplied-cflags.patch | 153 +++++++++++++++++++++
 dev-embedded/sunxi-tools/sunxi-tools-1.4.1.ebuild  |  36 +++++
 4 files changed, 232 insertions(+)

diff --git a/dev-embedded/sunxi-tools/Manifest b/dev-embedded/sunxi-tools/Manifest
index a6e9cfe28cfa..db2220b9c0ad 100644
--- a/dev-embedded/sunxi-tools/Manifest
+++ b/dev-embedded/sunxi-tools/Manifest
@@ -1 +1,2 @@
 DIST sunxi-tools-1.3.tar.gz 52608 BLAKE2B e8c3ed7276f705273598e38a0cc469225de1ee4eb8177b78be63b78ebc584c4fdf2362e21b895f61b4c5e84df98bfd5ccf6d3965ffa9338c98027c9ce4635626 SHA512 954c95963013aee8a38b3583ba1b7ec7e7049c7e09c5fa9ec564dfc33f304d3669fdf68c2fa5e4b5a6265640a3d1ee8bc13bcd71d804c714884b6a780d193615
+DIST sunxi-tools-1.4.1.tar.gz 78878 BLAKE2B f50b14e79d4880a076f8b25869eea44e34cfc50c91ce7f9e4adc831bb2ac2238c930623677bacb399e52faadba20c9ba21ea212915c50941af825d0579804153 SHA512 b66f5caaabec016a0d2f1ccc88ee7f37cd26a511ac81c270e2de6bf0b967e8dfda2b510d5306daffb33ec8855c3c6be99a29bfd1efd5bd0cf3431494b092a52b

diff --git a/dev-embedded/sunxi-tools/files/sunxi-tools-1.4.1-fix-strncpy-compiler-warning.patch b/dev-embedded/sunxi-tools/files/sunxi-tools-1.4.1-fix-strncpy-compiler-warning.patch
new file mode 100644
index 000000000000..a255e61f3f01
--- /dev/null
+++ b/dev-embedded/sunxi-tools/files/sunxi-tools-1.4.1-fix-strncpy-compiler-warning.patch
@@ -0,0 +1,42 @@
+From 0825d9aaa6078ef283390662004797a9a1d939f3 Mon Sep 17 00:00:00 2001
+From: Andre Przywara <andre.przywara@arm.com>
+Date: Wed, 15 Dec 2021 23:04:14 +0000
+Subject: [PATCH 1/2] nandpart: fix strncpy compiler warning
+
+More recent versions of GCC warns about the usage of strncpy in
+nandpart.c: we actually only (need to) copy the stub string part of the
+magic string, without the terminating NUL character. This is fine in
+our particular case, but raises the compiler's eyebrows:
+===================
+nand-part.c: In function '_get_mbr':
+nand-part.c:93:4: warning: 'strncpy' output truncated before terminating
+                  nul copying 8 bytes from a string of the same length
+                  [-Wstringop-truncation]
+   93 |    strncpy((char *)mbr->magic, MBR_MAGIC, 8);
+      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+===================
+
+Switch to the more fitting memcpy() here to avoid the warning.
+
+Signed-off-by: Andre Przywara <andre.przywara@arm.com>
+Reported-by: slange-dev
+---
+ nand-part.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/nand-part.c b/nand-part.c
+index a0d46c5..af2169d 100644
+--- a/nand-part.c
++++ b/nand-part.c
+@@ -90,7 +90,7 @@ static MBR *_get_mbr(int fd, int mbr_num, int force)
+ 		printf("check partition table copy %d: ", mbr_num);
+ 		printmbrheader(mbr);
+ 		if (force) {
+-			strncpy((char *)mbr->magic, MBR_MAGIC, 8);
++			memcpy(mbr->magic, MBR_MAGIC, 8);
+ 			mbr->version = MBR_VERSION;
+ 			return mbr;
+ 		}
+-- 
+2.32.0
+

diff --git a/dev-embedded/sunxi-tools/files/sunxi-tools-1.4.1-respect-user-supplied-cflags.patch b/dev-embedded/sunxi-tools/files/sunxi-tools-1.4.1-respect-user-supplied-cflags.patch
new file mode 100644
index 000000000000..faa2ae606bea
--- /dev/null
+++ b/dev-embedded/sunxi-tools/files/sunxi-tools-1.4.1-respect-user-supplied-cflags.patch
@@ -0,0 +1,153 @@
+From 95d40f8fcfd97890c270d2987bd845c7a6bac428 Mon Sep 17 00:00:00 2001
+From: Bernhard Nortmann <bernhard.nortmann@web.de>
+Date: Sat, 29 Oct 2016 18:32:00 +0200
+Subject: [PATCH] Makefile: Ensure that user-supplied CFLAGS get respected
+
+Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
+---
+ .travis.yml |  2 +-
+ Makefile    | 53 ++++++++++++++++++++++++++++-------------------------
+ 2 files changed, 29 insertions(+), 26 deletions(-)
+
+diff --git a/.travis.yml b/.travis.yml
+index 47aa891..c843fba 100644
+--- a/.travis.yml
++++ b/.travis.yml
+@@ -4,7 +4,7 @@ sudo: false
+ language: c
+ 
+ # treat all warnings as errors
+-env: EXTRA_CFLAGS=-Werror
++env: CFLAGS=-Werror
+ 
+ os:
+   - linux
+diff --git a/Makefile b/Makefile
+index 6e0471b..12f121c 100644
+--- a/Makefile
++++ b/Makefile
+@@ -17,21 +17,21 @@
+ # along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ 
+ CC ?= gcc
+-CFLAGS = -g -O0 -Wall -Wextra $(EXTRA_CFLAGS)
+-CFLAGS += -std=c99 $(DEFINES)
+-CFLAGS += -Iinclude/
++DEFAULT_CFLAGS := -g -O0 -Wall -Wextra -std=c99
+ 
+-DEFINES = -D_POSIX_C_SOURCE=200112L
++DEFAULT_CFLAGS += -D_POSIX_C_SOURCE=200112L
+ # Define _BSD_SOURCE, necessary to expose all endian conversions properly.
+ # See http://linux.die.net/man/3/endian
+-DEFINES += -D_BSD_SOURCE
++DEFAULT_CFLAGS += -D_BSD_SOURCE
+ # glibc 2.20+ also requires _DEFAULT_SOURCE
+-DEFINES += -D_DEFAULT_SOURCE
++DEFAULT_CFLAGS += -D_DEFAULT_SOURCE
+ ifeq (NetBSD,$(OS))
+ # add explicit _NETBSD_SOURCE, see https://github.com/linux-sunxi/sunxi-tools/pull/22
+-DEFINES += -D_NETBSD_SOURCE
++DEFAULT_CFLAGS += -D_NETBSD_SOURCE
+ endif
+ 
++DEFAULT_CFLAGS += -Iinclude/
++
+ # Tools useful on host and target
+ TOOLS = sunxi-fexc sunxi-bootinfo sunxi-fel sunxi-nand-part
+ 
+@@ -49,6 +49,7 @@ MISC_TOOLS = phoenix_info sunxi-nand-image-builder
+ BINFILES = fel-pio.bin jtag-loop.sunxi fel-sdboot.sunxi uart0-helloworld-sdboot.sunxi
+ 
+ CROSS_COMPILE ?= arm-none-eabi-
++CROSS_CC ?= $(CROSS_COMPILE)gcc
+ MKSUNXIBOOT ?= mksunxiboot
+ 
+ DESTDIR ?=
+@@ -110,24 +111,26 @@ LIBUSB_CFLAGS ?= `pkg-config --cflags $(LIBUSB)`
+ LIBUSB_LIBS ?= `pkg-config --libs $(LIBUSB)`
+ ifeq ($(OS),Windows_NT)
+ 	# Windows lacks mman.h / mmap()
+-	DEFINES += -DNO_MMAP
++	DEFAULT_CFLAGS += -DNO_MMAP
+ 	# portable_endian.h relies on winsock2
+ 	LIBS += -lws2_32
+ endif
+ 
++HOST_CFLAGS = $(DEFAULT_CFLAGS) $(CFLAGS)
++
+ sunxi-fel: fel.c fel-to-spl-thunk.h progress.c progress.h
+-	$(CC) $(CFLAGS) $(LIBUSB_CFLAGS) $(LDFLAGS) -o $@ $(filter %.c,$^) $(LIBS) $(LIBUSB_LIBS)
++	$(CC) $(HOST_CFLAGS) $(LIBUSB_CFLAGS) $(LDFLAGS) -o $@ $(filter %.c,$^) $(LIBS) $(LIBUSB_LIBS)
+ 
+ sunxi-nand-part: nand-part-main.c nand-part.c nand-part-a10.h nand-part-a20.h
+-	$(CC) $(CFLAGS) -c -o nand-part-main.o nand-part-main.c
+-	$(CC) $(CFLAGS) -c -o nand-part-a10.o nand-part.c -D A10
+-	$(CC) $(CFLAGS) -c -o nand-part-a20.o nand-part.c -D A20
++	$(CC) $(HOST_CFLAGS) -c -o nand-part-main.o nand-part-main.c
++	$(CC) $(HOST_CFLAGS) -c -o nand-part-a10.o nand-part.c -D A10
++	$(CC) $(HOST_CFLAGS) -c -o nand-part-a20.o nand-part.c -D A20
+ 	$(CC) $(LDFLAGS) -o $@ nand-part-main.o nand-part-a10.o nand-part-a20.o $(LIBS)
+ 
+ sunxi-%: %.c
+-	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(filter %.c,$^) $(LIBS)
++	$(CC) $(HOST_CFLAGS) $(LDFLAGS) -o $@ $(filter %.c,$^) $(LIBS)
+ phoenix_info: phoenix_info.c
+-	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS)
++	$(CC) $(HOST_CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS)
+ 
+ %.bin: %.elf
+ 	$(CROSS_COMPILE)objcopy -O binary $< $@
+@@ -143,39 +146,39 @@ ARM_ELF_FLAGS += -mno-thumb-interwork -fno-stack-protector -fno-toplevel-reorder
+ ARM_ELF_FLAGS += -Wstrict-prototypes -Wno-format-nonliteral -Wno-format-security
+ 
+ fel-pio.elf: fel-pio.c fel-pio.lds
+-	$(CROSS_COMPILE)gcc  -g  $(ARM_ELF_FLAGS)  $< -nostdlib -o $@ -T fel-pio.lds
++	$(CROSS_CC) -g $(ARM_ELF_FLAGS) $< -nostdlib -o $@ -T fel-pio.lds
+ 
+ fel-pio.nm: fel-pio.elf
+ 	$(CROSS_COMPILE)nm $< | grep -v " _" >$@
+ 
+ jtag-loop.elf: jtag-loop.c jtag-loop.lds
+-	$(CROSS_COMPILE)gcc  -g  $(ARM_ELF_FLAGS)  $< -nostdlib -o $@ -T jtag-loop.lds -Wl,-N
++	$(CROSS_CC) -g $(ARM_ELF_FLAGS) $< -nostdlib -o $@ -T jtag-loop.lds -Wl,-N
+ 
+ fel-sdboot.elf: fel-sdboot.S fel-sdboot.lds
+-	$(CROSS_COMPILE)gcc  -g  $(ARM_ELF_FLAGS)  $< -nostdlib -o $@ -T fel-sdboot.lds -Wl,-N
++	$(CROSS_CC) -g $(ARM_ELF_FLAGS) $< -nostdlib -o $@ -T fel-sdboot.lds -Wl,-N
+ 
+ uart0-helloworld-sdboot.elf: uart0-helloworld-sdboot.c uart0-helloworld-sdboot.lds
+-	$(CROSS_COMPILE)gcc  -g  $(ARM_ELF_FLAGS)  $< -nostdlib -o $@ -T uart0-helloworld-sdboot.lds -Wl,-N
++	$(CROSS_CC) -g $(ARM_ELF_FLAGS) $< -nostdlib -o $@ -T uart0-helloworld-sdboot.lds -Wl,-N
+ 
+ boot_head_sun3i.elf: boot_head.S boot_head.lds
+-	$(CROSS_COMPILE)gcc  -g  $(ARM_ELF_FLAGS)  $< -nostdlib -o $@ -T boot_head.lds -Wl,-N -DMACHID=0x1094
++	$(CROSS_CC) -g $(ARM_ELF_FLAGS) $< -nostdlib -o $@ -T boot_head.lds -Wl,-N -DMACHID=0x1094
+ 
+ boot_head_sun4i.elf: boot_head.S boot_head.lds
+-	$(CROSS_COMPILE)gcc  -g  $(ARM_ELF_FLAGS)  $< -nostdlib -o $@ -T boot_head.lds -Wl,-N -DMACHID=0x1008
++	$(CROSS_CC) -g $(ARM_ELF_FLAGS) $< -nostdlib -o $@ -T boot_head.lds -Wl,-N -DMACHID=0x1008
+ 
+ boot_head_sun5i.elf: boot_head.S boot_head.lds
+-	$(CROSS_COMPILE)gcc  -g  $(ARM_ELF_FLAGS)  $< -nostdlib -o $@ -T boot_head.lds -Wl,-N -DMACHID=0x102A
++	$(CROSS_CC) -g $(ARM_ELF_FLAGS) $< -nostdlib -o $@ -T boot_head.lds -Wl,-N -DMACHID=0x102A
+ 
+ sunxi-bootinfo: bootinfo.c
+ 
+ # target tools
+-TARGET_CFLAGS = -g -O0 -Wall -Wextra -std=c99 $(DEFINES) -Iinclude/ -static
++TARGET_CFLAGS = $(DEFAULT_CFLAGS) -static $(CFLAGS)
+ sunxi-pio: pio.c
+-	$(CROSS_COMPILE)gcc $(TARGET_CFLAGS) -o $@ $<
++	$(CROSS_CC) $(TARGET_CFLAGS) -o $@ $<
+ sunxi-meminfo: meminfo.c
+-	$(CROSS_COMPILE)gcc $(TARGET_CFLAGS) -o $@ $<
++	$(CROSS_CC) $(TARGET_CFLAGS) -o $@ $<
+ sunxi-script_extractor: script_extractor.c
+-	$(CROSS_COMPILE)gcc $(TARGET_CFLAGS) -o $@ $<
++	$(CROSS_CC) $(TARGET_CFLAGS) -o $@ $<
+ 
+ version.h:
+ 	@./autoversion.sh > $@
+-- 
+2.32.0
+

diff --git a/dev-embedded/sunxi-tools/sunxi-tools-1.4.1.ebuild b/dev-embedded/sunxi-tools/sunxi-tools-1.4.1.ebuild
new file mode 100644
index 000000000000..eead316718cc
--- /dev/null
+++ b/dev-embedded/sunxi-tools/sunxi-tools-1.4.1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit toolchain-funcs
+
+MY_PV="v${PV}"
+SRC_URI="https://github.com/linux-sunxi/sunxi-tools/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
+
+DESCRIPTION="Tools for Allwinner A10 devices."
+HOMEPAGE="http://linux-sunxi.org/"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE=""
+KEYWORDS="~amd64"
+
+DEPEND="virtual/libusb"
+
+PATCHES=(
+	"${FILESDIR}/${P}-respect-user-supplied-cflags.patch"
+	"${FILESDIR}/${P}-fix-strncpy-compiler-warning.patch"
+)
+
+src_compile() {
+	emake CC="$(tc-getCC)" tools misc
+}
+
+src_install() {
+	dobin bin2fex fex2bin phoenix_info sunxi-nand-image-builder
+	newbin sunxi-bootinfo bootinfo
+	newbin sunxi-fel fel
+	newbin sunxi-fexc fexc
+	newbin sunxi-nand-part nand-part
+}


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-embedded/sunxi-tools/files/, dev-embedded/sunxi-tools/
@ 2025-04-02 15:04 Yixun Lan
  0 siblings, 0 replies; 2+ messages in thread
From: Yixun Lan @ 2025-04-02 15:04 UTC (permalink / raw
  To: gentoo-commits

commit:     a525aa1d4f141637c56595ba6707de1f261a4815
Author:     Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Wed Apr  2 15:02:22 2025 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Wed Apr  2 15:02:37 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a525aa1d

dev-embedded/sunxi-tools: drop 1.3-r1, 1.4.1-r1

drop old since new stable version, along cleanup old EAPI=7

Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 dev-embedded/sunxi-tools/Manifest                  |   2 -
 ...-tools-1.4.1-respect-user-supplied-cflags.patch | 153 ---------------------
 dev-embedded/sunxi-tools/sunxi-tools-1.3-r1.ebuild |  32 -----
 .../sunxi-tools/sunxi-tools-1.4.1-r1.ebuild        |  45 ------
 4 files changed, 232 deletions(-)

diff --git a/dev-embedded/sunxi-tools/Manifest b/dev-embedded/sunxi-tools/Manifest
index a5a930f9841f..4879231ae41a 100644
--- a/dev-embedded/sunxi-tools/Manifest
+++ b/dev-embedded/sunxi-tools/Manifest
@@ -1,4 +1,2 @@
-DIST sunxi-tools-1.3.tar.gz 52608 BLAKE2B e8c3ed7276f705273598e38a0cc469225de1ee4eb8177b78be63b78ebc584c4fdf2362e21b895f61b4c5e84df98bfd5ccf6d3965ffa9338c98027c9ce4635626 SHA512 954c95963013aee8a38b3583ba1b7ec7e7049c7e09c5fa9ec564dfc33f304d3669fdf68c2fa5e4b5a6265640a3d1ee8bc13bcd71d804c714884b6a780d193615
-DIST sunxi-tools-1.4.1.tar.gz 78878 BLAKE2B f50b14e79d4880a076f8b25869eea44e34cfc50c91ce7f9e4adc831bb2ac2238c930623677bacb399e52faadba20c9ba21ea212915c50941af825d0579804153 SHA512 b66f5caaabec016a0d2f1ccc88ee7f37cd26a511ac81c270e2de6bf0b967e8dfda2b510d5306daffb33ec8855c3c6be99a29bfd1efd5bd0cf3431494b092a52b
 DIST sunxi-tools-1.4.2-test.zip 890565 BLAKE2B c24bafde5f049eca61962faf71d9928eb6340c48d619484f6dad1a6d7c1b9dc6f23d0f3f9b3e7847efd68004e70b44b9637d27bec8a97e6e3772b4003f3d25db SHA512 7763d60094f990e42bf57ae3e72f19dfb52cc6573777bf8c9a01bc5c1598505b067645f88b04955ae2b0f9456140e6bcb8eab31526e6e94fa28e826a80da7172
 DIST sunxi-tools-1.4.2.tar.gz 84090 BLAKE2B b3261855eb9a18025c19829e343e3e2e7097dc4e267a60fdcf39cd2e9bfa57580267a77846a576ea5fc04a07fd6ba90b1223a8c644c933879dc7aa766ba36210 SHA512 633bc1752ae11799ce0bae347b52296792d28265a2260e173727847e1f457b767e88d02ae547bb55a2bb05e1eb552ba4406985ae105a1712a9fa30852ae293e8

diff --git a/dev-embedded/sunxi-tools/files/sunxi-tools-1.4.1-respect-user-supplied-cflags.patch b/dev-embedded/sunxi-tools/files/sunxi-tools-1.4.1-respect-user-supplied-cflags.patch
deleted file mode 100644
index faa2ae606bea..000000000000
--- a/dev-embedded/sunxi-tools/files/sunxi-tools-1.4.1-respect-user-supplied-cflags.patch
+++ /dev/null
@@ -1,153 +0,0 @@
-From 95d40f8fcfd97890c270d2987bd845c7a6bac428 Mon Sep 17 00:00:00 2001
-From: Bernhard Nortmann <bernhard.nortmann@web.de>
-Date: Sat, 29 Oct 2016 18:32:00 +0200
-Subject: [PATCH] Makefile: Ensure that user-supplied CFLAGS get respected
-
-Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
----
- .travis.yml |  2 +-
- Makefile    | 53 ++++++++++++++++++++++++++++-------------------------
- 2 files changed, 29 insertions(+), 26 deletions(-)
-
-diff --git a/.travis.yml b/.travis.yml
-index 47aa891..c843fba 100644
---- a/.travis.yml
-+++ b/.travis.yml
-@@ -4,7 +4,7 @@ sudo: false
- language: c
- 
- # treat all warnings as errors
--env: EXTRA_CFLAGS=-Werror
-+env: CFLAGS=-Werror
- 
- os:
-   - linux
-diff --git a/Makefile b/Makefile
-index 6e0471b..12f121c 100644
---- a/Makefile
-+++ b/Makefile
-@@ -17,21 +17,21 @@
- # along with this program.  If not, see <http://www.gnu.org/licenses/>.
- 
- CC ?= gcc
--CFLAGS = -g -O0 -Wall -Wextra $(EXTRA_CFLAGS)
--CFLAGS += -std=c99 $(DEFINES)
--CFLAGS += -Iinclude/
-+DEFAULT_CFLAGS := -g -O0 -Wall -Wextra -std=c99
- 
--DEFINES = -D_POSIX_C_SOURCE=200112L
-+DEFAULT_CFLAGS += -D_POSIX_C_SOURCE=200112L
- # Define _BSD_SOURCE, necessary to expose all endian conversions properly.
- # See http://linux.die.net/man/3/endian
--DEFINES += -D_BSD_SOURCE
-+DEFAULT_CFLAGS += -D_BSD_SOURCE
- # glibc 2.20+ also requires _DEFAULT_SOURCE
--DEFINES += -D_DEFAULT_SOURCE
-+DEFAULT_CFLAGS += -D_DEFAULT_SOURCE
- ifeq (NetBSD,$(OS))
- # add explicit _NETBSD_SOURCE, see https://github.com/linux-sunxi/sunxi-tools/pull/22
--DEFINES += -D_NETBSD_SOURCE
-+DEFAULT_CFLAGS += -D_NETBSD_SOURCE
- endif
- 
-+DEFAULT_CFLAGS += -Iinclude/
-+
- # Tools useful on host and target
- TOOLS = sunxi-fexc sunxi-bootinfo sunxi-fel sunxi-nand-part
- 
-@@ -49,6 +49,7 @@ MISC_TOOLS = phoenix_info sunxi-nand-image-builder
- BINFILES = fel-pio.bin jtag-loop.sunxi fel-sdboot.sunxi uart0-helloworld-sdboot.sunxi
- 
- CROSS_COMPILE ?= arm-none-eabi-
-+CROSS_CC ?= $(CROSS_COMPILE)gcc
- MKSUNXIBOOT ?= mksunxiboot
- 
- DESTDIR ?=
-@@ -110,24 +111,26 @@ LIBUSB_CFLAGS ?= `pkg-config --cflags $(LIBUSB)`
- LIBUSB_LIBS ?= `pkg-config --libs $(LIBUSB)`
- ifeq ($(OS),Windows_NT)
- 	# Windows lacks mman.h / mmap()
--	DEFINES += -DNO_MMAP
-+	DEFAULT_CFLAGS += -DNO_MMAP
- 	# portable_endian.h relies on winsock2
- 	LIBS += -lws2_32
- endif
- 
-+HOST_CFLAGS = $(DEFAULT_CFLAGS) $(CFLAGS)
-+
- sunxi-fel: fel.c fel-to-spl-thunk.h progress.c progress.h
--	$(CC) $(CFLAGS) $(LIBUSB_CFLAGS) $(LDFLAGS) -o $@ $(filter %.c,$^) $(LIBS) $(LIBUSB_LIBS)
-+	$(CC) $(HOST_CFLAGS) $(LIBUSB_CFLAGS) $(LDFLAGS) -o $@ $(filter %.c,$^) $(LIBS) $(LIBUSB_LIBS)
- 
- sunxi-nand-part: nand-part-main.c nand-part.c nand-part-a10.h nand-part-a20.h
--	$(CC) $(CFLAGS) -c -o nand-part-main.o nand-part-main.c
--	$(CC) $(CFLAGS) -c -o nand-part-a10.o nand-part.c -D A10
--	$(CC) $(CFLAGS) -c -o nand-part-a20.o nand-part.c -D A20
-+	$(CC) $(HOST_CFLAGS) -c -o nand-part-main.o nand-part-main.c
-+	$(CC) $(HOST_CFLAGS) -c -o nand-part-a10.o nand-part.c -D A10
-+	$(CC) $(HOST_CFLAGS) -c -o nand-part-a20.o nand-part.c -D A20
- 	$(CC) $(LDFLAGS) -o $@ nand-part-main.o nand-part-a10.o nand-part-a20.o $(LIBS)
- 
- sunxi-%: %.c
--	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(filter %.c,$^) $(LIBS)
-+	$(CC) $(HOST_CFLAGS) $(LDFLAGS) -o $@ $(filter %.c,$^) $(LIBS)
- phoenix_info: phoenix_info.c
--	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS)
-+	$(CC) $(HOST_CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS)
- 
- %.bin: %.elf
- 	$(CROSS_COMPILE)objcopy -O binary $< $@
-@@ -143,39 +146,39 @@ ARM_ELF_FLAGS += -mno-thumb-interwork -fno-stack-protector -fno-toplevel-reorder
- ARM_ELF_FLAGS += -Wstrict-prototypes -Wno-format-nonliteral -Wno-format-security
- 
- fel-pio.elf: fel-pio.c fel-pio.lds
--	$(CROSS_COMPILE)gcc  -g  $(ARM_ELF_FLAGS)  $< -nostdlib -o $@ -T fel-pio.lds
-+	$(CROSS_CC) -g $(ARM_ELF_FLAGS) $< -nostdlib -o $@ -T fel-pio.lds
- 
- fel-pio.nm: fel-pio.elf
- 	$(CROSS_COMPILE)nm $< | grep -v " _" >$@
- 
- jtag-loop.elf: jtag-loop.c jtag-loop.lds
--	$(CROSS_COMPILE)gcc  -g  $(ARM_ELF_FLAGS)  $< -nostdlib -o $@ -T jtag-loop.lds -Wl,-N
-+	$(CROSS_CC) -g $(ARM_ELF_FLAGS) $< -nostdlib -o $@ -T jtag-loop.lds -Wl,-N
- 
- fel-sdboot.elf: fel-sdboot.S fel-sdboot.lds
--	$(CROSS_COMPILE)gcc  -g  $(ARM_ELF_FLAGS)  $< -nostdlib -o $@ -T fel-sdboot.lds -Wl,-N
-+	$(CROSS_CC) -g $(ARM_ELF_FLAGS) $< -nostdlib -o $@ -T fel-sdboot.lds -Wl,-N
- 
- uart0-helloworld-sdboot.elf: uart0-helloworld-sdboot.c uart0-helloworld-sdboot.lds
--	$(CROSS_COMPILE)gcc  -g  $(ARM_ELF_FLAGS)  $< -nostdlib -o $@ -T uart0-helloworld-sdboot.lds -Wl,-N
-+	$(CROSS_CC) -g $(ARM_ELF_FLAGS) $< -nostdlib -o $@ -T uart0-helloworld-sdboot.lds -Wl,-N
- 
- boot_head_sun3i.elf: boot_head.S boot_head.lds
--	$(CROSS_COMPILE)gcc  -g  $(ARM_ELF_FLAGS)  $< -nostdlib -o $@ -T boot_head.lds -Wl,-N -DMACHID=0x1094
-+	$(CROSS_CC) -g $(ARM_ELF_FLAGS) $< -nostdlib -o $@ -T boot_head.lds -Wl,-N -DMACHID=0x1094
- 
- boot_head_sun4i.elf: boot_head.S boot_head.lds
--	$(CROSS_COMPILE)gcc  -g  $(ARM_ELF_FLAGS)  $< -nostdlib -o $@ -T boot_head.lds -Wl,-N -DMACHID=0x1008
-+	$(CROSS_CC) -g $(ARM_ELF_FLAGS) $< -nostdlib -o $@ -T boot_head.lds -Wl,-N -DMACHID=0x1008
- 
- boot_head_sun5i.elf: boot_head.S boot_head.lds
--	$(CROSS_COMPILE)gcc  -g  $(ARM_ELF_FLAGS)  $< -nostdlib -o $@ -T boot_head.lds -Wl,-N -DMACHID=0x102A
-+	$(CROSS_CC) -g $(ARM_ELF_FLAGS) $< -nostdlib -o $@ -T boot_head.lds -Wl,-N -DMACHID=0x102A
- 
- sunxi-bootinfo: bootinfo.c
- 
- # target tools
--TARGET_CFLAGS = -g -O0 -Wall -Wextra -std=c99 $(DEFINES) -Iinclude/ -static
-+TARGET_CFLAGS = $(DEFAULT_CFLAGS) -static $(CFLAGS)
- sunxi-pio: pio.c
--	$(CROSS_COMPILE)gcc $(TARGET_CFLAGS) -o $@ $<
-+	$(CROSS_CC) $(TARGET_CFLAGS) -o $@ $<
- sunxi-meminfo: meminfo.c
--	$(CROSS_COMPILE)gcc $(TARGET_CFLAGS) -o $@ $<
-+	$(CROSS_CC) $(TARGET_CFLAGS) -o $@ $<
- sunxi-script_extractor: script_extractor.c
--	$(CROSS_COMPILE)gcc $(TARGET_CFLAGS) -o $@ $<
-+	$(CROSS_CC) $(TARGET_CFLAGS) -o $@ $<
- 
- version.h:
- 	@./autoversion.sh > $@
--- 
-2.32.0
-

diff --git a/dev-embedded/sunxi-tools/sunxi-tools-1.3-r1.ebuild b/dev-embedded/sunxi-tools/sunxi-tools-1.3-r1.ebuild
deleted file mode 100644
index 63cae3c5fd25..000000000000
--- a/dev-embedded/sunxi-tools/sunxi-tools-1.3-r1.ebuild
+++ /dev/null
@@ -1,32 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-inherit toolchain-funcs
-
-MY_PV="v${PV}"
-SRC_URI="https://github.com/linux-sunxi/sunxi-tools/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
-
-DESCRIPTION="Tools for Allwinner A10 devices"
-HOMEPAGE="http://linux-sunxi.org/"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE=""
-KEYWORDS="~amd64"
-
-DEPEND="virtual/libusb"
-
-src_compile() {
-	emake CC="$(tc-getCC)" CFLAGS="${CFLAGS} -std=c99 -D_POSIX_C_SOURCE=200112L -Iinclude/" all misc
-}
-
-src_install() {
-	dobin bin2fex fex2bin phoenix_info
-	newbin sunxi-bootinfo bootinfo
-	newbin sunxi-fel fel
-	newbin sunxi-fexc fexc
-	newbin sunxi-nand-part nand-part
-	newbin sunxi-pio pio
-}

diff --git a/dev-embedded/sunxi-tools/sunxi-tools-1.4.1-r1.ebuild b/dev-embedded/sunxi-tools/sunxi-tools-1.4.1-r1.ebuild
deleted file mode 100644
index 1935b50c89ee..000000000000
--- a/dev-embedded/sunxi-tools/sunxi-tools-1.4.1-r1.ebuild
+++ /dev/null
@@ -1,45 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-inherit toolchain-funcs
-
-MY_PV="v${PV}"
-SRC_URI="https://github.com/linux-sunxi/sunxi-tools/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
-
-DESCRIPTION="Tools for Allwinner A10 devices."
-HOMEPAGE="http://linux-sunxi.org/"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE=""
-KEYWORDS="~amd64"
-
-RDEPEND="acct-group/plugdev
-	virtual/libusb:1
-	virtual/udev"
-
-DEPEND="${RDEPEND}
-	virtual/pkgconfig"
-
-PATCHES=(
-	"${FILESDIR}/${P}-respect-user-supplied-cflags.patch"
-	"${FILESDIR}/${P}-fix-strncpy-compiler-warning.patch"
-)
-
-src_compile() {
-	tc-export PKG_CONFIG
-
-	emake LIBUSB_CFLAGS="$(${PKG_CONFIG} --cflags libusb-1.0)" \
-		LIBUSB_LIBS="$(${PKG_CONFIG} --libs libusb-1.0)" \
-		CC="$(tc-getCC)" tools misc
-}
-
-src_install() {
-	dobin bin2fex fex2bin phoenix_info sunxi-nand-image-builder
-	newbin sunxi-bootinfo bootinfo
-	newbin sunxi-fel fel
-	newbin sunxi-fexc fexc
-	newbin sunxi-nand-part nand-part
-}


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-04-02 15:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-14 23:43 [gentoo-commits] repo/gentoo:master commit in: dev-embedded/sunxi-tools/files/, dev-embedded/sunxi-tools/ Steve Arnold
  -- strict thread matches above, loose matches on Subject: below --
2025-04-02 15:04 Yixun Lan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox