1 # ====================================================================
5 # ROM Filesystem configuration data
7 # ====================================================================
8 #####ECOSGPLCOPYRIGHTBEGIN####
9 ## -------------------------------------------
10 ## This file is part of eCos, the Embedded Configurable Operating System.
11 ## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
12 ## Copyright (C) 2004 eCosCentric Limited
14 ## eCos is free software; you can redistribute it and/or modify it under
15 ## the terms of the GNU General Public License as published by the Free
16 ## Software Foundation; either version 2 or (at your option) any later version.
18 ## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
19 ## WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 ## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
23 ## You should have received a copy of the GNU General Public License along
24 ## with eCos; if not, write to the Free Software Foundation, Inc.,
25 ## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
27 ## As a special exception, if other files instantiate templates or use macros
28 ## or inline functions from this file, or you compile this file and link it
29 ## with other works to produce a work based on this file, this file does not
30 ## by itself cause the resulting work to be covered by the GNU General Public
31 ## License. However the source code for this file must still be made available
32 ## in accordance with section (3) of the GNU General Public License.
34 ## This exception does not invalidate any other reasons why a work based on
35 ## this file might be covered by the GNU General Public License.
37 ## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
38 ## at http://sources.redhat.com/ecos/ecos-license/
39 ## -------------------------------------------
40 #####ECOSGPLCOPYRIGHTEND####
41 # ====================================================================
42 ######DESCRIPTIONBEGIN####
45 # Original data: nickg
46 # Contributors: richard.panton@3glab.com
49 #####DESCRIPTIONEND####
51 # ====================================================================
53 cdl_package CYGPKG_FS_ROM {
54 display "ROM filesystem"
58 requires CYGPKG_IO_FILEIO
60 requires CYGPKG_ISOINFRA
61 requires CYGINT_ISO_ERRNO
62 requires CYGINT_ISO_ERRNO_CODES
64 implements CYGINT_IO_FILEIO_FS
66 compile -library=libextras.a romfs.c
68 cdl_option CYGBLD_FS_ROMFS_MK_ROMFS {
69 display "Build the tool used to build filesystems"
73 # FIXME: host compiler/flags should be provided by config system
75 <PREFIX>/bin/mk_romfs: <PACKAGE>/support/mk_romfs.c <PREFIX>/bin/file2c.tcl
77 @$(HOST_CC) -g -O2 -o $@ $< || cc -g -O2 -o $@ $< || gcc -g -O2 -o $@ $<
78 @cp $(REPOSITORY)/$(PACKAGE)/support/file2c.tcl $(PREFIX)/bin
82 When enabled this option will build a host tool which can be
83 used to create a rom filesystem image."
86 cdl_option CYGPKG_FS_ROM_RET_DIRENT_DTYPE {
87 display "Support for fileio's struct dirent d_type field"
90 active_if CYGPKG_FILEIO_DIRENT_DTYPE
93 This option controls whether the ROM filesystem supports
94 setting fileio's struct dirent d_type field.
95 If this option is enabled, d_type will be set. Otherwise,
96 nothing will be done, d_type's value will be zero because
97 fileio already sets it."
100 # ----------------------------------------------------------------
103 cdl_component CYGTST_ROMFS_BUILD_TESTS {
104 display "Build ROM filesystem tests"
108 requires CYGINT_LIBC_STARTUP_CONTEXT
109 requires CYGINT_ISO_STDIO_FORMATTED_IO
110 requires CYGINT_ISO_STRERROR
111 requires CYGBLD_FS_ROMFS_MK_ROMFS
113 This option enables the building of the ROM filesystem tests."
116 <PREFIX>/include/cyg/romfs/testromfs_le.h : $(PREFIX)/bin/mk_romfs <PACKAGE>/support/file2c.tcl
117 $(PREFIX)/bin/mk_romfs $(REPOSITORY)/$(PACKAGE)/tests/testromfs testromfs_le.bin
118 @mkdir -p "$(dir $@)"
119 # work around cygwin path problems by copying to build dir
120 @cp $(REPOSITORY)/$(PACKAGE)/support/file2c.tcl .
121 sh file2c.tcl testromfs_le.bin testromfs_le.h
123 @cp testromfs_le.h $@
127 <PREFIX>/include/cyg/romfs/testromfs_be.h : $(PREFIX)/bin/mk_romfs <PACKAGE>/support/file2c.tcl
128 $(PREFIX)/bin/mk_romfs -b $(REPOSITORY)/$(PACKAGE)/tests/testromfs testromfs_be.bin
129 @mkdir -p "$(dir $@)"
130 # work around cygwin path problems by copying to bin dir
131 @cp $(REPOSITORY)/$(PACKAGE)/support/file2c.tcl $(PREFIX)/bin/
132 sh $(PREFIX)/bin/file2c.tcl testromfs_be.bin testromfs_be.h
133 @cp testromfs_be.h $@
136 cdl_option CYGPKG_FS_ROM_TESTS {
137 display "ROM filesystem tests"
140 calculated { "tests/romfs1" }
142 This option specifies the set of tests for the ROM filesystem package."