Merge pull request #126 from bauen1/misc-changes
Cleanup and boot prompt for syslinux
This commit is contained in:
commit
de89c493d9
@ -10,52 +10,14 @@ cd work
|
||||
|
||||
echo "Cleaning existing sysroot. This may take a while."
|
||||
rm -rf sysroot
|
||||
rm -rf sysroot.specs
|
||||
|
||||
echo "Preparing glibc. This may take a while."
|
||||
cp -r glibc/glibc_installed sysroot
|
||||
cd sysroot
|
||||
mkdir -p sysroot/usr
|
||||
ln -s ../include sysroot/usr/include
|
||||
ln -s ../lib sysroot/usr/lib
|
||||
|
||||
# Create custom 'usr' area and link it with some of the kernel header directories.
|
||||
# BusyBox compilation process uses these linked directories. The following
|
||||
# directories are affected:
|
||||
#
|
||||
# usr (glibc)
|
||||
# |
|
||||
# +--include (glibc)
|
||||
# | |
|
||||
# | +--asm (kernel)
|
||||
# | |
|
||||
# | +--asm-generic (kernel)
|
||||
# | |
|
||||
# | +--linux (kernel)
|
||||
# | |
|
||||
# | +--mtd (kernel)
|
||||
# |
|
||||
# +--lib (glibc)
|
||||
|
||||
mkdir -p usr
|
||||
|
||||
ln -s ../include usr/include
|
||||
ln -s ../lib usr/lib
|
||||
|
||||
ln -s ../../kernel/kernel_installed/include/linux include/linux
|
||||
ln -s ../../kernel/kernel_installed/include/asm include/asm
|
||||
ln -s ../../kernel/kernel_installed/include/asm-generic include/asm-generic
|
||||
ln -s ../../kernel/kernel_installed/include/mtd include/mtd
|
||||
|
||||
cd ..
|
||||
|
||||
echo "generating sysroot.specs"
|
||||
SYSROOT="$PWD/sysroot"
|
||||
|
||||
# gcc has a "internal" path that needs to be added to find the static versions of libgcc_*
|
||||
GCC_INTERNAL_PATH=$(dirname $(gcc -print-libgcc-file-name))
|
||||
|
||||
cat << CEOF > sysroot.specs
|
||||
*link_libgcc:
|
||||
-L$SYSROOT/lib -L$SYSROOT/lib64 -L$SYSROOT/usr/lib -L$SYSROOT/usr/lib64 -L$SYSROOT/usr/local/lib -L$SYSROOT/usr/local/lib64 -L$GCC_INTERNAL_PATH
|
||||
CEOF
|
||||
cp -r kernel/kernel_installed/include sysroot
|
||||
cp -r glibc/glibc_installed/* sysroot
|
||||
|
||||
cd $SRC_DIR
|
||||
|
||||
|
@ -25,9 +25,9 @@ cp -r ../minimal_rootfs/* rootfs
|
||||
|
||||
cd rootfs
|
||||
|
||||
# Delete the '.gitignore' files which we use in order to keep track of otherwise
|
||||
# Delete the '.keep' files which we use in order to keep track of otherwise
|
||||
# empty folders.
|
||||
find * -type f -name '.gitignore' -exec rm {} +
|
||||
find * -type f -name '.keep' -exec rm {} +
|
||||
|
||||
# Remove 'linuxrc' which is used when we boot in 'RAM disk' mode.
|
||||
rm -f linuxrc
|
||||
|
@ -47,7 +47,24 @@ cp $WORK_SYSLINUX_DIR/bios/core/isolinux.bin .
|
||||
cp $WORK_SYSLINUX_DIR/bios/com32/elflink/ldlinux/ldlinux.c32 .
|
||||
|
||||
# Create the ISOLINUX configuration file.
|
||||
echo 'default kernel.xz initrd=rootfs.xz vga=ask' > ./syslinux.cfg
|
||||
cat << CEOF > ./syslinux.cfg
|
||||
PROMPT 1
|
||||
TIMEOUT 50
|
||||
DEFAULT mll
|
||||
|
||||
SAY Press enter to boot minimal linux or wait 5 seconds
|
||||
SAY Press tab to view available boot entries or enter syslinux commands directly
|
||||
|
||||
LABEL mll
|
||||
LINUX kernel.xz
|
||||
APPEND vga=ask
|
||||
INITRD rootfs.xz
|
||||
|
||||
LABEL mll_nomodeset
|
||||
LINUX kernel.xz
|
||||
APPEND vga=ask nomodeset
|
||||
INITRD rootfs.xz
|
||||
CEOF
|
||||
|
||||
# Create UEFI start script.
|
||||
mkdir -p efi/boot
|
||||
|
@ -25,9 +25,9 @@ cp $SRC_DIR/90_src.sh $DEST_DIR/etc/autorun
|
||||
|
||||
cd $DEST_DIR/usr/src
|
||||
|
||||
# Delete the '.gitignore' files which we use in order to keep track of otherwise
|
||||
# Delete the '.keep' files which we use in order to keep track of otherwise
|
||||
# empty folders.
|
||||
find * -type f -name '.gitignore' -exec rm {} +
|
||||
find * -type f -name '.keep' -exec rm {} +
|
||||
|
||||
# With '--remove-destination' all possibly existing soft links in
|
||||
# '$OVERLAY_ROOTFS' will be overwritten correctly.
|
||||
|
@ -13,7 +13,6 @@ export BUNDLE_NAME=`basename $SRC_DIR`
|
||||
export DEST_DIR=$WORK_DIR/overlay/$BUNDLE_NAME/${BUNDLE_NAME}_installed
|
||||
export CONFIG=$MAIN_SRC_DIR/.config
|
||||
export SYSROOT=$WORK_DIR/sysroot
|
||||
#export SYSROOT_SPECS=$WORK_DIR/sysroot.specs
|
||||
|
||||
# This function reads property from the main '.config' file.
|
||||
# If there is local '.config' file in the current directory
|
||||
@ -64,16 +63,3 @@ export NUM_JOBS=$((NUM_CORES * JOB_FACTOR))
|
||||
|
||||
# Ideally we would export MAKE at this point with -j etc to allow programs to just run $(MAKE) and not worry about extra flags that need to be passed
|
||||
# export MAKE="${MAKE-make} -j $NUM_JOBS"
|
||||
|
||||
# sysroot flags for the compiler
|
||||
|
||||
#-Wl,-nostdlib is required to make ld / gcc ignore the host's /usr/lib and /lib
|
||||
#ld_flags="-Wl,-nostdlib $(grep -- \"-L\" $SYSROOT_SPECS)"
|
||||
#-static-libgcc is neeeded since we don't have the gcc-libs in our sysroot
|
||||
#gcc_flags="-specs=$SYSROOT_SPECS -static-libgcc"
|
||||
|
||||
# $ld_flags is passed 2 times because sometimes bundles ignore one of the variables
|
||||
#export CC="${CC-gcc} $gcc_flags $ld_flags"
|
||||
#export CFLAGS="$CFLAGS"
|
||||
#export LDFLAGS="$LDFLAGS $ld_flags"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user