head	1.9;
access;
symbols
	RELENG_8_4:1.9.0.2
	RELENG_9_1_0_RELEASE:1.6.2.2.2.2
	RELENG_9_1:1.6.2.2.0.2
	RELENG_9_1_BP:1.6.2.2
	RELENG_8_3_0_RELEASE:1.4.2.1.8.1
	RELENG_8_3:1.4.2.1.0.8
	RELENG_8_3_BP:1.4.2.1
	RELENG_9_0_0_RELEASE:1.6.2.1.2.1
	RELENG_9_0:1.6.2.1.0.2
	RELENG_9_0_BP:1.6.2.1
	RELENG_9:1.6.0.2
	RELENG_9_BP:1.6
	RELENG_8_2_0_RELEASE:1.4.2.1.6.1
	RELENG_8_2:1.4.2.1.0.6
	RELENG_8_2_BP:1.4.2.1
	RELENG_8_1_0_RELEASE:1.4.2.1.4.1
	RELENG_8_1:1.4.2.1.0.4
	RELENG_8_1_BP:1.4.2.1
	RELENG_8_0_0_RELEASE:1.4.2.1.2.1
	RELENG_8_0:1.4.2.1.0.2
	RELENG_8_0_BP:1.4.2.1
	RELENG_8:1.4.0.2
	RELENG_8_BP:1.4;
locks; strict;
comment	@# @;


1.9
date	2012.11.17.01.51.20;	author svnexp;	state Exp;
branches
	1.9.2.1;
next	1.8;

1.8
date	2012.09.09.11.34.27;	author ae;	state Exp;
branches;
next	1.7;

1.7
date	2012.03.21.20.53.47;	author marius;	state Exp;
branches;
next	1.6;

1.6
date	2010.08.23.01.50.34;	author imp;	state Exp;
branches
	1.6.2.1;
next	1.5;

1.5
date	2010.05.25.15.21.39;	author raj;	state Exp;
branches;
next	1.4;

1.4
date	2008.09.03.15.39.50;	author raj;	state Exp;
branches
	1.4.2.1;
next	1.3;

1.3
date	2008.03.13.17.54.21;	author obrien;	state Exp;
branches;
next	1.2;

1.2
date	2008.02.23.17.56.17;	author marcel;	state Exp;
branches;
next	1.1;

1.1
date	2008.02.16.22.13.11;	author marcel;	state Exp;
branches;
next	;

1.9.2.1
date	2012.11.17.01.51.20;	author svnexp;	state dead;
branches;
next	1.9.2.2;

1.9.2.2
date	2013.03.28.13.04.03;	author svnexp;	state Exp;
branches;
next	;

1.6.2.1
date	2011.09.23.00.51.37;	author kensmith;	state Exp;
branches
	1.6.2.1.2.1;
next	1.6.2.2;

1.6.2.2
date	2012.03.31.00.07.53;	author marius;	state Exp;
branches
	1.6.2.2.2.1;
next	1.6.2.3;

1.6.2.3
date	2012.11.17.11.36.48;	author svnexp;	state Exp;
branches;
next	1.6.2.4;

1.6.2.4
date	2012.11.18.17.11.47;	author svnexp;	state Exp;
branches;
next	;

1.6.2.1.2.1
date	2011.11.11.04.20.22;	author kensmith;	state Exp;
branches;
next	1.6.2.1.2.2;

1.6.2.1.2.2
date	2012.11.17.08.36.46;	author svnexp;	state Exp;
branches;
next	;

1.6.2.2.2.1
date	2012.08.05.23.54.33;	author kensmith;	state Exp;
branches;
next	1.6.2.2.2.2;

1.6.2.2.2.2
date	2012.11.17.08.47.37;	author svnexp;	state Exp;
branches;
next	;

1.4.2.1
date	2009.08.03.08.13.06;	author kensmith;	state Exp;
branches
	1.4.2.1.2.1
	1.4.2.1.4.1
	1.4.2.1.6.1
	1.4.2.1.8.1;
next	1.4.2.2;

1.4.2.2
date	2012.03.31.00.07.54;	author marius;	state Exp;
branches;
next	1.4.2.3;

1.4.2.3
date	2012.11.17.10.36.28;	author svnexp;	state Exp;
branches;
next	;

1.4.2.1.2.1
date	2009.10.25.01.10.29;	author kensmith;	state Exp;
branches;
next	;

1.4.2.1.4.1
date	2010.06.14.02.09.06;	author kensmith;	state Exp;
branches;
next	;

1.4.2.1.6.1
date	2010.12.21.17.09.25;	author kensmith;	state Exp;
branches;
next	;

1.4.2.1.8.1
date	2012.03.03.06.15.13;	author kensmith;	state Exp;
branches;
next	1.4.2.1.8.2;

1.4.2.1.8.2
date	2012.11.17.08.25.08;	author svnexp;	state Exp;
branches;
next	;


desc
@@


1.9
log
@Switching exporter and resync
@
text
@# $FreeBSD: head/sys/boot/uboot/lib/Makefile 240275 2012-09-09 11:34:27Z ae $

.PATH: ${.CURDIR}/../../common

LIB=		uboot
INTERNALLIB=
WARNS?=		2

SRCS=	crc32.c console.c copy.c devicename.c elf_freebsd.c glue.c
SRCS+=	module.c net.c reboot.c time.c

CFLAGS+=	-ffreestanding -msoft-float

CFLAGS+=	-I${.CURDIR}/../../../../lib/libstand/

.if !defined(LOADER_NO_DISK_SUPPORT)
SRCS+=	disk.c
CFLAGS+= -DLOADER_DISK_SUPPORT
.endif

# Pick up FDT includes
CFLAGS+=	-I${.CURDIR}/../../../../sys/contrib/libfdt/

# Pick up the bootstrap header for some interface items
CFLAGS+=	-I${.CURDIR}/../../common -I${.CURDIR}/../../.. -I.

.ifdef(BOOT_DISK_DEBUG)
# Make the disk code more talkative
CFLAGS+= -DDISK_DEBUG
.endif

machine:
	ln -sf ${.CURDIR}/../../../${MACHINE_CPUARCH}/include machine

CLEANFILES+=	machine

.include <bsd.lib.mk>

beforedepend ${OBJS}: machine
@


1.9.2.1
log
@file Makefile was added on branch RELENG_8_4 on 2013-03-28 13:04:03 +0000
@
text
@d1 39
@


1.9.2.2
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/248810
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@a0 30
# $FreeBSD: releng/8.4/sys/boot/uboot/lib/Makefile 233720 2012-03-31 00:07:54Z marius $

.PATH: ${.CURDIR}/../../common

LIB=		uboot
INTERNALLIB=
WARNS?=		2

SRCS=	crc32.c console.c copy.c devicename.c disk.c elf_freebsd.c glue.c
SRCS+=	module.c net.c reboot.c time.c

CFLAGS+=	-ffreestanding -msoft-float

CFLAGS+=	-I${.CURDIR}/../../../../lib/libstand/
# Pick up the bootstrap header for some interface items
CFLAGS+=	-I${.CURDIR}/../../common -I${.CURDIR}/../../.. -I.

.ifdef(BOOT_DISK_DEBUG)
# Make the disk code more talkative
CFLAGS+= -DDISK_DEBUG
.endif

machine:
	ln -sf ${.CURDIR}/../../../${MACHINE_ARCH}/include machine

CLEANFILES+=	machine

.include <bsd.lib.mk>

beforedepend ${OBJS}: machine
@


1.8
log
@SVN rev 240275 on 2012-09-09 11:34:27Z by ae

Build disk.c only when DISK_SUPPORT is enabled.
@
text
@d1 1
a1 1
# $FreeBSD$
@


1.7
log
@SVN rev 233287 on 2012-03-21 20:53:47Z by marius

Use the common/shared CRC-32 implementation instead of duplicating it.

MFC after:	1 week
@
text
@d9 1
a9 1
SRCS=	crc32.c console.c copy.c devicename.c disk.c elf_freebsd.c glue.c
d16 5
@


1.6
log
@SVN rev 211680 on 2010-08-23 01:50:34Z by imp

MF tbemd: Minor tweaks, prefer MACHINE_CPUARCH generally to MACHINE_ARCH (which simplifies some powerpc/powerpc64 ifs)
@
text
@d3 2
d9 2
a10 2
SRCS=	devicename.c elf_freebsd.c console.c copy.c disk.c \
	module.c net.c reboot.c time.c glue.c
@


1.6.2.1
log
@SVN rev 225736 on 2011-09-23 00:51:37Z by kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.6.2.2
log
@SVN rev 233719 on 2012-03-31 00:07:53Z by marius

MFC: r233287

Use the common/shared CRC-32 implementation instead of duplicating it.
@
text
@a2 2
.PATH: ${.CURDIR}/../../common

d7 2
a8 2
SRCS=	crc32.c console.c copy.c devicename.c disk.c elf_freebsd.c glue.c
SRCS+=	module.c net.c reboot.c time.c
@


1.6.2.3
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242902
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242902 | dteske | 2012-11-11 23:29:45 +0000 (Sun, 11 Nov 2012) | 10 lines
## SVN ##
## SVN ## Fix a regression introduced by SVN r211417 that saw the breakage of a feature
## SVN ## documented in usr.sbin/sysinstall/help/shortcuts.hlp (reproduced below):
## SVN ##
## SVN ## If /usr/sbin/sysinstall is linked to another filename, say
## SVN ## `/usr/local/bin/configPackages', then the basename will be used
## SVN ## as an implicit command name.
## SVN ##
## SVN ## Reviewed by:	adrian (co-mentor)
## SVN ## Approved by:	adrian (co-mentor)
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d1 1
a1 1
# $FreeBSD: stable/9/sys/boot/uboot/lib/Makefile 233719 2012-03-31 00:07:53Z marius $
@


1.6.2.4
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 243243
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r243243 | ae | 2012-11-18 17:09:29 +0000 (Sun, 18 Nov 2012) | 135 lines
## SVN ##
## SVN ## MFC 239054,239057,239058,239060,239066,239067,239068,239070,239073,
## SVN ##     239087,239088,239127,239210,239211,239230,239231,239232,239243,
## SVN ##     239292,239293,239294,239325,240272,240273,240274,240275,240276,
## SVN ##     240277,240335,240481,241023,241047,241053,241065,241068,241069,
## SVN ##     241070,241164,241809,241876
## SVN ##
## SVN ## 239054:
## SVN ##   Create the interface to work with various partition tables from the
## SVN ##   loader(8). The following partition tables are supported: BSD label, GPT,
## SVN ##   MBR, EBR and VTOC8.
## SVN ## 239057:
## SVN ##   Remove unused variables.
## SVN ## 239058:
## SVN ##   Introduce new API to work with disks from the loader's drivers.
## SVN ##   It uses new API from the part.c to work with partition tables.
## SVN ## 239060:
## SVN ##   When GPT signature is invalid in the primary GPT header, then try to
## SVN ##   read backup GPT header.
## SVN ## 239066:
## SVN ##   Add offset field to the i386_devdesc structure to be compatible with
## SVN ##   disk_devdesc structure. Update biosdisk driver to the new disk API.
## SVN ## 239067:
## SVN ##   Remove unneeded flag.
## SVN ## 239068:
## SVN ##   Teach the ZFS use new partitions API when probing.
## SVN ##   Note: now ZFS does probe only for partitions with type "freebsd-zfs"
## SVN ##   and "freebsd".
## SVN ## 239070:
## SVN ##   Add simple test program that uses the partition tables handling code.
## SVN ##   It is useful to test and debug how boot loader handles partition tables
## SVN ##   metadata.
## SVN ## 239073:
## SVN ##   Bump USERBOOT_VERSION.
## SVN ## 239087:
## SVN ##   Add to the debug output the offset from the parent partitioning scheme.
## SVN ## 239088:
## SVN ##   Fix start offset calculation for the EBR partitions.
## SVN ## 239127:
## SVN ##   As it turned out, there are some installations, where BSD label
## SVN ##   contains partitions with type zero. And it has worked.
## SVN ##   So, allow detect these partitions.
## SVN ## 239210:
## SVN ##   Add more debug messages.
## SVN ## 239211:
## SVN ##   Add another debug message.
## SVN ## 239230:
## SVN ##   Unbreak booting from the true dedicated disks.
## SVN ##   When we open the disk, check the type of partition table, that has
## SVN ##   been detected. If this is BSD label, then we assume this is DD mode.
## SVN ## 239231:
## SVN ##   Remove colons from the debug message, device name returned by the
## SVN ##   disk_fmtdev() already has the colons.
## SVN ## 239232:
## SVN ##   Restore the old behaviour. If requested partition is a BSD slice,
## SVN ##   but d_partition isn't explicitly set, then try to open BSD label and its
## SVN ##   first partition.
## SVN ## 239243:
## SVN ##   After r239066, reinitialize v86.ctl and v86.addr for int 13 EDD probing
## SVN ##   in sys/boot/i386/libi386/biosdisk.c.  Otherwise, when DISK_DEBUG is
## SVN ##   enabled, the DEBUG() macros will clobber those fields, and cause the
## SVN ##   probing to always fail mysteriously when debugging is enabled.
## SVN ## 239292:
## SVN ##   Explicitly terminate the string after strncpy(3).
## SVN ## 239293:
## SVN ##   Rework r239232 to unbreak ZFS detection on MBR slices.
## SVN ## 239294:
## SVN ##   Some BIOSes return incorrect number of sectors, make checks less
## SVN ##   strictly, to do not lost some partitions.
## SVN ## 239325:
## SVN ##   Add comment why the code has been disabled.
## SVN ## 240272:
## SVN ##   Make struct uboot_devdesc compatible with struct disk_devdesc.
## SVN ## 240273:
## SVN ##   Use disk_fmtdev() and disk_parsedev() functions from the new DISK API.
## SVN ## 240274:
## SVN ##   Update uboot's disk driver to use new DISK API.
## SVN ## 240275:
## SVN ##   Build disk.c only when DISK_SUPPORT is enabled.
## SVN ## 240276:
## SVN ##   Update according to the change of struct uboot_devdesc.
## SVN ## 240277:
## SVN ##   Handle LOADER_NO_DISK_SUPPORT knob in the arm and powerpc ubldr.
## SVN ## 240335:
## SVN ##   Slightly reduce an overhead for the open() call in the zfsloader.
## SVN ##   libstand(3) tries to detect file system in the predefined order,
## SVN ##   but zfsloader usually is used for the booting from ZFS, and there is
## SVN ##   no need to try detect several file system types for each open() call.
## SVN ## 240481:
## SVN ##   The MBR data is not necessarily aligned.  This is a problem on ARM.
## SVN ## 241023:
## SVN ##   Make the loader a bit smarter, when it tries to open disk and the slice
## SVN ##   number is not exactly specified. When the disk has MBR, also try to read
## SVN ##   BSD label after ptable_getpart() call. When the disk has GPT, also set
## SVN ##   d_partition to 255.  Mostly, this is how it worked before.
## SVN ## 241047:
## SVN ##   Disable splitfs support, since we aren't support floppies for a long
## SVN ##   time. This slightly reduces an overhead, when loader tries to open
## SVN ##   file that doesn't exist.
## SVN ## 241053:
## SVN ##   Almost each time when loader opens a file, this leads to calling
## SVN ##   disk_open(). Very often this is called several times for one file.
## SVN ##   This leads to reading partition table metadata for each call. To
## SVN ##   reduce the number of disk I/O we have a simple block cache, but it
## SVN ##   is very dumb and more than half of I/O operations related to reading
## SVN ##   metadata, misses this cache.
## SVN ##
## SVN ##   Introduce new cache layer to resolve this problem. It is independent
## SVN ##   and doesn't need initialization like bcache, and will work by default
## SVN ##   for all loaders which use the new DISK API. A successful disk_open()
## SVN ##   call to each new disk or partition produces new entry in the cache.
## SVN ##   Even more, when disk was already open, now opening of any nested
## SVN ##   partitions does not require reading top level partition table.
## SVN ##   So, if without this cache, partition table metadata was read around
## SVN ##   20-50 times during boot, now it reads only once. This affects the booting
## SVN ##   from GPT and MBR from the UFS.
## SVN ## 241065:
## SVN ##   Fix disk_cleanup() to work without DISK_DEBUG too.
## SVN ## 241068:
## SVN ##   Reduce the number of attempts to detect proper kld format for the amd64
## SVN ##   loader.
## SVN ## 241069:
## SVN ##   Remember the file format of the last loaded module and try to use it for
## SVN ##   next files.
## SVN ## 241070:
## SVN ##   Fix the style.
## SVN ## 241164:
## SVN ##   Replace all references to loader_callbacks_v1 with loader_callbacks.
## SVN ## 241809:
## SVN ##   Add the flags parameter to the disk_open() function and DISK_F_NOCACHE
## SVN ##   flag, that disables the caching of partition tables metadata.
## SVN ##   Use this flag for floppies in the libi386/biosdisk driver.
## SVN ## 241876:
## SVN ##   When loader tries to open GPT partition, but partition table is not GPT,
## SVN ##   then try automatically detect an appropriate partition type.
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d1 1
a1 1
# $FreeBSD: stable/9/sys/boot/uboot/lib/Makefile 243243 2012-11-18 17:09:29Z ae $
d9 1
a9 1
SRCS=	crc32.c console.c copy.c devicename.c elf_freebsd.c glue.c
a15 5
.if !defined(LOADER_NO_DISK_SUPPORT)
SRCS+=	disk.c
CFLAGS+= -DLOADER_DISK_SUPPORT
.endif

@


1.6.2.2.2.1
log
@SVN rev 239080 on 2012-08-05 23:54:33Z by kensmith

Copy stable/9 to releng/9.1 as part of the 9.1-RELEASE release process.

Approved by:	re (implicit)
@
text
@@


1.6.2.2.2.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/9.1/sys/boot/uboot/lib/Makefile 233719 2012-03-31 00:07:53Z marius $
@


1.6.2.1.2.1
log
@SVN rev 227445 on 2011-11-11 04:20:22Z by kensmith

Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release
cycle.

Approved by:	re (implicit)
@
text
@@


1.6.2.1.2.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/9.0/sys/boot/uboot/lib/Makefile 211680 2010-08-23 01:50:34Z imp $
@


1.5
log
@SVN rev 208538 on 2010-05-25 15:21:39Z by raj

Initial loader(8) support for Flattened Device Tree.

o This is disabled by default for now, and can be enabled using WITH_FDT at
  build time.

o Tested with ARM and PowerPC.

Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
@
text
@d26 1
a26 1
	ln -sf ${.CURDIR}/../../../${MACHINE_ARCH}/include machine
@


1.4
log
@SVN rev 182723 on 2008-09-03 15:39:50Z by raj

Move U-Boot compatibility library to WARNS=2 level.
@
text
@d13 4
@


1.4.2.1
log
@SVN rev 196045 on 2009-08-03 08:13:06Z by kensmith

Copy head to stable/8 as part of 8.0 Release cycle.

Approved by:	re (Implicit)
@
text
@@


1.4.2.2
log
@SVN rev 233720 on 2012-03-31 00:07:54Z by marius

MFC: r233287

Use the common/shared CRC-32 implementation instead of duplicating it.
@
text
@a2 2
.PATH: ${.CURDIR}/../../common

d7 2
a8 2
SRCS=	crc32.c console.c copy.c devicename.c disk.c elf_freebsd.c glue.c
SRCS+=	module.c net.c reboot.c time.c
@


1.4.2.3
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242909
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242909 | dim | 2012-11-12 07:47:19 +0000 (Mon, 12 Nov 2012) | 20 lines
## SVN ##
## SVN ## MFC r242625:
## SVN ##
## SVN ## Remove duplicate const specifiers in many drivers (I hope I got all of
## SVN ## them, please let me know if not).  Most of these are of the form:
## SVN ##
## SVN ## static const struct bzzt_type {
## SVN ##       [...list of members...]
## SVN ## } const bzzt_devs[] = {
## SVN ##       [...list of initializers...]
## SVN ## };
## SVN ##
## SVN ## The second const is unnecessary, as arrays cannot be modified anyway,
## SVN ## and if the elements are const, the whole thing is const automatically
## SVN ## (e.g. it is placed in .rodata).
## SVN ##
## SVN ## I have verified this does not change the binary output of a full kernel
## SVN ## build (except for build timestamps embedded in the object files).
## SVN ##
## SVN ## Reviewed by:	yongari, marius
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d1 1
a1 1
# $FreeBSD: stable/8/sys/boot/uboot/lib/Makefile 233720 2012-03-31 00:07:54Z marius $
@


1.4.2.1.8.1
log
@SVN rev 232438 on 2012-03-03 06:15:13Z by kensmith

Copy stable/8 to releng/8.3 as part of 8.3-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.4.2.1.8.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/8.3/sys/boot/uboot/lib/Makefile 182723 2008-09-03 15:39:50Z raj $
@


1.4.2.1.6.1
log
@SVN rev 216617 on 2010-12-21 17:09:25Z by kensmith

Copy stable/8 to releng/8.2 in preparation for FreeBSD-8.2 release.

Approved by:	re (implicit)
@
text
@@


1.4.2.1.4.1
log
@SVN rev 209145 on 2010-06-14 02:09:06Z by kensmith

Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.

Approved by:	re (implicit)
@
text
@@


1.4.2.1.2.1
log
@SVN rev 198460 on 2009-10-25 01:10:29Z by kensmith

Copy stable/8 to releng/8.0 as part of 8.0-RELEASE release procedure.

Approved by:	re (implicit)
@
text
@@


1.3
log
@style(9) & style.Makefile(9)

Reviewed by:	raj
@
text
@d5 1
@


1.2
log
@o  Build libuboot with -msoft-float like everything else.
o  Move the API prototypes to a separate header (glue.h)
o  Allow the platform to hint libuboot about where to look
   for the API signature. The uboot_address variable is
   expected to be defined by the platform.
@
text
@d9 2
a11 1

a14 2
CFLAGS+=	-ffreestanding -msoft-float

@


1.1
log
@MFp4 (e500):

Add support for U-Boot. This uses the U-Boot API as developed by
Rafal and which is (will be) part of U-Boot 1.3.2 and later.

Credits to: raj@@
@
text
@d14 1
a14 1
CFLAGS+=	-ffreestanding
@

