summaryrefslogtreecommitdiff
path: root/nuttx
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-08-28 12:32:14 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-08-28 12:32:14 +0000
commitd65957d369dfa895eda4b20ba24a168c7ce6dd4b (patch)
tree729c641d771a16228ebd5e2757dca8340730cb41 /nuttx
parent021fe70054d93cf21e99cd7ffeaa10054f2bdac6 (diff)
downloadpx4-nuttx-d65957d369dfa895eda4b20ba24a168c7ce6dd4b.tar.gz
px4-nuttx-d65957d369dfa895eda4b20ba24a168c7ce6dd4b.tar.bz2
px4-nuttx-d65957d369dfa895eda4b20ba24a168c7ce6dd4b.zip
More fixe for FreeBSD build
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3919 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx')
-rw-r--r--nuttx/configs/qemu-i486/nsh/Make.defs7
-rw-r--r--nuttx/configs/qemu-i486/ostest/Make.defs7
-rwxr-xr-xnuttx/drivers/mtd/flash_eraseall.c6
-rwxr-xr-xnuttx/tools/configure.sh2
4 files changed, 20 insertions, 2 deletions
diff --git a/nuttx/configs/qemu-i486/nsh/Make.defs b/nuttx/configs/qemu-i486/nsh/Make.defs
index d18c80293..ff8d3dd6b 100644
--- a/nuttx/configs/qemu-i486/nsh/Make.defs
+++ b/nuttx/configs/qemu-i486/nsh/Make.defs
@@ -66,6 +66,13 @@ ARCHPICFLAGS = -fpic
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow
ARCHDEFINES =
+ifeq ($(HOSTOS),FreeBSD)
+ HOST_ARCH = ${shell uname -m 2>/dev/null || echo "Other"}
+ ifeq ($(HOST_ARCH),amd64)
+ ARCHCPUFLAGS += -m32
+ endif
+endif
+
# We have to use a cross-development toolchain under Cygwin because the native
# Cygwin toolchains don't generate ELF binaries.
diff --git a/nuttx/configs/qemu-i486/ostest/Make.defs b/nuttx/configs/qemu-i486/ostest/Make.defs
index 5851427e6..4a2d3bf08 100644
--- a/nuttx/configs/qemu-i486/ostest/Make.defs
+++ b/nuttx/configs/qemu-i486/ostest/Make.defs
@@ -66,6 +66,13 @@ ARCHPICFLAGS = -fpic
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow
ARCHDEFINES =
+ifeq ($(HOSTOS),FreeBSD)
+ HOST_ARCH = ${shell uname -m 2>/dev/null || echo "Other"}
+ ifeq ($(HOST_ARCH),amd64)
+ ARCHCPUFLAGS += -m32
+ endif
+endif
+
# We have to use a cross-development toolchain under Cygwin because the native
# Cygwin toolchains don't generate ELF binaries.
diff --git a/nuttx/drivers/mtd/flash_eraseall.c b/nuttx/drivers/mtd/flash_eraseall.c
index 7d42fe9d4..5f607da35 100755
--- a/nuttx/drivers/mtd/flash_eraseall.c
+++ b/nuttx/drivers/mtd/flash_eraseall.c
@@ -90,7 +90,7 @@ int flash_eraseall(FAR const char *driver)
ret = open_blockdriver(driver ,0, &inode);
if (ret < 0)
{
- fdbg("ERROR: Failed to open '%s': %d\n", driver, ret);
+ fdbg("ERROR: Failed to open '%s': %d\n", driver, ret);
return ret;
}
@@ -104,6 +104,10 @@ int flash_eraseall(FAR const char *driver)
if (ops->ioctl)
{
ret = ops->ioctl(inode, MTDIOC_BULKERASE, 0);
+ if (ret < 0)
+ {
+ fdbg("ERROR: MTD ioctl(%04x) failed: %d\n", MTDIOC_BULKERASE, ret);
+ }
}
/* Close the block driver */
diff --git a/nuttx/tools/configure.sh b/nuttx/tools/configure.sh
index 0103716a0..1174534fe 100755
--- a/nuttx/tools/configure.sh
+++ b/nuttx/tools/configure.sh
@@ -123,7 +123,7 @@ if [ -z "${appdir}" ]; then
unset CONFIG_VERSION_STRING
if [ -x "${TOPDIR}/.version" ]; then
- source "${TOPDIR}/.version"
+ . "${TOPDIR}/.version"
fi
# Check for an unversioned apps/ directory