Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Feb 2008 23:54:14 GMT
From:      Warner Losh <imp@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 136130 for review
Message-ID:  <200802242354.m1ONsEQh095806@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=136130

Change 136130 by imp@imp_paco-paco on 2008/02/24 23:53:58

	IFC @136129

Affected files ...

.. //depot/projects/arm/src/bin/sh/machdep.h#2 delete
.. //depot/projects/arm/src/contrib/amd/doc/stamp-vti#2 integrate
.. //depot/projects/arm/src/contrib/pf/pflogd/pidfile.c#3 delete
.. //depot/projects/arm/src/contrib/pf/pflogd/pidfile.h#3 delete
.. //depot/projects/arm/src/games/wargames/Makefile#2 delete
.. //depot/projects/arm/src/games/wargames/wargames.6#2 delete
.. //depot/projects/arm/src/sys/arm/arm/cpufunc_asm_arm11.S#2 integrate
.. //depot/projects/arm/src/sys/arm/arm/cpufunc_asm_armv5.S#2 integrate
.. //depot/projects/arm/src/sys/arm/arm/cpufunc_asm_armv5_ec.S#2 integrate
.. //depot/projects/arm/src/sys/arm/arm/cpufunc_asm_xscale_c3.S#2 integrate
.. //depot/projects/arm/src/sys/arm/conf/CRB#2 integrate
.. //depot/projects/arm/src/sys/arm/xscale/i8134x/crb_machdep.c#2 integrate
.. //depot/projects/arm/src/sys/arm/xscale/i8134x/files.crb#2 integrate
.. //depot/projects/arm/src/sys/arm/xscale/i8134x/files.i81342#2 integrate
.. //depot/projects/arm/src/sys/arm/xscale/i8134x/i81342.c#2 integrate
.. //depot/projects/arm/src/sys/arm/xscale/i8134x/i81342reg.h#2 integrate
.. //depot/projects/arm/src/sys/arm/xscale/i8134x/i81342var.h#2 integrate
.. //depot/projects/arm/src/sys/arm/xscale/i8134x/obio_space.c#2 integrate
.. //depot/projects/arm/src/sys/arm/xscale/i8134x/std.crb#2 integrate
.. //depot/projects/arm/src/sys/arm/xscale/i8134x/std.i81342#2 integrate
.. //depot/projects/arm/src/sys/arm/xscale/i8134x/uart_bus_i81342.c#2 integrate
.. //depot/projects/arm/src/sys/arm/xscale/i8134x/uart_cpu_i81342.c#2 integrate
.. //depot/projects/arm/src/sys/boot/arm/at91/boot2/bwct_board.c#4 integrate
.. //depot/projects/arm/src/sys/boot/arm/at91/boot2/centipad_board.c#2 integrate
.. //depot/projects/arm/src/sys/ia64/include/ioctl_meteor.h#2 delete
.. //depot/projects/arm/src/usr.bin/ar/Makefile#2 integrate
.. //depot/projects/arm/src/usr.bin/ar/ar.1#2 integrate
.. //depot/projects/arm/src/usr.bin/ar/ar.c#2 integrate
.. //depot/projects/arm/src/usr.sbin/crunch/crunchide/endian.h#2 delete

Differences ...

==== //depot/projects/arm/src/contrib/amd/doc/stamp-vti#2 (text+ko) ====

@@ -1,3 +1,4 @@
-@set UPDATED 3 July 2001
-@set EDITION 6.0.7
-@set VERSION 6.0.7
+@set UPDATED 20 April 2006
+@set UPDATED-MONTH April 2006
+@set EDITION 6.1.5
+@set VERSION 6.1.5

==== //depot/projects/arm/src/sys/arm/arm/cpufunc_asm_arm11.S#2 (text+ko) ====


==== //depot/projects/arm/src/sys/arm/arm/cpufunc_asm_armv5.S#2 (text+ko) ====


==== //depot/projects/arm/src/sys/arm/arm/cpufunc_asm_armv5_ec.S#2 (text+ko) ====


==== //depot/projects/arm/src/sys/arm/arm/cpufunc_asm_xscale_c3.S#2 (text+ko) ====


==== //depot/projects/arm/src/sys/arm/conf/CRB#2 (text+ko) ====

@@ -15,7 +15,7 @@
 # If you are in doubt as to the purpose or necessity of a line, check first 
 # in NOTES.
 #
-# $FreeBSD: src/sys/arm/conf/IQ31244,v 1.15 2006/06/15 19:58:52 netchild Exp $
+# $FreeBSD: src/sys/arm/conf/CRB,v 1.3 2007/12/02 13:10:41 cognet Exp $
 
 machine		arm
 ident		CRB
@@ -64,7 +64,6 @@
 device		genclock
 device		loop
 device		ether
-device		nexus
 device		mem			# Memory and kernel memory devices
 #device		saarm
 device		miibus
@@ -81,6 +80,8 @@
 device		atapist         # ATAPI tape drives
 options		ATA_STATIC_ID   # Static device numbering
 
+device		"7seg"
+
 # SCSI Controllers
 
 device		pty

==== //depot/projects/arm/src/sys/arm/xscale/i8134x/crb_machdep.c#2 (text+ko) ====

@@ -49,7 +49,8 @@
 #include "opt_ddb.h"
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: src/sys/arm/xscale/i8134x/crb_machdep.c,v 1.3 2007/11/05 11:36:11 kib Exp $");
+
 
 #define _ARM32_BUS_DMA_PRIVATE
 #include <sys/param.h>
@@ -162,6 +163,13 @@
 		    VM_PROT_READ|VM_PROT_WRITE,
 		    PTE_NOCACHE,
 	    },
+	    {
+		    IOP34X_PCE1_VADDR,
+		    IOP34X_PCE1,
+		    IOP34X_PCE1_SIZE,
+		    VM_PROT_READ|VM_PROT_WRITE,
+		    PTE_NOCACHE,
+	    },
 	    {	    
 		    0,
 		    0,
@@ -421,7 +429,7 @@
 #ifdef KSE
 	proc_linkup(&proc0, &ksegrp0, &thread0);
 #else
-	proc_linkup(&proc0, &thread0);
+	proc_linkup0(&proc0, &thread0);
 #endif
 	thread0.td_kstack = kernelstack.pv_va;
 	thread0.td_pcb = (struct pcb *)

==== //depot/projects/arm/src/sys/arm/xscale/i8134x/files.crb#2 (text+ko) ====

@@ -1,2 +1,3 @@
-# $FreeBSD$
+# $FreeBSD: src/sys/arm/xscale/i8134x/files.crb,v 1.2 2007/09/22 16:25:43 cognet Exp $
 arm/xscale/i8134x/crb_machdep.c		standard
+arm/xscale/i8134x/iq81342_7seg.c	optional	7seg

==== //depot/projects/arm/src/sys/arm/xscale/i8134x/files.i81342#2 (text+ko) ====


==== //depot/projects/arm/src/sys/arm/xscale/i8134x/i81342.c#2 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: src/sys/arm/xscale/i8134x/i81342.c,v 1.2 2007/09/22 16:25:43 cognet Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -95,3 +95,65 @@
 {
 	return (NULL);
 }
+	device_add_child(dev, "iqseg", 0);
+	bus_generic_probe(dev);
+	bus_generic_attach(dev);
+	return (0);
+}
+
+static struct resource *
+i81342_alloc_resource(device_t dev, device_t child, int type, int *rid,
+    u_long start, u_long end, u_long count, u_int flags)
+{
+	struct i81342_softc *sc = device_get_softc(dev);
+	struct resource *rv;
+
+	if (type == SYS_RES_IRQ) {
+		rv = rman_reserve_resource(&sc->sc_irq_rman,
+		    start, end, count, flags, child);
+		if (rv != NULL)
+			rman_set_rid(rv, *rid);
+		return (rv);
+	}
+	
+	return (NULL);
+}
+
+static int
+i81342_setup_intr(device_t dev, device_t child, struct resource *ires, 
+    int flags, driver_filter_t *filt, driver_intr_t *intr, void *arg, 
+    void **cookiep)
+{
+	
+
+	BUS_SETUP_INTR(device_get_parent(dev), child, ires, flags, filt, intr,
+	    arg, cookiep);
+	arm_unmask_irq(rman_get_start(ires));
+	return (0);
+}
+
+static int
+i81342_teardown_intr(device_t dev, device_t child, struct resource *res,
+    void *cookie)
+{
+	return (BUS_TEARDOWN_INTR(device_get_parent(dev), child, res, cookie));
+}
+
+static device_method_t i81342_methods[] = {
+	DEVMETHOD(device_probe, i81342_probe),
+	DEVMETHOD(device_attach, i81342_attach),
+	DEVMETHOD(device_identify, i81342_identify),
+	DEVMETHOD(bus_alloc_resource, i81342_alloc_resource),
+	DEVMETHOD(bus_setup_intr, i81342_setup_intr),
+	DEVMETHOD(bus_teardown_intr, i81342_teardown_intr),
+	{0, 0},
+};
+
+static driver_t i81342_driver = {
+	"iq",
+	i81342_methods,
+	sizeof(struct i81342_softc),
+};
+static devclass_t i81342_devclass;
+
+DRIVER_MODULE(iq, nexus, i81342_driver, i81342_devclass, 0, 0);

==== //depot/projects/arm/src/sys/arm/xscale/i8134x/i81342reg.h#2 (text+ko) ====

@@ -24,7 +24,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-/* $FreeBSD$ */
+/* $FreeBSD: src/sys/arm/xscale/i8134x/i81342reg.h,v 1.3 2007/09/22 22:25:24 cognet Exp $ */
 
 #ifndef I83142_REG_H_
 #define I83142_REG_H_
@@ -45,6 +45,63 @@
 #define IOP34X_HWADDR		0xffd00000
 #define IOP34X_SIZE		0x100000
 
+#define IOP34X_ADMA0_OFFSET	0x00080000
+#define IOP34X_ADMA1_OFFSET	0x00080200
+#define IOP34X_ADMA2_OFFSET	0x00080400
+#define IOP34X_ADMA_SIZE	0x200
+
+
+/* ADMA Registers */
+#define IOP34X_ADMA_CCR		0x0000 /* Channel Control Register */
+#define IOP34X_ADMA_CSR		0x0004 /* Channel Status Register */
+#define IOP34X_ADMA_DAR		0x0008 /* Descriptor Address Register */
+#define IOP34X_ADMA_IPCR	0x0018 /* Internal Interface Parity Ctrl Reg */
+#define IOP34X_ADMA_NDAR	0x0024 /* Next Descriptor Register */
+#define IOP34X_ADMA_DCR		0x0028 /* Descriptor Control Register */
+
+#define	IOP34X_ADMA_IE		(1 << 0) /* Interrupt enable */
+#define IOP34X_ADMA_TR		(1 << 1) /* Transfert Direction */
+/* 
+ *               Source                   Destination
+ *  00         Host I/O Interface	Local Memory
+ *  01         Local Memory             Host I/O Interface
+ *  10         Internal Bus             Local Memory
+ *  11         Local Memory             Internal Bus
+ */
+#define IOP34X_ADMA_SS		(1 << 3) /* Source selection */
+/* 0000: Data Transfer / CRC / Memory Block Fill */
+#define IOP34X_ADMA_ZRBCE	(1 << 7) /* Zero Result Buffer Check Enable */
+#define IOP34X_ADMA_MBFE	(1 << 8) /* Memory Block Fill Enable */
+#define IOP34X_ADMA_CGE		(1 << 9) /* CRC Generation enable */
+#define IOP34X_ADMA_CTD		(1 << 10) /* CRC Transfer disable */
+#define IOP34X_ADMA_CSFD	(1 << 11) /* CRC Seed fetch disable */
+#define IOP34X_ADMA_SWBE	(1 << 12) /* Status write back enable */
+#define IOP34X_ADMA_ESE		(1 << 13) /* Endian swap enable */
+#define IOP34X_ADMA_PQUTE	(1 << 16) /* P+Q Update Transfer Enable */
+#define IOP34X_ADMA_DXE		(1 << 17) /* Dual XOR Enable */
+#define IOP34X_ADMA_PQTE	(1 << 18) /* P+Q Transfer Enable */
+#define IOP34X_ADMA_PTD		(1 << 19) /* P Transfer Disable */
+#define IOP34X_ADMA_ROE		(1 << 30) /* Relaxed Ordering Enable */
+#define IOP34X_ADMA_NSE		(1 << 31) /* No Snoop Enable */
+
+#define IOP34X_PBBAR0		0x81588 /* PBI Base Address Register 0 */
+#define IOP34X_PBBAR0_ADDRMASK	0xfffff000
+#define IOP34X_PBBAR1		0x81590
+#define IOP34X_PCE1		0xF2000000
+#define IOP34X_PCE1_SIZE	0x00100000
+#define IOP34X_PCE1_VADDR	0xF1000000
+#define IOP34X_ESSTSR0		0x82188
+#define IOP34X_CONTROLLER_ONLY	(1 << 14)
+#define IOP34X_INT_SEL_PCIX	(1 << 15)
+#define IOP34X_PFR		0x82180 /* Processor Frequency Register */
+#define IOP34X_FREQ_MASK	((1 << 16) | (1 << 17) | (1 << 18))
+#define IOP34X_FREQ_600		(0)
+#define IOP34X_FREQ_667		(1 << 16)
+#define IOP34X_FREQ_800		(1 << 17)
+#define IOP34X_FREQ_833		((1 << 17) | (1 << 16))
+#define IOP34X_FREQ_1000	(1 << 18)
+#define IOP34X_FREQ_1200	((1 << 16) | (1 << 18))
+
 #define IOP34X_UART0_VADDR	IOP34X_VADDR + 0x82300
 #define IOP34X_UART0_HWADDR	IOP34X_HWADDR + 0x82300
 #define IOP34X_UART1_VADDR	IOP34X_VADDR + 0x82340

==== //depot/projects/arm/src/sys/arm/xscale/i8134x/i81342var.h#2 (text+ko) ====


==== //depot/projects/arm/src/sys/arm/xscale/i8134x/obio_space.c#2 (text+ko) ====


==== //depot/projects/arm/src/sys/arm/xscale/i8134x/std.crb#2 (text+ko) ====


==== //depot/projects/arm/src/sys/arm/xscale/i8134x/std.i81342#2 (text+ko) ====


==== //depot/projects/arm/src/sys/arm/xscale/i8134x/uart_bus_i81342.c#2 (text+ko) ====


==== //depot/projects/arm/src/sys/arm/xscale/i8134x/uart_cpu_i81342.c#2 (text+ko) ====


==== //depot/projects/arm/src/sys/boot/arm/at91/boot2/bwct_board.c#4 (text+ko) ====

@@ -1,49 +1,115 @@
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: src/sys/boot/arm/at91/boot2/bwct_board.c,v 1.2 2007/12/23 14:57:35 ticso Exp $");
 
 #include <sys/param.h>
 
+#include "at91rm9200_lowlevel.h"
+#include "at91rm9200.h"
 #include "emac.h"
 #include "lib.h"
 #include "ee.h"
 #include "board.h"
 #include "sd-card.h"
 
-unsigned char mac[6];
+unsigned char mac[6] = { 0x00, 0x0e, 0x42, 0x02, 0x00, 0x28 };
+
+static void USART0_Init();
+static void USART1_Init();
+static void USART2_Init();
+static void USART3_Init();
+static void DS1672_Init();
+
+static void
+DS1672_Init() {
+	uint8_t buf[] = {0x00, 0xa9};
+
+	EEWrite(0xd0, buf, sizeof(buf));
+}
+
+static void
+USART0_Init() {
+
+	AT91PS_PIO pPio = (AT91PS_PIO)AT91C_BASE_PIOA;
+	AT91PS_PMC pPMC = (AT91PS_PMC)AT91C_BASE_PMC;
+
+	// setup GPIO
+	pPio->PIO_ASR = AT91C_PA17_TXD0 | AT91C_PA18_RXD0;
+	pPio->PIO_PDR = AT91C_PA17_TXD0 | AT91C_PA18_RXD0;
+
+	// enable power
+	pPMC->PMC_PCER = 1u << AT91C_ID_US0;
+}
+
+static void
+USART1_Init() {
+
+	AT91PS_PIO pPio = (AT91PS_PIO)AT91C_BASE_PIOA;
+	AT91PS_PMC pPMC = (AT91PS_PMC)AT91C_BASE_PMC;
+
+	// setup GPIO
+	pPio->PIO_ASR = AT91C_PB20_TXD1 | AT91C_PB21_RXD1;
+	pPio->PIO_PDR = AT91C_PB20_TXD1 | AT91C_PB21_RXD1;
+
+	// enable power
+	pPMC->PMC_PCER = 1u << AT91C_ID_US1;
+}
+
+static void
+USART2_Init() {
+
+	AT91PS_PIO pPio = (AT91PS_PIO)AT91C_BASE_PIOA;
+	AT91PS_PMC pPMC = (AT91PS_PMC)AT91C_BASE_PMC;
+
+	// setup GPIO
+	pPio->PIO_ASR = AT91C_PA23_TXD2 | AT91C_PA22_RXD2;
+	pPio->PIO_PDR = AT91C_PA23_TXD2 | AT91C_PA22_RXD2;
+
+	// enable power
+	pPMC->PMC_PCER = 1u << AT91C_ID_US2;
+}
 
 static void
-MacFromEE()
-{	
-#if 0
-	uint32_t sig;
+USART3_Init() {
+
+	AT91PS_PIO pPio = (AT91PS_PIO)AT91C_BASE_PIOA;
+	AT91PS_PMC pPMC = (AT91PS_PMC)AT91C_BASE_PMC;
+
+	// setup GPIO
+	pPio->PIO_BSR = AT91C_PA5_TXD3 | AT91C_PA6_RXD3;
+	pPio->PIO_PDR = AT91C_PA5_TXD3 | AT91C_PA6_RXD3;
 
-	sig = 0;
-	EERead(0, (uint8_t *)&sig, sizeof(sig));
-	if (sig != 0xaa55aa55)
-		return;
-	EERead(48, mac, 3);
-	EERead(48+5, mac+3, 3);
-#else
-	mac[0] = 0x00;
-	mac[1] = 0x0e;
-	mac[2] = 0x42;
-	mac[3] = 0x02;
-	mac[4] = 0x00;
-	mac[5] = 0x21;
-#endif
-	printf("MAC %x:%x:%x:%x:%x:%x\n", mac[0],
-	  mac[1], mac[2], mac[3], mac[4], mac[5]);
+	// enable power
+	pPMC->PMC_PCER = 1u << AT91C_ID_US3;
 }
 
 void
 board_init(void)
 {
-    EEInit();
-    MacFromEE();
-    EMAC_Init();
-    sdcard_init();
-    EMAC_SetMACAddress(mac);
 
+	printf("\n\n");
+	printf("BWCT FSB-A920-1\n");
+	printf("http://www.bwct.de\n");
+	printf("\n");
+	printf("AT92RM9200 180MHz\n");
+	printf("Initialising USART0\n");
+	USART0_Init();
+	printf("Initialising USART1\n");
+	USART1_Init();
+	printf("Initialising USART2\n");
+	USART2_Init();
+	printf("Initialising USART3\n");
+	USART3_Init();
+	printf("Initialising TWI\n");
+	EEInit();
+	printf("Initialising DS1672\n");
+	DS1672_Init();
+	printf("Initialising Ethernet\n");
+	printf("MAC %x:%x:%x:%x:%x:%x\n", mac[0],
+	    mac[1], mac[2], mac[3], mac[4], mac[5]);
+	EMAC_Init();
+	EMAC_SetMACAddress(mac);
+	printf("Initialising SD-card\n");
+	sdcard_init();
 }
 
 #include "../bootspi/ee.c"

==== //depot/projects/arm/src/sys/boot/arm/at91/boot2/centipad_board.c#2 (text+ko) ====


==== //depot/projects/arm/src/usr.bin/ar/Makefile#2 (text+ko) ====

@@ -1,11 +1,28 @@
-#	@(#)Makefile	8.1 (Berkeley) 6/6/93
-# $FreeBSD: src/usr.bin/ar/Makefile,v 1.12 2002/02/08 22:31:35 markm Exp $
+# $FreeBSD: src/usr.bin/ar/Makefile,v 1.19 2008/02/22 06:53:52 obrien Exp $
 
+.if defined(WITH_BSDAR)
 PROG=	ar
-SRCS=	append.c ar.c archive.c contents.c delete.c extract.c misc.c \
-	move.c print.c replace.c
-CFLAGS+=-I${.CURDIR}
-MAN=	ar.1aout ar.5
-BINDIR=	/usr/libexec/aout
+.else
+PROG=	bsdar
+.endif
+SRCS=	ar.c read.c util.c write.c
+
+WARNS?=	5
+
+DPADD=	${LIBARCHIVE} ${LIBBZ2} ${LIBZ} ${LIBELF}
+LDADD=	-larchive -lbz2 -lz -lelf
+
+.if defined(WITH_BSDAR)
+NO_SHARED?=	yes
+LINKS=	${BINDIR}/ar ${BINDIR}/ranlib
+MLINKS=	ar ranlib
+.else
+LINKS=	${BINDIR}/bsdar ${BINDIR}/bsdranlib
+MLINKS=	bsdar.1 bsdranlib.1
+
+CLEANFILES+= bsdar.1
+bsdar.1: ar.1
+	ln -sf ${.ALLSRC} ${.TARGET}
+.endif
 
 .include <bsd.prog.mk>

==== //depot/projects/arm/src/usr.bin/ar/ar.1#2 (text+ko) ====

@@ -1,9 +1,5 @@
-.\" Copyright (c) 1990, 1993
-.\"	The Regents of the University of California.  All rights reserved.
+.\" Copyright (c) 2007 Joseph Koshy.  All rights reserved.
 .\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Hugh Smith at The University of Guelph.
-.\"
 .\" Redistribution and use in source and binary forms, with or without
 .\" modification, are permitted provided that the following conditions
 .\" are met:
@@ -12,205 +8,280 @@
 .\" 2. Redistributions in binary form must reproduce the above copyright
 .\"    notice, this list of conditions and the following disclaimer in the
 .\"    documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\"    must display the following acknowledgement:
-.\"	This product includes software developed by the University of
-.\"	California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\"    may be used to endorse or promote products derived from this software
-.\"    without specific prior written permission.
 .\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
+.\" This software is provided by Joseph Koshy ``as is'' and
+.\" any express or implied warranties, including, but not limited to, the
+.\" implied warranties of merchantability and fitness for a particular purpose
+.\" are disclaimed.  in no event shall Joseph Koshy be liable
+.\" for any direct, indirect, incidental, special, exemplary, or consequential
+.\" damages (including, but not limited to, procurement of substitute goods
+.\" or services; loss of use, data, or profits; or business interruption)
+.\" however caused and on any theory of liability, whether in contract, strict
+.\" liability, or tort (including negligence or otherwise) arising in any way
+.\" out of the use of this software, even if advised of the possibility of
+.\" such damage.
 .\"
-.\"	@(#)ar.1	8.1 (Berkeley) 6/29/93
-.\" $FreeBSD: src/usr.bin/ar/ar.1,v 1.15 2002/04/19 23:18:18 charnier Exp $
+.\" $FreeBSD: src/usr.bin/ar/ar.1,v 1.19 2008/02/23 14:34:52 brueffer Exp $
 .\"
-.Dd June 29, 1993
+.Dd August 31, 2007
+.Os
 .Dt AR 1
-.Os
 .Sh NAME
-.Nm ar
-.Nd create and maintain library archives
+.Nm ar ,
+.Nm ranlib
+.Nd manage archives
 .Sh SYNOPSIS
 .Nm
 .Fl d
-.Op Fl \&Tv
-.Ar archive Ar
+.Op Fl T
+.Op Fl j
+.Op Fl v
+.Op Fl z
+.Ar archive
+.Ar files ...
 .Nm
 .Fl m
-.Op Fl \&Tv
-.Ar archive Ar
-.Nm
-.Fl m
-.Op Fl abiTv
-.Ar position archive Ar
+.Op Fl T
+.Op Fl a Ar position-after
+.Op Fl b Ar position-before
+.Op Fl i Ar position-before
+.Op Fl j
+.Op Fl s
+.Op Fl z
+.Ar archive
+.Ar files ...
 .Nm
 .Fl p
-.Op Fl \&Tv
-.Ar archive Op Ar
+.Op Fl T
+.Op Fl v
+.Ar archive
+.Op Ar files ...
 .Nm
-.Fl q
-.Op Fl cTv
-.Ar archive Ar
-.Nm
 .Fl r
-.Op Fl cuTv
-.Ar archive Ar
+.Op Fl T
+.Op Fl a Ar position-after
+.Op Fl b Ar position-before
+.Op Fl c
+.Op Fl i Ar position-before
+.Op Fl j
+.Op Fl s
+.Op Fl u
+.Op Fl v
+.Op Fl z
+.Ar archive
+.Ar files ...
 .Nm
-.Fl r
-.Op Fl abciuTv
-.Ar position archive Ar
+.Fl s
+.Op Fl j
+.Op Fl z
+.Ar archive
 .Nm
 .Fl t
-.Op Fl \&Tv
-.Ar archive Op Ar
+.Op Fl T
+.Op Fl v
+.Ar archive
+.Op Ar files ...
 .Nm
 .Fl x
-.Op Fl ouTv
-.Ar archive Op Ar
+.Op Fl C
+.Op Fl T
+.Op Fl o
+.Op Fl u
+.Op Fl v
+.Ar archive
+.Op Ar files ...
+.Nm ranlib
+.Ar archive ...
 .Sh DESCRIPTION
 The
 .Nm
-utility creates and maintains groups of files combined into an archive.
-Once an archive has been created, new files can be added and existing
-files can be extracted, deleted, or replaced.
+utility creates and maintains groups of files combined into an
+archive.
+Once an archive has been created, new files can be added to it, and
+existing files can be extracted, deleted or replaced.
 .Pp
-Files are named in the archive by a single component, i.e., if a file
-referenced by a path containing a slash (``/'') is archived it will be
-named by the last component of that path.
-When matching paths listed on the command line against file names stored
-in the archive, only the last component of the path will be compared.
+Files are named in the archive by their last file name component,
+so if a file referenced by a path containing a
+.Dq /
+is archived, it will be named by the last component of the path.
+Similarly when matching paths listed on the command line against
+file names stored in the archive, only the last component of the
+path will be compared.
 .Pp
-All informational and error messages use the path listed on the command
-line, if any was specified; otherwise the name in the archive is used.
-If multiple files in the archive have the same name, and paths are listed
-on the command line to ``select'' archive files for an operation, only the
-.Em first
-file with a matching name will be selected.
-.Pp
 The normal use of
 .Nm
-is for the creation and maintenance of libraries suitable for use with
-the loader (see
-.Xr ld 1 )
+is for the creation and maintenance of libraries suitable for use
+with the link editor
+.Xr ld 1 ,
 although it is not restricted to this purpose.
+The
+.Nm
+utility can create and manage an archive symbol table (see
+.Xr ar 5 )
+used to speed up link editing operations.
+If a symbol table is present in an archive, it will be
+kept up-to-date by subsequent operations on the archive (excepting
+the quick update specified by the
+.Fl q
+option).
 .Pp
-The options are as follows:
+The
+.Nm ranlib
+utility is used to add an archive symbol table
+to an existing archive.
+.Sh OPTIONS
+The
+.Nm
+utility supports the following options:
 .Bl -tag -width indent
-.It Fl a
-A positioning modifier used with the options
+.It Fl a Ar member-after
+When used with option
+.Fl m
+this option specifies that the archive members specified by
+arguments
+.Ar files ...
+are moved to after the archive member named by argument
+.Ar member-after .
+When used with option
+.Fl r
+this option specifies that the files specified by arguments
+.Ar files ...
+are added after the archive member named by argument
+.Ar member-after .
+.It Fl b Ar member-before
+When used with option
+.Fl m
+this option specifies that the archive members specified by
+arguments
+.Ar files ...
+are moved to before the archive member named by argument
+.Ar member-before .
+When used with option
 .Fl r
-and
-.Fl m .
-The files are entered or moved
-.Em after
-the archive member
-.Ar position ,
-which must be specified.
-.It Fl b
-A positioning modifier used with the options
+this option specifies that the files specified by arguments
+.Ar files ...
+are added before the archive member named by argument
+.Ar member-before .
+.It Fl c
+Suppress the informational message printed when a new archive is
+created using the
 .Fl r
 and
-.Fl m .
-The files are entered or moved
-.Em before
-the archive member
-.Ar position ,
-which must be specified.
-.It Fl c
-Whenever an archive is created, an informational message to that effect
-is written to standard error.
-If the
-.Fl c
-option is specified,
-.Nm
-creates the archive silently.
+.Fl q
+options.
+.It Fl C
+Prevent extracted files from replacing like-named files
+in the file system.
 .It Fl d
-Delete the specified archive files.
-.It Fl i
-Identical to the
-.Fl b
-option.
+Delete the members named by arguments
+.Ar files ...
+from the archive specified by argument
+.Ar archive .
+The archive's symbol table, if present, is updated to reflect
+the new contents of the archive.
+.It Fl f
+Synonymous with option
+.Fl T .
+.It Fl i Ar member-before
+Synonymous with option
+.Fl b .
+.It Fl j
+Compress the resulting archive with
+.Xr bzip2 1 .
 .It Fl m
-Move the specified archive files within the archive.
-If one of the options
+Move archive members specified by arguments
+.Ar files ...
+within the archive.
+If a position has been specified by one of the
 .Fl a ,
 .Fl b
 or
 .Fl i
-is specified, the files are moved
-before or after the
-.Ar position
-file in the archive.
-If none of those options are specified, the files are moved
+options, the members are moved to before or after the specified
+position.
+If no position has been specified, the specified members are moved
 to the end of the archive.
+If the archive has a symbol table, it is updated to reflect the
+new contents of the archive.
 .It Fl o
-Set the access and modification times of extracted files to the
-modification time of the file when it was entered into the archive.
-This will fail if the user is not the owner of the extracted file
-or the super-user.
+Preserve the original modification times of members when extracting
+them.
 .It Fl p
-Write the contents of the specified archive files to the standard output.
-If no files are specified, the contents of all the files in the archive
-are written in the order they appear in the archive.
+Write the contents of the specified archive members named by
+arguments
+.Ar files ...
+to standard output.
+If no members were specified, the contents of all the files in the
+archive are written in the order they appear in the archive.
 .It Fl q
-(Quickly) append the specified files to the archive.
-If the archive does not exist a new archive file is created.
-Much faster than the
-.Fl r
-option, when creating a large archive
-piece-by-piece, as no checking is done to see if the files already
-exist in the archive.
+Append the files specified by arguments
+.Ar files ...
+to the archive specified by argument
+.Ar archive
+without checking if the files already exist in the archive and
+without updating the archive's symbol table.
+If the archive file
+.Ar archive
+does not already exist, a new archive is created.
+However, to be compatible with GNU
+.Nm ,
+.Fl q
+is implemented as a synonym for
+.Fl r .
 .It Fl r
-Replace or add the specified files to the archive.
-If the archive does not exist a new archive file is created.
-Files that replace existing files do not change the order of the files
+Replace (add) the files specified by arguments
+.Ar files ...
+in the archive specified by argument
+.Ar archive ,
+creating the archive if necessary.
+Files that replace existing files do not change the order of files
 within the archive.
-New files are appended to the archive unless one of the options
+If a file named in arguments
+.Ar files ...
+does not exist, existing members in the archive that match that
+name are not changed.
+New files are added to the end of the archive unless one of the
+positioning options
 .Fl a ,
 .Fl b
 or
 .Fl i
 is specified.
-.It Fl T
-Select and/or name archive members using only the first fifteen characters
-of the archive member or command line file name.
-The historic archive format had sixteen bytes for the name, but some
-historic archiver and loader implementations were unable to handle names
-that used the entire space.
-This means that file names that are not unique in their first fifteen
-characters can subsequently be confused.
-A warning message is printed to the standard error output if any file
-names are truncated.
-(See
-.Xr ar 5
-for more information.)
+The archive symbol table, if it exists, is updated to reflect the
+new state of the archive.
+.It Fl s
+Add an archive symbol table (see
+.Xr ar 5 )
+to the archive specified by argument
+.Ar archive .
+Invoking
+.Nm
+with the
+.Fl s
+option alone is equivalent to invoking
+.Nm ranlib .
 .It Fl t
-List the specified files in the order in which they appear in the archive,
-each on a separate line.
+List the files specified by arguments
+.Ar files ...
+in the order in which they appear in the archive, one per line.
 If no files are specified, all files in the archive are listed.
+.It Fl T
+Use only the first fifteen characters of the archive member name or
+command line file name argument when naming archive members.
 .It Fl u
-Update files.
+Conditionally update the archive or extract members.
 When used with the
 .Fl r
-option, files in the archive will be replaced
-only if the disk file has a newer modification time than the file in
-the archive.
+option, files named by arguments
+.Ar files ...
+will be replaced in the archive if they are newer than their
+archived versions.
 When used with the
 .Fl x
-option, files in the archive will be extracted
-only if the archive file has a newer modification time than the file
-on disk.
+option, the members specified by arguments
+.Ar files ...
+will be extracted only if they are newer than the corresponding
+files in the file system.
 .It Fl v
 Provide verbose output.
 When used with the
@@ -221,98 +292,115 @@
 .Fl x
 options,
 .Nm
-gives a file-by-file description of the archive modification.
-This description consists of three, white-space separated fields: the
-option letter, a dash (``-'') and the file name.
+gives a file-by-file description of the archive modification being
+performed, which consists of three white-space seperated fields:
+the option letter, a dash
+.Dq "-" ,
+and the file name.
 When used with the
 .Fl r
 option,
 .Nm
-displays the description as above, but the initial letter is an ``a'' if
-the file is added to the archive and an ``r'' if the file replaces a file
-already in the archive.
-.Pp
+displays the description as above, but the initial letter is an
+.Dq a
+if the file is added to the archive, or an
+.Dq r
+if the file replaces a file already in the archive.
 When used with the
 .Fl p
-option,
-the name of each printed file,
-enclosed in less-than (``<'') and greater-than (``>'') characters,
-is written to the standard output before
-the contents of the file;
-it is preceded by a single newline character, and
-followed by two newline characters.
-.Pp
+option, the name of the file enclosed in
+.Dq <
+and
+.Dq >
+characters is written to standard output preceded by a single newline
+character and followed by two newline characters.
+The contents of the named file follow the file name.
 When used with the
 .Fl t
 option,
 .Nm
-displays an ``ls -l'' style listing of information about the members of
-the archive.
-This listing consists of eight, white-space separated fields:
-the file permissions (see
-.Xr strmode 3 ) ,
-the decimal user and group ID's, separated by a single slash (``/''),
-the file size (in bytes), the file modification time (in the
-.Xr date 1
-format ``%b %e %H:%M %Y''), and the name of the file.
+displays eight whitespace separated fields:
+the file permissions as displayed by
+.Xr strmode 3 ,
+decimal user and group IDs separated by a slash (
+.Dq / Ns ) ,
+the file size in bytes, the file modification time in
+.Xr strftime 3
+format
+.Dq "%b %e %H:%M %Y" ,
+and the name of the file.
 .It Fl x

>>> TRUNCATED FOR MAIL (1000 lines) <<<



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200802242354.m1ONsEQh095806>