diff --git a/dev-embedded/u_boot_tools/patches/u_boot_tools-2012.10.patch b/dev-embedded/u_boot_tools/patches/u_boot_tools-2012.10.patch deleted file mode 100644 index fc0aff4d6..000000000 --- a/dev-embedded/u_boot_tools/patches/u_boot_tools-2012.10.patch +++ /dev/null @@ -1,120 +0,0 @@ -diff -ur u-boot-2012.10/common/image.c tmp/u-boot-2012.10/common/image.c ---- u-boot-2012.10/common/image.c 2012-11-08 10:52:02.774111232 +0100 -+++ tmp/u-boot-2012.10/common/image.c 2012-10-15 17:14:08.046399488 +0200 -@@ -71,7 +71,7 @@ - #include "mkimage.h" - #include - #include --#include -+#include - #endif /* !USE_HOSTCC*/ - - static const table_entry_t uimage_arch[] = { -diff -ur u-boot-2012.10/tools/aisimage.c tmp/u-boot-2012.10/tools/aisimage.c ---- u-boot-2012.10/tools/aisimage.c 2012-11-08 10:48:20.923271168 +0100 -+++ tmp/u-boot-2012.10/tools/aisimage.c 2012-10-15 17:14:08.063176704 +0200 -@@ -26,7 +26,7 @@ - - #include "mkimage.h" - #include "aisimage.h" --#include -+#include - - #define IS_FNC_EXEC(c) (cmd_table[c].AIS_cmd == AIS_CMD_FNLOAD) - #define WORD_ALIGN0 4 -diff -ur u-boot-2012.10/tools/default_image.c tmp/u-boot-2012.10/tools/default_image.c ---- u-boot-2012.10/tools/default_image.c 2012-11-08 10:48:39.345505792 +0100 -+++ tmp/u-boot-2012.10/tools/default_image.c 2012-10-15 17:14:08.066060288 +0200 -@@ -28,7 +28,7 @@ - */ - - #include "mkimage.h" --#include -+#include - #include - - static image_header_t header; -diff -ur u-boot-2012.10/tools/fit_image.c tmp/u-boot-2012.10/tools/fit_image.c ---- u-boot-2012.10/tools/fit_image.c 2012-11-08 10:48:56.498860032 +0100 -+++ tmp/u-boot-2012.10/tools/fit_image.c 2012-10-15 17:14:08.000786432 +0200 -@@ -28,7 +28,7 @@ - */ - - #include "mkimage.h" --#include -+#include - #include - - static image_header_t header; -diff -ur u-boot-2012.10/tools/imximage.c tmp/u-boot-2012.10/tools/imximage.c ---- u-boot-2012.10/tools/imximage.c 2012-11-08 10:52:34.872677376 +0100 -+++ tmp/u-boot-2012.10/tools/imximage.c 2012-10-15 17:14:08.003145728 +0200 -@@ -29,7 +29,7 @@ - #define _GNU_SOURCE - - #include "mkimage.h" --#include -+#include - #include "imximage.h" - - /* -diff -ur u-boot-2012.10/tools/kwbimage.c tmp/u-boot-2012.10/tools/kwbimage.c ---- u-boot-2012.10/tools/kwbimage.c 2012-11-08 10:52:53.073662464 +0100 -+++ tmp/u-boot-2012.10/tools/kwbimage.c 2012-10-15 17:14:08.003407872 +0200 -@@ -26,7 +26,7 @@ - #define _GNU_SOURCE - - #include "mkimage.h" --#include -+#include - #include "kwbimage.h" - - /* -diff -ur u-boot-2012.10/tools/mkimage.c tmp/u-boot-2012.10/tools/mkimage.c ---- u-boot-2012.10/tools/mkimage.c 2012-11-08 10:55:06.533463040 +0100 -+++ tmp/u-boot-2012.10/tools/mkimage.c 2012-10-15 17:14:08.005505024 +0200 -@@ -22,7 +22,7 @@ - */ - - #include "mkimage.h" --#include -+#include - #include - - static void copy_file(int, const char *, int); -diff -ur u-boot-2012.10/tools/omapimage.c tmp/u-boot-2012.10/tools/omapimage.c ---- u-boot-2012.10/tools/omapimage.c 2012-11-08 10:55:39.680525824 +0100 -+++ tmp/u-boot-2012.10/tools/omapimage.c 2012-10-15 17:14:08.006291456 +0200 -@@ -34,7 +34,7 @@ - #define _GNU_SOURCE - - #include "mkimage.h" --#include -+#include - #include "omapimage.h" - - /* Header size is CH header rounded up to 512 bytes plus GP header */ -diff -ur u-boot-2012.10/tools/pblimage.c tmp/u-boot-2012.10/tools/pblimage.c ---- u-boot-2012.10/tools/pblimage.c 2012-11-08 10:53:09.547356672 +0100 -+++ tmp/u-boot-2012.10/tools/pblimage.c 2012-10-15 17:14:08.008126464 +0200 -@@ -22,7 +22,7 @@ - #define _GNU_SOURCE - - #include "mkimage.h" --#include -+#include - #include "pblimage.h" - - /* -diff -ur u-boot-2012.10/tools/ublimage.c tmp/u-boot-2012.10/tools/ublimage.c ---- u-boot-2012.10/tools/ublimage.c 2012-11-08 10:55:59.951844864 +0100 -+++ tmp/u-boot-2012.10/tools/ublimage.c 2012-10-15 17:14:08.009175040 +0200 -@@ -33,7 +33,7 @@ - #define _GNU_SOURCE - - #include "mkimage.h" --#include -+#include - #include "ublimage.h" - - /* diff --git a/dev-embedded/u_boot_tools/patches/u_boot_tools-2012.10.patchset b/dev-embedded/u_boot_tools/patches/u_boot_tools-2012.10.patchset new file mode 100644 index 000000000..a6a145645 --- /dev/null +++ b/dev-embedded/u_boot_tools/patches/u_boot_tools-2012.10.patchset @@ -0,0 +1,192 @@ +From 07cf4d7799b3c89ccc39b6ede13d661617738b5d Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +Date: Sun, 21 Sep 2014 10:40:38 +0200 +Subject: Avoid include name conflict with Haiku. + + +diff --git a/common/image.c b/common/image.c +index f084d2b..9d11a15 100644 +--- a/common/image.c ++++ b/common/image.c +@@ -43,7 +43,7 @@ + #include + #endif + +-#include ++#include + + #if defined(CONFIG_FIT) || defined(CONFIG_OF_LIBFDT) + #include +@@ -71,7 +71,7 @@ static const image_header_t *image_get_ramdisk(ulong rd_addr, uint8_t arch, + #include "mkimage.h" + #include + #include +-#include ++#include + #endif /* !USE_HOSTCC*/ + + static const table_entry_t uimage_arch[] = { +diff --git a/include/compiler.h b/include/compiler.h +index 0734ed4..5ddcfd2 100644 +--- a/include/compiler.h ++++ b/include/compiler.h +@@ -52,7 +52,9 @@ typedef unsigned long ulong; + typedef uint8_t __u8; + typedef uint16_t __u16; + typedef uint32_t __u32; ++#ifndef __HAIKU__ + typedef unsigned int uint; ++#endif + + #define uswap_16(x) \ + ((((x) & 0xff00) >> 8) | \ +diff --git a/tools/aisimage.c b/tools/aisimage.c +index c645708..8c961f5 100644 +--- a/tools/aisimage.c ++++ b/tools/aisimage.c +@@ -26,7 +26,7 @@ + + #include "mkimage.h" + #include "aisimage.h" +-#include ++#include + + #define IS_FNC_EXEC(c) (cmd_table[c].AIS_cmd == AIS_CMD_FNLOAD) + #define WORD_ALIGN0 4 +diff --git a/tools/default_image.c b/tools/default_image.c +index e9d0729..194bc21 100644 +--- a/tools/default_image.c ++++ b/tools/default_image.c +@@ -28,7 +28,7 @@ + */ + + #include "mkimage.h" +-#include ++#include + #include + + static image_header_t header; +diff --git a/tools/fit_image.c b/tools/fit_image.c +index ef9ffee..0288d24 100644 +--- a/tools/fit_image.c ++++ b/tools/fit_image.c +@@ -28,7 +28,7 @@ + */ + + #include "mkimage.h" +-#include ++#include + #include + + static image_header_t header; +diff --git a/tools/imximage.c b/tools/imximage.c +index 03a7716..2e2e2f6 100644 +--- a/tools/imximage.c ++++ b/tools/imximage.c +@@ -29,9 +29,13 @@ + #define _GNU_SOURCE + + #include "mkimage.h" +-#include ++#include + #include "imximage.h" + ++#if __GNUC__ < 4 ++#define __builtin_expect(a,b) (a) ++#endif ++ + /* + * Supported commands for configuration file + */ +diff --git a/tools/kwbimage.c b/tools/kwbimage.c +index f327b07..686d361 100644 +--- a/tools/kwbimage.c ++++ b/tools/kwbimage.c +@@ -26,7 +26,7 @@ + #define _GNU_SOURCE + + #include "mkimage.h" +-#include ++#include + #include "kwbimage.h" + + /* +diff --git a/tools/mkimage.c b/tools/mkimage.c +index e43b09f..babc24b 100644 +--- a/tools/mkimage.c ++++ b/tools/mkimage.c +@@ -22,9 +22,13 @@ + */ + + #include "mkimage.h" +-#include ++#include + #include + ++#if __GNUC__ < 4 ++#define __builtin_expect(a,b) (a) ++#endif ++ + static void copy_file(int, const char *, int); + static void usage(void); + +diff --git a/tools/omapimage.c b/tools/omapimage.c +index 5e739ac..eea8dfc 100644 +--- a/tools/omapimage.c ++++ b/tools/omapimage.c +@@ -34,7 +34,7 @@ + #define _GNU_SOURCE + + #include "mkimage.h" +-#include ++#include + #include "omapimage.h" + + /* Header size is CH header rounded up to 512 bytes plus GP header */ +diff --git a/tools/pblimage.c b/tools/pblimage.c +index 508a747..c9001fc 100644 +--- a/tools/pblimage.c ++++ b/tools/pblimage.c +@@ -22,7 +22,7 @@ + #define _GNU_SOURCE + + #include "mkimage.h" +-#include ++#include + #include "pblimage.h" + + /* +@@ -55,9 +55,10 @@ static union + static void generate_pbl_cmd(void) + { + uint32_t val = next_pbl_cmd; +- next_pbl_cmd += 0x40; + int i; + ++ next_pbl_cmd += 0x40; ++ + for (i = 3; i >= 0; i--) { + *pmem_buf++ = (val >> (i * 8)) & 0xff; + pbl_size++; +diff --git a/tools/ublimage.c b/tools/ublimage.c +index d6b4017..8387b3d 100644 +--- a/tools/ublimage.c ++++ b/tools/ublimage.c +@@ -33,9 +33,13 @@ + #define _GNU_SOURCE + + #include "mkimage.h" +-#include ++#include + #include "ublimage.h" + ++#if __GNUC__ < 4 ++#define __builtin_expect(a,b) (a) ++#endif ++ + /* + * Supported commands for configuration file + */ +-- +1.8.3.4 + diff --git a/dev-embedded/u_boot_tools/u_boot_tools-2012.10.recipe b/dev-embedded/u_boot_tools/u_boot_tools-2012.10.recipe index ef0172941..466e9bb5f 100644 --- a/dev-embedded/u_boot_tools/u_boot_tools-2012.10.recipe +++ b/dev-embedded/u_boot_tools/u_boot_tools-2012.10.recipe @@ -1,21 +1,42 @@ -DESCRIPTION="utilities for working with Das U-Boot" +SUMMARY="utilities for working with Das U-Boot" +DESCRIPTION="This package includes the mkimage program, which allows generation +of U-Boot images in various formats." HOMEPAGE="http://www.denx.de/wiki/U-Boot/Documentation" -SRC_URI="http://ftp.denx.de/pub/u-boot/u-boot-2012.10.tar.bz2" REVISION="1" -STATUS_HAIKU="stable" +ARCHITECTURES="x86_gcc2" + +SRC_URI="http://ftp.denx.de/pub/u-boot/u-boot-2012.10.tar.bz2" +SOURCE_DIR="u-boot-$portVersion" +CHECKSUM_SHA256="dddec75070b5faa5df463085e3e1d27c6d058ec3481c666917baa961956d4d17" +PATCHES="u_boot_tools-$portVersion.patchset" + +PROVIDES=" + u_boot_tools = $portVersion + cmd:mkimage + cmd:mkenvimage +" + +REQUIRES=" + haiku >= $haikuVersion +" + +BUILD_PREREQUIRES=" + haiku_devel >= $haikuVersion + cmd:gcc + cmd:make +" BUILD() { - cd u-boot-2012.10 - mv include/image.h include/uimage.h + cp include/image.h include/uimage.h make tools } INSTALL() { - cd u-boot-2012.10 - cp -r /tools/mkimage /boot/common/bin/ - cp -r /tools/mkenvimage /boot/common/bin/ + mkdir -p $binDir + cp tools/mkimage $binDir + cp tools/mkenvimage $binDir } LICENSE="GNU GPL v2"