u-boot: fix build on macos
This commit is contained in:
parent
243f291413
commit
23b3a1c098
4 changed files with 53 additions and 4 deletions
|
@ -1,10 +1,12 @@
|
|||
$NetBSD: distinfo,v 1.4 2017/09/09 23:21:29 jmcneill Exp $
|
||||
$NetBSD: distinfo,v 1.5 2017/09/18 23:07:49 jmcneill Exp $
|
||||
|
||||
SHA1 (u-boot-2017.07.tar.bz2) = 517c33f41e2969f3b5b88e9ae3c042acfe1bde05
|
||||
RMD160 (u-boot-2017.07.tar.bz2) = b0d83a55b6daabdec28d85fdfb814a529c8d5eb9
|
||||
SHA512 (u-boot-2017.07.tar.bz2) = 821175dd414e1fd0e5b6d9293a5766cbc8ae63a2361e82309f67e92c02b881263a7832dba0bcfc820b036a582981ddc20a8f484f2995d110f3240907a3ff7a95
|
||||
Size (u-boot-2017.07.tar.bz2) = 11282262 bytes
|
||||
SHA1 (patch-Kconfig) = 7e572929f220af5af6e709fc9493d0aa17bfbea1
|
||||
SHA1 (patch-arch_arm_cpu_armv8_Kconfig) = 63cbbf2e3cebd46793fc03cc8e62297f6dc01aa9
|
||||
SHA1 (patch-drivers_video_sunxi_sunxi__de2.c) = 0e1ff9965703ef18c5e6a54a858217ad99617ea6
|
||||
SHA1 (patch-include_configs_sunxi-common.h) = b71c28480cc084860d63e95af33bc7eead8ac6ac
|
||||
SHA1 (patch-lib_bch.c) = e346680a94696713f6d0e71e965283b9bdfbbdbf
|
||||
SHA1 (patch-lib_bch.c) = 2e20f6d65a736b474859ef3ee840aae05452c6f4
|
||||
SHA1 (patch-tools_Makefile) = adc5082d369363113135d5c892822b57ee80ff19
|
||||
|
|
10
sysutils/u-boot/patches/patch-Kconfig
Normal file
10
sysutils/u-boot/patches/patch-Kconfig
Normal file
|
@ -0,0 +1,10 @@
|
|||
$NetBSD: patch-Kconfig,v 1.1 2017/09/18 23:07:49 jmcneill Exp $
|
||||
|
||||
--- Kconfig.orig 2017-07-10 17:07:38.000000000 +0000
|
||||
+++ Kconfig
|
||||
@@ -367,5 +367,3 @@ source "fs/Kconfig"
|
||||
source "lib/Kconfig"
|
||||
|
||||
source "test/Kconfig"
|
||||
-
|
||||
-source "scripts/Kconfig"
|
|
@ -1,13 +1,37 @@
|
|||
$NetBSD: patch-lib_bch.c,v 1.1 2017/08/12 16:44:33 jmcneill Exp $
|
||||
$NetBSD: patch-lib_bch.c,v 1.2 2017/09/18 23:07:49 jmcneill Exp $
|
||||
|
||||
--- lib/bch.c.orig 2017-07-10 17:07:38.000000000 +0000
|
||||
+++ lib/bch.c
|
||||
@@ -61,7 +61,7 @@
|
||||
@@ -61,8 +61,10 @@
|
||||
#include <linux/bitops.h>
|
||||
#else
|
||||
#include <errno.h>
|
||||
-#if defined(__FreeBSD__)
|
||||
+#if defined(__FreeBSD__) || defined(__NetBSD__)
|
||||
#include <sys/endian.h>
|
||||
+#elif defined(__APPLE__)
|
||||
+#include <machine/endian.h>
|
||||
#else
|
||||
#include <endian.h>
|
||||
#endif
|
||||
@@ -71,7 +73,11 @@
|
||||
#include <string.h>
|
||||
|
||||
#undef cpu_to_be32
|
||||
+#if defined(__APPLE__)
|
||||
+#define cpu_to_be32 htonl
|
||||
+#else
|
||||
#define cpu_to_be32 htobe32
|
||||
+#endif
|
||||
#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
|
||||
#define kmalloc(size, flags) malloc(size)
|
||||
#define kzalloc(size, flags) calloc(1, size)
|
||||
@@ -117,7 +123,7 @@ struct gf_poly_deg1 {
|
||||
};
|
||||
|
||||
#ifdef USE_HOSTCC
|
||||
-#ifndef __BSD_VISIBLE
|
||||
+#if !defined(__BSD_VISIBLE) && !defined(__APPLE__)
|
||||
static int fls(int x)
|
||||
{
|
||||
int r = 32;
|
||||
|
|
13
sysutils/u-boot/patches/patch-tools_Makefile
Normal file
13
sysutils/u-boot/patches/patch-tools_Makefile
Normal file
|
@ -0,0 +1,13 @@
|
|||
$NetBSD: patch-tools_Makefile,v 1.1 2017/09/18 23:07:49 jmcneill Exp $
|
||||
|
||||
--- tools/Makefile.orig 2017-07-10 17:07:38.000000000 +0000
|
||||
+++ tools/Makefile
|
||||
@@ -69,7 +69,7 @@ LIBFDT_CSRCS := fdt.c fdt_ro.c fdt_wip.c
|
||||
# Fatal error: can't create build/temp.linux-x86_64-2.7/../lib/libfdt/fdt.o:
|
||||
# No such file or directory
|
||||
# To fix this, use an absolute path.
|
||||
-libfdt_tree := $(shell readlink -f $(srctree)/lib/libfdt)
|
||||
+libfdt_tree := $(realpath $(srctree)/lib/libfdt)
|
||||
|
||||
LIBFDT_SRCS := $(addprefix $(libfdt_tree)/, $(LIBFDT_CSRCS))
|
||||
LIBFDT_SWIG := $(addprefix $(libfdt_tree)/, pylibfdt/libfdt.i)
|
Loading…
Reference in a new issue