Skip to content

Commit a953ba5

Browse files
committed
prepare boot
1 parent 06dac76 commit a953ba5

File tree

5 files changed

+33
-4
lines changed

5 files changed

+33
-4
lines changed

build_iso.sh

+20
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ source stage0n_variables
55
mkdir -p ${CLFS}/iso/boot/isolinux
66
mkdir -p ${CLFS}/iso/boot/system
77

8+
# Copy libraries
9+
echo ${CLFS}/cross-tools/${CLFS_TARGET} ${CLFS}/targetfs
10+
tar -C ${CLFS}/cross-tools/${CLFS_TARGET} -cvf - lib | tar -C ${CLFS}/targetfs -xf -
11+
812
# Create the initramfs
913
( cd ${CLFS}/targetfs ; find . | cpio -o -H newc | gzip -c > ../iso/boot/system/initrd.gz )
1014

@@ -13,4 +17,20 @@ kern=` ls ${CLFS}/targetfs/boot/vmlinuz* | tail -n1 `
1317
install -m 0644 "$kern" ${CLFS}/iso/boot/system/vmlinuz
1418

1519
# copy the bootloader
20+
for f in bios/com32/menu/menu.c32 bios/com32/menu/vesamenu.c32 \
21+
bios/com32/modules/ifcpu64.c32 bios/com32/modules/ifcpu.c32 \
22+
bios/com32/modules/reboot.c32 bios/com32/chain/chain.c32 \
23+
bios/com32/elflink/ldlinux/ldlinux.c32 bios/com32/libutil/libutil.c32 \
24+
bios/com32/cmenu/libmenu/libmenu.c32 bios/com32/lib/libcom32.c32 \
25+
bios/com32/lua/src/liblua.c32 bios/com32/gpllib/libgpl.c32 \
26+
bios/core/isolinux.bin ; do
27+
install -m 0644 ${CLFS}/hosttools/share/syslinux/$f ${CLFS}/iso/boot/isolinux/
28+
done
29+
30+
install -m 0644 patches/isolinux.cfg ${CLFS}/iso/boot/isolinux/
1631

32+
${CLFS}/hosttools/bin/xorriso -as mkisofs -joliet -graft-points \
33+
-c boot/isolinux/boot.cat -b boot/isolinux/isolinux.bin \
34+
-no-emul-boot -boot-info-table -boot-load-size 4 \
35+
-isohybrid-mbr ${CLFS}/hosttools/share/syslinux/bios/mbr/isohdpfx.bin \
36+
-V CLFS -o ${CLFS}/clfs.iso -r ${CLFS}/iso

patches/etc-rc

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
PATH=/static/bin:/static/sbin:/bin:/sbin:/usr/bin:/usr/sbin
44
export PATH
55

6+
mkdir /proc
67
mountpoint -q /proc || mount -t proc none /proc
78
ln -sf /proc/mounts /etc/mtab
89
touch /etc/fstab

patches/isolinux.cfg

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
2+
DEFAULT clfs
3+
TIMEOUT 100
4+
PROMPT 1
5+
6+
LABEL clfs
7+
KERNEL /boot/system/vmlinuz
8+
APPEND initrd=/boot/system/initrd.gz
9+

stage01_variables

-4
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,4 @@ PATH=${CLFS}/cross-tools/bin:/bin:/usr/bin
55
export CLFS LC_ALL PATH
66
unset CFLAGS
77
export CLFS_HOST=$(echo ${MACHTYPE} | sed "s/-[^-]*/-cross/")
8-
export CLFS_TARGET=x86_64-linux-musl
9-
export CLFS_CPU=k8
10-
export CLFS_ARCH="x86"
11-
128

stage0n_variables

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11

22
CLFS=/mnt/archiv/CrossLinux
33
SRCDIR=${CLFS}/src
4+
export CLFS_TARGET=x86_64-linux-musl
5+
export CLFS_CPU=k8
6+
export CLFS_ARCH="x86"

0 commit comments

Comments
 (0)