[Zrouter-src] ZRouter.org: push to ZRouter Makefile boards/Ubiquiti/RSPRO/boar...
zrouter-src at zrouter.org
zrouter-src at zrouter.org
Fri Jan 6 12:11:12 UTC 2012
details: http://zrouter.org/hg/zrouter//rev/806cb53de7f7
changeset: 307:806cb53de7f7
user: ray at terran.dlink.ua
date: Fri Jan 06 14:11:59 2012 +0200
description:
Define and use new variable KERNCONF_KERN_LDSCRIPT_NAME variable.
Normaly it take name of ldscript, such a "ldscript.mips" for 32bit MIPS CPU's
But if it not defined, then it will be "ldscript.${ARCH}" or "ldscript.mips.bin"
for MIPS32 BE/LE CPU's.
If it defined as empty, then FreeBSD kernel build process will decide which to use.
diffstat:
Makefile | 5 +++++
boards/Ubiquiti/RSPRO/board.mk | 3 +++
socs/Cavium/CN5010/soc.mk | 3 ++-
socs/socs.mk | 9 ++++++++-
4 files changed, 18 insertions(+), 2 deletions(-)
diffs (64 lines):
diff -r b0b3021badc7 -r 806cb53de7f7 Makefile
--- a/Makefile Wed Jan 04 17:47:48 2012 +0200
+++ b/Makefile Fri Jan 06 14:11:59 2012 +0200
@@ -50,6 +50,11 @@
.include "socs/socs.mk"
KERNCONF_MAKEOPTIONS+= "KERNLOADADDR=${KERNCONF_KERNLOADADDR}"
+# Allow to undefine LDSCRIPT_NAME if (board|soc).mk was set it to ""
+.if !empty(KERNCONF_KERN_LDSCRIPT_NAME)
+KERNCONF_MAKEOPTIONS+= "LDSCRIPT_NAME=${KERNCONF_KERN_LDSCRIPT_NAME}"
+.endif
+
# resolve board flash size with trailing M or K
.if defined(BOARD_FLASH_SIZE)
diff -r b0b3021badc7 -r 806cb53de7f7 boards/Ubiquiti/RSPRO/board.mk
--- a/boards/Ubiquiti/RSPRO/board.mk Wed Jan 04 17:47:48 2012 +0200
+++ b/boards/Ubiquiti/RSPRO/board.mk Fri Jan 06 14:11:59 2012 +0200
@@ -27,6 +27,9 @@
#KERNCONF_MODULES_OVERRIDE+=wlan_xauth wlan_wep wlan_tkip wlan_acl wlan_amrr wlan_ccmp wlan_rssadapt
#KERNCONF_MODULES_OVERRIDE+=usb/uplcom usb/u3g usb/umodem usb/umass usb/ucom cam zlib
+# Define empty LDSCRIPT_NAME, FreeBSD kernel make process will use his default
+KERNCONF_KERN_LDSCRIPT_NAME=
+
# Additional utilities
WORLD_SUBDIRS_ZROUTER+=target/sbin/upgrade
diff -r b0b3021badc7 -r 806cb53de7f7 socs/Cavium/CN5010/soc.mk
--- a/socs/Cavium/CN5010/soc.mk Wed Jan 04 17:47:48 2012 +0200
+++ b/socs/Cavium/CN5010/soc.mk Fri Jan 06 14:11:59 2012 +0200
@@ -17,7 +17,8 @@
KERNCONF_MAKEOPTIONS+= "ARCH_FLAGS=\"-march=octeon -mabi=64\""
KERNCONF_MAKEOPTIONS+= "MIPS_BIG_ENDIAN=defined"
-KERNCONF_MAKEOPTIONS+= "LDSCRIPT_NAME=ldscript.mips.octeon1"
+#KERNCONF_MAKEOPTIONS+= "LDSCRIPT_NAME=ldscript.mips.octeon1"
+KERNCONF_KERN_LDSCRIPT_NAME?= ldscript.mips.octeon1
KERNCONF_KERNLOADADDR?= 0xffffffff80100000
KERNCONF_OPTIONS+= MALLOC_DEBUG_MAXZONES=8
diff -r b0b3021badc7 -r 806cb53de7f7 socs/socs.mk
--- a/socs/socs.mk Wed Jan 04 17:47:48 2012 +0200
+++ b/socs/socs.mk Fri Jan 06 14:11:59 2012 +0200
@@ -2,7 +2,7 @@
SOC_VENDOR?="NONE"
# Defaults
-KERNCONF_KERNLOADADDR?=0x80001000
+KERNCONF_KERNLOADADDR?= 0x80001000
.if exists(${ZROUTER_ROOT}/socs/${SOC_VENDOR}/${SOC_CHIP}/)
TARGET_SOCDIR= ${ZROUTER_ROOT}/socs/${SOC_VENDOR}/${SOC_CHIP}
@@ -12,3 +12,10 @@
.if !defined(TARGET_SOCDIR)
SOC_PAIRS!=ls -d ${ZROUTER_ROOT}/socs/*/* | sed 's/^.*\/socs\///'
.endif
+
+.if ${TARGET_ARCH} == "mipsel" || ${TARGET_ARCH} == "mipseb"
+KERNCONF_KERN_LDSCRIPT_NAME?= ldscript.mips.bin
+.else
+KERNCONF_KERN_LDSCRIPT_NAME?= ldscript.${TARGET}
+.endif
+
More information about the Zrouter-src
mailing list