리눅스 커널에 대해 배우려고 하는데 읽고 싶었던 좋은 책을 발견했습니다. 시작 요구 사항은 빌드하기 쉬운 커널이며, 현재 며칠 동안 이를 구현하기 위해 노력하고 있습니다. 현재 나는 "재컴파일"하려는 버전이기도 한 2.6.32-5 커널로 Debian Squeeze를 실행하고 있습니다. 설정은 Ubuntu를 호스트로 실행하는 VM에 있습니다. 아직 공간이 많이 남아있습니다(~21GB).
내가 따랐던 마지막 매뉴얼은데비안 jessie 릴리스 노트의 "새 커널 컴파일".
그래서 kernel.org에서 받은 압축을 푼 커널 패키지로 가서 다음을 실행했습니다.
make menuconfig #(left the defaults there)
make-kpkg clean
fakeroot make-kpkg --initrd --revision=1.0.custom kernel_image
그러면 다음과 같은 출력이 생성됩니다.
====== making target debian/stamp/conf/minimal_debian [new prereqs: ]======
This is kernel package version 13.014+nmu1.
test -d debian || mkdir debian
test ! -e stamp-building || rm -f stamp-building
install -p -m 755 /usr/share/kernel-package/rules debian/rules
for file in ChangeLog Control Control.bin86 config templates.in rules; do \
cp -f /usr/share/kernel-package/$file ./debian/; \
done
for dir in Config docs examples ruleset scripts pkg po; do \
cp -af /usr/share/kernel-package/$dir ./debian/; \
done
test -f debian/control || sed -e 's/=V/2.6.32.5/g' \
-e 's/=D/1.0.custom/g' -e 's/=A/amd64/g' \
-e 's/=SA//g' \
-e 's/=I//g' \
-e 's/=CV/2.6/g' \
-e 's/=M/Unknown Kernel Package Maintainer <[email protected]>/g' \
-e 's/=ST/linux/g' -e 's/=B/x86_64/g' \
-e 's/=R//g' /usr/share/kernel-package/Control > debian/control
test -f debian/changelog || sed -e 's/=V/2.6.32.5/g' \
-e 's/=D/1.0.custom/g' -e 's/=A/amd64/g' \
-e 's/=ST/linux/g' -e 's/=B/x86_64/g' \
-e 's/=M/Unknown Kernel Package Maintainer <[email protected]>/g' \
/usr/share/kernel-package/changelog > debian/changelog
chmod 0644 debian/control debian/changelog
test -d ./debian/stamp || mkdir debian/stamp
make -f debian/rules debian/stamp/conf/kernel-conf
make[1]: Entering directory '/root/kernel/linux-2.6.32.5'
====== making target debian/stamp/conf/kernel-conf [new prereqs: ]======
make ARCH=x86_64 \
oldconfig;
make[2]: Entering directory '/root/kernel/linux-2.6.32.5'
scripts/kconfig/conf -o arch/x86/Kconfig
#
# configuration written to .config
#
make[2]: Leaving directory '/root/kernel/linux-2.6.32.5'
make ARCH=x86_64 prepare
make[2]: Entering directory '/root/kernel/linux-2.6.32.5'
scripts/kconfig/conf -s arch/x86/Kconfig
CHK include/linux/version.h
UPD include/linux/version.h
CHK include/linux/utsrelease.h
UPD include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-x86
CC kernel/bounds.s
GEN include/linux/bounds.h
CC arch/x86/kernel/asm-offsets.s
GEN include/asm/asm-offsets.h
CALL scripts/checksyscalls.sh
make[2]: Leaving directory '/root/kernel/linux-2.6.32.5'
echo done > debian/stamp/conf/kernel-conf
make[1]: Leaving directory '/root/kernel/linux-2.6.32.5'
make -f debian/rules debian/stamp/conf/full-changelog
make[1]: Entering directory '/root/kernel/linux-2.6.32.5'
====== making target debian/stamp/conf/full-changelog [new prereqs: ]======
for file in ChangeLog Control Control.bin86 config templates.in rules; do \
cp -f /usr/share/kernel-package/$file ./debian/; \
done
for dir in Config docs examples ruleset scripts pkg po; do \
cp -af /usr/share/kernel-package/$dir ./debian/; \
done
install -p -m 755 /usr/share/kernel-package/rules debian/rules
sed -e 's/=V/2.6.32.5/g' \
-e 's/=D/1.0.custom/g' -e 's/=A/amd64/g' \
-e 's/=SA//g' \
-e 's/=I//g' \
-e 's/=CV/2.6/g' \
-e 's/=M/Unknown Kernel Package Maintainer <[email protected]>/g' \
-e 's/=ST/linux/g' -e 's/=B/x86_64/g' \
-e 's/=R//g' /usr/share/kernel-package/Control > debian/control
sed -e 's/=V/2.6.32.5/g' -e 's/=D/1.0.custom/g' \
-e 's/=A/amd64/g' -e 's/=M/Unknown Kernel Package Maintainer <[email protected]>/g' \
-e 's/=ST/linux/g' -e 's/=B/x86_64/g' \
/usr/share/kernel-package/changelog > debian/changelog
chmod 0644 debian/control debian/changelog
make -f debian/rules debian/stamp/conf/kernel-conf
make[2]: Entering directory '/root/kernel/linux-2.6.32.5'
make[2]: 'debian/stamp/conf/kernel-conf' is up to date.
make[2]: Leaving directory '/root/kernel/linux-2.6.32.5'
make[1]: Leaving directory '/root/kernel/linux-2.6.32.5'
echo done > debian/stamp/conf/minimal_debian
====== making target debian/stamp/conf/vars [new prereqs: ]======
====== making target debian/stamp/build/kernel [new prereqs: vars]======
This is kernel package version 13.014+nmu1.
restore_upstream_debianization
test ! -f scripts/package/builddeb.kpkg-dist || mv -f scripts/package/builddeb.kpkg-dist scripts/package/builddeb
test ! -f scripts/package/Makefile.kpkg-dist || mv -f scripts/package/Makefile.kpkg-dist scripts/package/Makefile
/usr/bin/make ARCH=x86_64 \
bzImage
make[1]: Entering directory '/root/kernel/linux-2.6.32.5'
CHK include/linux/version.h
CHK include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-x86
CALL scripts/checksyscalls.sh
HOSTCC scripts/genksyms/genksyms.o
SHIPPED scripts/genksyms/lex.c
SHIPPED scripts/genksyms/parse.h
SHIPPED scripts/genksyms/keywords.c
HOSTCC scripts/genksyms/lex.o
SHIPPED scripts/genksyms/parse.c
HOSTCC scripts/genksyms/parse.o
HOSTLD scripts/genksyms/genksyms
CC scripts/mod/empty.o
HOSTCC scripts/mod/mk_elfconfig
MKELF scripts/mod/elfconfig.h
HOSTCC scripts/mod/file2alias.o
HOSTCC scripts/mod/modpost.o
HOSTCC scripts/mod/sumversion.o
HOSTLD scripts/mod/modpost
HOSTCC scripts/selinux/mdp/mdp
HOSTCC scripts/kallsyms
HOSTCC scripts/conmakehash
CC init/main.o
CHK include/linux/compile.h
UPD include/linux/compile.h
CC init/version.o
CC init/do_mounts.o
CC init/do_mounts_initrd.o
LD init/mounts.o
CC init/initramfs.o
CC init/calibrate.o
LD init/built-in.o
HOSTCC usr/gen_init_cpio
GEN usr/initramfs_data.cpio
AS usr/initramfs_data.o
LD usr/built-in.o
LD arch/x86/crypto/built-in.o
AS arch/x86/ia32/ia32entry.o
CC arch/x86/ia32/sys_ia32.o
CC arch/x86/ia32/ia32_signal.o
CC arch/x86/ia32/ipc32.o
CC arch/x86/ia32/ia32_aout.o
CC arch/x86/ia32/audit.o
LD arch/x86/ia32/built-in.o
CC arch/x86/kernel/process_64.o
CC arch/x86/kernel/signal.o
AS arch/x86/kernel/entry_64.o
scripts/Makefile.build:265: recipe for target 'arch/x86/kernel/entry_64.o' failed
scripts/Makefile.build:365: recipe for target 'arch/x86/kernel' failed
Makefile:878: recipe for target 'arch/x86' failed
make[1]: Leaving directory '/root/kernel/linux-2.6.32.5'
debian/ruleset/targets/common.mk:295: recipe for target 'debian/stamp/build/kernel' failed
나는 UNIX에 대한 경험이 있지만(몇 년 동안 Linux를 사용해 왔습니다) 지금까지 커널에 대해서는 아무것도 모릅니다. 누구든지 도와줄 수 있나요?