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