pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

add u-boot-full



Module Name:	pkgsrc-wip
Committed By:	Joe Davis <joe.davis512%gmail.com@localhost>
Pushed By:	joed
Date:		Tue Jun 14 21:39:16 2016 +0100
Changeset:	16bbdcb74a9f82e360256030ce1d9d31836e4ad9

Added Files:
	u-boot-full/DESCR
	u-boot-full/MESSAGE
	u-boot-full/Makefile
	u-boot-full/PLIST
	u-boot-full/distinfo
	u-boot-full/files/stdarg.h
	u-boot-full/files/stdbool.h
	u-boot-full/files/stddef.h
	u-boot-full/patches/patch-lib_Kconfig

Log Message:
add u-boot-full

This package installs the U-Boot platform-independent tools and builds
the U-Boot loader for the target board specified via the mk.conf
variable UBOOT_TARGET.

The tools are installed with the 'u-boot-' prefixed to their names,
i.e. tools/mkimage is installed as ${PREFIX}/bin/u-boot-mkimage.

It does not install the loader itself, as the files and procedure
involved can vary from target to target. Instead, while not ideal, it
leaves these files in the work tree for the user to install manually.

Additionally modified versions of NetBSD's stdarg.h, stdbool.h
and stddef.h are included to allow U-Boot to build on NetBSD hosts, as
well as a patch to U-Boot's default Kconfig to enable the option
CONFIG_USE_PRIVATE_LIBGCC for the same purpose (as well as reducing
reliance on any specific host toolchain).

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=16bbdcb74a9f82e360256030ce1d9d31836e4ad9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 u-boot-full/DESCR                     |  7 +++++
 u-boot-full/MESSAGE                   |  6 +++++
 u-boot-full/Makefile                  | 43 ++++++++++++++++++++++++++++++
 u-boot-full/PLIST                     |  6 +++++
 u-boot-full/distinfo                  |  7 +++++
 u-boot-full/files/stdarg.h            | 50 +++++++++++++++++++++++++++++++++++
 u-boot-full/files/stdbool.h           | 45 +++++++++++++++++++++++++++++++
 u-boot-full/files/stddef.h            | 16 +++++++++++
 u-boot-full/patches/patch-lib_Kconfig | 13 +++++++++
 9 files changed, 193 insertions(+)

diffs:
diff --git a/u-boot-full/DESCR b/u-boot-full/DESCR
new file mode 100644
index 0000000..2078603
--- /dev/null
+++ b/u-boot-full/DESCR
@@ -0,0 +1,7 @@
+U-Boot - The Universal Bootloader
+
+This package builds U-Boot and its associated tools for the platform
+indicated by the mk.conf variable UBOOT_TARGET.
+
+The loader itself still requires manual installation using target dependent
+files from the work tree, even after the installation of this package.
diff --git a/u-boot-full/MESSAGE b/u-boot-full/MESSAGE
new file mode 100644
index 0000000..40f5b6e
--- /dev/null
+++ b/u-boot-full/MESSAGE
@@ -0,0 +1,6 @@
+===========================================================================
+$NetBSD$
+The U-Boot tools mkimage, mkenvimage, dumpimage, fdtgrep, and netconsole
+have been installed. However, the loader itself still requires manual
+installation using target-dependent files in the work tree.
+===========================================================================
diff --git a/u-boot-full/Makefile b/u-boot-full/Makefile
new file mode 100644
index 0000000..a803a38
--- /dev/null
+++ b/u-boot-full/Makefile
@@ -0,0 +1,43 @@
+# $NetBSD$
+
+PKGNAME=	u-boot-full-2016.05
+DISTNAME=	u-boot-2016.05
+CATEGORIES=	sysutils
+MASTER_SITES=	ftp://ftp.denx.de/pub/u-boot/
+EXTRACT_SUFX=	.tar.bz2
+
+MAINTAINER=	joe.davis512%gmail.com@localhost
+HOMEPAGE=	ftp://ftp.denx.de/pub/u-boot/
+COMMENT=	Das U-Boot -- the Universal Boot Loader
+LICENSE=	gnu-gpl-v2
+
+USE_TOOLS=	gmake pkg-config
+
+USE_LANGUAGES=	c c++
+
+# Require the linux device tree compiler
+BUILD_DEPENDS=	dtc>=1.4.1:../../wip/dtc
+AUTO_MKDIRS=	yes
+
+.include "../../mk/bsd.prefs.mk"
+
+post-patch:
+.if ${OPSYS:tl} == "netbsd"
+	cp ${FILESDIR}/stdarg.h ${WRKSRC}/include/
+	cp ${FILESDIR}/stddef.h ${WRKSRC}/include/
+	cp ${FILESDIR}/stdbool.h ${WRKSRC}/include/
+.endif
+
+do-configure:
+.if defined(UBOOT_TARGET)
+	cd ${WRKSRC} && gmake ${UBOOT_TARGET}_defconfig
+.endif
+
+do-install:
+	${INSTALL_PROGRAM} ${WRKSRC}/tools/mkimage ${DESTDIR}${PREFIX}/bin/u-boot-mkimage
+	${INSTALL_PROGRAM} ${WRKSRC}/tools/fdtgrep ${DESTDIR}${PREFIX}/bin/u-boot-fdtgrep
+	${INSTALL_PROGRAM} ${WRKSRC}/tools/mkenvimage ${DESTDIR}${PREFIX}/bin/u-boot-mkenvimage
+	${INSTALL_PROGRAM} ${WRKSRC}/tools/dumpimage ${DESTDIR}${PREFIX}/bin/u-boot-dumpimage
+	${INSTALL_SCRIPT} ${WRKSRC}/tools/netconsole ${DESTDIR}${PREFIX}/bin/u-boot-netconsole
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/u-boot-full/PLIST b/u-boot-full/PLIST
new file mode 100644
index 0000000..8d28110
--- /dev/null
+++ b/u-boot-full/PLIST
@@ -0,0 +1,6 @@
+@comment $NetBSD$
+bin/u-boot-dumpimage
+bin/u-boot-fdtgrep
+bin/u-boot-mkenvimage
+bin/u-boot-mkimage
+bin/u-boot-netconsole
diff --git a/u-boot-full/distinfo b/u-boot-full/distinfo
new file mode 100644
index 0000000..f151960
--- /dev/null
+++ b/u-boot-full/distinfo
@@ -0,0 +1,7 @@
+$NetBSD$
+
+SHA1 (u-boot-2016.05.tar.bz2) = 92632d081c89537d9553178f03de760e37b6c921
+RMD160 (u-boot-2016.05.tar.bz2) = 02d8798a2dd477b2f6a94771c62f3811e01d3a78
+SHA512 (u-boot-2016.05.tar.bz2) = 61739390134f395c8b15a92819c534464c97f73b4ef8dafd35c0a58e0d163f149c9f8daa45cc99bde73a4606900486422279fdeb8043e20e616d597cc7b017a8
+Size (u-boot-2016.05.tar.bz2) = 11325053 bytes
+SHA1 (patch-lib_Kconfig) = f8ed4df889c6f3d0dd942845b2e439e7c5c23f92
diff --git a/u-boot-full/files/stdarg.h b/u-boot-full/files/stdarg.h
new file mode 100644
index 0000000..a1d825a
--- /dev/null
+++ b/u-boot-full/files/stdarg.h
@@ -0,0 +1,50 @@
+/*	$NetBSD: stdarg.h,v 1.3 2012/07/19 22:46:41 pooka Exp $	*/
+
+/*-
+ * Copyright (c) 1991, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 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. 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.
+ *
+ *	@(#)stdarg.h	8.1 (Berkeley) 6/10/93
+ */
+
+#ifndef _SYS_STDARG_H_
+#define	_SYS_STDARG_H_
+
+typedef __builtin_va_list va_list;
+
+#define	va_start(ap, last)	__builtin_va_start((ap), (last))
+#define	va_arg			__builtin_va_arg
+#define	va_end(ap)		__builtin_va_end(ap)
+#define	__va_copy(dest, src)	__builtin_va_copy((dest), (src))
+
+#if !defined(_ANSI_SOURCE) && \
+    (defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \
+     defined(_NETBSD_SOURCE))
+#define	va_copy(dest, src)	__va_copy((dest), (src))
+#endif
+
+#endif /* !_SYS_STDARG_H_ */
diff --git a/u-boot-full/files/stdbool.h b/u-boot-full/files/stdbool.h
new file mode 100644
index 0000000..966416b
--- /dev/null
+++ b/u-boot-full/files/stdbool.h
@@ -0,0 +1,45 @@
+/*	$NetBSD: stdbool.h,v 1.5 2013/04/26 17:41:34 joerg Exp $	*/
+
+/*-
+ * Copyright (c) 2002 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Jason R. Thorpe of Wasabi Systems, Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
+ */
+
+#ifndef _STDBOOL_H_
+#define	_STDBOOL_H_
+
+#ifndef __cplusplus
+#define	bool	_Bool
+
+#define	true	1
+#define	false	0
+
+#endif /* __cplusplus */
+
+#define	__bool_true_false_are_defined	1
+
+#endif /* _STDBOOL_H_ */
diff --git a/u-boot-full/files/stddef.h b/u-boot-full/files/stddef.h
new file mode 100644
index 0000000..ca3b33f
--- /dev/null
+++ b/u-boot-full/files/stddef.h
@@ -0,0 +1,16 @@
+#ifndef _STDDEF_H_
+#define _STDDEF_H_
+
+#ifdef	__SIZE_TYPE__
+typedef __SIZE_TYPE__ size_t;	
+#endif
+
+#ifndef NULL
+#define NULL ((void*)0)
+#endif
+
+#ifndef offsetof
+#define	offsetof(type, member)	__builtin_offsetof(type, member)
+#endif
+ 
+#endif /* _STDDEF_H_ */
diff --git a/u-boot-full/patches/patch-lib_Kconfig b/u-boot-full/patches/patch-lib_Kconfig
new file mode 100644
index 0000000..0e8d8be
--- /dev/null
+++ b/u-boot-full/patches/patch-lib_Kconfig
@@ -0,0 +1,13 @@
+$NetBSD$
+This forces U-Boot to use its own copy of libgcc rather than relying on it being 
+available from the host toolchain.
+--- lib/Kconfig.orig	2016-06-13 15:51:19.000000000 +0000
++++ lib/Kconfig
+@@ -13,6 +13,7 @@ config HAVE_PRIVATE_LIBGCC
+ 
+ config USE_PRIVATE_LIBGCC
+ 	bool "Use private libgcc"
++	default y
+ 	depends on HAVE_PRIVATE_LIBGCC
+ 	help
+ 	  This option allows you to use the built-in libgcc implementation


Home | Main Index | Thread Index | Old Index