· KLDP.org · KLDP.net · KLDP Wiki · KLDP BBS ·
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 하는 것도 검토 필요함.

diff knoppix and berry


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 만 없에고 사용하면 될 것 같음.

advancecomp-1.9_create_compressed_fs/7z/AriBitCoder.h


this->m_Probability, this->UpdateModel(aSymbol) this-> 를 붙인 것만이 다름.

advancecomp-1.9_create_compressed_fs/advfs.cc


#include <netinet/in.h> 의 위치만 다름.

compressed_loop.c


knoppix 의 경우 include 파일이 보다 많이 있슴. kernel 버전때문인 것으로 추측됨.

205c167 < struct clo_read_data *p = (struct clo_read_data*)desc->buf; ---
struct clo_read_data *p = (struct clo_read_data*)desc->arg.buf;
231c196 < desc.buf = (char*)&cd; ---
desc.arg.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;



sponsored by andamiro
sponsored by cdnetworks
sponsored by HP

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2005-02-17 14:48:20
Processing time 0.0062 sec