Make sure we always return to the source folder.
This commit is contained in:
parent
25568226f8
commit
fcb0eeb3d4
@ -35,5 +35,5 @@ mkdir ../work/kernel
|
||||
# Full path will be something like 'work/kernel/linux-4.4.6'.
|
||||
tar -xvf $ARCHIVE_FILE -C ../work/kernel
|
||||
|
||||
cd ..
|
||||
cd $SRC_DIR
|
||||
|
||||
|
@ -54,5 +54,5 @@ make \
|
||||
echo "Generating kernel headers..."
|
||||
make headers_install
|
||||
|
||||
cd ../../..
|
||||
cd $SRC_DIR
|
||||
|
||||
|
@ -35,5 +35,5 @@ mkdir ../work/glibc
|
||||
# Full path will be something like 'work/glibc/glibc-2.23'.
|
||||
tar -xvf $ARCHIVE_FILE -C ../work/glibc
|
||||
|
||||
cd ..
|
||||
cd $SRC_DIR
|
||||
|
||||
|
@ -1,10 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
SRC_DIR=$(pwd)
|
||||
|
||||
# Find the kernel build directory.
|
||||
cd work/kernel
|
||||
cd $(ls -d linux-*)
|
||||
WORK_KERNEL_DIR=$(pwd)
|
||||
cd ../../..
|
||||
cd $SRC_DIR
|
||||
|
||||
cd work/glibc
|
||||
|
||||
@ -52,5 +54,5 @@ make install \
|
||||
DESTDIR=$GLIBC_INSTALLED \
|
||||
-j $(grep ^processor /proc/cpuinfo | wc -l)
|
||||
|
||||
cd ../../..
|
||||
cd $SRC_DIR
|
||||
|
||||
|
@ -1,14 +1,16 @@
|
||||
#!/bin/sh
|
||||
|
||||
SRC_DIR=$(pwd)
|
||||
|
||||
# Find the kernel build directory.
|
||||
cd work/kernel
|
||||
cd $(ls -d *)
|
||||
WORK_KERNEL_DIR=$(pwd)
|
||||
cd ../../..
|
||||
cd $SRC_DIR
|
||||
|
||||
cd work/glibc
|
||||
|
||||
echo "Preparing glibc..."
|
||||
echo "Preparing glibc. This may take a while..."
|
||||
|
||||
rm -rf glibc_prepared
|
||||
cp -r glibc_installed glibc_prepared
|
||||
@ -46,5 +48,5 @@ ln -s $WORK_KERNEL_DIR/usr/include/asm asm
|
||||
ln -s $WORK_KERNEL_DIR/usr/include/asm-generic asm-generic
|
||||
ln -s $WORK_KERNEL_DIR/usr/include/mtd mtd
|
||||
|
||||
cd ../../../..
|
||||
cd $SRC_DIR
|
||||
|
||||
|
@ -35,5 +35,5 @@ mkdir ../work/busybox
|
||||
# Full path will be something like 'work/busybox/busybox-1.24.2'.
|
||||
tar -xvf $ARCHIVE_FILE -C ../work/busybox
|
||||
|
||||
cd ..
|
||||
cd $SRC_DIR
|
||||
|
||||
|
@ -59,5 +59,5 @@ make \
|
||||
CONFIG_PREFIX="../busybox_installed" \
|
||||
install
|
||||
|
||||
cd ../../..
|
||||
cd $SRC_DIR
|
||||
|
||||
|
@ -36,10 +36,10 @@ else
|
||||
echo "Source files and folders have been skipped."
|
||||
fi
|
||||
|
||||
# This is for the dynamic loader. Note that the file name and the the location
|
||||
# are both specific for 32-bit and 64-bit machines. First we check the BusyBox
|
||||
# executable and then we copy the loader to its appropriate location.
|
||||
BUSYBOX_ARCH=$(file bin/busybox | cut -d\ -f3)
|
||||
# This is for the dynamic loader. Note that the name and the location are both
|
||||
# specific for 32-bit and 64-bit machines. First we check the BusyBox executable
|
||||
# and then we copy the dynamic loader to its appropriate location.
|
||||
BUSYBOX_ARCH=$(file bin/busybox | cut -d' ' -f3)
|
||||
if [ "$BUSYBOX_ARCH" = "64-bit" ] ; then
|
||||
mkdir lib64
|
||||
cp $GLIBC_PREPARED/lib/ld-linux* lib64
|
||||
|
@ -1,5 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
SRC_DIR=$(pwd)
|
||||
|
||||
cd work
|
||||
|
||||
# Remove the old 'initramfs' archive if it exists.
|
||||
@ -11,5 +13,5 @@ cd rootfs
|
||||
echo "Packing initramfs..."
|
||||
find . | cpio -R root:root -H newc -o | xz --check=none > ../rootfs.cpio.xz
|
||||
|
||||
cd ../..
|
||||
cd cd $SRC_DIR
|
||||
|
||||
|
@ -35,5 +35,5 @@ mkdir ../work/syslinux
|
||||
# Full path will be something like 'work/syslinux/syslinux-6.03'.
|
||||
tar -xvf $ARCHIVE_FILE -C ../work/syslinux
|
||||
|
||||
cd ..
|
||||
cd $SRC_DIR
|
||||
|
||||
|
@ -6,13 +6,13 @@ SRC_DIR=$(pwd)
|
||||
cd work/kernel
|
||||
cd $(ls -d *)
|
||||
WORK_KERNEL_DIR=$(pwd)
|
||||
cd ../../..
|
||||
cd $SRC_DIR
|
||||
|
||||
# Find the Syslinux build directory.
|
||||
cd work/syslinux
|
||||
cd $(ls -d *)
|
||||
WORK_SYSLINUX_DIR=$(pwd)
|
||||
cd ../../..
|
||||
cd $SRC_DIR
|
||||
|
||||
# Remove the old ISO file if it exists.
|
||||
rm -f minimal_linux_live.iso
|
||||
|
Loading…
x
Reference in New Issue
Block a user