Major structural changes.

- New overlay bundle which provides the MLL sources.
- The build process has been enhanced.
--- Sources are provided as part of the new overlay bundle.
--- The MLL scripts have been refactored to handle the above change.
--- The overlay dependency file has been renamed.
NOTE: at this point some overlay bundles may be broken due to the numerous changes that haven't been fully tested.
This commit is contained in:
Ivan Davidov 2017-11-29 03:55:56 +02:00
parent 1817a4fc95
commit 77f04c6c8a
105 changed files with 640 additions and 761 deletions

View File

@ -222,16 +222,6 @@ OVERLAY_TYPE=folder
# Live" with predefined sources. # Live" with predefined sources.
USE_LOCAL_SOURCE=false USE_LOCAL_SOURCE=false
# Copy "Minimal Linux Live" source files and folders in '/src' inside initramfs.
# The default value is 'true'. You can use any other value, no value, or comment
# the property in order to disable it.
COPY_SOURCE_ROOTFS=true
# Copy "Minimal Linux Live" source files and folders in '/src' on the ISO image.
# The default value is 'true'. You can use any other value, no value, or comment
# the property in order to disable it.
COPY_SOURCE_ISO=true
# This property defines one or more additional overlay software pieces which # This property defines one or more additional overlay software pieces which
# will be generated and placed in the 'work/src/minimal_overlay/rootfs' folder. # will be generated and placed in the 'work/src/minimal_overlay/rootfs' folder.
# These software pieces will be visible and fully usable after boot. By default # These software pieces will be visible and fully usable after boot. By default
@ -261,7 +251,8 @@ COPY_SOURCE_ISO=true
# lua - scripting language. # lua - scripting language.
# make - GNU make utility # make - GNU make utility
# mll_utils - set of executable utilities (mll-*). # mll_utils - set of executable utilities (mll-*).
# nano - simple command-line text editor with on-screen shortcuts.git # mll_source - MLL source code provided in directory '/usr/src'.
# nano - simple command-line text editor with on-screen shortcuts.git
# ncurses - "GUI-like" API that runs within a terminal emulator. # ncurses - "GUI-like" API that runs within a terminal emulator.
# nweb - simple mini http server. # nweb - simple mini http server.
# openjdk - installs Open JDK. All operations are automated. # openjdk - installs Open JDK. All operations are automated.
@ -276,7 +267,12 @@ COPY_SOURCE_ISO=true
# The line below is sample which provides Open JDK, Apache Felix and Links. # The line below is sample which provides Open JDK, Apache Felix and Links.
# There is also DHCP/DNS functionality provided by the 'dhcp' overlay bundle. # There is also DHCP/DNS functionality provided by the 'dhcp' overlay bundle.
# #
#OVERLAY_BUNDLES=glibc_full,dhcp,felix,links,openjdk,zlib # OVERLAY_BUNDLES=glibc_full,dhcp,felix,links,openjdk
#
# The only default overlay bundle is 'mll_source'. It provides all MLL sources
# in the directory '/usr/src'. Note that these sources will not work there
# since MLL does not provide build tool chain.
OVERLAY_BUNDLES=mll_source
# This property enables the standard penguin boot logo in the upper left corner # This property enables the standard penguin boot logo in the upper left corner
# of the screen. The property is used in 'xx_build_kernel.sh'. The default value # of the screen. The property is used in 'xx_build_kernel.sh'. The default value

21
src/08_prepare_bundles.sh Executable file
View File

@ -0,0 +1,21 @@
#!/bin/sh
set -e
SRC_DIR=$(pwd)
echo "*** PREPARE OVERLAY BEGIN ***"
# Read the 'OVERLAY_BUNDLES' property from '.config'
OVERLAY_BUNDLES="$(grep -i ^OVERLAY_BUNDLES .config | cut -f2 -d'=')"
if [ ! "$OVERLAY_BUNDLES" = "" ] ; then
echo "Generating additional overlay bundles. This may take a while..."
cd minimal_overlay
./overlay_build.sh
cd $SRC_DIR
else
echo "Generation of additional overlay bundles has been skipped."
fi
echo "*** PREPARE OVERLAY END ***"

View File

@ -1,34 +0,0 @@
#!/bin/sh
set -e
echo "*** PREPARE SRC BEGIN ***"
SRC_DIR=$(pwd)
cd work
echo "Preparing source files and folders. This may take a while..."
# Remove old sources (if they exist)
rm -rf src
mkdir src
# Copy all source files and folders to 'work/src'.
cp ../*.sh src
cp ../.config src
cp ../README src
cp ../*.txt src
cp -r ../minimal_rootfs src
cp -r ../minimal_overlay src
cp -r ../minimal_config src
# Delete the '.gitignore' files which we use in order to keep track of otherwise
# empty folders.
find * -type f -name '.gitignore' -exec rm {} +
echo "Source files and folders have been prepared."
cd $SRC_DIR
echo "*** PREPARE SRC END ***"

View File

@ -20,25 +20,17 @@ rm -rf rootfs
cp -r $BUSYBOX_INSTALLED rootfs cp -r $BUSYBOX_INSTALLED rootfs
# Copy all rootfs resources to the location of our 'initramfs' folder. # Copy all rootfs resources to the location of our 'initramfs' folder.
cp -r src/minimal_rootfs/* rootfs cp -r ../minimal_rootfs/* rootfs
cd rootfs cd rootfs
# Delete the '.gitignore' files which we use in order to keep track of otherwise
# empty folders.
find * -type f -name '.gitignore' -exec rm {} +
# Remove 'linuxrc' which is used when we boot in 'RAM disk' mode. # Remove 'linuxrc' which is used when we boot in 'RAM disk' mode.
rm -f linuxrc rm -f linuxrc
# Read the 'COPY_SOURCE_ROOTFS' property from '.config'
COPY_SOURCE_ROOTFS="$(grep -i ^COPY_SOURCE_ROOTFS $SRC_ROOT/.config | cut -f2 -d'=')"
if [ "$COPY_SOURCE_ROOTFS" = "true" ] ; then
# Copy all prepared source files and folders to '/src'. Note that the scripts
# will not work there because you also need proper toolchain.
cp -r ../src src
echo "Source files and folders have been copied to '/src'."
else
echo "Source files and folders have been skipped."
fi
# This is for the dynamic loader. Note that the name and the location are both # 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 # 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. # and then we copy the dynamic loader to its appropriate location.
@ -72,4 +64,3 @@ echo "The initramfs area has been generated."
cd $SRC_ROOT cd $SRC_ROOT
echo "*** GENERATE ROOTFS END ***" echo "*** GENERATE ROOTFS END ***"

View File

@ -5,11 +5,9 @@ set -e
# TODO - this shell script file needs serios refactoring since right now it does # TODO - this shell script file needs serios refactoring since right now it does
# too many things: # too many things:
# #
# 1) Deal with 'src' copy. # 1) Create proper overlay structure.
# 2) Generate the 'overlay' software bundles. # 2) Prepare the actual ISO structure.
# 3) Create proper overlay structure. # 3) Generate the actual ISO image.
# 4) Prepare the actual ISO structure.
# 5) Generate the actual ISO image.
# #
# Probably it's best to create separate shell scripts for each functionality. # Probably it's best to create separate shell scripts for each functionality.
@ -41,27 +39,6 @@ echo "Prepared new ISO image work area."
# Read the 'COPY_SOURCE_ISO' property from '.config' # Read the 'COPY_SOURCE_ISO' property from '.config'
COPY_SOURCE_ISO="$(grep -i ^COPY_SOURCE_ISO .config | cut -f2 -d'=')" COPY_SOURCE_ISO="$(grep -i ^COPY_SOURCE_ISO .config | cut -f2 -d'=')"
if [ "$COPY_SOURCE_ISO" = "true" ] ; then
# Copy all prepared source files and folders to '/src'. Note that the scripts
# will not work there because you also need proper toolchain.
cp -r work/src work/isoimage
echo "Source files and folders have been copied to '/src'."
else
echo "Source files and folders have been skipped."
fi
# Read the 'OVERLAY_BUNDLES' property from '.config'
OVERLAY_BUNDLES="$(grep -i ^OVERLAY_BUNDLES .config | cut -f2 -d'=')"
if [ ! "$OVERLAY_BUNDLES" = "" ] ; then
echo "Generating additional overlay bundles. This may take a while..."
cd minimal_overlay
./overlay_build.sh
cd $SRC_DIR
else
echo "Generation of additional overlay bundles has been skipped."
fi
cd work/isoimage cd work/isoimage
# Now we copy the kernel. # Now we copy the kernel.
@ -106,7 +83,8 @@ if [ "$OVERLAY_TYPE" = "sparse" -a "$(id -u)" = "0" ] ; then
mkdir -p sparse/work mkdir -p sparse/work
# Copy the overlay content. # Copy the overlay content.
cp -r $SRC_DIR/work/src/minimal_overlay/rootfs/* sparse/rootfs/ cp -r $SRC_DIR/overlay_rootfs/* sparse/rootfs/
cp -r $SRC_DIR/minimal_overlay/rootfs/* sparse/rootfs/
# Unmount the sparse file and delete the temporary folder. # Unmount the sparse file and delete the temporary folder.
$BUSYBOX umount sparse $BUSYBOX umount sparse
@ -120,11 +98,13 @@ elif [ "$OVERLAY_TYPE" = "folder" ] ; then
echo "Using folder structure for overlay." echo "Using folder structure for overlay."
# Create the overlay folders.
mkdir -p minimal/rootfs mkdir -p minimal/rootfs
mkdir -p minimal/work mkdir -p minimal/work
cp -rf $SRC_DIR/work/src/minimal_overlay/rootfs/* \ # Copy the overlay content.
minimal/rootfs/ cp -rf $SRC_DIR/work/overlay_rootfs/* minimal/rootfs/
cp -r $SRC_DIR/minimal_overlay/rootfs/* minimal/rootfs/
else else
echo "Generating ISO image with no overlay structure..." echo "Generating ISO image with no overlay structure..."
fi fi
@ -148,7 +128,7 @@ CEOF
# Now we generate the ISO image file. # Now we generate the ISO image file.
xorriso \ xorriso \
-as mkisofs \ -as mkisofs \
-J \ -R \
-r \ -r \
-o ../minimal_linux_live.iso \ -o ../minimal_linux_live.iso \
-b isolinux.bin \ -b isolinux.bin \
@ -183,4 +163,3 @@ cat << CEOF
CEOF CEOF
echo "*** GENERATE ISO END ***" echo "*** GENERATE ISO END ***"

View File

@ -36,10 +36,9 @@ qemu:
src: src:
@echo "Generating source archive..." @echo "Generating source archive..."
@rm -f minimal_linux_live_*_src.tar.xz @rm -f minimal_linux_live_*_src.tar.xz
@mkdir -p work @cd minimal_overlay && ./overlay_build.sh mll_source 1>/dev/null && cd ..
@./08_prepare_src.sh 1>/dev/null
@$(eval DATE_PARSED := $(shell LANG=en_US ; date +"%d-%b-%Y")) @$(eval DATE_PARSED := $(shell LANG=en_US ; date +"%d-%b-%Y"))
@cd work/src && tar -cpf - `ls -A` | xz - > ../../minimal_linux_live_$(DATE_PARSED)_src.tar.xz && cd ../.. @cd work/overlay_rootfs/usr/src && tar -cpf - `ls -A` | xz - > ../../../../minimal_linux_live_$(DATE_PARSED)_src.tar.xz && cd ../../../..
@echo "Source archive: minimal_linux_live_$(DATE_PARSED)_src.tar.xz" @echo "Source archive: minimal_linux_live_$(DATE_PARSED)_src.tar.xz"
help: help:

View File

@ -58,7 +58,7 @@ Currently available overlay bundles:
to the "JAVA_ARCHIVE" property in the ".config" file for more to the "JAVA_ARCHIVE" property in the ".config" file for more
detailed information. detailed information.
This overlay bundle requires GLIBC. JDK 9 requires ZLIB. This overlay bundle requires GLIBC. JDK 9 requires ZLIB.
* kbd - Keyboard utilities and keymaps, you can for example load * kbd - Keyboard utilities and keymaps, you can for example load
a german keyboard layout: a german keyboard layout:
@ -90,6 +90,9 @@ Currently available overlay bundles:
This overlay bundle is currently experimental and its build This overlay bundle is currently experimental and its build
process depends on the host machine. process depends on the host machine.
* MLL Source - This overlay bundle provides all MLL source code in the
directory 'usr/src'.
* nano - Simple command-line text editor with on-screen shortcuts. * nano - Simple command-line text editor with on-screen shortcuts.
This overlay bundle requires ncurses. This overlay bundle requires ncurses.

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
@ -29,11 +29,10 @@ fi
# Delete folder with previously prepared cloud foundry cli. # Delete folder with previously prepared cloud foundry cli.
echo "Removing cloud foundry cli work area. This may take a while..." echo "Removing cloud foundry cli work area. This may take a while..."
rm -rf $WORK_DIR/overlay/clofo rm -rf $WORK_DIR/overlay/$BUNDLE_NAME
mkdir $WORK_DIR/overlay/clofo mkdir $WORK_DIR/overlay/$BUNDLE_NAME
# Copy cf-cli.tgz to folder 'work/overlay/clofo'. # Copy cf-cli.tgz to folder 'work/overlay/cf_cli'.
cp cf-cli.tgz $WORK_DIR/overlay/clofo cp cf-cli.tgz $WORK_DIR/overlay/$BUNDLE_NAME
cd $SRC_DIR cd $SRC_DIR

View File

@ -1,15 +1,15 @@
#!/bin/sh #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
echo "Removing old cloud foundry artifacts. This may take a while..." echo "Removing old cloud foundry artifacts. This may take a while..."
rm -rf $WORK_DIR/overlay/clofo/clofo_installed rm -rf $DEST_DIR
mkdir -p $WORK_DIR/overlay/clofo/clofo_installed/opt/clofo mkdir -p $DEST_DIR/opt/$BUNDLE_NAME
mkdir -p $WORK_DIR/overlay/clofo/clofo_installed/bin mkdir -p $DEST_DIR/bin
cd $WORK_DIR/overlay/clofo cd $WORK_DIR/overlay/$BUNDLE_NAME
cp $MAIN_SRC_DIR/source/overlay/cf-cli.tgz . cp $MAIN_SRC_DIR/source/overlay/cf-cli.tgz .
@ -17,15 +17,14 @@ tar -xvf cf-cli.tgz
rm -f LICENSE NOTICE cf-cli.tgz rm -f LICENSE NOTICE cf-cli.tgz
chmod +rx cf chmod +rx cf
cp cf $WORK_DIR/overlay/clofo/clofo_installed/opt/clofo/cf cp cf $DEST_DIR/opt/$BUNDLE_NAME/cf
cd $WORK_DIR/overlay/clofo/clofo_installed cd $DEST_DIR
ln -s ../opt/clofo/cf bin/cf ln -s ../opt/$BUNDLE_NAME/cf bin/cf
cp -r $WORK_DIR/overlay/clofo/clofo_installed/* $WORK_DIR/src/minimal_overlay/rootfs cp -r $DEST_DIR/* $OVERLAY_ROOTFS
echo "cloud foundry cli has been installed." echo "Cloud Foundry CLI has been installed."
cd $SRC_DIR cd $SRC_DIR

View File

@ -1,9 +1,10 @@
#!/bin/sh #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh
./01_get.sh ./01_get.sh
./02_install.sh ./02_install.sh
cd $SRC_DIR cd $SRC_DIR

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
@ -30,12 +30,11 @@ fi
# Delete folder with previously extracted coreutils. # Delete folder with previously extracted coreutils.
echo "Removing coreutils work area. This may take a while..." echo "Removing coreutils work area. This may take a while..."
rm -rf $WORK_DIR/overlay/coreutils rm -rf $WORK_DIR/overlay/$BUNDLE_NAME
mkdir $WORK_DIR/overlay/coreutils mkdir $WORK_DIR/overlay/$BUNDLE_NAME
# Extract coreutils to folder 'work/overlay/coreutils'. # Extract coreutils to folder 'work/overlay/coreutils'.
# Full path will be something like 'work/overlay/coreutils/coreutils-8.28'. # Full path will be something like 'work/overlay/coreutils/coreutils-8.28'.
tar -xvf $ARCHIVE_FILE -C $WORK_DIR/overlay/coreutils tar -xvf $ARCHIVE_FILE -C $WORK_DIR/overlay/$BUNDLE_NAME
cd $SRC_DIR cd $SRC_DIR

View File

@ -1,12 +1,10 @@
#!/bin/bash #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
cd $WORK_DIR/overlay/coreutils cd $WORK_DIR/overlay/$BUNDLE_NAME
DESTDIR="$PWD/coreutils_installed"
# Change to the coreutils source directory which ls finds, e.g. 'coreutils-8.28'. # Change to the coreutils source directory which ls finds, e.g. 'coreutils-8.28'.
cd $(ls -d coreutils-*) cd $(ls -d coreutils-*)
@ -14,7 +12,7 @@ cd $(ls -d coreutils-*)
echo "Preparing coreutils work area. This may take a while..." echo "Preparing coreutils work area. This may take a while..."
make -j $NUM_JOBS clean make -j $NUM_JOBS clean
rm -rf $DESTDIR rm -rf $DEST_DIR
echo "Configuring coreutils..." echo "Configuring coreutils..."
CFLAGS="$CFLAGS" ./configure \ CFLAGS="$CFLAGS" ./configure \
@ -24,14 +22,12 @@ echo "Building coreutils..."
make -j $NUM_JOBS make -j $NUM_JOBS
echo "Installing coreutils..." echo "Installing coreutils..."
make -j $NUM_JOBS install DESTDIR=$DESTDIR make -j $NUM_JOBS install DESTDIR=$DEST_DIR
echo "Reducing coreutils size..." echo "Reducing coreutils size..."
strip -g $DESTDIR/usr/bin/* strip -g $DEST_DIR/usr/bin/*
ROOTFS="$WORK_DIR/src/minimal_overlay/rootfs" cp -r $DEST_DIR/* $OVERLAY_ROOTFS
cp -r $DESTDIR/* $ROOTFS
echo "coreutils has been installed." echo "coreutils has been installed."

View File

@ -1,6 +1,8 @@
#!/bin/bash #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh
./01_get.sh ./01_get.sh
./02_build.sh ./02_build.sh

View File

@ -1,23 +1,20 @@
#!/bin/sh #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
echo "removing previous work area" echo "Removing previous work area."
rm -rf $WORK_DIR/overlay/dhcp rm -rf $WORK_DIR/overlay/$BUNDLE_NAME
mkdir -p $WORK_DIR/overlay/dhcp mkdir -p $WORK_DIR/overlay/$BUNDLE_NAME
cd $WORK_DIR/overlay/dhcp cd $WORK_DIR/overlay/$BUNDLE_NAME
DESTDIR="$MAIN_SRC_DIR/work/src/minimal_overlay/rootfs" install -d -m755 "$OVERLAY_ROOTFS/etc"
mkdir -p "$DESTDIR" install -m644 "$SRC_DIR/hosts" "$OVERLAY_ROOTFS/etc/hosts"
install -m644 "$SRC_DIR/nsswitch.conf" "$OVERLAY_ROOTFS/etc/nsswitch.conf"
install -m644 "$SRC_DIR/resolv.conf" "$OVERLAY_ROOTFS/etc/resolv.conf"
install -d -m755 "$OVERLAY_ROOTFS/etc/autorun"
install -m755 "$SRC_DIR/01_network.sh" "$OVERLAY_ROOTFS/etc/autorun/01_network.sh"
install -m755 "$SRC_DIR/05_rc.dhcp" "$OVERLAY_ROOTFS/etc/05_rc.dhcp"
install -d -m755 "$DESTDIR/etc" echo "DHCP scripts and libraries have been installed."
install -m644 "$SRC_DIR/hosts" "$DESTDIR/etc/hosts"
install -m644 "$SRC_DIR/nsswitch.conf" "$DESTDIR/etc/nsswitch.conf"
install -m644 "$SRC_DIR/resolv.conf" "$DESTDIR/etc/resolv.conf"
install -d -m755 "$DESTDIR/etc/autorun"
install -m755 "$SRC_DIR/01_network.sh" "$DESTDIR/etc/autorun/01_network.sh"
install -m755 "$SRC_DIR/05_rc.dhcp" "$DESTDIR/etc/05_rc.dhcp"
echo "dhcp scripts and libraries have been installed"

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
@ -30,11 +30,11 @@ fi
# Delete folder with previously extracted dialog. # Delete folder with previously extracted dialog.
echo "Removing dialog work area. This may take a while..." echo "Removing dialog work area. This may take a while..."
rm -rf $WORK_DIR/overlay/dialog rm -rf $WORK_DIR/overlay/$BUNDLE_NAME
mkdir $WORK_DIR/overlay/dialog mkdir $WORK_DIR/overlay/$BUNDLE_NAME
# Extract dialog to folder 'work/overlay/dialog'. # Extract dialog to folder 'work/overlay/dialog'.
# Full path will be something like 'work/overlay/dialog/dialog-1.3-20170509'. # Full path will be something like 'work/overlay/dialog/dialog-1.3-20170509'.
tar -xvf $ARCHIVE_FILE -C $WORK_DIR/overlay/dialog tar -xvf $ARCHIVE_FILE -C $WORK_DIR/overlay/$BUNDLE_NAME
cd $SRC_DIR cd $SRC_DIR

View File

@ -1,12 +1,10 @@
#!/bin/bash #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
cd $WORK_DIR/overlay/dialog cd $WORK_DIR/overlay/$BUNDLE_NAME
DESTDIR="$PWD/dialog_installed"
# Change to the dialog source directory which ls finds, e.g. 'dialog-1.3-20170509'. # Change to the dialog source directory which ls finds, e.g. 'dialog-1.3-20170509'.
cd $(ls -d dialog-*) cd $(ls -d dialog-*)
@ -14,7 +12,7 @@ cd $(ls -d dialog-*)
echo "Preparing dialog work area. This may take a while..." echo "Preparing dialog work area. This may take a while..."
make -j $NUM_JOBS clean make -j $NUM_JOBS clean
rm -rf $DESTDIR rm -rf $DEST_DIR
# Configure dialog # Configure dialog
echo "Configuring dialog..." echo "Configuring dialog..."
@ -25,16 +23,13 @@ echo "Building dialog..."
make -j $NUM_JOBS make -j $NUM_JOBS
echo "Installing dialog..." echo "Installing dialog..."
make -j $NUM_JOBS install DESTDIR=$DESTDIR make -j $NUM_JOBS install DESTDIR=$DEST_DIR
echo "Reducing dialog size..." echo "Reducing dialog size..."
strip -g $DESTDIR/usr/bin/* strip -g $DEST_DIR/usr/bin/*
ROOTFS="$WORK_DIR/src/minimal_overlay/rootfs" cp -r $DEST_DIR/usr/* $OVERLAY_ROOTFS
cp -r $DESTDIR/usr/* $ROOTFS echo "Bundle 'dialog' has been installed."
echo "dialog has been installed."
cd $SRC_DIR cd $SRC_DIR

View File

@ -1,9 +1,10 @@
#!/bin/sh #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh
./01_get.sh ./01_get.sh
./02_build.sh ./02_build.sh
cd $SRC_DIR cd $SRC_DIR

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
@ -30,12 +30,11 @@ fi
# Delete folder with previously extracted Dropbear. # Delete folder with previously extracted Dropbear.
echo "Removing Dropbear work area. This may take a while..." echo "Removing Dropbear work area. This may take a while..."
rm -rf $WORK_DIR/overlay/dropbear rm -rf $WORK_DIR/overlay/$BUNDLE_NAME
mkdir $WORK_DIR/overlay/dropbear mkdir $WORK_DIR/overlay/$BUNDLE_NAME
# Extract Dropbear to folder 'work/overlay/dropbear'. # Extract Dropbear to folder 'work/overlay/dropbear'.
# Full path will be something like 'work/overlay/dropbear/dropbear-2016.73'. # Full path will be something like 'work/overlay/dropbear/dropbear-2016.73'.
tar -xvf $ARCHIVE_FILE -C $WORK_DIR/overlay/dropbear tar -xvf $ARCHIVE_FILE -C $WORK_DIR/overlay/$BUNDLE_NAME
cd $SRC_DIR cd $SRC_DIR

View File

@ -1,19 +1,17 @@
#!/bin/sh #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
cd $WORK_DIR/overlay/dropbear cd $WORK_DIR/overlay/$BUNDLE_NAME
DESTDIR="$PWD/dropbear_installed"
# Change to the Dropbear source directory which ls finds, e.g. 'dropbear-2016.73'. # Change to the Dropbear source directory which ls finds, e.g. 'dropbear-2016.73'.
cd $(ls -d dropbear-*) cd $(ls -d dropbear-*)
echo "Preparing Dropbear work area. This may take a while..." echo "Preparing Dropbear work area. This may take a while..."
make -j $NUM_JOBS clean make -j $NUM_JOBS clean
rm -rf $DESTDIR rm -rf $DEST_DIR
echo "Configuring Dropbear..." echo "Configuring Dropbear..."
./configure \ ./configure \
@ -26,53 +24,50 @@ echo "Building Dropbear..."
make -j $NUM_JOBS make -j $NUM_JOBS
echo "Installing Dropbear..." echo "Installing Dropbear..."
make -j $NUM_JOBS install DESTDIR="$DESTDIR" make -j $NUM_JOBS install DESTDIR="$DEST_DIR"
mkdir -p $DESTDIR/etc/dropbear mkdir -p $DEST_DIR/etc/dropbear
# Create Dropbear SSH configuration BEGIN # Create Dropbear SSH configuration BEGIN
for key_type in rsa dss ecdsa; do for key_type in rsa dss ecdsa; do
echo "generating $key_type host key" echo "generating $key_type host key"
$DESTDIR/usr/bin/dropbearkey \ $DEST_DIR/usr/bin/dropbearkey \
-t $key_type \ -t $key_type \
-f $DESTDIR/etc/dropbear/dropbear_${key_type}_host_key -f $DEST_DIR/etc/dropbear/dropbear_${key_type}_host_key
done done
# Create user/group configuration files. # Create user/group configuration files.
touch $DESTDIR/etc/passwd touch $DEST_DIR/etc/passwd
touch $DESTDIR/etc/group touch $DEST_DIR/etc/group
# Add group 0 for root. # Add group 0 for root.
echo "root:x:0:" \ echo "root:x:0:" \
> $DESTDIR/etc/group > $DEST_DIR/etc/group
# Add user root with password 'toor'. # Add user root with password 'toor'.
echo "root:AprZpdBUhZXss:0:0:Minimal Root,,,:/root:/bin/sh" \ echo "root:AprZpdBUhZXss:0:0:Minimal Root,,,:/root:/bin/sh" \
> $DESTDIR/etc/passwd > $DEST_DIR/etc/passwd
# Create home folder for root user. # Create home folder for root user.
mkdir -p $DESTDIR/root mkdir -p $DEST_DIR/root
# Create Dropbear SSH configuration END # Create Dropbear SSH configuration END
echo "Reducing Dropbear size..." echo "Reducing Dropbear size..."
strip -g \ strip -g \
$DESTDIR/usr/bin/* \ $DEST_DIR/usr/bin/* \
$DESTDIR/usr/sbin/* \ $DEST_DIR/usr/sbin/* \
$DESTDIR/lib/* $DEST_DIR/lib/*
ROOTFS=$WORK_DIR/src/minimal_overlay/rootfs mkdir -p $OVERLAY_ROOTFS/usr
cp -r $DEST_DIR/etc $OVERLAY_ROOTFS
mkdir -p $ROOTFS/usr cp -r $DEST_DIR/usr/bin $OVERLAY_ROOTFS/usr
cp -r $DESTDIR/etc $ROOTFS cp -r $DEST_DIR/usr/sbin $OVERLAY_ROOTFS/usr
cp -r $DESTDIR/usr/bin $ROOTFS/usr cp -r $DEST_DIR/lib $OVERLAY_ROOTFS
cp -r $DESTDIR/usr/sbin $ROOTFS/usr mkdir -p "$OVERLAY_ROOTFS/etc/autorun"
cp -r $DESTDIR/lib $ROOTFS install -m 0755 "$SRC_DIR/20_dropbear.sh" "$OVERLAY_ROOTFS/etc/autorun/"
mkdir -p "$ROOTFS/etc/autorun"
install -m 0755 "$SRC_DIR/20_dropbear.sh" "$ROOTFS/etc/autorun/"
echo "Dropbear has been installed." echo "Dropbear has been installed."
cd $SRC_DIR cd $SRC_DIR

View File

@ -1,9 +1,10 @@
#!/bin/sh #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh
./01_get.sh ./01_get.sh
./02_build.sh ./02_build.sh
cd $SRC_DIR cd $SRC_DIR

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
@ -30,12 +30,11 @@ fi
# Delete folder with previously extracted Felix. # Delete folder with previously extracted Felix.
echo "Removing Apache Felix work area. This may take a while..." echo "Removing Apache Felix work area. This may take a while..."
rm -rf $WORK_DIR/overlay/felix rm -rf $WORK_DIR/overlay/$BUNDLE_NAME
mkdir $WORK_DIR/overlay/felix mkdir $WORK_DIR/overlay/$BUNDLE_NAME
# Extract Felix to folder 'work/overlay/felix'. # Extract Felix to folder 'work/overlay/felix'.
# Full path will be something like 'work/overlay/felix/felix-framework-5.4.0'. # Full path will be something like 'work/overlay/felix/felix-framework-5.4.0'.
tar -xvf $ARCHIVE_FILE -C $WORK_DIR/overlay/felix tar -xvf $ARCHIVE_FILE -C $WORK_DIR/overlay/$BUNDLE_NAME
cd $SRC_DIR cd $SRC_DIR

View File

@ -1,13 +1,13 @@
#!/bin/sh #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
echo "Removing old Apache Felix artifacts. This may take a while..." echo "Removing old Apache Felix artifacts. This may take a while..."
rm -rf $WORK_DIR/overlay/felix/felix_installed rm -rf $DEST_DIR
mkdir -p $WORK_DIR/overlay/felix/felix_installed/opt/felix mkdir -p $DEST_DIR/opt/felix
mkdir -p $WORK_DIR/overlay/felix/felix_installed/bin mkdir -p $DEST_DIR/bin
cd $WORK_DIR/overlay/felix cd $WORK_DIR/overlay/felix
cd $(ls -d felix-*) cd $(ls -d felix-*)
@ -22,14 +22,13 @@ CEOF
chmod +rx bin/felix-start.sh chmod +rx bin/felix-start.sh
cp -r * $WORK_DIR/overlay/felix/felix_installed/opt/felix cp -r * $DEST_DIR/opt/felix
cd $WORK_DIR/overlay/felix/felix_installed cd $DEST_DIR
ln -s ../opt/felix/bin/felix-start.sh bin/felix-start ln -s ../opt/felix/bin/felix-start.sh bin/felix-start
cp -r $WORK_DIR/overlay/felix/felix_installed/* \ cp -r $DEST_DIR/* $OVERLAYFS_ROOT
$WORK_DIR/src/minimal_overlay/rootfs
echo "Apache Felix has been installed." echo "Apache Felix has been installed."

View File

@ -1,6 +1,8 @@
#!/bin/sh #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh
./01_get.sh ./01_get.sh
./02_install.sh ./02_install.sh

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
@ -30,12 +30,11 @@ fi
# Delete folder with previously extracted fio. # Delete folder with previously extracted fio.
echo "Removing fio work area. This may take a while..." echo "Removing fio work area. This may take a while..."
rm -rf $WORK_DIR/overlay/fio rm -rf $WORK_DIR/overlay/$BUNDLE_NAME
mkdir $WORK_DIR/overlay/fio mkdir $WORK_DIR/overlay/$BUNDLE_NAME
# Extract fio to folder 'work/overlay/fio'. # Extract fio to folder 'work/overlay/fio'.
# Full path will be something like 'work/overlay/fio/fio-3.2'. # Full path will be something like 'work/overlay/fio/fio-3.2'.
tar -xvf $ARCHIVE_FILE -C $WORK_DIR/overlay/fio tar -xvf $ARCHIVE_FILE -C $WORK_DIR/overlay/$BUNDLE_NAME
cd $SRC_DIR cd $SRC_DIR

View File

@ -1,12 +1,10 @@
#!/bin/bash #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
cd $WORK_DIR/overlay/fio cd $WORK_DIR/overlay/$BUNDLE_NAME
DESTDIR="$PWD/fio_installed"
# Change to the fio source directory which ls finds, e.g. 'fio-3.2'. # Change to the fio source directory which ls finds, e.g. 'fio-3.2'.
cd $(ls -d fio-*) cd $(ls -d fio-*)
@ -14,7 +12,7 @@ cd $(ls -d fio-*)
echo "Preparing fio work area. This may take a while..." echo "Preparing fio work area. This may take a while..."
make -j $NUM_JOBS clean make -j $NUM_JOBS clean
rm -rf $DESTDIR rm -rf $DEST_DIR
echo "Configuring fio..." echo "Configuring fio..."
CFLAGS="$CFLAGS" ./configure \ CFLAGS="$CFLAGS" ./configure \
@ -24,14 +22,12 @@ echo "Building fio..."
make -j $NUM_JOBS make -j $NUM_JOBS
echo "Installing fio..." echo "Installing fio..."
make -j $NUM_JOBS install DESTDIR=$DESTDIR make -j $NUM_JOBS install DESTDIR=$DEST_DIR
echo "Reducing fio size..." echo "Reducing fio size..."
strip -g $DESTDIR/usr/bin/* strip -g $DEST_DIR/usr/bin/*
ROOTFS="$WORK_DIR/src/minimal_overlay/rootfs" cp -r $DEST_DIR/* $OVERLAY_ROOTFS
cp -r $DESTDIR/* $ROOTFS
echo "fio has been installed." echo "fio has been installed."

View File

@ -1,9 +1,10 @@
#!/bin/bash #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh
./01_get.sh ./01_get.sh
./02_build.sh ./02_build.sh
cd $SRC_DIR cd $SRC_DIR

View File

@ -1,2 +1,5 @@
#!/bin/sh #!/bin/sh
set -e
echo "All GNU C libraries have been installed." echo "All GNU C libraries have been installed."

View File

@ -1,3 +1,7 @@
#!/bin/sh #!/bin/sh
echo "$BUNDLE_NAME is provided by the initramfs" set -e
. ../../common.sh
echo "Bundle '$BUNDLE_NAME' is provided by the initramfs."

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
@ -12,20 +12,16 @@ fi
mkdir -p "$WORK_DIR/overlay/$BUNDLE_NAME" mkdir -p "$WORK_DIR/overlay/$BUNDLE_NAME"
cd $WORK_DIR/overlay/$BUNDLE_NAME cd $WORK_DIR/overlay/$BUNDLE_NAME
DESTDIR="$PWD/${BUNDLE_NAME}_installed" rm -rf $DEST_DIR
rm -rf $DESTDIR mkdir -p $DEST_DIR/lib
cp $SYSROOT/lib/libBrokenLocale.so.1 $DEST_DIR/lib/
mkdir -p $DESTDIR/lib ln -s libBrokenLocale.so.1 $DEST_DIR/lib/libBrokenLocale.so
cp $SYSROOT/lib/libBrokenLocale.so.1 $DESTDIR/lib/
ln -s libBrokenLocale.so.1 $DESTDIR/lib/libBrokenLocale.so
echo "Reducing $BUNDLE_NAME size" echo "Reducing $BUNDLE_NAME size"
strip -g $DESTDIR/lib/* strip -g $DEST_DIR/lib/*
ROOTFS="$WORK_DIR/src/minimal_overlay/rootfs" cp -r $DEST_DIR/* $OVERLAY_ROOTFS
cp -r $DESTDIR/* $ROOTFS
echo "$BUNDLE_NAME has been installed." echo "$BUNDLE_NAME has been installed."

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
@ -12,20 +12,16 @@ fi
mkdir -p "$WORK_DIR/overlay/$BUNDLE_NAME" mkdir -p "$WORK_DIR/overlay/$BUNDLE_NAME"
cd $WORK_DIR/overlay/$BUNDLE_NAME cd $WORK_DIR/overlay/$BUNDLE_NAME
DESTDIR="$PWD/${BUNDLE_NAME}_installed" rm -rf $DEST_DIR
rm -rf $DESTDIR mkdir -p $DEST_DIR/lib
cp $SYSROOT/lib/libanl.so.1 $DEST_DIR/lib/
ln -s libanl.so.1 $DEST_DIR/lib/libanl.so
mkdir -p $DESTDIR/lib echo "Reducing $BUNDLE_NAME size."
cp $SYSROOT/lib/libanl.so.1 $DESTDIR/lib/ strip -g $DEST_DIR/lib/*
ln -s libanl.so.1 $DESTDIR/lib/libanl.so
echo "Reducing $BUNDLE_NAME size" cp -r $DEST_DIR/* $OVERLAY_ROOTFS
strip -g $DESTDIR/lib/*
ROOTFS="$WORK_DIR/src/minimal_overlay/rootfs"
cp -r $DESTDIR/* $ROOTFS
echo "$BUNDLE_NAME has been installed." echo "$BUNDLE_NAME has been installed."

View File

@ -1,3 +1,7 @@
#!/bin/sh #!/bin/sh
echo "$BUNDLE_NAME is provided by the initramfs" set -e
. ../../common.sh
echo "Bundle '$BUNDLE_NAME' is provided by the initramfs."

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
@ -12,20 +12,16 @@ fi
mkdir -p "$WORK_DIR/overlay/$BUNDLE_NAME" mkdir -p "$WORK_DIR/overlay/$BUNDLE_NAME"
cd $WORK_DIR/overlay/$BUNDLE_NAME cd $WORK_DIR/overlay/$BUNDLE_NAME
DESTDIR="$PWD/${BUNDLE_NAME}_installed" rm -rf $DEST_DIR
rm -rf $DESTDIR mkdir -p $DEST_DIR/lib
cp $SYSROOT/lib/libcidn.so.1 $DEST_DIR/lib/
mkdir -p $DESTDIR/lib ln -s libcidn.so.1 $DEST_DIR/lib/libcidn.so
cp $SYSROOT/lib/libcidn.so.1 $DESTDIR/lib/
ln -s libcidn.so.1 $DESTDIR/lib/libcidn.so
echo "Reducing $BUNDLE_NAME size" echo "Reducing $BUNDLE_NAME size"
strip -g $DESTDIR/lib/* strip -g $DEST_DIR/lib/*
ROOTFS="$WORK_DIR/src/minimal_overlay/rootfs" cp -r $DEST_DIR/* $OVERLAY_ROOTFS
cp -r $DESTDIR/* $ROOTFS
echo "$BUNDLE_NAME has been installed." echo "$BUNDLE_NAME has been installed."

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
@ -12,20 +12,16 @@ fi
mkdir -p "$WORK_DIR/overlay/$BUNDLE_NAME" mkdir -p "$WORK_DIR/overlay/$BUNDLE_NAME"
cd $WORK_DIR/overlay/$BUNDLE_NAME cd $WORK_DIR/overlay/$BUNDLE_NAME
DESTDIR="$PWD/${BUNDLE_NAME}_installed" rm -rf $DEST_DIR
rm -rf $DESTDIR mkdir -p $DEST_DIR/lib
cp $SYSROOT/lib/libcrypt.so.1 $DEST_DIR/lib/
mkdir -p $DESTDIR/lib ln -s libcrypt.so.1 $DEST_DIR/lib/libcrypt.so
cp $SYSROOT/lib/libcrypt.so.1 $DESTDIR/lib/
ln -s libcrypt.so.1 $DESTDIR/lib/libcrypt.so
echo "Reducing $BUNDLE_NAME size" echo "Reducing $BUNDLE_NAME size"
strip -g $DESTDIR/lib/* strip -g $DEST_DIR/lib/*
ROOTFS="$WORK_DIR/src/minimal_overlay/rootfs" cp -r $DEST_DIR/* $OVERLAY_ROOTFS
cp -r $DESTDIR/* $ROOTFS
echo "$BUNDLE_NAME has been installed." echo "$BUNDLE_NAME has been installed."

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
@ -12,20 +12,16 @@ fi
mkdir -p "$WORK_DIR/overlay/$BUNDLE_NAME" mkdir -p "$WORK_DIR/overlay/$BUNDLE_NAME"
cd $WORK_DIR/overlay/$BUNDLE_NAME cd $WORK_DIR/overlay/$BUNDLE_NAME
DESTDIR="$PWD/${BUNDLE_NAME}_installed" rm -rf $DEST_DIR
rm -rf $DESTDIR mkdir -p $DEST_DIR/lib
cp $SYSROOT/lib/libdl.so.2 $DEST_DIR/lib/
mkdir -p $DESTDIR/lib ln -s libdl.so.2 $DEST_DIR/lib/libdl.so
cp $SYSROOT/lib/libdl.so.2 $DESTDIR/lib/
ln -s libdl.so.2 $DESTDIR/lib/libdl.so
echo "Reducing $BUNDLE_NAME size" echo "Reducing $BUNDLE_NAME size"
strip -g $DESTDIR/lib/* strip -g $DEST_DIR/lib/*
ROOTFS="$WORK_DIR/src/minimal_overlay/rootfs" cp -r $DEST_DIR/* $OVERLAY_ROOTFS
cp -r $DESTDIR/* $ROOTFS
echo "$BUNDLE_NAME has been installed." echo "$BUNDLE_NAME has been installed."

View File

@ -1,3 +1,7 @@
#!/bin/sh #!/bin/sh
echo "$BUNDLE_NAME is provided by the initramfs" set -e
. ../../common.sh
echo "Bundle '$BUNDLE_NAME' is provided by the initramfs."

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
@ -12,20 +12,16 @@ fi
mkdir -p "$WORK_DIR/overlay/$BUNDLE_NAME" mkdir -p "$WORK_DIR/overlay/$BUNDLE_NAME"
cd $WORK_DIR/overlay/$BUNDLE_NAME cd $WORK_DIR/overlay/$BUNDLE_NAME
DESTDIR="$PWD/${BUNDLE_NAME}_installed" rm -rf $DEST_DIR
rm -rf $DESTDIR mkdir -p $DEST_DIR/lib
cp $SYSROOT/lib/libnsl.so.1 $DEST_DIR/lib/
mkdir -p $DESTDIR/lib ln -s libnsl.so.1 $DEST_DIR/lib/libnsl.so
cp $SYSROOT/lib/libnsl.so.1 $DESTDIR/lib/
ln -s libnsl.so.1 $DESTDIR/lib/libnsl.so
echo "Reducing $BUNDLE_NAME size" echo "Reducing $BUNDLE_NAME size"
strip -g $DESTDIR/lib/* strip -g $DEST_DIR/lib/*
ROOTFS="$WORK_DIR/src/minimal_overlay/rootfs" cp -r $DEST_DIR/* $OVERLAY_ROOTFS
cp -r $DESTDIR/* $ROOTFS
echo "$BUNDLE_NAME has been installed." echo "$BUNDLE_NAME has been installed."

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
@ -12,20 +12,16 @@ fi
mkdir -p "$WORK_DIR/overlay/$BUNDLE_NAME" mkdir -p "$WORK_DIR/overlay/$BUNDLE_NAME"
cd $WORK_DIR/overlay/$BUNDLE_NAME cd $WORK_DIR/overlay/$BUNDLE_NAME
DESTDIR="$PWD/${BUNDLE_NAME}_installed" rm -rf $DEST_DIR
rm -rf $DESTDIR mkdir -p $DEST_DIR/lib
cp $SYSROOT/lib/libnss_db.so.2 $DEST_DIR/lib/
mkdir -p $DESTDIR/lib ln -s libnss_db.so.2 $DEST_DIR/lib/libnss_db.so
cp $SYSROOT/lib/libnss_db.so.2 $DESTDIR/lib/
ln -s libnss_db.so.2 $DESTDIR/lib/libnss_db.so
echo "Reducing $BUNDLE_NAME size" echo "Reducing $BUNDLE_NAME size"
strip -g $DESTDIR/lib/* strip -g $DEST_DIR/lib/*
ROOTFS="$WORK_DIR/src/minimal_overlay/rootfs" cp -r $DEST_DIR/* $OVERLAY_ROOTFS
cp -r $DESTDIR/* $ROOTFS
echo "$BUNDLE_NAME has been installed." echo "$BUNDLE_NAME has been installed."

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
@ -12,20 +12,16 @@ fi
mkdir -p "$WORK_DIR/overlay/$BUNDLE_NAME" mkdir -p "$WORK_DIR/overlay/$BUNDLE_NAME"
cd $WORK_DIR/overlay/$BUNDLE_NAME cd $WORK_DIR/overlay/$BUNDLE_NAME
DESTDIR="$PWD/${BUNDLE_NAME}_installed" rm -rf $DEST_DIR
rm -rf $DESTDIR mkdir -p $DEST_DIR/lib
cp $SYSROOT/lib/libnss_dns.so.2 $DEST_DIR/lib/
mkdir -p $DESTDIR/lib ln -s libnss_dns.so.2 $DEST_DIR/lib/libnss_dns.so
cp $SYSROOT/lib/libnss_dns.so.2 $DESTDIR/lib/
ln -s libnss_dns.so.2 $DESTDIR/lib/libnss_dns.so
echo "Reducing $BUNDLE_NAME size" echo "Reducing $BUNDLE_NAME size"
strip -g $DESTDIR/lib/* strip -g $DEST_DIR/lib/*
ROOTFS="$WORK_DIR/src/minimal_overlay/rootfs" cp -r $DEST_DIR/* $OVERLAY_ROOTFS
cp -r $DESTDIR/* $ROOTFS
echo "$BUNDLE_NAME has been installed." echo "$BUNDLE_NAME has been installed."

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
@ -12,20 +12,16 @@ fi
mkdir -p "$WORK_DIR/overlay/$BUNDLE_NAME" mkdir -p "$WORK_DIR/overlay/$BUNDLE_NAME"
cd $WORK_DIR/overlay/$BUNDLE_NAME cd $WORK_DIR/overlay/$BUNDLE_NAME
DESTDIR="$PWD/${BUNDLE_NAME}_installed" rm -rf $DEST_DIR
rm -rf $DESTDIR mkdir -p $DEST_DIR/lib
cp $SYSROOT/lib/libnss_files.so.2 $DEST_DIR/lib/
mkdir -p $DESTDIR/lib ln -s libnss_files.so.2 $DEST_DIR/lib/libnss_files.so
cp $SYSROOT/lib/libnss_files.so.2 $DESTDIR/lib/
ln -s libnss_files.so.2 $DESTDIR/lib/libnss_files.so
echo "Reducing $BUNDLE_NAME size" echo "Reducing $BUNDLE_NAME size"
strip -g $DESTDIR/lib/* strip -g $DEST_DIR/lib/*
ROOTFS="$WORK_DIR/src/minimal_overlay/rootfs" cp -r $DEST_DIR/* $OVERLAY_ROOTFS
cp -r $DESTDIR/* $ROOTFS
echo "$BUNDLE_NAME has been installed." echo "$BUNDLE_NAME has been installed."

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
@ -12,20 +12,16 @@ fi
mkdir -p "$WORK_DIR/overlay/$BUNDLE_NAME" mkdir -p "$WORK_DIR/overlay/$BUNDLE_NAME"
cd $WORK_DIR/overlay/$BUNDLE_NAME cd $WORK_DIR/overlay/$BUNDLE_NAME
DESTDIR="$PWD/${BUNDLE_NAME}_installed" rm -rf $DEST_DIR
rm -rf $DESTDIR mkdir -p $DEST_DIR/lib
cp $SYSROOT/lib/libnss_hesiod.so.2 $DEST_DIR/lib/
mkdir -p $DESTDIR/lib ln -s libnss_hesiod.so.2 $DEST_DIR/lib/libnss_hesiod.so
cp $SYSROOT/lib/libnss_hesiod.so.2 $DESTDIR/lib/
ln -s libnss_hesiod.so.2 $DESTDIR/lib/libnss_hesiod.so
echo "Reducing $BUNDLE_NAME size" echo "Reducing $BUNDLE_NAME size"
strip -g $DESTDIR/lib/* strip -g $DEST_DIR/lib/*
ROOTFS="$WORK_DIR/src/minimal_overlay/rootfs" cp -r $DEST_DIR/* $OVERLAY_ROOTFS
cp -r $DESTDIR/* $ROOTFS
echo "$BUNDLE_NAME has been installed." echo "$BUNDLE_NAME has been installed."

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
@ -12,19 +12,16 @@ fi
mkdir -p "$WORK_DIR/overlay/$BUNDLE_NAME" mkdir -p "$WORK_DIR/overlay/$BUNDLE_NAME"
cd $WORK_DIR/overlay/$BUNDLE_NAME cd $WORK_DIR/overlay/$BUNDLE_NAME
DESTDIR="$PWD/${BUNDLE_NAME}_installed" rm -rf $DEST_DIR
rm -rf $DESTDIR mkdir -p $DEST_DIR/lib
cp $SYSROOT/lib/libpthread.so.0 $DEST_DIR/lib/
mkdir -p $DESTDIR/lib ln -s libpthread.so.0 $DEST_DIR/lib/libpthread.so
cp $SYSROOT/lib/libpthread.so.0 $DESTDIR/lib/
echo "Reducing $BUNDLE_NAME size" echo "Reducing $BUNDLE_NAME size"
strip -g $DESTDIR/lib/* strip -g $DEST_DIR/lib/*
ROOTFS="$WORK_DIR/src/minimal_overlay/rootfs" cp -r $DEST_DIR/* $OVERLAY_ROOTFS
cp -r $DESTDIR/* $ROOTFS
echo "$BUNDLE_NAME has been installed." echo "$BUNDLE_NAME has been installed."

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
@ -12,20 +12,16 @@ fi
mkdir -p "$WORK_DIR/overlay/$BUNDLE_NAME" mkdir -p "$WORK_DIR/overlay/$BUNDLE_NAME"
cd $WORK_DIR/overlay/$BUNDLE_NAME cd $WORK_DIR/overlay/$BUNDLE_NAME
DESTDIR="$PWD/${BUNDLE_NAME}_installed" rm -rf $DEST_DIR
rm -rf $DESTDIR mkdir -p $DEST_DIR/lib
cp $SYSROOT/lib/libresolv.so.2 $DEST_DIR/lib/
mkdir -p $DESTDIR/lib ln -s libresolv.so.2 $DEST_DIR/lib/libresolv.so
cp $SYSROOT/lib/libresolv.so.2 $DESTDIR/lib/
ln -s libresolv.so.2 $DESTDIR/lib/libresolv.so
echo "Reducing $BUNDLE_NAME size" echo "Reducing $BUNDLE_NAME size"
strip -g $DESTDIR/lib/* strip -g $DEST_DIR/lib/*
ROOTFS="$WORK_DIR/src/minimal_overlay/rootfs" cp -r $DEST_DIR/* $OVERLAY_ROOTFS
cp -r $DESTDIR/* $ROOTFS
echo "$BUNDLE_NAME has been installed." echo "$BUNDLE_NAME has been installed."

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
@ -12,20 +12,16 @@ fi
mkdir -p "$WORK_DIR/overlay/$BUNDLE_NAME" mkdir -p "$WORK_DIR/overlay/$BUNDLE_NAME"
cd $WORK_DIR/overlay/$BUNDLE_NAME cd $WORK_DIR/overlay/$BUNDLE_NAME
DESTDIR="$PWD/${BUNDLE_NAME}_installed" rm -rf $DEST_DIR
rm -rf $DESTDIR mkdir -p $DEST_DIR/lib
cp $SYSROOT/lib/librt.so.1 $DEST_DIR/lib/
mkdir -p $DESTDIR/lib ln -s librt.so.1 $DEST_DIR/lib/librt.so
cp $SYSROOT/lib/librt.so.1 $DESTDIR/lib/
ln -s librt.so.1 $DESTDIR/lib/librt.so
echo "Reducing $BUNDLE_NAME size" echo "Reducing $BUNDLE_NAME size"
strip -g $DESTDIR/lib/* strip -g $DEST_DIR/lib/*
ROOTFS="$WORK_DIR/src/minimal_overlay/rootfs" cp -r $DEST_DIR/* $OVERLAY_ROOTFS
cp -r $DESTDIR/* $ROOTFS
echo "$BUNDLE_NAME has been installed." echo "$BUNDLE_NAME has been installed."

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
@ -12,20 +12,16 @@ fi
mkdir -p "$WORK_DIR/overlay/$BUNDLE_NAME" mkdir -p "$WORK_DIR/overlay/$BUNDLE_NAME"
cd $WORK_DIR/overlay/$BUNDLE_NAME cd $WORK_DIR/overlay/$BUNDLE_NAME
DESTDIR="$PWD/${BUNDLE_NAME}_installed" rm -rf $DEST_DIR
rm -rf $DESTDIR mkdir -p $DEST_DIR/lib
cp $SYSROOT/lib/libthread_db.so.1 $DEST_DIR/lib/
mkdir -p $DESTDIR/lib ln -s libthread_db.so.1 $DEST_DIR/lib/libthread_db.so
cp $SYSROOT/lib/libthread_db.so.1 $DESTDIR/lib/
ln -s libthread_db.so.1 $DESTDIR/lib/libthread_db.so
echo "Reducing $BUNDLE_NAME size" echo "Reducing $BUNDLE_NAME size"
strip -g $DESTDIR/lib/* strip -g $DEST_DIR/lib/*
ROOTFS="$WORK_DIR/src/minimal_overlay/rootfs" cp -r $DEST_DIR/* $OVERLAY_ROOTFS
cp -r $DESTDIR/* $ROOTFS
echo "$BUNDLE_NAME has been installed." echo "$BUNDLE_NAME has been installed."

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
@ -12,20 +12,16 @@ fi
mkdir -p "$WORK_DIR/overlay/$BUNDLE_NAME" mkdir -p "$WORK_DIR/overlay/$BUNDLE_NAME"
cd $WORK_DIR/overlay/$BUNDLE_NAME cd $WORK_DIR/overlay/$BUNDLE_NAME
DESTDIR="$PWD/${BUNDLE_NAME}_installed" rm -rf $DEST_DIR
rm -rf $DESTDIR mkdir -p $DEST_DIR/lib
cp $SYSROOT/lib/libutil.so.1 $DEST_DIR/lib/
mkdir -p $DESTDIR/lib ln -s libutil.so.1 $DEST_DIR/lib/libutil.so
cp $SYSROOT/lib/libutil.so.1 $DESTDIR/lib/
ln -s libutil.so.1 $DESTDIR/lib/libutil.so
echo "Reducing $BUNDLE_NAME size" echo "Reducing $BUNDLE_NAME size"
strip -g $DESTDIR/lib/* strip -g $DEST_DIR/lib/*
ROOTFS="$WORK_DIR/src/minimal_overlay/rootfs" cp -r $DEST_DIR/* $OVERLAY_ROOTFS
cp -r $DESTDIR/* $ROOTFS
echo "$BUNDLE_NAME has been installed." echo "$BUNDLE_NAME has been installed."

View File

@ -16,7 +16,7 @@
# 3) Run this script. Note that the script will fail with error message if the # 3) Run this script. Note that the script will fail with error message if the
# 'JAVA_ARCHIVE' property is not set or if it points to invalid file. # 'JAVA_ARCHIVE' property is not set or if it points to invalid file.
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
@ -31,27 +31,25 @@ elif [ ! -f "$JAVA_ARCHIVE" ] ; then
exit 1 exit 1
fi fi
rm -rf $WORK_DIR/overlay/java rm -rf $DEST_DIR
mkdir -p $WORK_DIR/overlay/java/opt mkdir -p $DEST_DIR/opt
tar -xvf \ tar -xvf \
$JAVA_ARCHIVE \ $JAVA_ARCHIVE \
-C $WORK_DIR/overlay/java/opt -C $DEST_DIR/opt
cd $WORK_DIR/overlay/java/opt cd $DEST_DIR/opt
mv $(ls -d *) java mv $(ls -d *) java
mkdir $WORK_DIR/overlay/java/bin mkdir $DEST_DIR/bin
for FILE in $(ls java/bin) for FILE in $(ls java/bin)
do do
ln -s ../opt/java/bin/$FILE ../bin/$FILE ln -s ../opt/$BUNDLE_NAME/bin/$FILE ../bin/$FILE
done done
cp -r $WORK_DIR/overlay/java/* \ cp -r $DEST_DIR/* $OVERLAY_ROOTFS
$WORK_DIR/src/minimal_overlay/rootfs
echo "Java has been installed." echo "Java has been installed."
cd $SRC_DIR cd $SRC_DIR

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
@ -30,25 +30,37 @@ fi
# Delete folder with previously extracted kbd. # Delete folder with previously extracted kbd.
echo "Removing kbd work area. This may take a while..." echo "Removing kbd work area. This may take a while..."
rm -rf $WORK_DIR/overlay/kbd rm -rf $WORK_DIR/overlay/$BUNDLE_NAME
mkdir $WORK_DIR/overlay/kbd mkdir $WORK_DIR/overlay/$BUNDLE_NAME
# Extract kbd to folder 'work/overlay/kbd'. # Extract kbd to folder 'work/overlay/kbd'.
# Full path will be something like 'work/overlay/kbd/kbd-2.04'. # Full path will be something like 'work/overlay/kbd/kbd-2.04'.
tar -xvf $ARCHIVE_FILE -C $WORK_DIR/overlay/kbd tar -xvf $ARCHIVE_FILE -C $WORK_DIR/overlay/$BUNDLE_NAME
cd "$WORK_DIR/overlay/kbd" cd "$WORK_DIR/overlay/$BUNDLE_NAME"
cd $(ls -d kbd-*) cd $(ls -d kbd-*)
# rename keymaps with the same name # Rename keymaps with the same name BEGIN
mv data/keymaps/i386/qwertz/cz.map data/keymaps/i386/qwertz/cz-qwertz.map
mv data/keymaps/i386/olpc/es.map data/keymaps/i386/olpc/es-olpc.map
mv data/keymaps/i386/olpc/pt.map data/keymaps/i386/olpc/pt-olpc.map
mv data/keymaps/i386/dvorak/no.map data/keymaps/i386/dvorak/no-dvorak.map
mv data/keymaps/i386/fgGIod/trf.map data/keymaps/i386/fgGIod/trf-fgGIod.map
mv data/keymaps/i386/colemak/en-latin9.map data/keymaps/i386/colemak/colemak.map
mv data/keymaps/i386/qwertz/cz.map \
data/keymaps/i386/qwertz/cz-qwertz.map
mv data/keymaps/i386/olpc/es.map \
data/keymaps/i386/olpc/es-olpc.map
mv data/keymaps/i386/olpc/pt.map \
data/keymaps/i386/olpc/pt-olpc.map
mv data/keymaps/i386/dvorak/no.map \
data/keymaps/i386/dvorak/no-dvorak.map
mv data/keymaps/i386/fgGIod/trf.map \
data/keymaps/i386/fgGIod/trf-fgGIod.map
mv data/keymaps/i386/colemak/en-latin9.map \
data/keymaps/i386/colemak/colemak.map
# Rename keymaps with the same name BEGIN
cd $SRC_DIR cd $SRC_DIR

View File

@ -1,19 +1,17 @@
#!/bin/sh #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
cd $WORK_DIR/overlay/kbd cd $WORK_DIR/overlay/$BUNDLE_NAME
DESTDIR="$PWD/kbd_installed"
# Change to the kbd source directory which ls finds, e.g. 'kbd-2.04'. # Change to the kbd source directory which ls finds, e.g. 'kbd-2.04'.
cd $(ls -d kbd-*) cd $(ls -d kbd-*)
echo "Preparing kbd work area. This may take a while..." echo "Preparing kbd work area. This may take a while..."
make -j $NUM_JOBS clean make -j $NUM_JOBS clean
rm -rf $DESTDIR rm -rf $DEST_DIR
echo "Configuring kbd..." echo "Configuring kbd..."
CFLAGS="$CFLAGS" ./configure \ CFLAGS="$CFLAGS" ./configure \
@ -25,22 +23,19 @@ echo "Building kbd..."
make -j $NUM_JOBS make -j $NUM_JOBS
echo "Installing kbd..." echo "Installing kbd..."
make -j $NUM_JOBS install DESTDIR="$DESTDIR" make -j $NUM_JOBS install DESTDIR="$DEST_DIR"
echo "Reducing kbd size..." echo "Reducing kbd size..."
strip -g \ strip -g \
$DESTDIR/usr/bin/* \ $DEST_DIR/usr/bin/* \
$DESTDIR/usr/sbin/* \ $DEST_DIR/usr/sbin/* \
$DESTDIR/lib/* $DEST_DIR/lib/*
ROOTFS=$WORK_DIR/src/minimal_overlay/rootfs mkdir -p $OVERLAY_ROOTFS/usr
cp -r "$DEST_DIR/usr/bin" \
"$DEST_DIR/usr/share" \
"$OVERLAY_ROOTFS/usr/"
mkdir -p $ROOTFS/usr echo "Bundle 'kbd' has been installed."
cp -r "$DESTDIR/usr/bin" \
"$DESTDIR/usr/share" \
"$ROOTFS/usr/"
echo "kbd has been installed."
cd $SRC_DIR cd $SRC_DIR

View File

@ -1,9 +1,10 @@
#!/bin/sh #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh
./01_get.sh ./01_get.sh
./02_build.sh ./02_build.sh
cd $SRC_DIR cd $SRC_DIR

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
@ -30,11 +30,11 @@ fi
# Delete folder with previously extracted kexec-tools. # Delete folder with previously extracted kexec-tools.
echo "Removing kexec-tools work area. This may take a while..." echo "Removing kexec-tools work area. This may take a while..."
rm -rf $WORK_DIR/overlay/kexec-tools rm -rf $WORK_DIR/overlay/$BUNDLE_NAME
mkdir $WORK_DIR/overlay/kexec-tools mkdir $WORK_DIR/overlay/$BUNDLE_NAME
# Extract kexec-tools to folder 'work/overlay/kexec-tools'. # Extract kexec-tools to folder 'work/overlay/kexec-tools'.
# Full path will be something like 'work/overlay/kexec-tools/kexec-tools-2.0.15'. # Full path will be something like 'work/overlay/kexec-tools/kexec-tools-2.0.15'.
tar -xvf $ARCHIVE_FILE -C $WORK_DIR/overlay/kexec-tools tar -xvf $ARCHIVE_FILE -C $WORK_DIR/overlay/$BUNDLE_NAME
cd $SRC_DIR cd $SRC_DIR

View File

@ -1,19 +1,17 @@
#!/bin/bash #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
cd $WORK_DIR/overlay/kexec-tools cd $WORK_DIR/overlay/$BUNDLE_NAME
DESTDIR="$PWD/kexec-tools_installed"
# Change to the kexec-tools source directory which ls finds, e.g. 'kexec-tools-2.0.15'. # Change to the kexec-tools source directory which ls finds, e.g. 'kexec-tools-2.0.15'.
cd $(ls -d kexec-tools-*) cd $(ls -d kexec-tools-*)
echo "Preparing kexec-tools work area. This may take a while..." echo "Preparing kexec-tools work area. This may take a while..."
make -j $NUM_JOBS clean make -j $NUM_JOBS clean
rm -rf $DESTDIR rm -rf $DEST_DIR
echo "Building kexec-tools..." echo "Building kexec-tools..."
CFLAGS="$CFLAGS" ./configure \ CFLAGS="$CFLAGS" ./configure \
@ -22,15 +20,14 @@ CFLAGS="$CFLAGS" ./configure \
make -j $NUM_JOBS make -j $NUM_JOBS
make -j $NUM_JOBS install DESTDIR="$DESTDIR" make -j $NUM_JOBS install DESTDIR="$DEST_DIR"
echo "Reducing kexec-tools size..." echo "Reducing kexec-tools size..."
strip -g $DESTDIR/usr/bin/* \ strip -g $DEST_DIR/usr/bin/* \
$DESTDIR/usr/lib/* 2>/dev/null $DEST_DIR/usr/lib/* 2>/dev/null
ROOTFS="$WORK_DIR/src/minimal_overlay/rootfs" mkdir -p $OVERLAY_ROOTFS/usr/
mkdir -p $ROOTFS/usr/ cp -r $DEST_DIR/usr/* $OVERLAY_ROOTFS/usr/
cp -r $DESTDIR/usr/* $ROOTFS/usr/
echo "kexec-tools has been installed." echo "kexec-tools has been installed."

View File

@ -1,6 +1,8 @@
#!/bin/sh #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh
./01_get.sh ./01_get.sh
./02_build.sh ./02_build.sh

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
@ -30,12 +30,11 @@ fi
# Delete folder with previously extracted libevent. # Delete folder with previously extracted libevent.
echo "Removing libevent work area. This may take a while..." echo "Removing libevent work area. This may take a while..."
rm -rf $WORK_DIR/overlay/libevent rm -rf $WORK_DIR/overlay/$BUNDLE_NAME
mkdir $WORK_DIR/overlay/libevent mkdir $WORK_DIR/overlay/$BUNDLE_NAME
# Extract libevent to folder 'work/overlay/libevent'. # Extract libevent to folder 'work/overlay/libevent'.
# Full path will be something like 'work/overlay/libevent/libevent-2.1.8-stable'. # Full path will be something like 'work/overlay/libevent/libevent-2.1.8-stable'.
tar -xvf $ARCHIVE_FILE -C $WORK_DIR/overlay/libevent tar -xvf $ARCHIVE_FILE -C $WORK_DIR/overlay/$BUNDLE_NAME
cd $SRC_DIR cd $SRC_DIR

View File

@ -1,12 +1,10 @@
#!/bin/bash #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
cd $WORK_DIR/overlay/libevent cd $WORK_DIR/overlay/$BUNDLE_NAME
DESTDIR="$PWD/libevent_installed"
# Change to the libevent source directory which ls finds, e.g. 'libevent-2.1.8-stable'. # Change to the libevent source directory which ls finds, e.g. 'libevent-2.1.8-stable'.
cd $(ls -d libevent-*) cd $(ls -d libevent-*)
@ -14,7 +12,7 @@ cd $(ls -d libevent-*)
echo "Preparing libevent work area. This may take a while..." echo "Preparing libevent work area. This may take a while..."
make -j $NUM_JOBS clean make -j $NUM_JOBS clean
rm -rf $DESTDIR rm -rf $DEST_DIR
echo "Configuring libevent..." echo "Configuring libevent..."
CFLAGS="$CFLAGS" ./configure CFLAGS="$CFLAGS" ./configure
@ -23,14 +21,12 @@ echo "Building libevent..."
make -j $NUM_JOBS make -j $NUM_JOBS
echo "Installing libevent..." echo "Installing libevent..."
make -j $NUM_JOBS install DESTDIR=$DESTDIR make -j $NUM_JOBS install DESTDIR=$DEST_DIR
echo "Reducing libevent size..." echo "Reducing libevent size..."
strip -g $DESTDIR/usr/bin/* strip -g $DEST_DIR/usr/bin/*
ROOTFS="$WORK_DIR/src/minimal_overlay/rootfs" cp -r $DEST_DIR/usr/local/* $OVERLAY_ROOTFS
cp -r $DESTDIR/usr/local/* $ROOTFS
echo "libevent has been installed." echo "libevent has been installed."

View File

@ -1,9 +1,10 @@
#!/bin/bash #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh
./01_get.sh ./01_get.sh
./02_build.sh ./02_build.sh
cd $SRC_DIR cd $SRC_DIR

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
@ -30,12 +30,11 @@ fi
# Delete folder with previously extracted Links. # Delete folder with previously extracted Links.
echo "Removing Links work area. This may take a while..." echo "Removing Links work area. This may take a while..."
rm -rf $WORK_DIR/overlay/links rm -rf $WORK_DIR/overlay/$BUNDLE_NAME
mkdir $WORK_DIR/overlay/links mkdir $WORK_DIR/overlay/$BUNDLE_NAME
# Extract Links to folder 'work/overlay/links'. # Extract Links to folder 'work/overlay/links'.
# Full path will be something like 'work/overlay/links/links-2.12'. # Full path will be something like 'work/overlay/links/links-2.12'.
tar -xvf $ARCHIVE_FILE -C $WORK_DIR/overlay/links tar -xvf $ARCHIVE_FILE -C $WORK_DIR/overlay/$BUNDLE_NAME
cd $SRC_DIR cd $SRC_DIR

View File

@ -1,12 +1,10 @@
#!/bin/sh #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
cd $WORK_DIR/overlay/links cd $WORK_DIR/overlay/$BUNDLE_NAME
DESTDIR="$PWD/links_installed"
# Change to the Links source directory which ls finds, e.g. 'links-2.12'. # Change to the Links source directory which ls finds, e.g. 'links-2.12'.
cd $(ls -d links-*) cd $(ls -d links-*)
@ -14,7 +12,7 @@ cd $(ls -d links-*)
echo "Preparing Links work area. This may take a while..." echo "Preparing Links work area. This may take a while..."
make -j $NUM_JOBS clean make -j $NUM_JOBS clean
rm -rf $DESTDIR rm -rf $DEST_DIR
echo "Configuring Links..." echo "Configuring Links..."
CFLAGS="$CFLAGS" ./configure \ CFLAGS="$CFLAGS" ./configure \
@ -30,17 +28,14 @@ echo "Building Links..."
make -j $NUM_JOBS make -j $NUM_JOBS
echo "Installing Links..." echo "Installing Links..."
make -j $NUM_JOBS install DESTDIR=$DESTDIR make -j $NUM_JOBS install DESTDIR=$DEST_DIR
echo "Reducing Links size..." echo "Reducing Links size..."
strip -g $DESTDIR/usr/bin/* strip -g $DEST_DIR/usr/bin/*
ROOTFS="$WORK_DIR/src/minimal_overlay/rootfs" mkdir -p "$OVERLAY_ROOTFS/usr/bin"
cp -r $DEST_DIR/usr/bin/* $OVERLAY_ROOTFS/usr/bin/
mkdir -p "$ROOTFS/usr/bin"
cp -r $DESTDIR/usr/bin/* $ROOTFS/usr/bin/
echo "Links has been installed." echo "Links has been installed."
cd $SRC_DIR cd $SRC_DIR

View File

@ -1,9 +1,10 @@
#!/bin/sh #!/bin/sh
SRC_DIR=$(pwd) . ../../common.sh
set -e
./01_get.sh ./01_get.sh
./02_build.sh ./02_build.sh
cd $SRC_DIR cd $SRC_DIR

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
@ -30,11 +30,11 @@ fi
# Delete folder with previously extracted Lua. # Delete folder with previously extracted Lua.
echo "Removing Lua work area. This may take a while..." echo "Removing Lua work area. This may take a while..."
rm -rf $WORK_DIR/overlay/lua rm -rf $WORK_DIR/overlay/$BUNDLE_NAME
mkdir $WORK_DIR/overlay/lua mkdir $WORK_DIR/overlay/$BUNDLE_NAME
# Extract lua to folder 'work/overlay/lua'. # Extract lua to folder 'work/overlay/lua'.
# Full path will be something like 'work/overlay/lua/lua-5.3.4'. # Full path will be something like 'work/overlay/lua/lua-5.3.4'.
tar -xvf $ARCHIVE_FILE -C $WORK_DIR/overlay/lua tar -xvf $ARCHIVE_FILE -C $WORK_DIR/overlay/$BUNDLE_NAME
cd $SRC_DIR cd $SRC_DIR

View File

@ -2,13 +2,11 @@
# TODO: compile the gnu readline library for line editing support # TODO: compile the gnu readline library for line editing support
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
cd $WORK_DIR/overlay/lua cd $WORK_DIR/overlay/$BUNDLE_NAME
DESTDIR="$PWD/lua_installed"
# Change to the Lua source directory which ls finds, e.g. 'lua-5.3.4'. # Change to the Lua source directory which ls finds, e.g. 'lua-5.3.4'.
cd $(ls -d lua-*) cd $(ls -d lua-*)
@ -17,19 +15,18 @@ echo "Preparing Lua work area. This may take a while..."
# we install lua to /usr and not to /usr/local so we need to fix luaconf.h so lua can find modules, etc ... # we install lua to /usr and not to /usr/local so we need to fix luaconf.h so lua can find modules, etc ...
sed -i 's/#define LUA_ROOT.*/#define LUA_ROOT \"\/usr\/\"/' src/luaconf.h sed -i 's/#define LUA_ROOT.*/#define LUA_ROOT \"\/usr\/\"/' src/luaconf.h
make -j $NUM_JOBS clean make -j $NUM_JOBS clean
rm -rf $DESTDIR rm -rf $DEST_DIR
echo "Building Lua..." echo "Building Lua..."
make -j $NUM_JOBS posix CFLAGS="$CFLAGS" make -j $NUM_JOBS posix CFLAGS="$CFLAGS"
make -j $NUM_JOBS install INSTALL_TOP="$DESTDIR/usr" make -j $NUM_JOBS install INSTALL_TOP="$DEST_DIR/usr"
echo "Reducing Lua size..." echo "Reducing Lua size..."
strip -g $DESTDIR/usr/bin/* 2>/dev/null strip -g $DEST_DIR/usr/bin/* 2>/dev/null
ROOTFS="$WORK_DIR/src/minimal_overlay/rootfs" mkdir -p $OVERLAY_ROOTFS/usr/
mkdir -p $ROOTFS/usr/ cp -r $DEST_DIR/usr/* $OVERLAY_ROOTFS/usr/
cp -r $DESTDIR/usr/* $ROOTFS/usr/
echo "Lua has been installed." echo "Lua has been installed."

View File

@ -1,6 +1,8 @@
#!/bin/sh #!/bin/sh
SRC_DIR=$(pwd) . ../../common.sh
set -e
./01_get.sh ./01_get.sh
./02_build.sh ./02_build.sh

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
@ -30,12 +30,11 @@ fi
# Delete folder with previously extracted make. # Delete folder with previously extracted make.
echo "Removing make work area. This may take a while..." echo "Removing make work area. This may take a while..."
rm -rf $WORK_DIR/overlay/make rm -rf $WORK_DIR/overlay/$BUNDLE_NAME
mkdir $WORK_DIR/overlay/make mkdir $WORK_DIR/overlay/$BUNDLE_NAME
# Extract make to folder 'work/overlay/make'. # Extract make to folder 'work/overlay/make'.
# Full path will be something like 'work/overlay/make/make-8.28'. # Full path will be something like 'work/overlay/make/make-8.28'.
tar -xvf $ARCHIVE_FILE -C $WORK_DIR/overlay/make tar -xvf $ARCHIVE_FILE -C $WORK_DIR/overlay/$BUNDLE_NAME
cd $SRC_DIR cd $SRC_DIR

View File

@ -1,12 +1,10 @@
#!/bin/bash #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
cd $WORK_DIR/overlay/make cd $WORK_DIR/overlay/$BUNDLE_NAME
DESTDIR="$PWD/make_installed"
# Change to the make source directory which ls finds, e.g. 'make-8.28'. # Change to the make source directory which ls finds, e.g. 'make-8.28'.
cd $(ls -d make-*) cd $(ls -d make-*)
@ -14,7 +12,7 @@ cd $(ls -d make-*)
echo "Preparing make work area. This may take a while..." echo "Preparing make work area. This may take a while..."
make -j $NUM_JOBS clean make -j $NUM_JOBS clean
rm -rf $DESTDIR rm -rf $DEST_DIR
echo "Configuring make..." echo "Configuring make..."
CFLAGS="$CFLAGS" ./configure \ CFLAGS="$CFLAGS" ./configure \
@ -24,17 +22,15 @@ echo "Building make..."
make -j $NUM_JOBS make -j $NUM_JOBS
echo "Installing make..." echo "Installing make..."
make -j $NUM_JOBS install DESTDIR=$DESTDIR make -j $NUM_JOBS install DESTDIR=$DEST_DIR
mkdir -p $DESTDIR/lib mkdir -p $DEST_DIR/lib
cp $SYSROOT/lib/libdl.so.2 $DESTDIR/lib/ cp $SYSROOT/lib/libdl.so.2 $DEST_DIR/lib/
echo "Reducing make size..." echo "Reducing make size..."
strip -g $DESTDIR/usr/bin/* strip -g $DEST_DIR/usr/bin/*
ROOTFS="$WORK_DIR/src/minimal_overlay/rootfs" cp -r $DEST_DIR/* $OVERLAY_ROOTFS
cp -r $DESTDIR/* $ROOTFS
echo "make has been installed." echo "make has been installed."

View File

@ -1,6 +1,8 @@
#!/bin/bash #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh
./01_get.sh ./01_get.sh
./02_build.sh ./02_build.sh

View File

@ -0,0 +1,33 @@
#!/bin/sh
set -e
. ../../common.sh
mkdir -p "$WORK_DIR/overlay/$BUNDLE_NAME"
cd $WORK_DIR/overlay/$BUNDLE_NAME
rm -rf $DEST_DIR
mkdir -p $DEST_DIR/usr/src
# Copy all source files and folders to 'work/src'.
cp $MAIN_SRC_DIR/*.sh $DEST_DIR/usr/src
cp $MAIN_SRC_DIR/.config $DEST_DIR/usr/src
cp $MAIN_SRC_DIR/README $DEST_DIR/usr/src
cp $MAIN_SRC_DIR/*.txt $DEST_DIR/usr/src
cp -r $MAIN_SRC_DIR/minimal_rootfs $DEST_DIR/usr/src
cp -r $MAIN_SRC_DIR/minimal_overlay $DEST_DIR/usr/src
cp -r $MAIN_SRC_DIR/minimal_config $DEST_DIR/usr/src
cd $DEST_DIR/usr/src
# Delete the '.gitignore' files which we use in order to keep track of otherwise
# empty folders.
find * -type f -name '.gitignore' -exec rm {} +
cp -r $DEST_DIR/* $OVERLAY_ROOTFS
echo "$BUNDLE_NAME has been installed."
cd $SRC_DIR

View File

@ -1,14 +1,13 @@
#!/bin/sh #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
echo "Preparing the Minimal Linux Live utilities folder. This may take a while..." echo "Preparing the Minimal Linux Live utilities folder. This may take a while..."
rm -rf $WORK_DIR/overlay/mll_utils rm -rf $WORK_DIR/overlay/$BUNDLE_NAME
mkdir -p $WORK_DIR/overlay/mll_utils/sbin mkdir -p $WORK_DIR/overlay/$BUNDLE_NAME/sbin
echo "Miminal Linux Live utilities folder has been prepared." echo "Miminal Linux Live utilities folder has been prepared."
cd $SRC_DIR cd $SRC_DIR

View File

@ -1,15 +1,15 @@
#!/bin/sh #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
if [ ! -d "$WORK_DIR/overlay/mll_utils" ] ; then if [ ! -d "$WORK_DIR/overlay/$BUNDLE_NAME" ] ; then
echo "The directory $WORK_DIR/overlay/mll_utils does not exist. Cannot continue." echo "The directory $WORK_DIR/overlay/$BUNDLE_NAME does not exist. Cannot continue."
exit 1 exit 1
fi fi
cd $WORK_DIR/overlay/mll_utils cd $WORK_DIR/overlay/$BUNDLE_NAME
# 'mll-disk-erase' BEGIN # 'mll-disk-erase' BEGIN
@ -48,7 +48,7 @@ if [ "\$PRINT_HELP" = "true" ] ; then
The above example wipes '/dev/sdb' 8 times in row. The above example wipes '/dev/sdb' 8 times in row.
DEOF DEOF
exit 0 exit 0
fi fi
@ -71,7 +71,7 @@ fi
for n in \$(seq \$NUM_LOOPS) ; do for n in \$(seq \$NUM_LOOPS) ; do
echo " Windows update \$n of \$NUM_LOOPS is being installed. Please wait..." echo " Windows update \$n of \$NUM_LOOPS is being installed. Please wait..."
dd if=/dev/urandom of=/dev/\$1 bs=1024b conv=notrunc > /dev/null 2>\&1 dd if=/dev/urandom of=/dev/\$1 bs=1024b conv=notrunc > /dev/null 2>\&1
done done
echo " All updates have been installed." echo " All updates have been installed."
@ -84,4 +84,3 @@ chmod +rx sbin/mll-disk-erase
echo "Utility script 'mll-disk-erase' has been generated." echo "Utility script 'mll-disk-erase' has been generated."
cd $SRC_DIR cd $SRC_DIR

View File

@ -1,15 +1,15 @@
#!/bin/sh #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
if [ ! -d "$WORK_DIR/overlay/mll_utils" ] ; then if [ ! -d "$WORK_DIR/overlay/$BUNDLE_NAME" ] ; then
echo "The directory $WORK_DIR/overlay/mll_utils does not exist. Cannot continue." echo "The directory $WORK_DIR/overlay/$BUNDLE_NAME does not exist. Cannot continue."
exit 1 exit 1
fi fi
cd $WORK_DIR/overlay/mll_utils cd $WORK_DIR/overlay/$BUNDLE_NAME
# 'mll-install' BEGIN # 'mll-install' BEGIN
@ -43,7 +43,7 @@ if [ "\$PRINT_HELP" = "true" ] ; then
The above example installs Minimal Linux Live on '/dev/sdb'. The above example installs Minimal Linux Live on '/dev/sdb'.
DEOF DEOF
exit 0 exit 0
fi fi
@ -59,10 +59,10 @@ fi
cat << DEOF cat << DEOF
Minimal Linux Live will be installed on device '/dev/\$1'. The device will be Minimal Linux Live will be installed on device '/dev/\$1'. The device will be
formatted with Ext2 and all previous data will be lost. Press 'Ctrl + C' to formatted with Ext2 and all previous data will be lost. Press 'Ctrl + C' to
exit or any other key to continue. exit or any other key to continue.
DEOF DEOF
read -n1 -s read -n1 -s
@ -108,24 +108,23 @@ cd $WORK_DIR/syslinux
cd $(ls -d syslinux-*) cd $(ls -d syslinux-*)
cp bios/extlinux/extlinux \ cp bios/extlinux/extlinux \
$WORK_DIR/overlay/mll_utils/sbin $WORK_DIR/overlay/$BUNDLE_NAME/sbin
mkdir -p $WORK_DIR/overlay/mll_utils/opt/syslinux mkdir -p $WORK_DIR/overlay/$BUNDLE_NAME/opt/syslinux
cp bios/mbr/mbr.bin \ cp bios/mbr/mbr.bin \
$WORK_DIR/overlay/mll_utils/opt/syslinux $WORK_DIR/overlay/$BUNDLE_NAME/opt/syslinux
# Big mama hack - need to find proper workaround!!! # Big mama hack - need to find proper workaround!!!
# Both syslinux and extlinux are 32-bit executables which require 32-bit libs. # Both syslinux and extlinux are 32-bit executables which require 32-bit libs.
# Possible solution 1 - build 32-bit GLIBC on demand. # Possible solution 1 - build 32-bit GLIBC on demand.
# Possible solution 2 - drop 32-bit MLL and provide 64-bit with multi-arch. # Possible solution 2 - drop 32-bit MLL and provide 64-bit with multi-arch.
mkdir -p $WORK_DIR/overlay/mll_utils/lib mkdir -p $WORK_DIR/overlay/$BUNDLE_NAME/lib
mkdir -p $WORK_DIR/overlay/mll_utils/usr/lib mkdir -p $WORK_DIR/overlay/$BUNDLE_NAME/usr/lib
cp /lib/ld-linux.so.2 \ cp /lib/ld-linux.so.2 \
$WORK_DIR/overlay/mll_utils/lib $WORK_DIR/overlay/$BUNDLE_NAME/lib
cp /lib/i386-linux-gnu/libc.so.6 \ cp /lib/i386-linux-gnu/libc.so.6 \
$WORK_DIR/overlay/mll_utils/usr/lib $WORK_DIR/overlay/$BUNDLE_NAME/usr/lib
# Big mama hack - end. # Big mama hack - end.
echo "Minimal Linux Live installer has been generated." echo "Minimal Linux Live installer has been generated."
cd $SRC_DIR cd $SRC_DIR

View File

@ -1,18 +1,17 @@
#!/bin/sh #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
if [ ! -d "$WORK_DIR/overlay/mll_utils" ] ; then if [ ! -d "$WORK_DIR/overlay/$BUNDLE_NAME" ] ; then
echo "The directory $WORK_DIR/overlay/mll_utils does not exist. Cannot continue." echo "The directory $WORK_DIR/overlay/$BUNDLE_NAME does not exist. Cannot continue."
exit 1 exit 1
fi fi
# Copy all generated files to the source overlay folder. # Copy all generated files to the source overlay folder.
cp -r $WORK_DIR/overlay/mll_utils/* $WORK_DIR/src/minimal_overlay/rootfs cp -r $WORK_DIR/overlay/$BUNDLE_NAME/* $OVERLAY_ROOTFS
echo "All MLL utilities have been installed." echo "All MLL utilities have been installed."
cd $SRC_DIR cd $SRC_DIR

View File

@ -1,6 +1,8 @@
#!/bin/sh #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh
./01_prepare.sh ./01_prepare.sh
./02_disk_erase.sh ./02_disk_erase.sh
@ -8,4 +10,3 @@ SRC_DIR=$(pwd)
./04_install.sh ./04_install.sh
cd $SRC_DIR cd $SRC_DIR

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
@ -30,11 +30,11 @@ fi
# Delete folder with previously extracted nano. # Delete folder with previously extracted nano.
echo "Removing nano work area. This may take a while..." echo "Removing nano work area. This may take a while..."
rm -rf $WORK_DIR/overlay/nano rm -rf $WORK_DIR/overlay/$BUNDLE_NAME
mkdir $WORK_DIR/overlay/nano mkdir $WORK_DIR/overlay/$BUNDLE_NAME
# Extract nano to folder 'work/overlay/nano'. # Extract nano to folder 'work/overlay/nano'.
# Full path will be something like 'work/overlay/nano/nano-2.8.7'. # Full path will be something like 'work/overlay/nano/nano-2.8.7'.
tar -xvf $ARCHIVE_FILE -C $WORK_DIR/overlay/nano tar -xvf $ARCHIVE_FILE -C $WORK_DIR/overlay/$BUNDLE_NAME
cd $SRC_DIR cd $SRC_DIR

View File

@ -1,12 +1,10 @@
#!/bin/bash #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
cd $WORK_DIR/overlay/nano cd $WORK_DIR/overlay/$BUNDLE_NAME
DESTDIR="$PWD/nano_installed"
# Change to the nano source directory which ls finds, e.g. 'nano-2.8.7'. # Change to the nano source directory which ls finds, e.g. 'nano-2.8.7'.
cd $(ls -d nano-*) cd $(ls -d nano-*)
@ -14,25 +12,23 @@ cd $(ls -d nano-*)
echo "Preparing nano work area. This may take a while..." echo "Preparing nano work area. This may take a while..."
make -j $NUM_JOBS clean make -j $NUM_JOBS clean
rm -rf $DESTDIR rm -rf $DEST_DIR
echo "Configuring nano..." echo "Configuring nano..."
CFLAGS="$CFLAGS" ./configure \ CFLAGS="$CFLAGS" ./configure \
--prefix=/usr \ --prefix=/usr \
LDFLAGS=-L$WORK_DIR/overlay/ncurses/ncurses_installed/usr/include LDFLAGS=-L$DEST_DIR/usr/include
echo "Building nano..." echo "Building nano..."
make -j $NUM_JOBS make -j $NUM_JOBS
echo "Installing nano..." echo "Installing nano..."
make -j $NUM_JOBS install DESTDIR=$DESTDIR make -j $NUM_JOBS install DESTDIR=$DEST_DIR
echo "Reducing nano size..." echo "Reducing nano size..."
strip -g $DESTDIR/usr/bin/* strip -g $DEST_DIR/usr/bin/*
ROOTFS="$WORK_DIR/src/minimal_overlay/rootfs" cp -r $DEST_DIR/* $OVERLAY_ROOTFS
cp -r $DESTDIR/* $ROOTFS
echo "nano has been installed." echo "nano has been installed."

View File

@ -1,6 +1,8 @@
#!/bin/sh #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh
./01_get.sh ./01_get.sh
./02_build.sh ./02_build.sh

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
@ -30,11 +30,11 @@ fi
# Delete folder with previously extracted ncurses. # Delete folder with previously extracted ncurses.
echo "Removing ncurses work area. This may take a while..." echo "Removing ncurses work area. This may take a while..."
rm -rf $WORK_DIR/overlay/ncurses rm -rf $WORK_DIR/overlay/$BUNDLE_NAME
mkdir $WORK_DIR/overlay/ncurses mkdir $WORK_DIR/overlay/$BUNDLE_NAME
# Extract ncurses to folder 'work/overlay/ncurses'. # Extract ncurses to folder 'work/overlay/ncurses'.
# Full path will be something like 'work/overlay/ncurses/ncurses-6.0'. # Full path will be something like 'work/overlay/ncurses/ncurses-6.0'.
tar -xvf $ARCHIVE_FILE -C $WORK_DIR/overlay/ncurses tar -xvf $ARCHIVE_FILE -C $WORK_DIR/overlay/$BUNDLE_NAME
cd $SRC_DIR cd $SRC_DIR

View File

@ -1,12 +1,10 @@
#!/bin/bash #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
cd $WORK_DIR/overlay/ncurses cd $WORK_DIR/overlay/$BUNDLE_NAME
DESTDIR="$PWD/ncurses_installed"
# Change to the ncurses source directory which ls finds, e.g. 'ncurses-6.0'. # Change to the ncurses source directory which ls finds, e.g. 'ncurses-6.0'.
cd $(ls -d ncurses-*) cd $(ls -d ncurses-*)
@ -14,7 +12,7 @@ cd $(ls -d ncurses-*)
echo "Preparing ncurses work area. This may take a while..." echo "Preparing ncurses work area. This may take a while..."
make -j $NUM_JOBS clean make -j $NUM_JOBS clean
rm -rf $DESTDIR rm -rf $DEST_DIR
# Remove static library # Remove static library
sed -i '/LIBTOOL_INSTALL/d' c++/Makefile.in sed -i '/LIBTOOL_INSTALL/d' c++/Makefile.in
@ -48,23 +46,20 @@ echo "Building ncurses..."
make -j $NUM_JOBS make -j $NUM_JOBS
echo "Installing ncurses..." echo "Installing ncurses..."
make -j $NUM_JOBS install DESTDIR=$DESTDIR make -j $NUM_JOBS install DESTDIR=$DEST_DIR
# Symnlink wide character libraries # Symnlink wide character libraries
cd $DESTDIR/usr/lib cd $DEST_DIR/usr/lib
ln -s libncursesw.so.5 libncurses.so.5 ln -s libncursesw.so.5 libncurses.so.5
ln -s libncurses.so.5 libncurses.so ln -s libncurses.so.5 libncurses.so
ln -s libtinfow.so.5 libtinfo.so.5 ln -s libtinfow.so.5 libtinfo.so.5
ln -s libtinfo.so.5 libtinfo.so ln -s libtinfo.so.5 libtinfo.so
echo "Reducing ncurses size..." echo "Reducing ncurses size..."
strip -g $DESTDIR/usr/bin/* strip -g $DEST_DIR/usr/bin/*
ROOTFS="$WORK_DIR/src/minimal_overlay/rootfs" cp -r $DEST_DIR/usr/* $OVERLAY_ROOTFS
cp -r $DESTDIR/usr/* $ROOTFS
echo "ncurses has been installed." echo "ncurses has been installed."
cd $SRC_DIR cd $SRC_DIR

View File

@ -1,9 +1,10 @@
#!/bin/sh #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh
./01_get.sh ./01_get.sh
./02_build.sh ./02_build.sh
cd $SRC_DIR cd $SRC_DIR

View File

@ -1,31 +1,28 @@
#!/bin/sh #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
echo "removing previous work area" echo "removing previous work area"
rm -rf $WORK_DIR/overlay/nweb rm -rf $WORK_DIR/overlay/$BUNDLE_NAME
mkdir -p $WORK_DIR/overlay/nweb mkdir -p $WORK_DIR/overlay/$BUNDLE_NAME
cd $WORK_DIR/overlay/nweb cd $WORK_DIR/overlay/$BUNDLE_NAME
# nweb # nweb
gcc $CFLAGS $SRC_DIR/nweb23.c -o nweb gcc $CFLAGS $SRC_DIR/nweb23.c -o nweb
echo "nweb has been build." echo "nweb has been build."
DESTDIR="$MAIN_SRC_DIR/work/src/minimal_overlay/rootfs" install -d -m755 "$OVERLAY_ROOTFS/usr"
install -d -m755 "$OVERLAY_ROOTFS/usr/bin"
install -d -m755 "$DESTDIR/usr" install -m755 nweb "$OVERLAY_ROOTFS/usr/bin/nweb"
install -d -m755 "$DESTDIR/usr/bin" install -d -m755 "$OVERLAY_ROOTFS/srv/www" # FHS compliant location
install -m755 nweb "$DESTDIR/usr/bin/nweb" install -m644 "$SRC_DIR/index.html" "$OVERLAY_ROOTFS/srv/www/index.html"
install -d -m755 "$DESTDIR/srv/www" # FHS compliant location install -m644 "$SRC_DIR/favicon.ico" "$OVERLAY_ROOTFS/srv/www/favicon.ico"
install -m644 "$SRC_DIR/index.html" "$DESTDIR/srv/www/index.html" install -d -m755 "$OVERLAY_ROOTFS/etc"
install -m644 "$SRC_DIR/favicon.ico" "$DESTDIR/srv/www/favicon.ico" install -d -m755 "$OVERLAY_ROOTFS/etc/autorun"
install -d -m755 "$DESTDIR/etc" install -m755 "$SRC_DIR/90_nweb.sh" "$OVERLAY_ROOTFS/etc/autorun/90_nweb.sh"
install -d -m755 "$DESTDIR/etc/autorun"
install -m755 "$SRC_DIR/90_nweb.sh" "$DESTDIR/etc/autorun/90_nweb.sh"
echo "nweb has been installed." echo "nweb has been installed."
echo "It will be autostarted on boot." echo "It will be autostarted on boot."

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
@ -30,12 +30,11 @@ fi
# Delete folder with previously extracted Felix. # Delete folder with previously extracted Felix.
echo "Removing Open JDK work area. This may take a while..." echo "Removing Open JDK work area. This may take a while..."
rm -rf $WORK_DIR/overlay/openjdk rm -rf $WORK_DIR/overlay/$BUNDLE_NAME
mkdir $WORK_DIR/overlay/openjdk mkdir $WORK_DIR/overlay/$BUNDLE_NAME
# Extract Open JDK to folder 'work/overlay/openjdk'. # Extract Open JDK to folder 'work/overlay/openjdk'.
# Full path will be something like 'work/overlay/openjdk/jdk-9'. # Full path will be something like 'work/overlay/openjdk/jdk-9'.
tar -xvf $ARCHIVE_FILE -C $WORK_DIR/overlay/openjdk tar -xvf $ARCHIVE_FILE -C $WORK_DIR/overlay/$BUNDLE_NAME
cd $SRC_DIR cd $SRC_DIR

View File

@ -1,27 +1,26 @@
#!/bin/sh #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
cd $WORK_DIR/overlay/openjdk cd $WORK_DIR/overlay/$BUNDLE_NAME
mv `ls -d *` openjdk mv `ls -d *` $BUNDLE_NAME
mkdir opt mkdir opt
mv openjdk opt mv openjdk opt
mkdir $WORK_DIR/overlay/openjdk/bin mkdir $WORK_DIR/overlay/$BUNDLE_NAME/bin
cd $WORK_DIR/overlay/openjdk/bin cd $WORK_DIR/overlay/$BUNDLE_NAME/bin
for FILE in $(ls ../opt/openjdk/bin) for FILE in $(ls ../opt/$BUNDLE_NAME/bin)
do do
ln -s ../opt/openjdk/bin/$FILE $FILE ln -s ../opt/$BUNDLE_NAME/bin/$FILE $FILE
done done
cp -r $WORK_DIR/overlay/openjdk/* \ cp -r $WORK_DIR/overlay/$BUNDLE_NAME/* \
$WORK_DIR/src/minimal_overlay/rootfs $OVERLAY_ROOTFS
echo "Open JDK has been installed." echo "Open JDK has been installed."
cd $SRC_DIR cd $SRC_DIR

View File

@ -1,9 +1,10 @@
#!/bin/sh #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh
./01_get.sh ./01_get.sh
./02_install.sh ./02_install.sh
cd $SRC_DIR cd $SRC_DIR

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
@ -34,4 +34,3 @@ mkdir $WORK_DIR/overlay/$BUNDLE_NAME
cp static-get.sh $WORK_DIR/overlay/$BUNDLE_NAME cp static-get.sh $WORK_DIR/overlay/$BUNDLE_NAME
cd $SRC_DIR cd $SRC_DIR

View File

@ -1,13 +1,13 @@
#!/bin/sh #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
echo "Removing old static-get artifacts. This may take a while..." echo "Removing old static-get artifacts. This may take a while..."
rm -rf $WORK_DIR/overlay/$BUNDLE_NAME/$BUNDLE_NAME_installed rm -rf $DEST_DIR
mkdir -p $WORK_DIR/overlay/$BUNDLE_NAME/$BUNDLE_NAME_installed/opt/$BUNDLE_NAME mkdir -p $DEST_DIR/opt/$BUNDLE_NAME
mkdir -p $WORK_DIR/overlay/$BUNDLE_NAME/$BUNDLE_NAME_installed/bin mkdir -p $DEST_DIR/bin
cd $WORK_DIR/overlay/$BUNDLE_NAME cd $WORK_DIR/overlay/$BUNDLE_NAME
@ -15,17 +15,16 @@ cp $MAIN_SRC_DIR/source/overlay/static-get.sh .
chmod +rx static-get.sh chmod +rx static-get.sh
cp static-get.sh $WORK_DIR/overlay/$BUNDLE_NAME/$BUNDLE_NAME_installed/opt/$BUNDLE_NAME cp static-get.sh $DEST_DIR/opt/$BUNDLE_NAME
cd $WORK_DIR/overlay/$BUNDLE_NAME/$BUNDLE_NAME_installed cd $DEST_DIR
ln -s ../opt/$BUNDLE_NAME/static-get.sh bin/static-get ln -s ../opt/$BUNDLE_NAME/static-get.sh bin/static-get
ln -s ../opt/$BUNDLE_NAME/static-get.sh bin/mll-get ln -s ../opt/$BUNDLE_NAME/static-get.sh bin/mll-get
cp -r $WORK_DIR/overlay/$BUNDLE_NAME/$BUNDLE_NAME_installed/* \ cp -r $DEST_DIR/* \
$WORK_DIR/src/minimal_overlay/rootfs $OVERLAY_ROOTFS
echo "static-get has been installed." echo "static-get has been installed."
cd $SRC_DIR cd $SRC_DIR

View File

@ -1,9 +1,10 @@
#!/bin/sh #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh
./01_get.sh ./01_get.sh
./02_install.sh ./02_install.sh
cd $SRC_DIR cd $SRC_DIR

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
@ -30,12 +30,11 @@ fi
# Delete folder with previously extracted stress. # Delete folder with previously extracted stress.
echo "Removing stress work area. This may take a while..." echo "Removing stress work area. This may take a while..."
rm -rf $WORK_DIR/overlay/stress rm -rf $WORK_DIR/overlay/$BUNDLE_NAME
mkdir $WORK_DIR/overlay/stress mkdir $WORK_DIR/overlay/$BUNDLE_NAME
# Extract stress to folder 'work/overlay/stress'. # Extract stress to folder 'work/overlay/stress'.
# Full path will be something like 'work/overlay/stress/stress-1.0.4'. # Full path will be something like 'work/overlay/stress/stress-1.0.4'.
tar -xvf $ARCHIVE_FILE -C $WORK_DIR/overlay/stress tar -xvf $ARCHIVE_FILE -C $WORK_DIR/overlay/$BUNDLE_NAME
cd $SRC_DIR cd $SRC_DIR

View File

@ -1,10 +1,10 @@
#!/bin/bash #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
cd $WORK_DIR/overlay/stress cd $WORK_DIR/overlay/$BUNDLE_NAME
DESTDIR="$PWD/stress_installed" DESTDIR="$PWD/stress_installed"
@ -14,7 +14,7 @@ cd $(ls -d stress-*)
echo "Preparing stress work area. This may take a while..." echo "Preparing stress work area. This may take a while..."
make -j $NUM_JOBS clean make -j $NUM_JOBS clean
rm -rf $DESTDIR rm -rf $DEST_DIR
echo "Configuring stress..." echo "Configuring stress..."
CFLAGS="$CFLAGS" ./configure \ CFLAGS="$CFLAGS" ./configure \
@ -24,14 +24,12 @@ echo "Building stress..."
make -j $NUM_JOBS make -j $NUM_JOBS
echo "Installing stress..." echo "Installing stress..."
make -j $NUM_JOBS install DESTDIR=$DESTDIR make -j $NUM_JOBS install DESTDIR=$DEST_DIR
echo "Reducing stress size..." echo "Reducing stress size..."
strip -g $DESTDIR/usr/bin/* strip -g $DEST_DIR/usr/bin/*
ROOTFS="$WORK_DIR/src/minimal_overlay/rootfs" cp -r $DEST_DIR/* $OVERLAY_ROOTFS
cp -r $DESTDIR/* $ROOTFS
echo "stress has been installed." echo "stress has been installed."

View File

@ -1,6 +1,8 @@
#!/bin/bash #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh
./01_get.sh ./01_get.sh
./02_build.sh ./02_build.sh

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
@ -30,12 +30,11 @@ fi
# Delete folder with previously extracted util-linux. # Delete folder with previously extracted util-linux.
echo "Removing util-linux work area. This may take a while..." echo "Removing util-linux work area. This may take a while..."
rm -rf $WORK_DIR/overlay/util_linux rm -rf $WORK_DIR/overlay/$BUNDLE_NAME
mkdir $WORK_DIR/overlay/util_linux mkdir $WORK_DIR/overlay/$BUNDLE_NAME
# Extract util-linux to folder 'work/overlay/util_linux'. # Extract util-linux to folder 'work/overlay/util_linux'.
# Full path will be something like 'work/overlay/util_linux/util-linux-2.31'. # Full path will be something like 'work/overlay/util_linux/util-linux-2.31'.
tar -xvf $ARCHIVE_FILE -C $WORK_DIR/overlay/util_linux tar -xvf $ARCHIVE_FILE -C $WORK_DIR/overlay/$BUNDLE_NAME
cd $SRC_DIR cd $SRC_DIR

View File

@ -1,12 +1,10 @@
#!/bin/bash #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
cd $WORK_DIR/overlay/util_linux cd $WORK_DIR/overlay/$BUNDLE_NAME
DESTDIR="$PWD/util_linux_installed"
# Change to the util-linux source directory which ls finds, e.g. 'util-linux-2.31'. # Change to the util-linux source directory which ls finds, e.g. 'util-linux-2.31'.
cd $(ls -d util-linux-*) cd $(ls -d util-linux-*)
@ -14,7 +12,7 @@ cd $(ls -d util-linux-*)
echo "Preparing util-linux work area. This may take a while..." echo "Preparing util-linux work area. This may take a while..."
make -j $NUM_JOBS clean make -j $NUM_JOBS clean
rm -rf $DESTDIR rm -rf $DEST_DIR
echo "Configuring util-linux..." echo "Configuring util-linux..."
CFLAGS="$CFLAGS" ./configure \ CFLAGS="$CFLAGS" ./configure \
@ -36,14 +34,12 @@ echo "Building util-linux..."
make -j $NUM_JOBS make -j $NUM_JOBS
echo "Installing util-linux..." echo "Installing util-linux..."
make -j $NUM_JOBS install DESTDIR=$DESTDIR make -j $NUM_JOBS install DESTDIR=$DEST_DIR
echo "Reducing util-linux size..." echo "Reducing util-linux size..."
strip -g $DESTDIR/usr/bin/* strip -g $DEST_DIR/usr/bin/*
ROOTFS="$WORK_DIR/src/minimal_overlay/rootfs" cp -r $DEST_DIR/* $OVERLAY_ROOTFS
cp -r $DESTDIR/* $ROOTFS
echo "util-linux has been installed." echo "util-linux has been installed."

View File

@ -1,9 +1,10 @@
#!/bin/sh #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh
./01_get.sh ./01_get.sh
./02_build.sh ./02_build.sh
cd $SRC_DIR cd $SRC_DIR

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
@ -30,12 +30,11 @@ fi
# Delete folder with previously extracted vim. # Delete folder with previously extracted vim.
echo "Removing vim work area. This may take a while..." echo "Removing vim work area. This may take a while..."
rm -rf $WORK_DIR/overlay/vim rm -rf $WORK_DIR/overlay/$BUNDLE_NAME
mkdir $WORK_DIR/overlay/vim mkdir $WORK_DIR/overlay/$BUNDLE_NAME
# Extract vim to folder 'work/overlay/vim'. # Extract vim to folder 'work/overlay/vim'.
# Full path will be something like 'work/overlay/vim/vim-8.0.1298'. # Full path will be something like 'work/overlay/vim/vim-8.0.1298'.
tar -xvf $ARCHIVE_FILE -C $WORK_DIR/overlay/vim tar -xvf $ARCHIVE_FILE -C $WORK_DIR/overlay/$BUNDLE_NAME
cd $SRC_DIR cd $SRC_DIR

View File

@ -1,12 +1,10 @@
#!/bin/bash #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
cd $WORK_DIR/overlay/vim cd $WORK_DIR/overlay/$BUNDLE_NAME
DESTDIR="$PWD/vim_installed"
# Change to the vim source directory which ls finds, e.g. 'vim-8.0.1298'. # Change to the vim source directory which ls finds, e.g. 'vim-8.0.1298'.
cd $(ls -d vim-*) cd $(ls -d vim-*)
@ -14,7 +12,7 @@ cd $(ls -d vim-*)
echo "Preparing vim work area. This may take a while..." echo "Preparing vim work area. This may take a while..."
make -j $NUM_JOBS clean make -j $NUM_JOBS clean
rm -rf $DESTDIR rm -rf $DEST_DIR
echo "Setting vimrc location..." echo "Setting vimrc location..."
echo '#define SYS_VIMRC_FILE "/etc/vimrc"' >> src/feature.h echo '#define SYS_VIMRC_FILE "/etc/vimrc"' >> src/feature.h
@ -27,11 +25,11 @@ echo "Building vim..."
make -j $NUM_JOBS make -j $NUM_JOBS
echo "Installing vim..." echo "Installing vim..."
make -j $NUM_JOBS install DESTDIR=$DESTDIR make -j $NUM_JOBS install DESTDIR=$DEST_DIR
echo "Generating vimrc..." echo "Generating vimrc..."
mkdir -p $DESTDIR/etc mkdir -p $DEST_DIR/etc
cat > $DESTDIR/etc/vimrc << "EOF" cat > $DES_TDIR/etc/vimrc << "EOF"
" Begin /etc/vimrc " Begin /etc/vimrc
set nocompatible set nocompatible
@ -44,18 +42,15 @@ set background=dark
EOF EOF
echo "Symlinking vim to vi..." echo "Symlinking vim to vi..."
ln -sv vim $DESTDIR/usr/bin/vi ln -sv vim $DEST_DIR/usr/bin/vi
mkdir -p $DESTDIR/bin mkdir -p $DEST_DIR/bin
ln -sv vim $DESTDIR/bin/vi ln -sv vim $DEST_DIR/bin/vi
echo "Reducing vim size..." echo "Reducing vim size..."
strip -g $DESTDIR/usr/bin/* strip -g $DEST_DIR/usr/bin/*
ROOTFS="$WORK_DIR/src/minimal_overlay/rootfs" cp -r $DEST_DIR/* $OVERLAY_ROOTFS
cp -r $DESTDIR/* $ROOTFS
echo "vim has been installed." echo "vim has been installed."
cd $SRC_DIR cd $SRC_DIR

View File

@ -1,9 +1,10 @@
#!/bin/bash #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh
./01_get.sh ./01_get.sh
./02_build.sh ./02_build.sh
cd $SRC_DIR cd $SRC_DIR

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
SRC_DIR=$(pwd) set -e
. ../../common.sh . ../../common.sh
@ -30,12 +30,11 @@ fi
# Delete folder with previously extracted ZLIB. # Delete folder with previously extracted ZLIB.
echo "Removing ZLIB work area. This may take a while..." echo "Removing ZLIB work area. This may take a while..."
rm -rf $WORK_DIR/overlay/zlib rm -rf $WORK_DIR/overlay/$BUNDLE_NAME
mkdir $WORK_DIR/overlay/zlib mkdir $WORK_DIR/overlay/$BUNDLE_NAME
# Extract ZLIB to folder 'work/overlay/zlib'. # Extract ZLIB to folder 'work/overlay/zlib'.
# Full path will be something like 'work/overlay/zlib/zlib-1.2.11'. # Full path will be something like 'work/overlay/zlib/zlib-1.2.11'.
tar -xvf $ARCHIVE_FILE -C $WORK_DIR/overlay/zlib tar -xvf $ARCHIVE_FILE -C $WORK_DIR/overlay/$BUNDLE_NAME
cd $SRC_DIR cd $SRC_DIR

Some files were not shown because too many files have changed in this diff Show More