summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-06-24 14:26:39 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-06-24 14:26:39 +0000
commitcecd890c6283dc824e2c972c357bb02a76ae3269 (patch)
tree8e6898e8e583fb2ffbed4ee6ba9469cf02abcaa4 /misc
parent14645583fb003bba5810ae809d7c1ed2618b67aa (diff)
downloadnuttx-cecd890c6283dc824e2c972c357bb02a76ae3269.tar.gz
nuttx-cecd890c6283dc824e2c972c357bb02a76ae3269.tar.bz2
nuttx-cecd890c6283dc824e2c972c357bb02a76ae3269.zip
Add genromfs
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1938 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'misc')
-rw-r--r--misc/buildroot/configs/cortexm3-defconfig-nxflat1
-rw-r--r--misc/buildroot/toolchain/Config.in1
-rw-r--r--misc/buildroot/toolchain/genromfs/Config.in8
-rw-r--r--misc/buildroot/toolchain/genromfs/genromfs.mk38
4 files changed, 48 insertions, 0 deletions
diff --git a/misc/buildroot/configs/cortexm3-defconfig-nxflat b/misc/buildroot/configs/cortexm3-defconfig-nxflat
index 2628fc201..00916aee8 100644
--- a/misc/buildroot/configs/cortexm3-defconfig-nxflat
+++ b/misc/buildroot/configs/cortexm3-defconfig-nxflat
@@ -94,6 +94,7 @@ BR2_EXTRA_BINUTILS_CONFIG_OPTIONS=""
# NuttX Binary Support
#
BR2_PACKAGE_NXFLAT=y
+BR2_PACKAGE_GENROMFS=y
#
# Common Toolchain Options
diff --git a/misc/buildroot/toolchain/Config.in b/misc/buildroot/toolchain/Config.in
index 9acc55783..7824dba35 100644
--- a/misc/buildroot/toolchain/Config.in
+++ b/misc/buildroot/toolchain/Config.in
@@ -6,6 +6,7 @@ source "toolchain/binutils/Config.in"
source "toolchain/gcc/Config.in"
source "toolchain/gdb/Config.in"
source "toolchain/nxflat/Config.in"
+source "toolchain/genromfs/Config.in"
comment "Common Toolchain Options"
diff --git a/misc/buildroot/toolchain/genromfs/Config.in b/misc/buildroot/toolchain/genromfs/Config.in
new file mode 100644
index 000000000..e2882c2be
--- /dev/null
+++ b/misc/buildroot/toolchain/genromfs/Config.in
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_GENROMFS
+ bool "Build genromfs"
+ default n if !BR2_PACKAGE_NXFLAT
+ default y if BR2_PACKAGE_NXFLAT
+ help
+ genromfs is a tools that will convert a directory on the host
+ machine to a FLASH-able ROMFS image file. genromfs support
+ is normally required with NXFLAT.
diff --git a/misc/buildroot/toolchain/genromfs/genromfs.mk b/misc/buildroot/toolchain/genromfs/genromfs.mk
new file mode 100644
index 000000000..69b818dba
--- /dev/null
+++ b/misc/buildroot/toolchain/genromfs/genromfs.mk
@@ -0,0 +1,38 @@
+######################################################################
+#
+# genromfs
+#
+######################################################################
+
+GENROMFS_VERSION:=0.5.2
+GENROMFS_SOURCE:=genromfs-$(GENROMFS_VERSION).tar.gz
+GENROMFS_BUILD:=$(TOOL_BUILD_DIR)/genromfs-$(GENROMFS_VERSION)
+
+$(GENROMFS_BUILD)/.unpacked : $(GENROMFS_TARBALL)
+ $(ZCAT) toolchain/genromfs/$(GENROMFS_SOURCE) | tar -C $(TOOL_BUILD_DIR) $(TAR_OPTIONS) -
+ toolchain/patch-kernel.sh $(GENROMFS_BUILD) toolchain/genromfs \*.patch
+ touch $@
+
+$(GENROMFS_BUILD)/.compiled : $(GENROMFS_BUILD)/.unpacked
+ $(MAKE) -C $(GENROMFS_BUILD)
+ touch $@
+
+$(STAGING_DIR)/bin/genromfs: $(GENROMFS_BUILD)/.compiled
+ install -m 755 $(GENROMFS_BUILD)/genromfs $(STAGING_DIR)/bin/genromfs
+
+genromfs: $(STAGING_DIR)/bin/genromfs
+
+genromfs-source:
+
+genromfs-clean:
+ rm -f $(STAGING_DIR)/bin/genromfs
+ (if [ -d $(GENROMFS_BUILD) ]; then $(MAKE) -C $(GENROMFS_BUILD) clean; fi)
+ rm -f $(GENROMFS_BUILD)/.compiled
+
+genromfs-dirclean:
+ rm -rf $(GENROMFS_BUILD)
+
+ifeq ($(strip $(BR2_PACKAGE_GENROMFS)),y)
+TARGETS+=genromfs
+endif
+