Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Genromfs 0.5.7 unreleased #170

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions romfs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@ EE_OBJS += romfs.o romfs_io.o
EE_OBJS := $(EE_OBJS:%=$(EE_OBJS_DIR)%)

all: $(EE_OBJS_DIR) $(EE_LIB_DIR) $(EE_LIB)

tools: tools/genromfs
$(MAKE) -C tools/genromfs all
cp -f tools/genromfs/genromfs $(DESTDIR)$(PS2SDK)/bin/

$(EE_OBJS_DIR):
mkdir -p $(EE_OBJS_DIR)
Expand All @@ -32,6 +29,7 @@ install: all
mkdir -p $(DESTDIR)$(PS2SDK)/ports/lib
cp -f $(EE_LIB) $(DESTDIR)$(PS2SDK)/ports/lib
cp -f include/*.h $(DESTDIR)$(PS2SDK)/ports/include/
cp -f tools/genromfs/genromfs $(DESTDIR)$(PS2SDK)/bin/

clean:
rm -f -r $(EE_OBJS_DIR) $(EE_LIB_DIR)
Expand Down
5 changes: 5 additions & 0 deletions romfs/tools/genromfs/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2009-02-15 11:43 Janos Farkas <[email protected]>

* Many changes, the main feature is to support
unixy file metadata on request. Test release 0.5.7.

2007-06-26 19:04 Janos Farkas <chexum+dev () gmail.com>
* NEWS, genromfs.8, genromfs.lsm: releasing 0.5.2.

Expand Down
19 changes: 12 additions & 7 deletions romfs/tools/genromfs/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@

# Makefile for the genromfs program.

# Modified to build on MINGW
ifeq ($(OS), Windows_NT)
LDLIBS = -lshlwapi -lws2_32
endif

all: genromfs

PACKAGE = genromfs
VERSION = 0.5.2
VERSION = 0.5.7-unreleased
CC = gcc
CFLAGS = -O2 -Wall -DVERSION=\"$(VERSION)\"#-g#
LDFLAGS = -s#-g
Expand All @@ -14,17 +19,14 @@ DISTDIR = $(PACKAGE)-$(VERSION)
FILES = COPYING NEWS ChangeLog Makefile \
genromfs.8 genromfs.c genromfs.lsm \
readme-kernel-patch genrommkdev romfs.txt \
checkdist
checkdist \
.gitignore selftest

prefix = /usr
bindir = $(prefix)/bin
mandir = $(prefix)/man

genromfs: genromfs.o
$(CC) $(LDFLAGS) genromfs.o -o genromfs

.c.o:
$(CC) $(CFLAGS) $< -c -o $@

clean:
rm -f genromfs *.o
Expand All @@ -37,11 +39,14 @@ dist:
rm -rf $(DISTDIR).tar.gz $(DISTDIR)
mkdir $(DISTDIR);
for i in $(FILES); do \
cp $$i $(DISTDIR)/; \
cp -r $$i $(DISTDIR)/; \
done; \
tar --owner=root --group=root -zcf $(DISTDIR).tar.gz $(DISTDIR);
rm -rf $(DISTDIR)

check: all selftest
$(MAKE) -C selftest dotest

install: all install-bin install-man

install-bin:
Expand Down
62 changes: 62 additions & 0 deletions romfs/tools/genromfs/NEWS
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
Changes since 0.5.7:

* Make extension options really able to copy the current data.
* Detect unparseable numbers in the extended options.
* Tags were stored in an incorrect order, making any value of uids, gids and
timestamps larger than 4095 ending up with a wrong value.

Changes in the not released 0.5.7:

* A test suite is now included (but may not work correctly in all
circumstances).
* Implemented including files by pattern, and combining this with excludes
* It is now possible to override alignment with a smaller value:
genromfs -A2048,*.boot -A1024,m68k.boot -A512,m68k.boot
* Unix permissions, including mode bits, user and group id, and even
mtime may be saved for individual files. This needs a format change,
which is backward compatible, but older kernels will not recognise
any of these features.

Changes in release 0.5.2:

* faked device names may contain the special characters "-" "_" and "+"
Thanks to Greg Ungerer
* code changes -- avoid possible side effects of ntohl(), and report
nonexistant directories instead of a segfault
Thanks to Ilguiz Latypov
* version numbers are checked at make distcheck time

Changes in release 0.5.1:

* the man page is now installed correctly
* documented @ special files, updated man page version
* manual wording updates

Changes in release 0.5:

* genromfs builds on Linux (libc5, glibc), FreeBSD, Solaris, with gcc
* added a script to generate device special files
* merged in the uClinux changes, thanks to:
Greg Ungerer (gerg -at- snapgear.com)
The LEOX team (lpm/bdl/bronche -at- leox.org)
profesor -at- sidehack.sat.gweep.net
** allow specifying device files by names @dev,b,major,minor
** -x option to exclude files
** portability fixes to compile on Solaris
* print version
* spelling fixes

Changes in release 0.3:

* Support file data to be aligned on larger than 16 byte boundary
by Jakub Jelinek.

Changes in release 0.2:

* Added manual page by Christoph Lameter.
* Added help option.
* Added install target.

Changes in release 0.1:

* Initial release.
7 changes: 7 additions & 0 deletions romfs/tools/genromfs/checkdist
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh
current=$1
# check for previous versions
echo "The following files have not been updated for $current"
grep -L $current NEWS ChangeLog genromfs.lsm genromfs.8 && echo "(all ok)"
# find -type f|xargs egrep '(0\.3|0\.5|0\.5.1)'
exit 0
133 changes: 121 additions & 12 deletions romfs/tools/genromfs/genromfs.8
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH GENROMFS 8 "Jun 2007" "Version 0.5.2"
.TH GENROMFS 8 "Feb 2009" "Version 0.5.7"
.SH NAME
genromfs \- create a romfs image
.SH SYNOPSIS
Expand Down Expand Up @@ -35,10 +35,13 @@ will scan the current directory and its subdirectories, build a romfs
image from the files found, and output it to the file or device you
specified.
.PP
During scanning, it recognizes a special notation. If a file begins
The files found during scanning will be incorporated in the filesystem image.
To allow easier management of filesystem trees
as a normal user,
file names starting
with the @ sign
(and is empty otherwise),
it refers to a device special node in the format:
will cause a device special node to be created in the filesystem image.
The format is the following:
.B @name,type,major,minor.
type can be
.I b
Expand All @@ -48,7 +51,8 @@ for character devices,
and
.I p
for fifos.
The linux virtual console 1 can thus be included as a
The first linux virtual console
can thus be included as a
file with the name:
.B @tty1,c,4,1

Expand All @@ -57,6 +61,7 @@ file with the name:
.BI -f \ output
Specifies the file to output the image to.
This option is required.
This is to prevent printing binary output on standard output.
.TP
.BI -d \ source
Use the specified directory as the source, not the current directory.
Expand All @@ -77,22 +82,112 @@ will guarantee only an alignment of 16 bytes.
.TP
.BI -A \ alignment,pattern
Align objects matching shell wildcard pattern to alignment bytes.
If one object matches more patterns, then the highest alignment is chosen.
Alignment has to be a power of two. Patterns either don't contain any
slashes, in which case files matching those patterns are matched in all
directories, or start with a leading slash, in which case they are matched
against absolute paths inside of the romfs filesystem (that is, as if you
chrooted into the rom filesystem).
If one object matches more patterns, then the longest alignment is chosen.
Alignment has to be a power of two.
If a pattern doesn't contain any slashes, the pattern will match file names
in all directories.
Patterns starting with a slash will be expected to match absolute path names
in the generated romfs file system.

.TP
.BI -x \ pattern
Allow to exclude files that match a pattern.
Exclude files that match a pattern.
It's useful to exclude CVS directories and backup files (ending in a '~').
.TP
.BI -i \ pattern
Include files that match a pattern. You can mix and match
.B
-i
and
.B
-x
options, they will be processed in the order specified. You can exclude
files matching
.I
*.bin
but include
.I
boot*.bin
later.
.TP
.BI -v
Verbose operation,
.B genromfs
will print each file which is included in the image, along with
its offset.

.SH EXTENSION OPTIONS
Except for the alignment options, these are not supported in current
in-kernel
.B
romfs
implementations as of early 2010.
The resulting file system image
is still readable but no extended information stored
in the filesystem will be visible (or used).

.TP
.BI -ealign:N,PATTERN
Same as the
.B -AN,PATTERN
option.

.TP
.BI -ealign:N
Same as the
.B -aN
option.

.TP
.BI -eperm:N[,PATTERN]
Will try to store the numeric (octal) permission for the files matching the pattern. Examples are
.B
600
for files accessible to their owners only, or
.B
4711
for
.I
setuid
files.
Note that
.B -eperm:[,PATTERN]
is the same as
.B -eperm:0[,PATTERN]
The
.I
PATTERN
is optional, if missing, it will apply to all files (which is not generally useful).

.TP
.BI -eperm[,PATTERN]
Similar to the above option, except that the permission to store will be retrieved from the
actual file.

.TP
.BI -euid:N[,PATTERN]

.TP
.BI -euid[,PATTERN]

.TP
.BI -egid:N[,PATTERN]

.TP
.BI -egid[,PATTERN]
Similarly to the
.I
-eperm
option, these options allow to store the file user-id and group-id information.

.TP
.BI -etime:N[,PATTERN]

.TP
.BI -etime[,PATTERN]
Similarly, these options allow to store the file modification timestamp. The number is the
Unix time, the seconds since January 1, 1970, 00:00:00 UTC.

.SH EXAMPLES

.EX
Expand Down Expand Up @@ -127,6 +222,20 @@ romfs module loaded, or compiled into the kernel) via:
mount -t romfs /dev/fd0 /mnt
.EE

.SH CAVEATS

.P
Extension options might not be supported by older kernels.
In fact, currently no kernels support showing custom permission and timestamp
information.

.P
Please note that if you specify extension options which have no effect,
they still cause the image format version to be marked as extended.
One such dummy option is enabling uid storage when the the uid is zero,
or forced to be zero.
It should be just as compatible with older kernels.

.SH AUTHOR
This manual page was initially written by Christoph Lameter <[email protected]>,
for the Debian GNU/Linux system.
Expand Down
Loading