[Prev][Next][Index][Thread]

Putting files with $'s into the multiboot image



The short question:

How do I put files with '$' in the name into the multiboot image?

The long question:

I'm trying to make an mb image with a JVM and a whole lot of class files
(the JVM doesn't support jar or zip files).

My command to do this is:

mkmbimage  jvmimage $(cat listofclassfiles)

where listofclassfiles is a file which looks like:


'java/io/ByteArrayOutputStream.class:java/io/ByteArrayOutputStream.class'
'java/io/FileInputStream.class:java/io/FileInputStream.class'
'java/io/FileOutputStream.class:java/io/FileOutputStream.class'
'java/io/FilterReader.class:java/io/FilterReader.class'
'java/io/FilterWriter.class:java/io/FilterWriter.class'
'java/io/LineNumberInputStream.class:java/io/LineNumberInputStream.class'
'java/io/LineNumberReader.class:java/io/LineNumberReader.class'
'java/io/PushbackReader.class:java/io/PushbackReader.class'
'java/io/ObjectInputStream.class:java/io/ObjectInputStream.class'
'java/io/File.class:java/io/File.class'
'java/io/ObjectInputStream$1.class:java/io/ObjectInputStream$1.class'
'java/io/ObjectStreamClass.class:java/io/ObjectStreamClass.class'
'java/io/ObjectInputStream$2.class:java/io/ObjectInputStream$2.class'
'java/io/ObjectInputStream$GetField.class:java/io/ObjectInputStream$GetField.class'
'java/io/FileFilter.class:java/io/FileFilter.class'
'java/io/ObjectOutputStream.class:java/io/ObjectOutputStream.class'

As you can see I've put single quotes around the entries to handle the '$'
in the filenames, but I get the following error when running mkmb2:

sh: unexpected EOF while looking for `''
sh: -c: line 2: syntax error
LD failed       

This implies that there is an opening ', but no closing '. But this
doesn't occur in my file.

My methods were working fine previously when my classes didn't have inner
classes (and hence the $), so I'm wondering if this is a problem within
the mkmbimage / mkmb2 scripts, or with the way I'm expecting bash to
handle the arguments?

If I use grep to remove all entries with a '$' everything works fine. If I
don't quote the entries I get errors like:

java/util/Collections.class(.data+0x0): multiple definition of `_binary_java_util_Collections_class_start'
java/util/Collections.class(.data+0x0): first defined here   

Any help/advice would be appreciated.

John Leuner








































---------------------------------------------------
I saw Be's face, now I'm a Be-liever
http://www.be.com/




Follow-Ups: References: