summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2017-10-02 00:09:02 (UTC)
committerChris Johns <chrisj@rtems.org>2017-10-02 00:09:02 (UTC)
commitc7dfbaf83c5b119106f9ee38c902988cc463b0aa (patch)
treeb868f09971f896b351cf141179589a3a7d23af79
parent220ceb27e6bfd2cf6372668167e51a971956ab4f (diff)
downloadexamples-v2-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.
-rw-r--r--file_io/crc/wscript33
-rw-r--r--filesystem/fat_ramdisk/fat_ramdisk.ini3
-rw-r--r--filesystem/fat_ramdisk/init.c4
-rw-r--r--filesystem/fat_ramdisk/wscript34
-rw-r--r--hello/both_hello/hello-deep.ini3
-rw-r--r--hello/both_hello/hello.ini1
m---------rtems_waf0
-rw-r--r--wscript3
8 files changed, 29 insertions, 52 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'])
diff --git a/filesystem/fat_ramdisk/fat_ramdisk.ini b/filesystem/fat_ramdisk/fat_ramdisk.ini
index beb6235..61b64cf 100644
--- a/filesystem/fat_ramdisk/fat_ramdisk.ini
+++ b/filesystem/fat_ramdisk/fat_ramdisk.ini
@@ -9,8 +9,7 @@ name = FAT Filesystem RTEMS Tracer
;
; Options can be defined here or on the command line.
;
-;options = verbose, verbose
-options = dump-on-error
+;options = verbose
;
; Functions to trace.
;
diff --git a/filesystem/fat_ramdisk/init.c b/filesystem/fat_ramdisk/init.c
index 62721f1..dfe4409 100644
--- a/filesystem/fat_ramdisk/init.c
+++ b/filesystem/fat_ramdisk/init.c
@@ -18,7 +18,7 @@
#include <rtems/untar.h>
#include <rtems/shell.h>
-#include "FilesystemImage.h"
+#include "fs-root-tar.h"
/**
@@ -111,7 +111,7 @@ rtems_task Init(
puts( "\n\n*** ramdisk/fat example ***" );
printf("Unpacking tar filesystem\nThis may take awhile...\n");
- if(Untar_FromMemory((char*) FilesystemImage, FilesystemImage_size) != 0) {
+ if(Untar_FromMemory((char*) fs_root_tar, fs_root_tar_size) != 0) {
printf("Can't unpack tar filesystem\n");
exit(1);
}
diff --git a/filesystem/fat_ramdisk/wscript b/filesystem/fat_ramdisk/wscript
index f5d5016..de806c1 100644
--- a/filesystem/fat_ramdisk/wscript
+++ b/filesystem/fat_ramdisk/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,29 +16,30 @@ 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 = 'fat_ramdisk.exe',
includes = bld.includes,
defines = bld.defines,
- cflags = cflags,
- source = 'init.c FilesystemImage')
+ source = ['init.c', 'fs-root-tar.c'])
if rtems.check_env(bld, 'RTEMS_TLD'):
bld(features = 'c rtrace',
target = 'fat_ramdisk.texe',
includes = bld.includes,
defines = bld.defines,
- cflags = cflags,
- source = 'init.c FilesystemImage',
+ source = ['init.c', 'fs-root-tar.c'],
rtrace_cfg = '../../filesystem/fat_ramdisk/fat_ramdisk.ini')
diff --git a/hello/both_hello/hello-deep.ini b/hello/both_hello/hello-deep.ini
index e3f486b..946e588 100644
--- a/hello/both_hello/hello-deep.ini
+++ b/hello/both_hello/hello-deep.ini
@@ -12,8 +12,7 @@ name = Hello Deep RTEMS Tracer
;
; Options can be defined here or on the command line.
;
-;options = verbose, verbose
-options = dump-on-error
+;options = verbose
;
; Functions to trace.
;
diff --git a/hello/both_hello/hello.ini b/hello/both_hello/hello.ini
index 4cde2b6..7056414 100644
--- a/hello/both_hello/hello.ini
+++ b/hello/both_hello/hello.ini
@@ -13,7 +13,6 @@ name = Hello RTEMS Tracer
; Options can be defined here or on the command line.
;
;options = verbose
-options = dump-on-error
;
; Functions to trace.
;
diff --git a/rtems_waf b/rtems_waf
-Subproject 7bcf72b72ec42f2feedac5f5cc5f2f57d50b5d2
+Subproject de75eecdc19c97c6e0e2fb902ffab3dbbf089eb
diff --git a/wscript b/wscript
index 8f976db..9345d97 100644
--- a/wscript
+++ b/wscript
@@ -17,6 +17,7 @@
# to build for more than BSP at a time.
#
+rtems_version = "4.12"
try:
import rtems_waf.rtems as rtems
except:
@@ -25,7 +26,7 @@ except:
sys.exit(1)
def init(ctx):
- rtems.init(ctx)
+ rtems.init(ctx, version = rtems_version, long_commands = True)
def options(opt):
rtems.options(opt)