Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F161330539
D5639.id14329.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D5639.id14329.diff
View Options
Index: etc/mtree/BSD.usr.dist
===================================================================
--- etc/mtree/BSD.usr.dist
+++ etc/mtree/BSD.usr.dist
@@ -428,6 +428,8 @@
uefisign
..
..
+ firmware
+ ..
games
fortune
..
Index: share/man/man7/hier.7
===================================================================
--- share/man/man7/hier.7
+++ share/man/man7/hier.7
@@ -545,6 +545,9 @@
.Pp
.It Pa examples/
various examples for users and programmers
+.It Pa firmware/
+Firmware files used by various firmware loaders / programmers that
+are done with a user land tool.
.It Pa games/
ASCII text files used by various games
.It Pa groff_font/
Index: tools/build/mk/OptionalObsoleteFiles.inc
===================================================================
--- tools/build/mk/OptionalObsoleteFiles.inc
+++ tools/build/mk/OptionalObsoleteFiles.inc
@@ -8024,6 +8024,7 @@
OLD_FILES+=usr/share/examples/libusb20/util.c
OLD_FILES+=usr/share/examples/libusb20/util.h
OLD_DIRS+=usr/share/examples/libusb20
+OLD_FILES+=usr/share/firmware/ar5523.bin
OLD_FILES+=usr/share/man/man1/uhsoctl.1.gz
OLD_FILES+=usr/share/man/man1/usbhidaction.1.gz
OLD_FILES+=usr/share/man/man1/usbhidctl.1.gz
Index: usr.sbin/uathload/Makefile
===================================================================
--- usr.sbin/uathload/Makefile
+++ usr.sbin/uathload/Makefile
@@ -3,28 +3,14 @@
PROG= uathload
MAN= uathload.8
-SRCS= uathload.c ar5523.bin
+SRCS= uathload.c
+FILES= ar5523.bin
+FILESDIR= ${SHAREDIR}/firmware
+FILESMODE= 444
CLEANFILES= ar5523.bin
-# It's hard to tag ar5523.o with the proper gnu note saying that it has a
-# non-executable stack, so ld doesn't properly mark his executable as
-# not having an executable stack. Mark it explicitly, but only for those
-# platforms that support his feature (otherwise signals don't work).
-# Note: Newer versions of ld than is in the tree ignore -z.
-.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpc64"
-LDFLAGS+= -Wl,-z,noexecstack
-.endif
-
-# The conversion from .bin to .o doesn't always produce a pedantically correct
-# .o's. And it doesn't matter, so turn off the mismatch warnings since it is
-# pure data. On mips64 here's no easy way to produce a proper .o.
-LDFLAGS+= -Wl,--no-warn-mismatch
-
ar5523.bin: ${.CURDIR}/../../sys/contrib/dev/uath/ar5523.bin.uu
uudecode -p ${.CURDIR}/../../sys/contrib/dev/uath/ar5523.bin.uu > ${.TARGET}
-ar5523.o: ar5523.bin
- ${LD} -b binary -d -warn-common -r -d -o ${.TARGET} ar5523.bin
-
.include <bsd.prog.mk>
Index: usr.sbin/uathload/uathload.c
===================================================================
--- usr.sbin/uathload/uathload.c
+++ usr.sbin/uathload/uathload.c
@@ -140,23 +140,19 @@
if (argc > 1)
usage();
- if (argc == 1) {
+ if (argc == 1)
fwname = argv[0];
- fw = open(fwname, O_RDONLY, 0);
- if (fw < 0)
- err(-1, "open(%s)", fwname);
- if (fstat(fw, &sb) < 0)
- err(-1, "fstat(%s)", fwname);
- txdata = mmap(NULL, sb.st_size, PROT_READ, MAP_PRIVATE, fw, 0);
- if (txdata == MAP_FAILED)
- err(-1, "mmap(%s)", fwname);
- len = sb.st_size;
- } else {
- fwname = "ar5523.bin (builtin)";
- fw = -1;
- txdata = &_binary_ar5523_bin_start;
- len = &_binary_ar5523_bin_end - &_binary_ar5523_bin_start;
- }
+ else
+ fwname = "/usr/share/firmware/ar5523.bin";
+ fw = open(fwname, O_RDONLY, 0);
+ if (fw < 0)
+ err(-1, "open(%s)", fwname);
+ if (fstat(fw, &sb) < 0)
+ err(-1, "fstat(%s)", fwname);
+ txdata = mmap(NULL, sb.st_size, PROT_READ, MAP_PRIVATE, fw, 0);
+ if (txdata == MAP_FAILED)
+ err(-1, "mmap(%s)", fwname);
+ len = sb.st_size;
/* XXX verify device is an AR5005 part */
if (getdevname(devname, msgdev, datadev))
err(-1, "getdevname error");
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jul 3, 9:27 PM (20 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34638004
Default Alt Text
D5639.id14329.diff (3 KB)
Attached To
Mode
D5639: Just install ar5523.bin into /usr/share/firmware and stop compiling it in.
Attached
Detach File
Event Timeline
Log In to Comment