From owner-svn-src-all@freebsd.org Tue Mar 15 04:42:39 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5ADEAD10EC; Tue, 15 Mar 2016 04:42:39 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 630BF3A0; Tue, 15 Mar 2016 04:42:39 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2F4gcrJ072843; Tue, 15 Mar 2016 04:42:38 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2F4gbeK072837; Tue, 15 Mar 2016 04:42:37 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201603150442.u2F4gbeK072837@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 15 Mar 2016 04:42:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r296889 - in head: etc/mtree share/man/man7 tools/build/mk usr.sbin usr.sbin/uathload X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Mar 2016 04:42:39 -0000 Author: imp Date: Tue Mar 15 04:42:37 2016 New Revision: 296889 URL: https://svnweb.freebsd.org/changeset/base/296889 Log: Just install ar5523.bin into /usr/share/firmware and stop compiling it in. Differential Review: https://reviews.freebsd.org/D5639 Modified: head/etc/mtree/BSD.usr.dist head/share/man/man7/hier.7 head/tools/build/mk/OptionalObsoleteFiles.inc head/usr.sbin/Makefile head/usr.sbin/uathload/Makefile head/usr.sbin/uathload/uathload.c Modified: head/etc/mtree/BSD.usr.dist ============================================================================== --- head/etc/mtree/BSD.usr.dist Tue Mar 15 04:03:15 2016 (r296888) +++ head/etc/mtree/BSD.usr.dist Tue Mar 15 04:42:37 2016 (r296889) @@ -428,6 +428,8 @@ uefisign .. .. + firmware + .. games fortune .. Modified: head/share/man/man7/hier.7 ============================================================================== --- head/share/man/man7/hier.7 Tue Mar 15 04:03:15 2016 (r296888) +++ head/share/man/man7/hier.7 Tue Mar 15 04:42:37 2016 (r296889) @@ -28,7 +28,7 @@ .\" @(#)hier.7 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd October 2, 2015 +.Dd March 15, 2016 .Dt HIER 7 .Os .Sh NAME @@ -545,6 +545,8 @@ Chinese translations of documents in /us .Pp .It Pa examples/ various examples for users and programmers +.It Pa firmware/ +Firmware images loaded by user land programs .It Pa games/ ASCII text files used by various games .It Pa groff_font/ Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Tue Mar 15 04:03:15 2016 (r296888) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Tue Mar 15 04:42:37 2016 (r296889) @@ -8024,6 +8024,7 @@ OLD_FILES+=usr/share/examples/libusb20/c 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 Modified: head/usr.sbin/Makefile ============================================================================== --- head/usr.sbin/Makefile Tue Mar 15 04:03:15 2016 (r296888) +++ head/usr.sbin/Makefile Tue Mar 15 04:42:37 2016 (r296889) @@ -194,9 +194,7 @@ SUBDIR.${MK_TIMED}+= timed SUBDIR.${MK_TOOLCHAIN}+= config SUBDIR.${MK_TOOLCHAIN}+= crunch SUBDIR.${MK_UNBOUND}+= unbound -.if !(${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 50200) SUBDIR.${MK_USB}+= uathload -.endif SUBDIR.${MK_USB}+= uhsoctl SUBDIR.${MK_USB}+= usbconfig SUBDIR.${MK_USB}+= usbdump Modified: head/usr.sbin/uathload/Makefile ============================================================================== --- head/usr.sbin/uathload/Makefile Tue Mar 15 04:03:15 2016 (r296888) +++ head/usr.sbin/uathload/Makefile Tue Mar 15 04:42:37 2016 (r296889) @@ -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 Modified: head/usr.sbin/uathload/uathload.c ============================================================================== --- head/usr.sbin/uathload/uathload.c Tue Mar 15 04:03:15 2016 (r296888) +++ head/usr.sbin/uathload/uathload.c Tue Mar 15 04:42:37 2016 (r296889) @@ -140,23 +140,19 @@ main(int argc, char *argv[]) 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");