#! /bin/sh -e
## include.dpatch by Thiemo Seufer <ica2_ts@csv.ica.uni-stuttgart.de>
##
## DP: patches to include files for building sibyl
[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
patch_opts="${patch_opts:--f --no-backup-if-mismatch ${2:+-d $2}}"
if [ $# -lt 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch) patch $patch_opts -p1 < $0;;
-unpatch) patch $patch_opts -p1 -R < $0;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1;;
esac
exit 0
@DPATCH@
diff -wurN orig/include/cfe_bootblock.h debian/include/cfe_bootblock.h
--- orig/include/cfe_bootblock.h 2004-02-09 22:24:54.000000000 +0100
+++ debian/include/cfe_bootblock.h 2004-07-25 14:10:59.000000000 +0200
@@ -100,15 +100,15 @@
* Fields within the boot block
*/
#define _U64(x) ((uint64_t) x)
-#define BOOT_MAGIC_NUMBER _U64(0x43465631424f4f54ULL)
-#define BOOT_HDR_CHECKSUM_MASK _U64(0x00000000FFFFFFFFULL)
-#define BOOT_HDR_VER_MASK _U64(0x000000FF00000000ULL)
+#define BOOT_MAGIC_NUMBER _U64(0x43465631424f4f54)
+#define BOOT_HDR_CHECKSUM_MASK _U64(0x00000000FFFFFFFF)
+#define BOOT_HDR_VER_MASK _U64(0x000000FF00000000)
#define BOOT_HDR_VER_SHIFT 32
-#define BOOT_HDR_FLAGS_MASK _U64(0xFF00000000000000ULL)
-#define BOOT_SECSIZE_MASK _U64(0x00000000FFFFFFFFULL)
-#define BOOT_DATA_CHECKSUM_MASK _U64(0xFFFFFFFF00000000ULL)
+#define BOOT_HDR_FLAGS_MASK _U64(0xFF00000000000000)
+#define BOOT_SECSIZE_MASK _U64(0x00000000FFFFFFFF)
+#define BOOT_DATA_CHECKSUM_MASK _U64(0xFFFFFFFF00000000)
#define BOOT_DATA_CHECKSUM_SHIFT 32
-#define BOOT_ARCHINFO_MASK _U64(0x00000000FFFFFFFFULL)
+#define BOOT_ARCHINFO_MASK _U64(0x00000000FFFFFFFF)
#define BOOT_HDR_VERSION 1
diff -wurN orig/include/cfe_crypto.h debian/include/cfe_crypto.h
--- orig/include/cfe_crypto.h 2003-09-04 22:15:10.000000000 +0200
+++ debian/include/cfe_crypto.h 1970-01-01 01:00:00.000000000 +0100
@@ -1,129 +0,0 @@
-/* *********************************************************************
- * Broadcom Common Firmware Environment (CFE)
- *
- * Crypto IOCTL definitions File: cfe_crypto.h
- *
- * IOCTL function numbers and I/O data structures for communicating
- * with BlueSteel/Broadcom BCM582x crypto engines.
- *
- *********************************************************************
- *
- * Copyright 2003
- * Broadcom Corporation. All rights reserved.
- *
- * This software is furnished under license and may be used and
- * copied only in accordance with the following terms and
- * conditions. Subject to these conditions, you may download,
- * copy, install, use, modify and distribute modified or unmodified
- * copies of this software in source and/or binary form. No title
- * or ownership is transferred hereby.
- *
- * 1) Any source code used, modified or distributed must reproduce
- * and retain this copyright notice and list of conditions
- * as they appear in the source file.
- *
- * 2) No right is granted to use any trade name, trademark, or
- * logo of Broadcom Corporation. The "Broadcom Corporation"
- * name may not be used to endorse or promote products derived
- * from this software without the prior written permission of
- * Broadcom Corporation.
- *
- * 3) THIS SOFTWARE IS PROVIDED "AS-IS" AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO, ANY IMPLIED
- * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- * PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT
- * SHALL BROADCOM BE LIABLE FOR ANY DAMAGES WHATSOEVER, AND IN
- * PARTICULAR, BROADCOM SHALL NOT BE LIABLE FOR 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), EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- ********************************************************************* */
-
-#ifndef _CFE_CRYPTO_H_
-#define _CFE_CRYPTO_H_
-
-#define _DD_MAKEMASK1(n) (1 << (n))
-#define _DD_MAKEMASK(v,n) ((((1)<<(v))-1) << (n))
-#define _DD_MAKEVALUE(v,n) ((v) << (n))
-#define _DD_GETVALUE(v,n,m) (((v) & (m)) >> (n))
-
-/* *********************************************************************
- * Crypto stuff
- ********************************************************************* */
-
-#define IOCTL_CRYPTO_GETINFO 0 /* return crypto_info_t */
-#define IOCTL_CRYPTO_CMD_1 1 /* run a 582x MCR1 command */
-#define IOCTL_CRYPTO_CMD_2 2 /* run a 582x MCR2 command */
-
-typedef enum {
- BCM5820,
- BCM5821,
- BCM5822,
- BCM5823
-} bs_chip_type;
-
-typedef struct crypto_info_s {
- bs_chip_type chip;
-} crypto_info_t;
-
-
-/*
- The CMD IOCTL's expect pointers to records describing the crypto
- operation to be carried out. Such records are passed directly to
- the corresponding device (see chip_type) and are limited to its
- capabilities, which vary somewhat among the chip types.
-
- Formats of 582x Command Record fields follow.
-*/
-
-/* Master Command Record Header Format */
-
-#define S_MCR_NUM_PACKETS 0
-#define M_MCR_NUM_PACKETS _DD_MAKEMASK(16,S_MCR_NUM_PACKETS)
-#define V_MCR_NUM_PACKETS(x) _DD_MAKEVALUE(x,S_MCR_NUM_PACKETS)
-#define G_MCR_NUM_PACKETS(x) _DD_GETVALUE(x,S_MCR_NUM_PACKETS,M_MCR_NUM_PACKETS)
-
-/* Input flags */
-
-#define M_MCR_SUPPRESS_INTR _DD_MAKEMASK1(31)
-
-/* Output flags */
-
-#define M_MCR_DONE _DD_MAKEMASK1(16)
-#define M_MCR_ERROR _DD_MAKEMASK1(17)
-
-#define S_MCR_ERROR_CODE 24
-#define M_MCR_ERROR_CODE _DD_MAKEMASK(8,S_MCR_ERROR_CODE)
-#define V_MCR_ERROR_CODE(x) _DD_MAKEVALUE(x,S_MCR_ERROR_CODE)
-#define G_MCR_ERROR_CODE(x) _DD_GETVALUE(x,S_MCR_ERROR_CODE,M_MCR_ERROR_CODE)
-#define K_MCR_ERROR_OK 0
-#define K_MCR_ERROR_UNKNOWN_OP 1
-#define K_MCR_ERROR_DSA_SHORT 2
-#define K_MCR_ERROR_PKI_SHORT 3
-#define K_MCR_ERROR_PKO_SHORT 4 /* Not 5820 */
-#define K_MCR_ERROR_CHAIN_SHORT 5 /* Not 5820 */
-#define K_MCR_ERROR_FIFO 6 /* Not 5820 */
-
-/* In both cases, the header word is followed by an array of N PD entries:
- commandContext[0]
- dataBuffer[0]
- pktLen[0]
- outputBuffer[0]
- ...
- commandContext[n-1]
- dataBuffer[n-1]
- pktLen[n-1]
- outputBuffer[n-1]
-*/
-
-#define MCR_WORDS(n) (1+8*(n))
-#define MCR_BYTES(n) ((1+8*(n))*4)
-
-
-/* Descriptions of PDs to be added. */
-
-#endif /* _CFE_CRYPTO_H_ */
diff -wurN orig/include/cfe_irq.h debian/include/cfe_irq.h
--- orig/include/cfe_irq.h 2003-12-31 22:16:20.000000000 +0100
+++ debian/include/cfe_irq.h 2004-07-25 14:10:59.000000000 +0200
@@ -62,6 +62,8 @@
* Constants
********************************************************************* */
+#define NR_IRQS 64
+
#define CFE_IRQ_FLAGS_SHARED 0x1
/* *********************************************************************
diff -wurN orig/include/cfe_mem.h debian/include/cfe_mem.h
--- orig/include/cfe_mem.h 2003-08-01 00:54:39.000000000 +0200
+++ debian/include/cfe_mem.h 2004-07-25 14:10:59.000000000 +0200
@@ -60,8 +60,6 @@
#define MEMTYPE_L2CACHE 7
#define MEMTYPE_LDT_PCI 8
#define MEMTYPE_DRAM_BOOTPROGRAM 9
-#define MEMTYPE_DRAM_MANUALLY_RESERVED 10
-#define MEMTYPE_MAX 10
/* *********************************************************************
* External data
diff -wurN orig/include/cfe_smbus.h debian/include/cfe_smbus.h
--- orig/include/cfe_smbus.h 2003-12-03 18:23:44.000000000 +0100
+++ debian/include/cfe_smbus.h 1970-01-01 01:00:00.000000000 +0100
@@ -1,90 +0,0 @@
-/* *********************************************************************
- * Broadcom Common Firmware Environment (CFE)
- *
- * Common SMBus definitions File: cfe_smbus.h
- *
- * Driver common data structures for SMBus devices. The
- * higher-level (device-specific) SMBus drivers talk to this, and
- * via these structures we end up at platofrm-specific SMbus
- * handlers.
- *
- * Author: Mitch Lichtenberg
- *
- *********************************************************************
- *
- * Copyright 2000,2001,2002,2003
- * Broadcom Corporation. All rights reserved.
- *
- * This software is furnished under license and may be used and
- * copied only in accordance with the following terms and
- * conditions. Subject to these conditions, you may download,
- * copy, install, use, modify and distribute modified or unmodified
- * copies of this software in source and/or binary form. No title
- * or ownership is transferred hereby.
- *
- * 1) Any source code used, modified or distributed must reproduce
- * and retain this copyright notice and list of conditions
- * as they appear in the source file.
- *
- * 2) No right is granted to use any trade name, trademark, or
- * logo of Broadcom Corporation. The "Broadcom Corporation"
- * name may not be used to endorse or promote products derived
- * from this software without the prior written permission of
- * Broadcom Corporation.
- *
- * 3) THIS SOFTWARE IS PROVIDED "AS-IS" AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO, ANY IMPLIED
- * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- * PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT
- * SHALL BROADCOM BE LIABLE FOR ANY DAMAGES WHATSOEVER, AND IN
- * PARTICULAR, BROADCOM SHALL NOT BE LIABLE FOR 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), EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- ********************************************************************* */
-
-
-typedef struct cfe_smbus_channel_s cfe_smbus_channel_t;
-typedef struct cfe_smbus_s cfe_smbus_t;
-
-struct cfe_smbus_s {
- /* Attach channel */
- cfe_smbus_channel_t * (*attach)(cfe_smbus_t *,uint64_t probe_a,uint64_t probe_b);
- /* initialize channel */
- int (*init)(cfe_smbus_channel_t *chan);
- /* Write 'n' bytes to device (stop condition after write) */
- int (*write)(cfe_smbus_channel_t *chan,uint8_t slave,uint8_t *buf,int len);
- /* Read 'n' bytes from device (stop condition after each read) */
- int (*read)(cfe_smbus_channel_t *chan,uint8_t slave,uint8_t *buf,int len);
- /* Transaction: Write 1 byte and read 'n' bytes (no stop between write and read) */
- int (*xact)(cfe_smbus_channel_t *chan,uint8_t slave,uint8_t cmd,uint8_t *buf,int len);
- /* Quick command */
- int (*qcmd)(cfe_smbus_channel_t *chan,uint8_t slave,int rw);
-};
-
-#define SMBUS_QCMD_R 0
-#define SMBUS_QCMD_W 1
-
-struct cfe_smbus_channel_s {
- cfe_smbus_t *ops;
- void *softc;
-};
-
-#define SMBUS_CHANNELS_MAX 4
-
-extern cfe_smbus_channel_t *cfe_smbus_channels[SMBUS_CHANNELS_MAX];
-
-#define SMBUS_CHANNEL(chanidx) cfe_smbus_channels[chanidx]
-#define SMBUS_INIT(chan) (chan)->ops->init(chan)
-#define SMBUS_READ(chan,slave,buf,len) (chan)->ops->read(chan,slave,buf,len)
-#define SMBUS_WRITE(chan,slave,buf,len) (chan)->ops->write(chan,slave,buf,len)
-#define SMBUS_XACT(chan,slave,cmd,buf,len) (chan)->ops->xact(chan,slave,cmd,buf,len)
-#define SMBUS_QCMD(chan,slave,rw) (chan)->ops->qcmd(chan,slave,rw);
-
-int cfe_add_smbus(cfe_smbus_t *ops,uint64_t probe_a,uint64_t probe_b);
-
-
diff -wurN orig/include/cfe_timer.h debian/include/cfe_timer.h
--- orig/include/cfe_timer.h 2003-07-14 15:59:19.000000000 +0200
+++ debian/include/cfe_timer.h 2004-07-25 14:10:59.000000000 +0200
@@ -59,7 +59,7 @@
void cfe_timer_init(void);
extern volatile int64_t cfe_ticks;
-extern unsigned int cfe_cpu_speed;
+extern int cfe_cpu_speed;
void cfe_sleep(int ticks);
void cfe_usleep(int usec);
diff -wurN orig/include/config.h debian/include/config.h
--- orig/include/config.h 1970-01-01 01:00:00.000000000 +0100
+++ debian/include/config.h 2004-07-25 14:10:59.000000000 +0200
@@ -0,0 +1,47 @@
+/* $Id: config.h,v 1.4 2003/05/30 00:42:38 cgd Exp $ */
+
+/*
+ * Copyright 2001, 2003
+ * Broadcom Corporation. All rights reserved.
+ *
+ * This software is furnished under license and may be used and copied only
+ * in accordance with the following terms and conditions. Subject to these
+ * conditions, you may download, copy, install, use, modify and distribute
+ * modified or unmodified copies of this software in source and/or binary
+ * form. No title or ownership is transferred hereby.
+ *
+ * 1) Any source code used, modified or distributed must reproduce and
+ * retain this copyright notice and list of conditions as they appear in
+ * the source file.
+ *
+ * 2) No right is granted to use any trade name, trademark, or logo of
+ * Broadcom Corporation. The "Broadcom Corporation" name may not be
+ * used to endorse or promote products derived from this software
+ * without the prior written permission of Broadcom Corporation.
+ *
+ * 3) THIS SOFTWARE IS PROVIDED "AS-IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
+ * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL BROADCOM BE LIABLE
+ * FOR ANY DAMAGES WHATSOEVER, AND IN PARTICULAR, BROADCOM SHALL NOT BE
+ * LIABLE FOR 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), EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _CONFIG_H
+#define _CONFIG_H
+
+/* Network support */
+#ifndef CONFIG_BLOCKDEV
+#define CONFIG_NETWORK
+#endif
+
+/* Support for booting from block devices (Currently broken) */
+//#define CONFIG_BLOCKDEV
+
+#endif
+
diff -wurN orig/include/console.h debian/include/console.h
--- orig/include/console.h 1970-01-01 01:00:00.000000000 +0100
+++ debian/include/console.h 2004-07-25 14:10:59.000000000 +0200
@@ -0,0 +1,41 @@
+/* $Id: console.h,v 1.3 2003/05/30 00:42:38 cgd Exp $ */
+
+/*
+ * Copyright 2001, 2003
+ * Broadcom Corporation. All rights reserved.
+ *
+ * This software is furnished under license and may be used and copied only
+ * in accordance with the following terms and conditions. Subject to these
+ * conditions, you may download, copy, install, use, modify and distribute
+ * modified or unmodified copies of this software in source and/or binary
+ * form. No title or ownership is transferred hereby.
+ *
+ * 1) Any source code used, modified or distributed must reproduce and
+ * retain this copyright notice and list of conditions as they appear in
+ * the source file.
+ *
+ * 2) No right is granted to use any trade name, trademark, or logo of
+ * Broadcom Corporation. The "Broadcom Corporation" name may not be
+ * used to endorse or promote products derived from this software
+ * without the prior written permission of Broadcom Corporation.
+ *
+ * 3) THIS SOFTWARE IS PROVIDED "AS-IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
+ * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL BROADCOM BE LIABLE
+ * FOR ANY DAMAGES WHATSOEVER, AND IN PARTICULAR, BROADCOM SHALL NOT BE
+ * LIABLE FOR 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), EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _CONSOLE_H
+#define _CONSOLE_H
+
+void console_print(char *string);
+int open_console();
+
+#endif
diff -wurN orig/include/elf.h debian/include/elf.h
--- orig/include/elf.h 2003-07-22 17:06:00.000000000 +0200
+++ debian/include/elf.h 2004-07-25 14:10:59.000000000 +0200
@@ -71,9 +71,6 @@
#define EM_88K 5 /* Motorola m88k family */
#define EM_860 7 /* Intel 80860 */
#define EM_MIPS 8 /* MIPS R3000 */
-#define EM_PPC 20 /* PowerPC */
-#define EM_PPC64 21 /* PowerPC (64-bit) */
-#define EM_ARM 40 /* ARM */
/* e_version */
#define EV_NONE 0 /* Invalid ELF version */
diff -wurN orig/include/env_subr.h debian/include/env_subr.h
--- orig/include/env_subr.h 2004-01-20 02:53:44.000000000 +0100
+++ debian/include/env_subr.h 2004-07-25 14:10:59.000000000 +0200
@@ -100,8 +100,6 @@
#define ENV_FLG_BUILTIN 0x01 /* builtin - not stored in flash */
#define ENV_FLG_READONLY 0x02 /* read-only - cannot be changed */
-#define ENV_FLG_STARTUP_NORUN 0x04 /* Do not issue commands in STARTUP */
-
#define ENV_FLG_MASK 0xFF /* mask of attributes we keep */
#define ENV_FLG_ADMIN 0x100 /* lets us internally override permissions */
@@ -116,6 +114,4 @@
int env_save(void);
int env_enum(int idx,char *name,int *namelen,char *val,int *vallen);
int env_envtype(const char *name);
-int env_setflags(const char *name,int flags);
-
diff -wurN orig/include/getfile.h debian/include/getfile.h
--- orig/include/getfile.h 1970-01-01 01:00:00.000000000 +0100
+++ debian/include/getfile.h 2004-07-25 14:10:59.000000000 +0200
@@ -0,0 +1,60 @@
+/* $Id: getfile.h,v 1.6 2003/05/30 00:42:38 cgd Exp $ */
+
+/*
+ * Copyright 2001, 2003
+ * Broadcom Corporation. All rights reserved.
+ *
+ * This software is furnished under license and may be used and copied only
+ * in accordance with the following terms and conditions. Subject to these
+ * conditions, you may download, copy, install, use, modify and distribute
+ * modified or unmodified copies of this software in source and/or binary
+ * form. No title or ownership is transferred hereby.
+ *
+ * 1) Any source code used, modified or distributed must reproduce and
+ * retain this copyright notice and list of conditions as they appear in
+ * the source file.
+ *
+ * 2) No right is granted to use any trade name, trademark, or logo of
+ * Broadcom Corporation. The "Broadcom Corporation" name may not be
+ * used to endorse or promote products derived from this software
+ * without the prior written permission of Broadcom Corporation.
+ *
+ * 3) THIS SOFTWARE IS PROVIDED "AS-IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
+ * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL BROADCOM BE LIABLE
+ * FOR ANY DAMAGES WHATSOEVER, AND IN PARTICULAR, BROADCOM SHALL NOT BE
+ * LIABLE FOR 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), EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _GETFILE_H
+#define _GETFILE_H
+
+#include "port.h"
+
+typedef enum {
+ GF_SEEK_SET,
+ GF_SEEK_CUR
+} file_handler_whence_t;
+
+
+typedef struct {
+ void *(*open)(char *loc);
+ int32_t (*seek)(void *private, int32_t ofs, file_handler_whence_t whence);
+ int32_t (*read)(void *private, void *buf, int32_t amount);
+ void (*close)(void *private);
+} file_ops_t;
+
+
+int file_handler_add(file_ops_t *ops);
+void file_handler_del(file_ops_t *ops);
+file_ops_t *file_handler_find(char *name, void **data);
+void file_handler_close(file_ops_t *ops,void *priv);
+
+
+#endif
diff -wurN orig/include/jedec.h debian/include/jedec.h
--- orig/include/jedec.h 2003-12-13 19:18:44.000000000 +0100
+++ debian/include/jedec.h 1970-01-01 01:00:00.000000000 +0100
@@ -1,105 +0,0 @@
-/* *********************************************************************
- * Broadcom Common Firmware Environment (CFE)
- *
- * JEDEC DRAM constants File: jedec.h
- *
- * Constants and macros mostly related to JEDEC serial-presence
- * detect ROMs on DIMMs
- *
- * Author: Mitch Lichtenberg
- *
- *********************************************************************
- *
- * Copyright 2000,2001,2002,2003
- * Broadcom Corporation. All rights reserved.
- *
- * This software is furnished under license and may be used and
- * copied only in accordance with the following terms and
- * conditions. Subject to these conditions, you may download,
- * copy, install, use, modify and distribute modified or unmodified
- * copies of this software in source and/or binary form. No title
- * or ownership is transferred hereby.
- *
- * 1) Any source code used, modified or distributed must reproduce
- * and retain this copyright notice and list of conditions
- * as they appear in the source file.
- *
- * 2) No right is granted to use any trade name, trademark, or
- * logo of Broadcom Corporation. The "Broadcom Corporation"
- * name may not be used to endorse or promote products derived
- * from this software without the prior written permission of
- * Broadcom Corporation.
- *
- * 3) THIS SOFTWARE IS PROVIDED "AS-IS" AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO, ANY IMPLIED
- * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- * PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT
- * SHALL BROADCOM BE LIABLE FOR ANY DAMAGES WHATSOEVER, AND IN
- * PARTICULAR, BROADCOM SHALL NOT BE LIABLE FOR 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), EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- ********************************************************************* */
-
-
-#ifndef _JEDEC_H
-#define _JEDEC_H
-
-/* *********************************************************************
- * JEDEC constants (serial presence detect offsets and bit fields)
- ********************************************************************* */
-
-#define JEDEC_SPD_MEMTYPE 2 /* memory type (sdram, ddr, etc.) */
-#define JEDEC_SPD_ROWS 3 /* row bits */
-#define JEDEC_SPD_COLS 4 /* column bits */
-#define JEDEC_SPD_SIDES 5 /* number of sides */
-#define JEDEC_SPD_WIDTH 6 /* and 7, bit width of device */
-#define JEDEC_SPD_BANKS 17 /* number of banks */
-#define JEDEC_SPD_DENSITY 31 /* module bank density */
-#define JEDEC_SPD_ECC_INFO 11
-
-#define JEDEC_SPD_tCK25 9 /* tCK @ CAS 2.5 */
-#define JEDEC_SPD_tCK20 23 /* tCK @ CAS 2.0 */
-#define JEDEC_SPD_tCK10 25 /* tCK @ CAS 1.0 */
-#define JEDEC_SPD_RFSH 12 /* refresh rate */
-#define JEDEC_SPD_CASLATENCIES 18 /* CAS Latencies supported */
-#define JEDEC_SPD_ATTRIBUTES 21 /* module attributes */
-#define JEDEC_SPD_tRAS 30 /* tRAS */
-#define JEDEC_SPD_tRP 27 /* tRP */
-#define JEDEC_SPD_tRRD 28 /* tRRD */
-#define JEDEC_SPD_tRCD 29 /* tRCD */
-#define JEDEC_SPD_tRFC 42 /* tRFC */
-#define JEDEC_SPD_tRC 41 /* tRC */
-
-#define JEDEC_SPD_SIZE 46 /* number of SPD bytes we will read
- (adequate for DDR SDRAM) */
-
-#define JEDEC_MEMTYPE_DDRSDRAM 1
-#define JEDEC_MEMTYPE_DDRSDRAM2 7
-#define JEDEC_MEMTYPE_SDRAM 4
-#define SPD_MEMTYPE_FCRAM 8 /* CFE specific to support FCRAM dimms */
-
-#define JEDEC_CASLAT_35 0x20
-#define JEDEC_CASLAT_30 0x10
-#define JEDEC_CASLAT_25 0x08
-#define JEDEC_CASLAT_20 0x04
-#define JEDEC_CASLAT_15 0x02
-#define JEDEC_CASLAT_10 0x01
-
-#define JEDEC_ATTRIB_REG 0x02
-
-#define JEDEC_FLG_ECC_SUPPORT 0x02
-
-#define JEDEC_RFSH_MASK 0x7F
-#define JEDEC_RFSH_64khz 0
-#define JEDEC_RFSH_256khz 1
-#define JEDEC_RFSH_128khz 2
-#define JEDEC_RFSH_32khz 3
-#define JEDEC_RFSH_16khz 4
-#define JEDEC_RFSH_8khz 5
-
-#endif /* _JEDEC_H */
diff -wurN orig/include/parse_config.h debian/include/parse_config.h
--- orig/include/parse_config.h 1970-01-01 01:00:00.000000000 +0100
+++ debian/include/parse_config.h 2004-07-25 14:10:59.000000000 +0200
@@ -0,0 +1,53 @@
+/* $Id: parse_config.h,v 1.4 2003/05/30 00:42:38 cgd Exp $ */
+
+/*
+ * Copyright 2001, 2003
+ * Broadcom Corporation. All rights reserved.
+ *
+ * This software is furnished under license and may be used and copied only
+ * in accordance with the following terms and conditions. Subject to these
+ * conditions, you may download, copy, install, use, modify and distribute
+ * modified or unmodified copies of this software in source and/or binary
+ * form. No title or ownership is transferred hereby.
+ *
+ * 1) Any source code used, modified or distributed must reproduce and
+ * retain this copyright notice and list of conditions as they appear in
+ * the source file.
+ *
+ * 2) No right is granted to use any trade name, trademark, or logo of
+ * Broadcom Corporation. The "Broadcom Corporation" name may not be
+ * used to endorse or promote products derived from this software
+ * without the prior written permission of Broadcom Corporation.
+ *
+ * 3) THIS SOFTWARE IS PROVIDED "AS-IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
+ * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL BROADCOM BE LIABLE
+ * FOR ANY DAMAGES WHATSOEVER, AND IN PARTICULAR, BROADCOM SHALL NOT BE
+ * LIABLE FOR 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), EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * Parse a config file.
+ */
+
+#ifndef _PARSE_CONFIG_H
+#define _PARSE_CONFIG_H
+
+typedef struct boot_config_struct {
+ char *kernel;
+ char *initrd;
+ char *extra_args;
+ char *root_dev;
+} boot_config_t;
+
+extern boot_config_t *boot_config;
+
+void parse_config_buf(char *buf);
+
+#endif
diff -wurN orig/include/partition.h debian/include/partition.h
--- orig/include/partition.h 1970-01-01 01:00:00.000000000 +0100
+++ debian/include/partition.h 2004-07-25 14:10:59.000000000 +0200
@@ -0,0 +1,61 @@
+/* $Id: partition.h,v 1.3 2003/05/30 00:42:38 cgd Exp $ */
+
+/*
+ * Copyright 2001, 2003
+ * Broadcom Corporation. All rights reserved.
+ *
+ * This software is furnished under license and may be used and copied only
+ * in accordance with the following terms and conditions. Subject to these
+ * conditions, you may download, copy, install, use, modify and distribute
+ * modified or unmodified copies of this software in source and/or binary
+ * form. No title or ownership is transferred hereby.
+ *
+ * 1) Any source code used, modified or distributed must reproduce and
+ * retain this copyright notice and list of conditions as they appear in
+ * the source file.
+ *
+ * 2) No right is granted to use any trade name, trademark, or logo of
+ * Broadcom Corporation. The "Broadcom Corporation" name may not be
+ * used to endorse or promote products derived from this software
+ * without the prior written permission of Broadcom Corporation.
+ *
+ * 3) THIS SOFTWARE IS PROVIDED "AS-IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
+ * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL BROADCOM BE LIABLE
+ * FOR ANY DAMAGES WHATSOEVER, AND IN PARTICULAR, BROADCOM SHALL NOT BE
+ * LIABLE FOR 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), EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _PARTITION_H
+#define _PARTITION_H
+
+/*
+ * Routines for dealing with partitions
+ */
+
+#include <stdint.h>
+
+typedef struct {
+ unsigned char active;
+ unsigned char start_chs[3];
+ unsigned char id;
+ unsigned char end_chs[3];
+ uint32_t start_sector;
+ uint32_t size;
+} part_entry_t;
+
+
+/* Take a CFE handle and read the partition table, returning
+ the linear offset of the desired partion or -1 for failure
+*/
+int part_get_info(int handle, int partno, part_entry_t *part_info);
+
+
+
+#endif
diff -wurN orig/include/port.h debian/include/port.h
--- orig/include/port.h 1970-01-01 01:00:00.000000000 +0100
+++ debian/include/port.h 2004-07-25 14:10:59.000000000 +0200
@@ -0,0 +1,65 @@
+/* $Id: port.h,v 1.10 2003/11/17 20:54:52 kwalker Exp $ */
+
+/*
+ * Copyright 2001, 2003
+ * Broadcom Corporation. All rights reserved.
+ *
+ * This software is furnished under license and may be used and copied only
+ * in accordance with the following terms and conditions. Subject to these
+ * conditions, you may download, copy, install, use, modify and distribute
+ * modified or unmodified copies of this software in source and/or binary
+ * form. No title or ownership is transferred hereby.
+ *
+ * 1) Any source code used, modified or distributed must reproduce and
+ * retain this copyright notice and list of conditions as they appear in
+ * the source file.
+ *
+ * 2) No right is granted to use any trade name, trademark, or logo of
+ * Broadcom Corporation. The "Broadcom Corporation" name may not be
+ * used to endorse or promote products derived from this software
+ * without the prior written permission of Broadcom Corporation.
+ *
+ * 3) THIS SOFTWARE IS PROVIDED "AS-IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
+ * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL BROADCOM BE LIABLE
+ * FOR ANY DAMAGES WHATSOEVER, AND IN PARTICULAR, BROADCOM SHALL NOT BE
+ * LIABLE FOR 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), EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef PORT_H
+#define PORT_H
+
+#ifdef __linux__
+#include <stdint.h>
+#else /* !__linux__ */
+typedef unsigned char uint8_t;
+typedef signed char int8_t;
+typedef unsigned short uint16_t;
+typedef signed short int16_t;
+typedef unsigned int uint32_t;
+typedef signed int int32_t;
+typedef unsigned long long uint64_t;
+typedef signed long long int64_t;
+
+#define unsigned signed /* Kludge to get unsigned size-shaped type. */
+typedef __SIZE_TYPE__ intptr_t;
+#undef unsigned
+typedef __SIZE_TYPE__ uintptr_t;
+
+#define UINT64_C(arg) (arg ## ULL)
+#define UINT32_MAX (0xffffffffU)
+
+#endif /* __linux__ */
+
+
+uint16_t port_swap_16(uint16_t src);
+uint32_t port_swap_32(uint32_t src);
+uint64_t port_swap_64(uint64_t src);
+
+#endif
diff -wurN orig/include/tftp_fileops.h debian/include/tftp_fileops.h
--- orig/include/tftp_fileops.h 1970-01-01 01:00:00.000000000 +0100
+++ debian/include/tftp_fileops.h 2004-07-25 14:10:59.000000000 +0200
@@ -0,0 +1,42 @@
+/* $Id: tftp_fileops.h,v 1.4 2003/05/30 00:42:38 cgd Exp $ */
+
+/*
+ * Copyright 2001, 2003
+ * Broadcom Corporation. All rights reserved.
+ *
+ * This software is furnished under license and may be used and copied only
+ * in accordance with the following terms and conditions. Subject to these
+ * conditions, you may download, copy, install, use, modify and distribute
+ * modified or unmodified copies of this software in source and/or binary
+ * form. No title or ownership is transferred hereby.
+ *
+ * 1) Any source code used, modified or distributed must reproduce and
+ * retain this copyright notice and list of conditions as they appear in
+ * the source file.
+ *
+ * 2) No right is granted to use any trade name, trademark, or logo of
+ * Broadcom Corporation. The "Broadcom Corporation" name may not be
+ * used to endorse or promote products derived from this software
+ * without the prior written permission of Broadcom Corporation.
+ *
+ * 3) THIS SOFTWARE IS PROVIDED "AS-IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
+ * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL BROADCOM BE LIABLE
+ * FOR ANY DAMAGES WHATSOEVER, AND IN PARTICULAR, BROADCOM SHALL NOT BE
+ * LIABLE FOR 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), EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _TFTP_FILEOPS_H
+#define _TFTP_FILEOPS_H
+
+#include "getfile.h"
+
+extern file_ops_t tftp_ops;
+
+#endif