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 # ----------------------------------------------------------------
89 cdl_component CYGTST_ROMFS_BUILD_TESTS {
90 display "Build ROM filesystem tests"
94 requires CYGINT_LIBC_STARTUP_CONTEXT
95 requires CYGINT_ISO_STDIO_FORMATTED_IO
96 requires CYGINT_ISO_STRERROR
97 requires CYGBLD_FS_ROMFS_MK_ROMFS
99 This option enables the building of the ROM filesystem tests."
102 <PREFIX>/include/cyg/romfs/testromfs_le.h : $(PREFIX)/bin/mk_romfs <PACKAGE>/support/file2c.tcl
103 $(PREFIX)/bin/mk_romfs $(REPOSITORY)/$(PACKAGE)/tests/testromfs testromfs_le.bin
104 @mkdir -p "$(dir $@)"
105 # work around cygwin path problems by copying to build dir
106 @cp $(REPOSITORY)/$(PACKAGE)/support/file2c.tcl .
107 sh file2c.tcl testromfs_le.bin testromfs_le.h
109 @cp testromfs_le.h $@
113 <PREFIX>/include/cyg/romfs/testromfs_be.h : $(PREFIX)/bin/mk_romfs <PACKAGE>/support/file2c.tcl
114 $(PREFIX)/bin/mk_romfs -b $(REPOSITORY)/$(PACKAGE)/tests/testromfs testromfs_be.bin
115 @mkdir -p "$(dir $@)"
116 # work around cygwin path problems by copying to bin dir
117 @cp $(REPOSITORY)/$(PACKAGE)/support/file2c.tcl $(PREFIX)/bin/
118 sh $(PREFIX)/bin/file2c.tcl testromfs_be.bin testromfs_be.h
119 @cp testromfs_be.h $@
122 cdl_option CYGPKG_FS_ROM_TESTS {
123 display "ROM filesystem tests"
126 calculated { "tests/romfs1" }
128 This option specifies the set of tests for the ROM filesystem package."