Booyo LiveCD/Make Cloop
BooyoLiveCD/MakeCloop ¶download cloop-2.01-b6.src.rpm
rpm -ivh cloop-2.01-b6.src.rpm
cd /usr/src/redhat/SPECS
rpmbuild -bp --target i686 cloop.spec
cd /usr/src/redhat/BUILD/cloop-2.01
edit compressed_loop.c
uncomment define REDHAT_KERNEL
#define REDHAT_KERNEL
cd advancecomp-1.9_create_compressed_fs
edit advfs.cc
netinet/in.h ¸¦ sys/stat.h ¹ØÀ¸·Î À̵¿
#include <sys/stat.h>
#include <netinet/in.h>
cd ..
make
extract_compressed_fs.c ¿¡¼ ¿À·ù ¹ß»ýÇÔ.
extract_compressed_fs.c: In function `main':
extract_compressed_fs.c:66: error: `__be32' undeclared (first use in this function)
extract_compressed_fs.c:82: error: `__be64' undeclared (first use in this function)
½Ã°£ÀÌ ÀÖÀ»¶§ °ËÅäÇØ¾ß ÇÔ.
linux/include/linux/types.h ¿¡¼
#endif __KERNEL_STRICT_NAMES
À»
#ifdef CHECKER
À§·Î ¿Å±è.
ÀÌ °æ¿ì side effect °¡ ÀÖ´ÂÁö ¾Ë ¼ö °¡ ¾ø½¿.
compressed_loop.c
int __init init_cloop_fs(void)
void exit_cloop_fs(void)
static int __init init_cloop_fs(void)
static void __exit exit_cloop_fs(void)
edit Makefile
CFLAGS = -Wall $(COPTS) -DKERNEL -DMODULE ${INCLUDES} -march=${MARCH} \
CFLAGS = -Wall $(COPTS) -DKERNEL -DMODULE ${INCLUDES} -march=${MARCH} \
-mregparm=3 \
¹®Á¦ ÇØ°áµÊ.
cloop.ko ¸¦ Ä¿³Î¿¡ patch ÇÏ´Â °Íµµ °ËÅä ÇÊ¿äÇÔ.
Makefile ¶knoppix
kernel 2.6 ÀÇ °æ¿ì¿¡´Â conf.vars °¡ ¾ø´Â °ÍÀΰ¡?
¾î¶² °æ¿ì¿¡ conf.vars °¡ Àִ°¡? (µ¥ºñ¾È¿¡¸¸ ÀÖ´Ù´Â ¼³µµ ÀÖ½¿.)
conf.vars ÀÇ ³»¿ë
VERSION = 2 PATCHLEVEL = 4 SUBLEVEL = 24 EXTRAVERSION = APPEND_TO_VERSION = -se1-686 ARCH = KPKG_ARCH = HOSTCC = HOSTCFLAGS = CROSS_COMPILE = AS = as make -p LD = ld make -p CC = cc make -p CPP = cc -E make -p AR = ar make -p NM = STRIP = OBJCOPY = OBJDUMP = MAKE = /usr/bin/make GENKSYMS = CFLAGS = AFLAGS = MODFLAGS = berry ´Â cloop.mod.c ¸¦ º°µµ·Î ¸¸µé¾ú½¿.
knoppix ´Â create_compressed_fs.c ¿¡ Æ÷ÇԵǾî ÀÖ½¿.
knoppix ¿¡¼ conf.vars ¸¸ ¾ø¿¡°í »ç¿ëÇÏ¸é µÉ °Í °°À½.
compressed_loop.c ¶knoppix ÀÇ °æ¿ì include ÆÄÀÏÀÌ º¸´Ù ¸¹ÀÌ ÀÖ½¿.
kernel ¹öÀü¶§¹®ÀÎ °ÍÀ¸·Î ÃßÃøµÊ.
205c167
< struct clo_read_data *p = (struct clo_read_data*)desc->buf;
---
231c196 < desc.buf = (char*)&cd; --- berry °¡ ¸ÂÀ½. (º°µµ include ¿¡ ÀÇÇØ ÇØ°áµÇ´ÂÁö compile ÇØ º¸¾Æ¾ß ÇÔ.) cloop-booyo ¶diff -r cloop-2.01/Makefile cloop-booyo/Makefile 9c9 < include $(KERNEL_DIR)/conf.vars --- > #include $(KERNEL_DIR)/conf.vars 12c12,17 < CKERNOPS:=-D__KERNEL__ -DMODULE -fno-builtin -nostdlib -DKBUILD_MODNAME="cloop" -DKBUILD_BASENAME="cloop" --- > CKERNOPS:=-O2 -D__KERNEL__ -DMODULE -fno-builtin -nostdlib -DKBUILD_MODNAME="cloop" -DKBUILD_BASENAME="cloop" > > ifdef CONFIG_REGPARM > REGPARM:= -mregparm=3 > CKERNOPS += $(REGPARM) > endif 15c20,21 < MODVERSIONS:= -DMODVERSIONS -include $(KERNEL_DIR)/include/linux/modversions.h --- > #MODVERSIONS:= -DMODVERSIONS -include $(KERNEL_DIR)/include/linux/modversions.h > MODVERSIONS:= -DMODVERSIONS 28a35,38 > ifndef PATCHLEVEL > PATCHLEVEL:=6 > endif > diff -r cloop-2.01/advancecomp-1.9_create_compressed_fs/7z/AriBitCoder.h cloop-booyo/advancecomp-1.9_create_compressed_fs/7z/AriBitCoder.h 54,55c54,55 < aRangeEncoder->EncodeBit(m_Probability, kNumBitModelTotalBits, aSymbol); < UpdateModel(aSymbol); --- > aRangeEncoder->EncodeBit(this->m_Probability, kNumBitModelTotalBits, aSymbol); > this->UpdateModel(aSymbol); 60c60 < (((m_Probability - aSymbol) ^ ((-(int)aSymbol))) & (kBitModelTotal - 1)) >> kNumMoveReducingBits]; --- > (((this->m_Probability - aSymbol) ^ ((-(int)aSymbol))) & (kBitModelTotal - 1)) >> kNumMoveReducingBits]; 71c71 < UINT32 aNewBound = (aRangeDecoder->m_Range >> kNumBitModelTotalBits) * m_Probability; --- > UINT32 aNewBound = (aRangeDecoder->m_Range >> kNumBitModelTotalBits) * this->m_Probability; 75c75 < m_Probability += (kBitModelTotal - m_Probability) >> aNumMoveBits; --- > this->m_Probability += (kBitModelTotal - this->m_Probability) >> aNumMoveBits; 87c87 < m_Probability -= (m_Probability) >> aNumMoveBits; --- > this->m_Probability -= (this->m_Probability) >> aNumMoveBits; diff -r cloop-2.01/advancecomp-1.9_create_compressed_fs/advfs.cc cloop-booyo/advancecomp-1.9_create_compressed_fs/advfs.cc 23a24 > #include <netinet/in.h> 33d33 < #include <netinet/in.h> diff -r cloop-2.01/compressed_loop.c cloop-booyo/compressed_loop.c 26c26 < /* #define REDHAT_KERNEL */ --- > #define REDHAT_KERNEL 205c205 < struct clo_read_data *p = (struct clo_read_data*)desc->buf; --- > struct clo_read_data *p = (struct clo_read_data*)desc->arg.buf; 231c231 < desc.buf = (char*)&cd; --- > desc.arg.buf = (char*)&cd; |
Creditors have much better memories than debtors. |