Add some bits to the armv6 build to get a successful build/run on the RPi.

Not bumping the PORTREVISION as this is only applied to ARM builds.

Phabric:        https://reviews.freebsd.org/D756
PR:             181318
Submitted by:   mikael.urankar@gmail.com
Reviewed by:    kwm@
Approved by:    bdrewery (mentor)
This commit is contained in:
Sean Bruno 2014-09-15 23:27:13 +00:00
parent a710dc5470
commit d7a36e69db
3 changed files with 55 additions and 0 deletions

View file

@ -114,6 +114,13 @@ PLIST_SUB+= SUID=""
PLIST_SUB+= SUID="@comment "
.endif
.if ${ARCH} == armv6
.if defined(WITH_NEW_XORG)
EXTRA_PATCHES+= ${FILESDIR}/extra-arm-patch-hw__xfree86__os-support__bsd__Makefile.in
EXTRA_PATCHES+= ${FILESDIR}/extra-arm-patch-include__servermd.h
.endif
.endif
.if ${ARCH} == i386
.if defined(WITH_NEW_XORG)
EXTRA_PATCHES+= ${FILESDIR}/extra-new-arch-i386

View file

@ -0,0 +1,17 @@
--- hw/xfree86/os-support/bsd/Makefile.in.orig 2014-09-10 14:57:51 UTC
+++ hw/xfree86/os-support/bsd/Makefile.in
@@ -84,11 +84,13 @@
$(srcdir)/../shared/pm_noop.c $(srcdir)/bsd_apm.c \
$(srcdir)/bsd_kqueue_apm.c $(srcdir)/../shared/kmod_noop.c \
bsd_kmod.c
+@FREEBSD_KLDLOAD_TRUE@@ARM_VIDEO_TRUE@am__objects_1 = sparc64_video.lo \
+@FREEBSD_KLDLOAD_TRUE@@ARM_VIDEO_TRUE@ ioperm_noop.lo
@ALPHA_VIDEO_FALSE@@ARM_VIDEO_FALSE@@I386_VIDEO_FALSE@@PPC_VIDEO_FALSE@@SPARC64_VIDEO_TRUE@am__objects_1 = sparc64_video.lo \
@ALPHA_VIDEO_FALSE@@ARM_VIDEO_FALSE@@I386_VIDEO_FALSE@@PPC_VIDEO_FALSE@@SPARC64_VIDEO_TRUE@ ioperm_noop.lo
@ALPHA_VIDEO_FALSE@@ARM_VIDEO_FALSE@@I386_VIDEO_FALSE@@PPC_VIDEO_TRUE@am__objects_1 = ppc_video.lo
@ALPHA_VIDEO_FALSE@@ARM_VIDEO_FALSE@@I386_VIDEO_TRUE@am__objects_1 = i386_video.lo
-@ALPHA_VIDEO_FALSE@@ARM_VIDEO_TRUE@am__objects_1 = arm_video.lo
+@ALPHA_VIDEO_FALSE@@ARM_VIDEO_TRUE@@FREEBSD_KLDLOAD_FALSE@am__objects_1 = arm_video.lo
@ALPHA_VIDEO_TRUE@am__objects_1 = alpha_video.lo bsd_ev56.lo \
@ALPHA_VIDEO_TRUE@ bsd_axp.lo xf86Axp.lo
@AGP_FALSE@am__objects_2 = agp_noop.lo

View file

@ -0,0 +1,31 @@
--- include/servermd.h.orig 2014-09-10 15:01:49 UTC
+++ include/servermd.h
@@ -104,6 +104,19 @@
#endif /* __nds32__ */
+#if defined(__FreeBSD__) && defined(__arm__)
+
+#ifdef __BIG_ENDIAN
+#define IMAGE_BYTE_ORDER MSBFirst
+#define BITMAP_BIT_ORDER MSBFirst
+#else
+#define IMAGE_BYTE_ORDER LSBFirst
+#define BITMAP_BIT_ORDER LSBFirst
+#endif
+#define GLYPHPADBYTES 4
+
+#endif /* __FreeBSD__ && __arm__ */
+
#if defined __hppa__
#define IMAGE_BYTE_ORDER MSBFirst
@@ -153,7 +166,7 @@
defined(__sparc__) || defined(__mc68000__)
#if defined(__sparc) || defined(__sparc__)
-#if !defined(sparc)
+#if !defined(sparc) && !defined(__FreeBSD__)
#define sparc 1
#endif
#endif