forked from vtsingaras/firmware-mod-kit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
298 changed files
with
30,706 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
|
||
CC = gcc | ||
CXX = g++ | ||
AR = ar | ||
CFLAGS = -W -Wall -O2 -g | ||
|
||
INCLUDEDIR = . | ||
|
||
CFLAGS := -I$(INCLUDEDIR) -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -g | ||
|
||
ifdef CONFIG_SQUASHFS_CRAMFS_MAGIC | ||
CFLAGS += -DCONFIG_SQUASHFS_CRAMFS_MAGIC=1 | ||
endif | ||
|
||
all: mksquashfs unsquashfs | ||
|
||
mksquashfs: mksquashfs.o read_fs.o sort.o liblzma.a | ||
$(CXX) mksquashfs.o read_fs.o sort.o -L. -llzma -lpthread -o $@ | ||
|
||
mksquashfs.o: mksquashfs.c mksquashfs.h | ||
|
||
liblzma.a: liblzma/Makefile | ||
$(MAKE) -f liblzma/Makefile | ||
|
||
unsquashfs: unsquashfs.o liblzma.a | ||
$(CXX) unsquashfs.o -L. -llzma -lpthread -o $@ | ||
|
||
#unsquashfs.o: unsquashfs.c | ||
|
||
read_fs.o: read_fs.c read_fs.h | ||
|
||
sort.o: sort.c | ||
|
||
clean: | ||
rm -f *.o liblzma.a unsquashfs mksquashfs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#ifndef GLOBAL_H | ||
#define GLOBAL_H | ||
|
||
/* | ||
* Squashfs | ||
* | ||
* Copyright (c) 2002, 2003, 2004, 2005 | ||
* Phillip Lougher <phillip@lougher.demon.co.uk> | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License | ||
* as published by the Free Software Foundation; either version 2, | ||
* or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
* | ||
* global.h | ||
*/ | ||
|
||
typedef struct squashfs_super_block squashfs_super_block; | ||
typedef struct squashfs_dir_index squashfs_dir_index; | ||
typedef struct squashfs_base_inode_header squashfs_base_inode_header; | ||
typedef struct squashfs_ipc_inode_header squashfs_ipc_inode_header; | ||
typedef struct squashfs_dev_inode_header squashfs_dev_inode_header; | ||
typedef struct squashfs_symlink_inode_header squashfs_symlink_inode_header; | ||
typedef struct squashfs_reg_inode_header squashfs_reg_inode_header; | ||
typedef struct squashfs_dir_inode_header squashfs_dir_inode_header; | ||
typedef struct squashfs_ldir_inode_header squashfs_ldir_inode_header; | ||
typedef struct squashfs_dir_entry squashfs_dir_entry; | ||
typedef struct squashfs_dir_header squashfs_dir_header; | ||
typedef struct squashfs_fragment_entry squashfs_fragment_entry; | ||
|
||
typedef union squashfs_inode_header squashfs_inode_header; | ||
typedef unsigned int squashfs_uid; | ||
typedef unsigned int squashfs_fragment_index; | ||
typedef squashfs_inode_t squashfs_inode; | ||
typedef squashfs_block_t squashfs_block; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
# | ||
# build a zlib compatible wrapper around p7zip (davidm@snapgear.com) | ||
# | ||
|
||
PROG = liblzma.a | ||
|
||
P7ZIP_SRC = p7zip | ||
|
||
# CXX = g++ -O3 -Wall | ||
AR ?= ar | ||
RM ?= rm -f | ||
CFLAGS += -c -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DNDEBUG -D_REENTRANT -DENV_UNIX -DEXCLUDE_COM -DNO_REGISTRY -DFORMAT_7Z -DFORMAT_BZIP2 -DFORMAT_ZIP -DFORMAT_TAR -DFORMAT_GZIP -DCOMPRESS_LZMA -DCOMPRESS_BCJ_X86 -DFORMAT_SPLIT -DFORMAT_Z -DCOMPRESS_BCJ2 -DCOMPRESS_COPY -DCOMPRESS_MF_MT -DCOMPRESS_PPMD -DCOMPRESS_DEFLATE -DCOMPRESS_DEFLATE64 -DCOMPRESS_IMPLODE -DCOMPRESS_BZIP2 -DCRYPTO_ZIP -DCRYPTO_7ZAES -DCRYPTO_AES -c -I$(P7ZIP_SRC)/myWindows -I$(P7ZIP_SRC) -I$(P7ZIP_SRC)/include_windows | ||
|
||
|
||
MY_WINDOWS= | ||
|
||
include $(P7ZIP_SRC)/makefile.machine | ||
|
||
OBJS = \ | ||
ZLib.o \ | ||
LZMADecoder.o \ | ||
LZMAEncoder.o \ | ||
LZInWindow.o \ | ||
LZOutWindow.o \ | ||
RangeCoderBit.o \ | ||
InBuffer.o \ | ||
OutBuffer.o \ | ||
FileStreams.o \ | ||
Alloc.o \ | ||
StreamUtils.o \ | ||
CommandLineParser.o \ | ||
Synchronization.o \ | ||
MT.o \ | ||
CRC.o \ | ||
String.o \ | ||
StringConvert.o \ | ||
StringToInt.o \ | ||
Vector.o \ | ||
|
||
|
||
all: $(PROG) | ||
|
||
$(PROG): $(OBJS) | ||
$(AR) r $(PROG) $(OBJS) | ||
|
||
ZLib.o: liblzma/ZLib.cpp | ||
$(CXX) $(CFLAGS) liblzma/ZLib.cpp | ||
|
||
LZMADecoder.o: $(P7ZIP_SRC)/7zip/Compress/LZMA/LZMADecoder.cpp | ||
$(CXX) $(CFLAGS) $(P7ZIP_SRC)/7zip/Compress/LZMA/LZMADecoder.cpp | ||
|
||
LZMAEncoder.o: $(P7ZIP_SRC)/7zip/Compress/LZMA/LZMAEncoder.cpp | ||
$(CXX) $(CFLAGS) $(P7ZIP_SRC)/7zip/Compress/LZMA/LZMAEncoder.cpp | ||
|
||
Synchronization.o: $(P7ZIP_SRC)/Windows/Synchronization.cpp | ||
$(CXX) $(CFLAGS) $(P7ZIP_SRC)/Windows/Synchronization.cpp | ||
|
||
StreamUtils.o: $(P7ZIP_SRC)/7zip/Common/StreamUtils.cpp | ||
$(CXX) $(CFLAGS) $(P7ZIP_SRC)/7zip/Common/StreamUtils.cpp | ||
|
||
MT.o: $(P7ZIP_SRC)/7zip/Compress/LZ/MT/MT.cpp | ||
$(CXX) $(CFLAGS) $(P7ZIP_SRC)/7zip/Compress/LZ/MT/MT.cpp | ||
|
||
LZInWindow.o: $(P7ZIP_SRC)/7zip/Compress/LZ/LZInWindow.cpp | ||
$(CXX) $(CFLAGS) $(P7ZIP_SRC)/7zip/Compress/LZ/LZInWindow.cpp | ||
|
||
LZOutWindow.o: $(P7ZIP_SRC)/7zip/Compress/LZ/LZOutWindow.cpp | ||
$(CXX) $(CFLAGS) $(P7ZIP_SRC)/7zip/Compress/LZ/LZOutWindow.cpp | ||
|
||
RangeCoderBit.o: $(P7ZIP_SRC)/7zip/Compress/RangeCoder/RangeCoderBit.cpp | ||
$(CXX) $(CFLAGS) $(P7ZIP_SRC)/7zip/Compress/RangeCoder/RangeCoderBit.cpp | ||
|
||
InBuffer.o: $(P7ZIP_SRC)/7zip/Common/InBuffer.cpp | ||
$(CXX) $(CFLAGS) $(P7ZIP_SRC)/7zip/Common/InBuffer.cpp | ||
|
||
OutBuffer.o: $(P7ZIP_SRC)/7zip/Common/OutBuffer.cpp | ||
$(CXX) $(CFLAGS) $(P7ZIP_SRC)/7zip/Common/OutBuffer.cpp | ||
|
||
FileStreams.o: $(P7ZIP_SRC)/7zip/Common/FileStreams.cpp | ||
$(CXX) $(CFLAGS) $(P7ZIP_SRC)/7zip/Common/FileStreams.cpp | ||
|
||
Alloc.o: $(P7ZIP_SRC)/Common/Alloc.cpp | ||
$(CXX) $(CFLAGS) $(P7ZIP_SRC)/Common/Alloc.cpp | ||
|
||
C_FileIO.o: $(P7ZIP_SRC)/Common/C_FileIO.cpp | ||
$(CXX) $(CFLAGS) $(P7ZIP_SRC)/Common/C_FileIO.cpp | ||
|
||
CommandLineParser.o: $(P7ZIP_SRC)/Common/CommandLineParser.cpp | ||
$(CXX) $(CFLAGS) $(P7ZIP_SRC)/Common/CommandLineParser.cpp | ||
|
||
CRC.o: $(P7ZIP_SRC)/Common/CRC.cpp | ||
$(CXX) $(CFLAGS) $(P7ZIP_SRC)/Common/CRC.cpp | ||
|
||
MyWindows.o: $(P7ZIP_SRC)/Common/MyWindows.cpp | ||
$(CXX) $(CFLAGS) $(P7ZIP_SRC)/Common/MyWindows.cpp | ||
|
||
String.o: $(P7ZIP_SRC)/Common/String.cpp | ||
$(CXX) $(CFLAGS) $(P7ZIP_SRC)/Common/String.cpp | ||
|
||
StringConvert.o: $(P7ZIP_SRC)/Common/StringConvert.cpp | ||
$(CXX) $(CFLAGS) $(P7ZIP_SRC)/Common/StringConvert.cpp | ||
|
||
StringToInt.o: $(P7ZIP_SRC)/Common/StringToInt.cpp | ||
$(CXX) $(CFLAGS) $(P7ZIP_SRC)/Common/StringToInt.cpp | ||
|
||
Vector.o: $(P7ZIP_SRC)/Common/Vector.cpp | ||
$(CXX) $(CFLAGS) $(P7ZIP_SRC)/Common/Vector.cpp | ||
|
||
clean: | ||
-$(RM) $(PROG) $(OBJS) | ||
|
||
romfs: |
Oops, something went wrong.