Syslinux is now automatically downloaded and ISO image generation process uses precompiled Syslinux binaries. The initramfs logging has been improved and more details are displayed during boot.
This commit is contained in:
parent
5acf2b46f8
commit
44ee04c758
@ -16,3 +16,11 @@ GLIBC_SOURCE_URL=http://ftp.gnu.org/gnu/glibc/glibc-2.23.tar.bz2
|
||||
#
|
||||
BUSYBOX_SOURCE_URL=http://busybox.net/downloads/busybox-1.24.2.tar.bz2
|
||||
|
||||
# You can find the latest Syslinux source bundles here:
|
||||
#
|
||||
# http://syslinux.org (official website)
|
||||
#
|
||||
# http://kernel.org/pub/linux/utils/boot/syslinux
|
||||
#
|
||||
SYSLINUX_SOURCE_URL=https://www.kernel.org/pub/linux/utils/boot/syslinux/syslinux-6.03.tar.xz
|
||||
|
||||
|
0
src/00_prepare.sh
Normal file → Executable file
0
src/00_prepare.sh
Normal file → Executable file
0
src/01_get_kernel.sh
Normal file → Executable file
0
src/01_get_kernel.sh
Normal file → Executable file
0
src/02_build_kernel.sh
Normal file → Executable file
0
src/02_build_kernel.sh
Normal file → Executable file
0
src/03_get_glibc.sh
Normal file → Executable file
0
src/03_get_glibc.sh
Normal file → Executable file
0
src/04_build_glibc.sh
Normal file → Executable file
0
src/04_build_glibc.sh
Normal file → Executable file
0
src/05_prepare_glibc.sh
Normal file → Executable file
0
src/05_prepare_glibc.sh
Normal file → Executable file
0
src/06_get_busybox.sh
Normal file → Executable file
0
src/06_get_busybox.sh
Normal file → Executable file
0
src/07_build_busybox.sh
Normal file → Executable file
0
src/07_build_busybox.sh
Normal file → Executable file
12
src/08_generate_rootfs.sh
Normal file → Executable file
12
src/08_generate_rootfs.sh
Normal file → Executable file
@ -46,12 +46,15 @@ cd etc
|
||||
cat > bootscript.sh << EOF
|
||||
#!/bin/sh
|
||||
|
||||
echo "Welcome to \"Minimal Linbux Live\" (/sbin/init)"
|
||||
|
||||
dmesg -n 1
|
||||
mount -t devtmpfs none /dev
|
||||
mount -t proc none /proc
|
||||
mount -t sysfs none /sys
|
||||
|
||||
for DEVICE in /sys/class/net/* ; do
|
||||
echo "Found network device \${DEVICE##*/}"
|
||||
ip link set \${DEVICE##*/} up
|
||||
[ \${DEVICE##*/} != lo ] && udhcpc -b -i \${DEVICE##*/} -s /etc/rc.dhcp
|
||||
done
|
||||
@ -70,6 +73,13 @@ if [ "\$router" ]; then
|
||||
ip route add default via \$router dev \$interface
|
||||
fi
|
||||
|
||||
if [ "\$ip" ]; then
|
||||
echo "DHCP configuration for device \$interface"
|
||||
echo "ip: \$ip"
|
||||
echo "mask: \$mask"
|
||||
echo "router: \$router"
|
||||
fi
|
||||
|
||||
EOF
|
||||
|
||||
chmod +x rc.dhcp
|
||||
@ -118,6 +128,8 @@ cd ..
|
||||
cat > init << EOF
|
||||
#!/bin/sh
|
||||
|
||||
echo "Welcome to \"Minimal Linbux Live\" (/init)"
|
||||
|
||||
exec /sbin/init
|
||||
|
||||
EOF
|
||||
|
0
src/09_pack_rootfs.sh
Normal file → Executable file
0
src/09_pack_rootfs.sh
Normal file → Executable file
24
src/10_get_syslinux.sh
Executable file
24
src/10_get_syslinux.sh
Executable file
@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Grab everything after the '=' character.
|
||||
DOWNLOAD_URL=$(grep -i SYSLINUX_SOURCE_URL .config | cut -f2 -d'=')
|
||||
|
||||
# Grab everything after the last '/' character.
|
||||
ARCHIVE_FILE=${DOWNLOAD_URL##*/}
|
||||
|
||||
cd source
|
||||
|
||||
# Downloading Syslinux file.
|
||||
# -c option allows the download to resume.
|
||||
wget -c $DOWNLOAD_URL
|
||||
|
||||
# Delete folder with previously extracted Syslinux.
|
||||
rm -rf ../work/syslinux
|
||||
mkdir ../work/syslinux
|
||||
|
||||
# Extract Syslinux to folder 'work/syslinux'.
|
||||
# Full path will be something like 'work/syslinux/syslinux-6.03'.
|
||||
tar -xvf $ARCHIVE_FILE -C ../work/syslinux
|
||||
|
||||
cd ..
|
||||
|
20
src/10_generate_iso.sh → src/11_generate_iso.sh
Normal file → Executable file
20
src/10_generate_iso.sh → src/11_generate_iso.sh
Normal file → Executable file
@ -6,6 +6,12 @@ cd $(ls -d *)
|
||||
WORK_KERNEL_DIR=$(pwd)
|
||||
cd ../../..
|
||||
|
||||
# Find the Syslinux build directory.
|
||||
cd work/syslinux
|
||||
cd $(ls -d *)
|
||||
WORK_SYSLINUX_DIR=$(pwd)
|
||||
cd ../../..
|
||||
|
||||
# Remove the old ISO file if it exists.
|
||||
rm -f minimal_linux_live.iso
|
||||
|
||||
@ -16,17 +22,9 @@ rm -rf work/isoimage
|
||||
mkdir work/isoimage
|
||||
cd work/isoimage
|
||||
|
||||
# Search and copy the files 'isolinux.bin' and 'ldlinux.c32'
|
||||
for i in lib lib64 share end ; do
|
||||
if [ -f /usr/$i/syslinux/isolinux.bin ]; then
|
||||
cp /usr/$i/syslinux/isolinux.bin .
|
||||
if [ -f /usr/$i/syslinux/ldlinux.c32 ]; then
|
||||
cp /usr/$i/syslinux/ldlinux.c32 .
|
||||
fi;
|
||||
break;
|
||||
fi;
|
||||
if [ $i = end ]; then exit 1; fi;
|
||||
done
|
||||
# Copy the precompiled files 'isolinux.bin' and 'ldlinux.c32' in the ISO image root folder.
|
||||
cp $WORK_SYSLINUX_DIR/bios/core/isolinux.bin .
|
||||
cp $WORK_SYSLINUX_DIR/bios/com32/elflink/ldlinux/ldlinux.c32 .
|
||||
|
||||
# Now we copy the kernel.
|
||||
cp $WORK_KERNEL_DIR/arch/x86/boot/bzImage ./kernel.bz
|
@ -10,5 +10,6 @@ sh 06_get_busybox.sh
|
||||
sh 07_build_busybox.sh
|
||||
sh 08_generate_rootfs.sh
|
||||
sh 09_pack_rootfs.sh
|
||||
sh 10_generate_iso.sh
|
||||
sh 10_get_syslinux.sh
|
||||
sh 11_generate_iso.sh
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user