Adde Open JDK and ZLIB as overlay bundles. Updated the core components to the latest available versions.
This commit is contained in:
		
							parent
							
								
									9b25853063
								
							
						
					
					
						commit
						2e46c2fd28
					
				
							
								
								
									
										11
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								README.md
									
									
									
									
									
								
							@ -20,18 +20,19 @@ This is a screenshot of the current development version of Minimal Linux Live:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||

 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Current development state (29-Jan-2017)
 | 
					## Current development state (23-Sep-2017)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
* Linux kernel 4.4.44 (longterm)
 | 
					* Linux kernel 4.13.3 (stable)
 | 
				
			||||||
* GNU C Library 2.24 (stable)
 | 
					* GNU C Library 2.26 (stable)
 | 
				
			||||||
* BusyBox 1.26.2 (stable)
 | 
					* BusyBox 1.27.2 (stable)
 | 
				
			||||||
* Stable on default Ubuntu 16.04.1 installation (32-bit and 64-bit) with applied system updates.
 | 
					* Stable on default Ubuntu 16.04 installation with applied system updates.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Future improvements
 | 
					## Future improvements
 | 
				
			||||||
 | 
					
 | 
				
			||||||
* Add kernel modules and firmware.
 | 
					* Add kernel modules and firmware.
 | 
				
			||||||
* Reorganize and simplify the ISO image generation script.
 | 
					* Reorganize and simplify the ISO image generation script.
 | 
				
			||||||
* Allow individual overlay bundles to be downloaded and installed.
 | 
					* Allow individual overlay bundles to be downloaded and installed.
 | 
				
			||||||
 | 
					* Add more overlay bundles.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
The above list is not fixed it may be updated at any time.
 | 
					The above list is not fixed it may be updated at any time.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										28
									
								
								src/.config
									
									
									
									
									
								
							
							
						
						
									
										28
									
								
								src/.config
									
									
									
									
									
								
							@ -11,7 +11,7 @@
 | 
				
			|||||||
#
 | 
					#
 | 
				
			||||||
#   http://kernel.org
 | 
					#   http://kernel.org
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
KERNEL_SOURCE_URL=http://kernel.org/pub/linux/kernel/v4.x/linux-4.12.4.tar.xz
 | 
					KERNEL_SOURCE_URL=http://kernel.org/pub/linux/kernel/v4.x/linux-4.13.3.tar.xz
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# You can find the latest GNU libc source bundles here:
 | 
					# You can find the latest GNU libc source bundles here:
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
@ -23,7 +23,7 @@ GLIBC_SOURCE_URL=http://ftp.gnu.org/gnu/glibc/glibc-2.26.tar.bz2
 | 
				
			|||||||
#
 | 
					#
 | 
				
			||||||
#   http://busybox.net
 | 
					#   http://busybox.net
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
BUSYBOX_SOURCE_URL=http://busybox.net/downloads/busybox-1.27.1.tar.bz2
 | 
					BUSYBOX_SOURCE_URL=http://busybox.net/downloads/busybox-1.27.2.tar.bz2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# You can find the latest Syslinux source bundles here:
 | 
					# You can find the latest Syslinux source bundles here:
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
@ -57,7 +57,7 @@ DROPBEAR_SOURCE_URL=http://matt.ucc.asn.au/dropbear/releases/dropbear-2017.75.ta
 | 
				
			|||||||
#
 | 
					#
 | 
				
			||||||
#   http://felix.apache.org
 | 
					#   http://felix.apache.org
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
FELIX_SOURCE_URL=http://archive.apache.org/dist/felix/org.apache.felix.main.distribution-5.6.4.tar.gz
 | 
					FELIX_SOURCE_URL=http://archive.apache.org/dist/felix/org.apache.felix.main.distribution-5.6.8.tar.gz
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# You need to manually download Oracle's JRE or JDK and set the property with
 | 
					# You need to manually download Oracle's JRE or JDK and set the property with
 | 
				
			||||||
# the absolute path to the downloaded archive. Example:
 | 
					# the absolute path to the downloaded archive. Example:
 | 
				
			||||||
@ -65,7 +65,7 @@ FELIX_SOURCE_URL=http://archive.apache.org/dist/felix/org.apache.felix.main.dist
 | 
				
			|||||||
#   JAVA_ARCHIVE=/home/ivan/Downloads/jdk-8u131-linux-x64.tar.gz
 | 
					#   JAVA_ARCHIVE=/home/ivan/Downloads/jdk-8u131-linux-x64.tar.gz
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
#JAVA_ARCHIVE=/absolute/path/to/java.archive.tar.gz
 | 
					#JAVA_ARCHIVE=/absolute/path/to/java.archive.tar.gz
 | 
				
			||||||
#JAVA_ARCHIVE=/home/ivan/Downloads/jdk-8u131-linux-x64.tar.gz
 | 
					#JAVA_ARCHIVE=/home/ivan/Downloads/jdk-9_linux-x64_bin.tar.gz
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# You can find the latest Lua source bundes here:
 | 
					# You can find the latest Lua source bundes here:
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
@ -86,6 +86,20 @@ STATIC_GET_SOURCE_URL=http://s.minos.io/s
 | 
				
			|||||||
#
 | 
					#
 | 
				
			||||||
CLOUD_FOUNDRY_CLI_URL=http://cli.run.pivotal.io/stable?release=linux64-binary&source=github
 | 
					CLOUD_FOUNDRY_CLI_URL=http://cli.run.pivotal.io/stable?release=linux64-binary&source=github
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# You can find the latest Open JDK archives here:
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					#   http://jdk.java.net/9
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					OPENJDK_URL=http://download.java.net/java/GA/jdk9/9/binaries/jdk-9+181_linux-x64_bin.tar.gz
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# You can find the latest ZLIB source bundles here:
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					#   http://zlib.net
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					ZLIB_SOURCE_URL=http://zlib.net/zlib-1.2.11.tar.xz
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
####################################################
 | 
					####################################################
 | 
				
			||||||
#                                                  #
 | 
					#                                                  #
 | 
				
			||||||
#  This section contains configuration properties  #
 | 
					#  This section contains configuration properties  #
 | 
				
			||||||
@ -162,9 +176,10 @@ COPY_SOURCE_ISO=true
 | 
				
			|||||||
# Currently available overlay software:
 | 
					# Currently available overlay software:
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# glibc_full - all core GNU C libraries (useful if other software is included).
 | 
					# glibc_full - all core GNU C libraries (useful if other software is included).
 | 
				
			||||||
# links      - text browser.
 | 
					# links      - text browser for the web.
 | 
				
			||||||
# dropbear   - SSH server and client.
 | 
					# dropbear   - SSH server and client.
 | 
				
			||||||
# java       - installs Oracle's JRE or JDK. Manual preparations are required.
 | 
					# java       - installs Oracle's JRE or JDK. Manual preparations are required.
 | 
				
			||||||
 | 
					# openjdk    - installs Open JDK. All operations are automated.
 | 
				
			||||||
# felix      - Apache Felix OSGi framework.
 | 
					# felix      - Apache Felix OSGi framework.
 | 
				
			||||||
# mll_utils  - set of executable utilities (mll-*).
 | 
					# mll_utils  - set of executable utilities (mll-*).
 | 
				
			||||||
# lua        - scripting language
 | 
					# lua        - scripting language
 | 
				
			||||||
@ -172,11 +187,12 @@ COPY_SOURCE_ISO=true
 | 
				
			|||||||
# cf_cli     - CLoud Foundry CLI (command line interface)
 | 
					# cf_cli     - CLoud Foundry CLI (command line interface)
 | 
				
			||||||
# nweb       - simple mini http server
 | 
					# nweb       - simple mini http server
 | 
				
			||||||
# dhcp       - DHCP and DNS functionality
 | 
					# dhcp       - DHCP and DNS functionality
 | 
				
			||||||
 | 
					# zlib       - DEFLATE compression/decompression library.
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# Refer to the README file for more information.
 | 
					# Refer to the README file for more information.
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
#OVERLAY_BUNDLES=glibc_full,links,dropbear,java,felix,mll_utils,lua,static_get,cf_cli,nweb,dhcp
 | 
					#OVERLAY_BUNDLES=glibc_full,links,dropbear,java,felix,mll_utils,lua,static_get,cf_cli,nweb,dhcp
 | 
				
			||||||
OVERLAY_BUNDLES=nweb,dhcp
 | 
					OVERLAY_BUNDLES=dhcp,glibc_full,zlib,openjdk,felix,links
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# 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
 | 
				
			||||||
 | 
				
			|||||||
@ -49,12 +49,15 @@ else
 | 
				
			|||||||
  # Changes the name of the system to 'minimal'.
 | 
					  # Changes the name of the system to 'minimal'.
 | 
				
			||||||
  sed -i "s/.*CONFIG_DEFAULT_HOSTNAME.*/CONFIG_DEFAULT_HOSTNAME=\"minimal\"/" .config
 | 
					  sed -i "s/.*CONFIG_DEFAULT_HOSTNAME.*/CONFIG_DEFAULT_HOSTNAME=\"minimal\"/" .config
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  # Enable overlay support, e.g. merge ro and rw directories.
 | 
					  # Enable overlay support, e.g. merge ro and rw directories (3.18+).
 | 
				
			||||||
  sed -i "s/.*CONFIG_OVERLAY_FS.*/CONFIG_OVERLAY_FS=y/" .config
 | 
					  sed -i "s/.*CONFIG_OVERLAY_FS.*/CONFIG_OVERLAY_FS=y/" .config
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
  # Enable overlayfs redirection 
 | 
					  # Enable overlayfs redirection (4.10+).
 | 
				
			||||||
  echo "CONFIG_OVERLAY_FS_REDIRECT_DIR=y" >> .config
 | 
					  echo "CONFIG_OVERLAY_FS_REDIRECT_DIR=y" >> .config
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  # Turn on inodes index feature by default (4.13+).
 | 
				
			||||||
 | 
					  echo "CONFIG_OVERLAY_FS_INDEX=y" >> .config
 | 
				
			||||||
 | 
					  
 | 
				
			||||||
  # Step 1 - disable all active kernel compression options (should be only one).
 | 
					  # Step 1 - disable all active kernel compression options (should be only one).
 | 
				
			||||||
  sed -i "s/.*\\(CONFIG_KERNEL_.*\\)=y/\\#\\ \\1 is not set/" .config  
 | 
					  sed -i "s/.*\\(CONFIG_KERNEL_.*\\)=y/\\#\\ \\1 is not set/" .config  
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
 | 
				
			|||||||
@ -27,6 +27,11 @@ Currently available overlay bundles:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
               This overlay bundle depends on the GLIBC build process.
 | 
					               This overlay bundle depends on the GLIBC build process.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					* ZLIB       - Software library used for data compression.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					               This overlay bundle is self sufficient and doesn't require other
 | 
				
			||||||
 | 
					               overlay bundles.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
* Links      - text based browser. Requires ~1MB additional space. Use the
 | 
					* Links      - text based browser. Requires ~1MB additional space. Use the
 | 
				
			||||||
               "links" command to activate the browser.
 | 
					               "links" command to activate the browser.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -49,6 +54,10 @@ Currently available overlay bundles:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
               This overlay bundle requires GLIBC.
 | 
					               This overlay bundle requires GLIBC.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					* Open JDK   - The open source JDK. No need for manual steps.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					               This overlay bundle requires GLIBC and ZLIB.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
* Felix OSGi - Apache Felix OSGi framework. Requires ~2MB additional space. Use
 | 
					* Felix OSGi - Apache Felix OSGi framework. Requires ~2MB additional space. Use
 | 
				
			||||||
               the "felix-start" command to run the Apache Felix OSGi framework.
 | 
					               the "felix-start" command to run the Apache Felix OSGi framework.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										41
									
								
								src/minimal_overlay/bundles/openjdk/01_get.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										41
									
								
								src/minimal_overlay/bundles/openjdk/01_get.sh
									
									
									
									
									
										Executable file
									
								
							@ -0,0 +1,41 @@
 | 
				
			|||||||
 | 
					#!/bin/sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					SRC_DIR=$(pwd)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					. ../../common.sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Grab everything after the '=' character.
 | 
				
			||||||
 | 
					DOWNLOAD_URL=$(grep -i OPENJDK_URL $MAIN_SRC_DIR/.config | cut -f2 -d'=')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Grab everything after the last '/' character.
 | 
				
			||||||
 | 
					ARCHIVE_FILE=${DOWNLOAD_URL##*/}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Read the 'USE_LOCAL_SOURCE' property from '.config'
 | 
				
			||||||
 | 
					USE_LOCAL_SOURCE="$(grep -i USE_LOCAL_SOURCE $MAIN_SRC_DIR/.config | cut -f2 -d'=')"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if [ "$USE_LOCAL_SOURCE" = "true" -a ! -f $MAIN_SRC_DIR/source/overlay/$ARCHIVE_FILE ] ; then
 | 
				
			||||||
 | 
					  echo "Bundle $MAIN_SRC_DIR/source/overlay/$ARCHIVE_FILE is missing and will be downloaded."
 | 
				
			||||||
 | 
					  USE_LOCAL_SOURCE="false"
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					cd $MAIN_SRC_DIR/source/overlay
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if [ ! "$USE_LOCAL_SOURCE" = "true" ] ; then
 | 
				
			||||||
 | 
					  # Downloading Open JDK bundle file. The '-c' option allows the download to resume.
 | 
				
			||||||
 | 
					  echo "Downloading Open JDK bundle from $DOWNLOAD_URL"
 | 
				
			||||||
 | 
					  wget -c $DOWNLOAD_URL
 | 
				
			||||||
 | 
					else
 | 
				
			||||||
 | 
					  echo "Using local Open JDK bundle $MAIN_SRC_DIR/source/overlay/$ARCHIVE_FILE"
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Delete folder with previously extracted Felix.
 | 
				
			||||||
 | 
					echo "Removing Open JDK work area. This may take a while..."
 | 
				
			||||||
 | 
					rm -rf $WORK_DIR/overlay/openjdk
 | 
				
			||||||
 | 
					mkdir $WORK_DIR/overlay/openjdk
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Extract Open JDK to folder 'work/overlay/openjdk'.
 | 
				
			||||||
 | 
					# Full path will be something like 'work/overlay/openjdk/jdk-9'.
 | 
				
			||||||
 | 
					tar -xvf $ARCHIVE_FILE -C $WORK_DIR/overlay/openjdk
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					cd $SRC_DIR
 | 
				
			||||||
 | 
					
 | 
				
			||||||
							
								
								
									
										27
									
								
								src/minimal_overlay/bundles/openjdk/02_install.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										27
									
								
								src/minimal_overlay/bundles/openjdk/02_install.sh
									
									
									
									
									
										Executable file
									
								
							@ -0,0 +1,27 @@
 | 
				
			|||||||
 | 
					#!/bin/sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					SRC_DIR=$(pwd)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					. ../../common.sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					cd $WORK_DIR/overlay/openjdk
 | 
				
			||||||
 | 
					mv `ls -d *` openjdk
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					mkdir opt
 | 
				
			||||||
 | 
					mv openjdk opt
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					mkdir $WORK_DIR/overlay/openjdk/bin
 | 
				
			||||||
 | 
					cd $WORK_DIR/overlay/openjdk/bin
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					for FILE in $(ls ../opt/openjdk/bin)
 | 
				
			||||||
 | 
					do
 | 
				
			||||||
 | 
					  ln -s ../opt/openjdk/bin/$FILE $FILE
 | 
				
			||||||
 | 
					done
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					cp -r $WORK_DIR/overlay/openjdk/* \
 | 
				
			||||||
 | 
					  $WORK_DIR/src/minimal_overlay/rootfs
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					echo "Open JDK has been installed."
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					cd $SRC_DIR
 | 
				
			||||||
 | 
					
 | 
				
			||||||
							
								
								
									
										9
									
								
								src/minimal_overlay/bundles/openjdk/bundle.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										9
									
								
								src/minimal_overlay/bundles/openjdk/bundle.sh
									
									
									
									
									
										Executable file
									
								
							@ -0,0 +1,9 @@
 | 
				
			|||||||
 | 
					#!/bin/sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					SRC_DIR=$(pwd)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					time sh 01_get.sh
 | 
				
			||||||
 | 
					time sh 02_install.sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					cd $SRC_DIR
 | 
				
			||||||
 | 
					
 | 
				
			||||||
							
								
								
									
										41
									
								
								src/minimal_overlay/bundles/zlib/01_get.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										41
									
								
								src/minimal_overlay/bundles/zlib/01_get.sh
									
									
									
									
									
										Executable file
									
								
							@ -0,0 +1,41 @@
 | 
				
			|||||||
 | 
					#!/bin/sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					SRC_DIR=$(pwd)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					. ../../common.sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Grab everything after the '=' character.
 | 
				
			||||||
 | 
					DOWNLOAD_URL=$(grep -i ZLIB_SOURCE_URL $MAIN_SRC_DIR/.config | cut -f2 -d'=')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Grab everything after the last '/' character.
 | 
				
			||||||
 | 
					ARCHIVE_FILE=${DOWNLOAD_URL##*/}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Read the 'USE_LOCAL_SOURCE' property from '.config'
 | 
				
			||||||
 | 
					USE_LOCAL_SOURCE="$(grep -i USE_LOCAL_SOURCE $MAIN_SRC_DIR/.config | cut -f2 -d'=')"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if [ "$USE_LOCAL_SOURCE" = "true" -a ! -f $MAIN_SRC_DIR/source/overlay/$ARCHIVE_FILE  ] ; then
 | 
				
			||||||
 | 
					  echo "Source bundle $MAIN_SRC_DIR/source/overlay/$ARCHIVE_FILE is missing and will be downloaded."
 | 
				
			||||||
 | 
					  USE_LOCAL_SOURCE="false"
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					cd $MAIN_SRC_DIR/source/overlay
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if [ ! "$USE_LOCAL_SOURCE" = "true" ] ; then
 | 
				
			||||||
 | 
					  # Downloading ZLIB source bundle file. The '-c' option allows the download to resume.
 | 
				
			||||||
 | 
					  echo "Downloading ZLIB source bundle from $DOWNLOAD_URL"
 | 
				
			||||||
 | 
					  wget -c $DOWNLOAD_URL
 | 
				
			||||||
 | 
					else
 | 
				
			||||||
 | 
					  echo "Using local ZLIB source bundle $MAIN_SRC_DIR/source/overlay/$ARCHIVE_FILE"
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Delete folder with previously extracted ZLIB.
 | 
				
			||||||
 | 
					echo "Removing ZLIB work area. This may take a while..."
 | 
				
			||||||
 | 
					rm -rf $WORK_DIR/overlay/zlib
 | 
				
			||||||
 | 
					mkdir $WORK_DIR/overlay/zlib
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Extract ZLIB to folder 'work/overlay/zlib'.
 | 
				
			||||||
 | 
					# Full path will be something like 'work/overlay/zlib/zlib-1.2.11'.
 | 
				
			||||||
 | 
					tar -xvf $ARCHIVE_FILE -C $WORK_DIR/overlay/zlib
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					cd $SRC_DIR
 | 
				
			||||||
 | 
					
 | 
				
			||||||
							
								
								
									
										40
									
								
								src/minimal_overlay/bundles/zlib/02_build.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										40
									
								
								src/minimal_overlay/bundles/zlib/02_build.sh
									
									
									
									
									
										Executable file
									
								
							@ -0,0 +1,40 @@
 | 
				
			|||||||
 | 
					#!/bin/sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					SRC_DIR=$(pwd)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					. ../../common.sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					cd $WORK_DIR/overlay/zlib
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					DESTDIR="$WORK_DIR/overlay/zlib/zlib_installed"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Change to the Links source directory which ls finds, e.g. 'zlib-1.2.11'.
 | 
				
			||||||
 | 
					cd $(ls -d zlib-*)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					echo "Preparing ZLIB work area. This may take a while..."
 | 
				
			||||||
 | 
					make -j $NUM_JOBS clean
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					rm -rf $DESTDIR
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					echo "Configuring ZLIB..."
 | 
				
			||||||
 | 
					CFLAGS="$CFLAGS" ./configure \
 | 
				
			||||||
 | 
					  --prefix=$DESTDIR
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					echo "Building ZLIB..."
 | 
				
			||||||
 | 
					make -j $NUM_JOBS
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					echo "Installing ZLIB..."
 | 
				
			||||||
 | 
					make -j $NUM_JOBS install
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					echo "Reducing ZLIB size..."
 | 
				
			||||||
 | 
					strip -g $DESTDIR/lib/*
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ROOTFS="$WORK_DIR/src/minimal_overlay/rootfs"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					mkdir -p "$ROOTFS/lib"
 | 
				
			||||||
 | 
					cp -r $DESTDIR/lib/libz.so.1.* $ROOTFS/lib/libz.so.1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					echo "ZLIB has been installed."
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					cd $SRC_DIR
 | 
				
			||||||
 | 
					
 | 
				
			||||||
							
								
								
									
										9
									
								
								src/minimal_overlay/bundles/zlib/bundle.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										9
									
								
								src/minimal_overlay/bundles/zlib/bundle.sh
									
									
									
									
									
										Executable file
									
								
							@ -0,0 +1,9 @@
 | 
				
			|||||||
 | 
					#!/bin/sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					SRC_DIR=$(pwd)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					time sh 01_get.sh
 | 
				
			||||||
 | 
					time sh 02_build.sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					cd $SRC_DIR
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user