Disable mount option in fsutil. No need for libfuse anymore.
Fix build issues in virtualmips simulator.
This commit is contained in:
@@ -36,7 +36,7 @@ Berkeley YACC, GNU bison, flex, groff, ELF library and FUSE library.
|
|||||||
Under Ubuntu, for example, you can do it by command:
|
Under Ubuntu, for example, you can do it by command:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ sudo apt-get install bison byacc flex groff-base libelf-dev libfuse-dev
|
$ sudo apt-get install bison byacc flex groff-base libelf-dev
|
||||||
```
|
```
|
||||||
|
|
||||||
You can change a desired filesystem size and swap area size, as required.
|
You can change a desired filesystem size and swap area size, as required.
|
||||||
|
|||||||
@@ -5,14 +5,21 @@ OBJS = fsutil.o superblock.o block.c inode.o create.o check.o \
|
|||||||
file.o mount.o manifest.o
|
file.o mount.o manifest.o
|
||||||
PROG = fsutil
|
PROG = fsutil
|
||||||
|
|
||||||
|
# Enable mount option.
|
||||||
|
#ENABLE_FUSE = 1
|
||||||
|
|
||||||
# For Mac OS X
|
# For Mac OS X
|
||||||
ifneq ($(wildcard /usr/local/lib/pkgconfig),)
|
ifneq ($(wildcard /usr/local/lib/pkgconfig),)
|
||||||
FUSE_PATH = /usr/local/lib/pkgconfig
|
FUSE_PATH = /usr/local/lib/pkgconfig
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Fuse
|
# Fuse
|
||||||
MOUNT_CFLAGS = $(shell PKG_CONFIG_PATH=$(FUSE_PATH) pkg-config fuse --cflags)
|
ifneq ($(ENABLE_FUSE),)
|
||||||
LIBS += $(shell PKG_CONFIG_PATH=$(FUSE_PATH) pkg-config fuse --libs)
|
CFLAGS += -DENABLE_FUSE
|
||||||
|
MOUNT_CFLAGS = -DFUSE_USE_VERSION=26
|
||||||
|
MOUNT_CFLAGS += $(shell PKG_CONFIG_PATH=$(FUSE_PATH) pkg-config fuse --cflags)
|
||||||
|
LIBS += $(shell PKG_CONFIG_PATH=$(FUSE_PATH) pkg-config fuse --libs)
|
||||||
|
endif
|
||||||
|
|
||||||
all: $(PROG)
|
all: $(PROG)
|
||||||
|
|
||||||
|
|||||||
@@ -85,7 +85,9 @@ static void print_help (char *progname)
|
|||||||
printf (" %s [--verbose] [--partition=n] disk.img\n", progname);
|
printf (" %s [--verbose] [--partition=n] disk.img\n", progname);
|
||||||
printf (" %s --check [--fix] [--partition=n] disk.img\n", progname);
|
printf (" %s --check [--fix] [--partition=n] disk.img\n", progname);
|
||||||
printf (" %s --new [--size=kbytes | --partition=n] [--manifest=file] disk.img [dir]\n", progname);
|
printf (" %s --new [--size=kbytes | --partition=n] [--manifest=file] disk.img [dir]\n", progname);
|
||||||
|
#ifdef ENABLE_FUSE
|
||||||
printf (" %s --mount [--partition=n] disk.img dir\n", progname);
|
printf (" %s --mount [--partition=n] disk.img dir\n", progname);
|
||||||
|
#endif
|
||||||
printf (" %s --add [--partition=n] disk.img files...\n", progname);
|
printf (" %s --add [--partition=n] disk.img files...\n", progname);
|
||||||
printf (" %s --extract [--partition=n] disk.img\n", progname);
|
printf (" %s --extract [--partition=n] disk.img\n", progname);
|
||||||
printf (" %s --repartition=format disk.img\n", progname);
|
printf (" %s --repartition=format disk.img\n", progname);
|
||||||
@@ -99,7 +101,9 @@ static void print_help (char *progname)
|
|||||||
printf (" -s NUM, --size=NUM Size of filesystem in kbytes.\n");
|
printf (" -s NUM, --size=NUM Size of filesystem in kbytes.\n");
|
||||||
printf (" -M file, --manifest=file\n");
|
printf (" -M file, --manifest=file\n");
|
||||||
printf (" List of files and attributes to create.\n");
|
printf (" List of files and attributes to create.\n");
|
||||||
|
#ifdef ENABLE_FUSE
|
||||||
printf (" -m, --mount Mount the filesystem.\n");
|
printf (" -m, --mount Mount the filesystem.\n");
|
||||||
|
#endif
|
||||||
printf (" -a, --add Add files to filesystem.\n");
|
printf (" -a, --add Add files to filesystem.\n");
|
||||||
printf (" -x, --extract Extract all files.\n");
|
printf (" -x, --extract Extract all files.\n");
|
||||||
printf (" -r format, --repartition=format\n");
|
printf (" -r format, --repartition=format\n");
|
||||||
@@ -889,7 +893,12 @@ int main (int argc, char **argv)
|
|||||||
print_help (argv[0]);
|
print_help (argv[0]);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
#ifdef ENABLE_FUSE
|
||||||
return fs_mount(&fs, argv[i+1]);
|
return fs_mount(&fs, argv[i+1]);
|
||||||
|
#else
|
||||||
|
fprintf (stderr, "fsutil: -m, --mount options are not supported in this version.\n");
|
||||||
|
return -1;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Print the structure of flesystem. */
|
/* Print the structure of flesystem. */
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#define FUSE_USE_VERSION 26
|
#ifdef ENABLE_FUSE
|
||||||
#include <fuse.h>
|
#include <fuse.h>
|
||||||
|
|
||||||
#include "bsdfs.h"
|
#include "bsdfs.h"
|
||||||
@@ -909,3 +909,5 @@ int fs_mount(fs_t *fs, char *dirname)
|
|||||||
printf ("\nFilesystem %s unmounted\n", dirname);
|
printf ("\nFilesystem %s unmounted\n", dirname);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif /* ENABLE_FUSE */
|
||||||
|
|||||||
@@ -16,8 +16,11 @@ CFLAGS = -DSIM_PIC32 -DPIC32MX7 -DMAX32
|
|||||||
#CFLAGS = -DSIM_PIC32 -DPIC32MX7 -DUBW32
|
#CFLAGS = -DSIM_PIC32 -DPIC32MX7 -DUBW32
|
||||||
|
|
||||||
CC = gcc -g
|
CC = gcc -g
|
||||||
CFLAGS += -Wall -Werror -MT $@ -MD -MP -MF .deps/$*.dep -I/opt/local/include -I/opt/local/include/libelf
|
CFLAGS += -Wall -Werror -MT $@ -MD -MP -MF .deps/$*.dep
|
||||||
LIBS = -lpthread -lelf
|
LIBS = -lpthread
|
||||||
|
|
||||||
|
CFLAGS += $(shell pkg-config libelf --cflags)
|
||||||
|
LIBS += $(shell pkg-config libelf --libs)
|
||||||
|
|
||||||
ifneq ($(wildcard /usr/lib/librt.a),)
|
ifneq ($(wildcard /usr/lib/librt.a),)
|
||||||
LIBS += -lrt # Linux
|
LIBS += -lrt # Linux
|
||||||
|
|||||||
@@ -803,12 +803,12 @@ static void vtty_read_and_store (vtty_t * vtty)
|
|||||||
vtty->telnet_opt = c;
|
vtty->telnet_opt = c;
|
||||||
/* if telnet client can support ttype, ask it to send ttype string */
|
/* if telnet client can support ttype, ask it to send ttype string */
|
||||||
if ((vtty->telnet_cmd == WILL) && (vtty->telnet_opt == TELOPT_TTYPE)) {
|
if ((vtty->telnet_cmd == WILL) && (vtty->telnet_opt == TELOPT_TTYPE)) {
|
||||||
vtty_put_char (vtty, IAC);
|
vtty_put_char (vtty, (char)IAC);
|
||||||
vtty_put_char (vtty, SB);
|
vtty_put_char (vtty, (char)SB);
|
||||||
vtty_put_char (vtty, TELOPT_TTYPE);
|
vtty_put_char (vtty, TELOPT_TTYPE);
|
||||||
vtty_put_char (vtty, TELQUAL_SEND);
|
vtty_put_char (vtty, TELQUAL_SEND);
|
||||||
vtty_put_char (vtty, IAC);
|
vtty_put_char (vtty, (char)IAC);
|
||||||
vtty_put_char (vtty, SE);
|
vtty_put_char (vtty, (char)SE);
|
||||||
}
|
}
|
||||||
vtty->input_state = VTTY_INPUT_TEXT;
|
vtty->input_state = VTTY_INPUT_TEXT;
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user