차이
문서의 선택한 두 판 사이의 차이를 보여줍니다.
양쪽 이전 판 이전 판 다음 판 | 이전 판 | ||
linuxfromscratch [2024/06/07 19:38] – [LFS로 부팅하기 전에 준비할 것들] baecy | linuxfromscratch [2024/06/16 23:14] (현재) – [PS1 설정] baecy | ||
---|---|---|---|
줄 1: | 줄 1: | ||
- | ====== Linux From Scratch ====== | + | ===== 토막 상식 |
+ | ==== for, echo and sed ===== | ||
+ | |||
+ | <code bash> | ||
+ | for i in $(echo " | ||
+ | </ | ||
==== Grep && Tar ==== | ==== Grep && Tar ==== | ||
줄 168: | 줄 173: | ||
PS1_USER=' | PS1_USER=' | ||
PS1_HEAD=' | PS1_HEAD=' | ||
- | if [ "$(awk ' | + | if [ "$(awk ' |
- | en | + | |
if [ $(id -u) -eq 0 ] ; then | if [ $(id -u) -eq 0 ] ; then | ||
PS1="< | PS1="< | ||
else | else | ||
- | PS1="< | + | PS1="< |
fi | fi | ||
else | else | ||
if [ $(id -u) -eq 0 ] ; then | if [ $(id -u) -eq 0 ] ; then | ||
- | PS1=" | + | PS1=" |
else | else | ||
PS1=" | PS1=" | ||
줄 189: | 줄 193: | ||
LFS 진행에 필요한 패키지 설치 | LFS 진행에 필요한 패키지 설치 | ||
- | <codelang=bash > | + | <code bash > |
sudo apt install build-essentials bison gawk m4 texinfo texinfo | sudo apt install build-essentials bison gawk m4 texinfo texinfo | ||
sudo apt install gettext libisl-dev | sudo apt install gettext libisl-dev | ||
줄 330: | 줄 334: | ||
---- | ---- | ||
- | ==== Glibc 2.39 Testsuite Fail ==== | ||
- | 8.5 Glibc 2.39 '' | ||
- | <code cmd=true cmdout=3-9 user=root> | ||
- | make check | ||
- | grep " | ||
- | ./ | ||
- | ./ | ||
- | ./ | ||
- | ./ | ||
- | ./ | ||
- | ./ | ||
- | ./ | ||
- | |||
- | === 다음의 두 가지 경우는 넘겨도 상관없음 === | ||
- | ndbm.h가 없어서 Fail.\\ | ||
- | 8.37. GDBM-1.23 을 설치하면 해결 | ||
- | <code lang=log> | ||
- | / | ||
- | 1 | #include < | ||
- | | ^~~~~~~~ | ||
- | compilation terminated. | ||
- | FAIL: Availability of < | ||
- | SKIP: Namespace of < | ||
- | ---------------------------------------------------------------------------- | ||
- | Total number of tests : | ||
- | Number of failed tests : 1 | ||
- | Number of xfailed tests : 0 | ||
- | Number of skipped tests : 1</ | ||
- | GCC에서 더 이상 지원하지 않는 < | ||
- | <code lang=log> | ||
- | In file included from / | ||
- | / | ||
- | 4 | #error "GCC no longer implements < | ||
- | | ^~~~~ | ||
- | / | ||
- | 5 | #error " | ||
- | | ^~~~~ | ||
- | FAIL: Availability of < | ||
- | SKIP: Namespace of < | ||
- | ---------------------------------------------------------------------------- | ||
- | Total number of tests : | ||
- | Number of failed tests : 1 | ||
- | Number of xfailed tests : 0 | ||
- | Number of skipped tests : 1 | ||
- | </ | ||
==== Textinfo Dir File Rebuild ==== | ==== Textinfo Dir File Rebuild ==== | ||
+ | |||
<code lang=bash> | <code lang=bash> | ||
pushd / | pushd / | ||
줄 383: | 줄 343: | ||
do install-info $f dir 2>/ | do install-info $f dir 2>/ | ||
done | done | ||
- | popd</ | + | popd |
+ | </ | ||
+ | ---- | ||
==== Swap file ==== | ==== Swap file ==== | ||
+ | |||
<code cmd=true cmdout=6, | <code cmd=true cmdout=6, | ||
export LFS=/ | export LFS=/ | ||
줄 395: | 줄 358: | ||
no label, UUID=890ba9a5-da48-4374-84ce-b71b91863e00 | no label, UUID=890ba9a5-da48-4374-84ce-b71b91863e00 | ||
sudo swapon $LFS_SWAP | sudo swapon $LFS_SWAP | ||
- | sudo echo " | + | sudo echo " |
+ | </ | ||
+ | |||
+ | ---- | ||
+ | ==== Binutils 설치하기 전에 ISL 설치하기 ==== | ||
+ | |||
+ | GMP를 먼저 설치 | ||
- | ==== Binutils 설치하기 전에 ISL 설치하기 (실패) ==== | ||
- | GMP를 먼저 설치 \\ | ||
<code lang=bash> | <code lang=bash> | ||
./configure --prefix=/ | ./configure --prefix=/ | ||
줄 406: | 줄 373: | ||
make | make | ||
make check 2>&1 | tee gmp-check.log | make check 2>&1 | tee gmp-check.log | ||
- | ## 책에서는 199이라고 나오지만 실제는 200이 나옴 | ||
awk '/# PASS:/ | awk '/# PASS:/ | ||
- | </ | + | </ |
- | LFS 12.1 기준으로 8.20 참고 \\ | + | |
- | [[https:// | + | [[https:// |
<code lang=bash> | <code lang=bash> | ||
- | ./configure --prefix=/ | + | ./configure --prefix=/ |
make | make | ||
- | make install</ | + | make install |
+ | </ | ||
- | ==== BLFS 시작하기 전에 필요한 패키지 ==== | + | ---- |
- | sudo, nfs-utils(또는 sshfs), openssh, wget | + | |
==== $LFS/ | ==== $LFS/ | ||
+ | |||
<code lang=bash> | <code lang=bash> | ||
alias dirfind=" | alias dirfind=" | ||
줄 425: | 줄 393: | ||
rm -rf $(dirfind) | rm -rf $(dirfind) | ||
## 설치 완료된 패키지 디렉토리만 삭제할거면 다음과 같이 | ## 설치 완료된 패키지 디렉토리만 삭제할거면 다음과 같이 | ||
- | alias SearchAndDestroy=' | + | alias SearchAndDestroy=' |
+ | </ | ||
+ | ---- | ||
==== SBU 측정 ==== | ==== SBU 측정 ==== | ||
<code lang=bash> | <code lang=bash> |