forked from lede-project/source
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
following patch allows to build images for Qemu ARM on OpenBSD 5.2 amd64 and FreeBSD 9.1 amd64. Mostly small pieces of code changes to get things right on the specific platform. Updated the README to describe better, which tools on the host are required. Added some kind of prepare scripts to install needed tools on BSD via packages. Signed-off-by: Waldemar Brodkorb <[email protected]> SVN-Revision: 35900
- Loading branch information
Felix Fietkau
committed
Mar 7, 2013
1 parent
ed08358
commit 1f77bff
Showing
17 changed files
with
173 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
diff -Nur compat-wireless-2013-02-22.orig/compat/scripts/gen-compat-config.sh compat-wireless-2013-02-22/compat/scripts/gen-compat-config.sh | ||
--- compat-wireless-2013-02-22.orig/compat/scripts/gen-compat-config.sh 2012-12-20 15:14:36.000000000 +0100 | ||
+++ compat-wireless-2013-02-22/compat/scripts/gen-compat-config.sh 2013-03-07 17:27:04.000000000 +0100 | ||
@@ -1,4 +1,4 @@ | ||
-#!/bin/bash | ||
+#!/usr/bin/env bash | ||
# Copyright 2012 Luis R. Rodriguez <[email protected]> | ||
# Copyright 2012 Hauke Mehrtens <[email protected]> | ||
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
env PACKAGESITE=ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9.0-release/All/ pkg_add -r gmake-3.82.tbz bash-4.1.11.tbz python27-2.7.2_3.tbz gtar-1.26.tbz findutils-4.5.10_2.tbz coreutils-8.12.tbz getopt-1.1.4_2.tbz wget-1.13.4_1.tbz gnugrep-2.9.tbz gawk-4.0.0.tbz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/sh | ||
ver=$(uname -r) | ||
arch=$(uname -m) | ||
echo "Preparing OpenBSD $arch $ver for OpenWrt" | ||
PKG_PATH="http://ftp.openbsd.org/pub/OpenBSD/${ver}/packages/${arch}/" | ||
export PKG_PATH | ||
pkg_add -v gmake | ||
pkg_add -v findutils | ||
pkg_add -v coreutils | ||
pkg_add -v gdiff | ||
pkg_add -v rsync-- | ||
pkg_add -v git | ||
pkg_add -v bash | ||
pkg_add -v unzip | ||
pkg_add -v wget | ||
pkg_add -v gtar-- | ||
pkg_add -v ggrep | ||
pkg_add -v gawk | ||
pkg_add -v gsed | ||
pkg_add -v xz | ||
pkg_add -v apr-util-- | ||
pkg_add -v cyrus-sasl-- | ||
pkg_add -v subversion | ||
pkg_add -v gnugetopt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
diff -Nur e2fsprogs-1.42.7.orig/lib/blkid/getsize.c e2fsprogs-1.42.7/lib/blkid/getsize.c | ||
--- e2fsprogs-1.42.7.orig/lib/blkid/getsize.c Fri Nov 30 03:40:18 2012 | ||
+++ e2fsprogs-1.42.7/lib/blkid/getsize.c Thu Mar 7 14:21:59 2013 | ||
@@ -26,6 +26,9 @@ | ||
#include <fcntl.h> | ||
#ifdef HAVE_SYS_IOCTL_H | ||
#include <sys/ioctl.h> | ||
+#ifdef __OpenBSD__ | ||
+#include <sys/dkio.h> | ||
+#endif | ||
#endif | ||
#ifdef HAVE_LINUX_FD_H | ||
#include <linux/fd.h> | ||
diff -Nur e2fsprogs-1.42.7.orig/lib/quota/mkquota.c e2fsprogs-1.42.7/lib/quota/mkquota.c | ||
--- e2fsprogs-1.42.7.orig/lib/quota/mkquota.c Wed Jan 2 01:47:20 2013 | ||
+++ e2fsprogs-1.42.7/lib/quota/mkquota.c Thu Mar 7 14:21:59 2013 | ||
@@ -8,6 +8,7 @@ | ||
#include <sys/stat.h> | ||
#include <unistd.h> | ||
#include <errno.h> | ||
+#include <stdint.h> | ||
#include <string.h> | ||
#include <fcntl.h> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff -Nur e2fsprogs-1.42.7.orig/lib/ext2fs/tdb.c e2fsprogs-1.42.7/lib/ext2fs/tdb.c | ||
--- e2fsprogs-1.42.7.orig/lib/ext2fs/tdb.c 2012-07-06 15:37:27.000000000 +0200 | ||
+++ e2fsprogs-1.42.7/lib/ext2fs/tdb.c 2013-03-07 14:54:59.000000000 +0100 | ||
@@ -56,7 +56,9 @@ | ||
#include <utime.h> | ||
#endif | ||
#include <sys/stat.h> | ||
+#ifndef __FreeBSD__ | ||
#include <sys/file.h> | ||
+#endif | ||
#include <fcntl.h> | ||
|
||
#ifdef HAVE_SYS_MMAN_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
diff -Nur u-boot-2012.04.01.orig/tools/mkimage.c u-boot-2012.04.01/tools/mkimage.c | ||
--- u-boot-2012.04.01.orig/tools/mkimage.c Wed Apr 25 15:22:50 2012 | ||
+++ u-boot-2012.04.01/tools/mkimage.c Wed Mar 6 17:09:29 2013 | ||
@@ -449,6 +449,7 @@ | ||
#if defined(_POSIX_SYNCHRONIZED_IO) && \ | ||
!defined(__sun__) && \ | ||
!defined(__FreeBSD__) && \ | ||
+ !defined(__OpenBSD__) && \ | ||
!defined(__APPLE__) | ||
(void) fdatasync (ifd); | ||
#else | ||
@@ -492,6 +493,7 @@ | ||
#if defined(_POSIX_SYNCHRONIZED_IO) && \ | ||
!defined(__sun__) && \ | ||
!defined(__FreeBSD__) && \ | ||
+ !defined(__OpenBSD__) && \ | ||
!defined(__APPLE__) | ||
(void) fdatasync (ifd); | ||
#else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# | ||
# Copyright (C) 2013 OpenWrt.org | ||
# | ||
# This is free software, licensed under the GNU General Public License v2. | ||
# See /LICENSE for more information. | ||
# | ||
include $(TOPDIR)/rules.mk | ||
|
||
PKG_NAME:=patch | ||
PKG_VERSION:=2.7.1 | ||
|
||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz | ||
PKG_SOURCE_URL:=ftp://ftp.gnu.org/gnu/patch | ||
PKG_MD5SUM:=e9ae5393426d3ad783a300a338c09b72 | ||
|
||
include $(INCLUDE_DIR)/host-build.mk | ||
|
||
$(eval $(call HostBuild)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
diff -Nur squashfs4.2.orig/squashfs-tools/mksquashfs.c squashfs4.2/squashfs-tools/mksquashfs.c | ||
--- squashfs4.2.orig/squashfs-tools/mksquashfs.c Tue Mar 5 16:20:49 2013 | ||
+++ squashfs4.2/squashfs-tools/mksquashfs.c Tue Mar 5 16:25:10 2013 | ||
@@ -32,6 +32,9 @@ | ||
#include <stdio.h> | ||
#include <stddef.h> | ||
#include <sys/time.h> | ||
+#if defined(__OpenBSD__) | ||
+#include <sys/param.h> | ||
+#endif | ||
#include <sys/types.h> | ||
#include <sys/stat.h> | ||
#include <fcntl.h> | ||
diff -Nur squashfs4.2.orig/squashfs-tools/unsquashfs.h squashfs4.2/squashfs-tools/unsquashfs.h | ||
--- squashfs4.2.orig/squashfs-tools/unsquashfs.h Tue Mar 5 16:20:49 2013 | ||
+++ squashfs4.2/squashfs-tools/unsquashfs.h Tue Mar 5 16:25:57 2013 | ||
@@ -25,6 +25,9 @@ | ||
#define TRUE 1 | ||
#define FALSE 0 | ||
#include <stdio.h> | ||
+#if defined(__OpenBSD__) | ||
+#include <sys/param.h> | ||
+#endif | ||
#include <sys/types.h> | ||
#include <unistd.h> | ||
#include <stdlib.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
diff -Nur yaffs2_android.orig/yaffs2/yaffs_guts.h yaffs2_android/yaffs2/yaffs_guts.h | ||
--- yaffs2_android.orig/yaffs2/yaffs_guts.h Sun Feb 15 16:23:50 2009 | ||
+++ yaffs2_android/yaffs2/yaffs_guts.h Tue Mar 5 15:45:21 2013 | ||
@@ -823,6 +823,10 @@ | ||
int yaffs_SetAttributes(yaffs_Object * obj, struct iattr *attr); | ||
int yaffs_GetAttributes(yaffs_Object * obj, struct iattr *attr); | ||
|
||
+#if defined(__OpenBSD__) | ||
+#define loff_t off_t | ||
+#endif | ||
+ | ||
/* File operations */ | ||
int yaffs_ReadDataFromFile(yaffs_Object * obj, __u8 * buffer, loff_t offset, | ||
int nBytes); |