Skip to content

Commit 0aad4c3

Browse files
committed
In which one tries to kernel headers and glibc. Not quite.
Hit golang/go#16847 while cloning the kernel sources. whee. Signed-off-by: Eric Myhre <[email protected]>
1 parent c552990 commit 0aad4c3

File tree

2 files changed

+76
-0
lines changed

2 files changed

+76
-0
lines changed

lfs-003-kernelheaders.frm

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
## Unpack kernel headers.
2+
## http://www.linuxfromscratch.org/lfs/view/stable/chapter05/linux-headers.html
3+
inputs:
4+
"/":
5+
type: "tar"
6+
tag: "ubuntu-base+gcc"
7+
silo:
8+
- "file+ca://wares/"
9+
- "http+ca://repeatr.s3.amazonaws.com/assets/"
10+
"/src/kernel":
11+
type: "tar"
12+
hash: "gFPeFwgxUTG_1wkAcvQhLLK0KE_kXlVzve7VOAJiIdF70Khrpb28aVVIPoDWPUEo"
13+
silo: "https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.7.2.tar.xz"
14+
action:
15+
policy: governor
16+
env:
17+
"LFS": "/lfs/"
18+
"LC_ALL": "POSIX"
19+
"LFS_TGT": "x86_64-lfs-linux-gnu"
20+
"PATH": "/tools/bin:/bin:/usr/bin"
21+
"MAKEFLAGS": "-j 8"
22+
cwd: "/src/kernel"
23+
command:
24+
- "/bin/bash"
25+
- "-c"
26+
- |
27+
set -euo pipefail ; set -x
28+
ln -s $LFS/tools/ /
29+
cd *
30+
make mrproper
31+
make INSTALL_HDR_PATH=dest headers_install
32+
cp -rv dest/include/* /$LFS/tools/include
33+
outputs:

lfs-004-glibc.frm

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
## Glibc!
2+
## http://www.linuxfromscratch.org/lfs/view/stable/chapter05/glibc.html
3+
inputs:
4+
"/":
5+
type: "tar"
6+
tag: "ubuntu-base+gcc"
7+
silo:
8+
- "file+ca://wares/"
9+
- "http+ca://repeatr.s3.amazonaws.com/assets/"
10+
"/src/glibc":
11+
type: "tar"
12+
hash: "EuSaUYVTHP-qIzxgY2vDdArjzitbFQQ8G-YDe2_dZU48zGd0seLcBpb6kGElk62Z"
13+
silo: "http://ftp.gnu.org/gnu/glibc/glibc-2.24.tar.xz"
14+
action:
15+
policy: governor
16+
env:
17+
"LFS": "/lfs/"
18+
"LC_ALL": "POSIX"
19+
"LFS_TGT": "x86_64-lfs-linux-gnu"
20+
"PATH": "/tools/bin:/bin:/usr/bin"
21+
"MAKEFLAGS": "-j 8"
22+
cwd: "/src/glibc"
23+
command:
24+
- "/bin/bash"
25+
- "-c"
26+
- |
27+
set -euo pipefail ; set -x
28+
ln -s $LFS/tools/ /
29+
cd *
30+
mkdir -v build; cd build
31+
time {
32+
../configure \
33+
--prefix=/tools \
34+
--host=$LFS_TGT \
35+
--build=$(../scripts/config.guess) \
36+
--enable-kernel=2.6.32 \
37+
--with-headers=/tools/include \
38+
libc_cv_forced_unwind=yes \
39+
libc_cv_c_cleanup=yes
40+
make
41+
make install
42+
}
43+
outputs:

0 commit comments

Comments
 (0)