Changeset b0afac0 in rtems_waf
- Timestamp:
-
06/15/16 01:14:16
(8 years ago)
- Author:
- Chris Johns <chrisj@…>
- Branches:
- f921380bbd36458894f9114c1826fb1e4aee1ea7
- Children:
- 1aef190
- Parents:
- 93e5545
- Message:
-
Add root_filesystem support to create a root file system.
To use add to your wscript file:
rtems.root_filesystem(bld, 'rootfs',
etc/rc.conf?,
'rootfs.tar', 'rootfs-tar.o')
to create a rootfs-tar.o which you add to your executable's list of
sources.
In your main or Init function add:
#include <rtems/untar.h>
extern int _binary_rootfs_tar_start;
extern int _binary_rootfs_tar_size;
static void expand_rootfs_tarfile(void)
{
rtems_status_code sc;
rtems_printer printer;
rtems_print_printer_printf(&printer);
sc = Untar_FromMemory_Print((void *)(&_binary_rootfs_tar_start),
(size_t)&_binary_rootfs_tar_size,
&printer);
if (sc != RTEMS_SUCCESSFUL)
fprintf(stderr, "error: untar failed: %s\n", rtems_status_text(sc));
}
Note, some arch's may not need the '_' at the start of the tar symbols.
-
(No files)
-