summaryrefslogtreecommitdiffstats
path: root/file_io
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2017-10-02 11:09:02 +1100
committerChris Johns <chrisj@rtems.org>2017-10-02 11:09:02 +1100
commitc7dfbaf83c5b119106f9ee38c902988cc463b0aa (patch)
treeb868f09971f896b351cf141179589a3a7d23af79 /file_io
parentAdd waf to the project so we control the version required. (diff)
downloadrtems-examples-c7dfbaf83c5b119106f9ee38c902988cc463b0aa.tar.bz2
Update rtems_waf to use the rootfs support. Fix trace linker INI files.
Use the rtems_waf rootfs support to create a root file system. Remove the double cflags on some projects that broke linking. Remove the dump-on-error, there is no option in rtems-tld. Closes 3158. Closes 3159.
Diffstat (limited to 'file_io')
-rw-r--r--file_io/crc/wscript33
1 files changed, 12 insertions, 21 deletions
diff --git a/file_io/crc/wscript b/file_io/crc/wscript
index 00db909..f7b0f5b 100644
--- a/file_io/crc/wscript
+++ b/file_io/crc/wscript
@@ -6,22 +6,9 @@
# Waf build script for RTEMS fat_ramdisk
import rtems_waf.rtems as rtems
-version = "1.0.0"
+import rtems_waf.rootfs as rootfs
-## FilesystemImage processing
-from waflib.Task import Task
-from waflib.TaskGen import extension
-class bin2c(Task):
- run_str = '${RTEMS_BIN2C} ${SRC} ${TGT[0].abspath()} && ' + \
- 'touch ${TGT[1].abspath()}'
- ext_out = ['.h']
-
-@extension('FilesystemImage')
-def process_FilesystemImage(self, node):
- c_node = node.change_ext('.c')
- h_node = node.change_ext('.h')
- self.create_task('bin2c', node, [c_node, h_node])
- self.source.append(c_node)
+version = "1.0.0"
def build(bld):
rtems.build(bld)
@@ -29,20 +16,24 @@ def build(bld):
arch_bsp = bld.get_env()['RTEMS_ARCH_BSP']
arch = bld.get_env()['RTEMS_ARCH']
bsp = bld.get_env()['RTEMS_BSP']
- cflags = bld.get_env()['CFLAGS']
#
# The include paths and defines.
#
bld.includes = ['.']
bld.defines = ['PACKAGE_VERSION="' + version + '"']
- bld(rule='tar -C ' + bld.path.find_dir('rootfs').abspath() + \
- ' -cf ${TGT} .',
- target='FilesystemImage')
+
+ #
+ # Package the root file system as a C file.
+ #
+ rootfs.build(bld,
+ name = 'fs-root',
+ root = 'rootfs')
bld(features = 'c cprogram',
target = 'crc.exe',
includes = bld.includes,
defines = bld.defines,
- cflags = cflags,
- source = 'init.c FilesystemImage crc_32.c')
+ source = ['init.c',
+ 'fs-root-tar.c',
+ 'crc_32.c'])