From a510e9ac3e765352c904a976bfa0fd499e9dac14 Mon Sep 17 00:00:00 2001 From: Ivan Davidov Date: Fri, 10 Mar 2017 22:31:16 +0200 Subject: [PATCH] Updated software versions. Added experimental 'static-get'. It seems that 'static-get' works fine in normal desktop environment but it doesn't seem to work fine in BusyBox. The problem seems to be somewhere in 'wget' because each downloaded package is ~14KB regardless of its real size. --- src/.config | 13 ++++-- .../bundles/static_get/01_get.sh | 40 +++++++++++++++++++ .../bundles/static_get/02_install.sh | 33 +++++++++++++++ .../bundles/static_get/bundle.sh | 9 +++++ 4 files changed, 92 insertions(+), 3 deletions(-) create mode 100755 src/minimal_overlay/bundles/static_get/01_get.sh create mode 100755 src/minimal_overlay/bundles/static_get/02_install.sh create mode 100755 src/minimal_overlay/bundles/static_get/bundle.sh diff --git a/src/.config b/src/.config index 40c8920e7..cde495093 100644 --- a/src/.config +++ b/src/.config @@ -11,13 +11,13 @@ # # http://kernel.org # -KERNEL_SOURCE_URL=http://kernel.org/pub/linux/kernel/v4.x/linux-4.4.44.tar.xz +KERNEL_SOURCE_URL=http://kernel.org/pub/linux/kernel/v4.x/linux-4.9.13.tar.xz # You can find the latest GNU libc source bundles here: # # http://gnu.org/software/libc # -GLIBC_SOURCE_URL=http://ftp.gnu.org/gnu/glibc/glibc-2.24.tar.bz2 +GLIBC_SOURCE_URL=http://ftp.gnu.org/gnu/glibc/glibc-2.25.tar.bz2 # You can find the latest BusyBox source bundles here: # @@ -73,6 +73,12 @@ FELIX_SOURCE_URL=http://www-us.apache.org/dist/felix/org.apache.felix.main.distr # LUA_SOURCE_URL=https://www.lua.org/ftp/lua-5.3.4.tar.gz +# You can find the latest static-get shell script here: +# +# http://s.minos.io/s +# http://github.com/minos-org/minos-static +# +STATIC_GET_SOURCE_URL=http://s.minos.io/s @@ -158,11 +164,12 @@ COPY_SOURCE_ISO=true # felix - Apache Felix OSGi framework. # mll_utils - set of executable utilities (mll-*). # lua - scripting language +# static_get - portable binaries for Linux (http://s.minos.io) # # Refer to the README file for more information. # #OVERLAY_BUNDLES=glibc_full,links,dropbear,java,felix,mll_utils,lua -#OVERLAY_BUNDLES=mll_utils +#OVERLAY_BUNDLES=static_get # 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 diff --git a/src/minimal_overlay/bundles/static_get/01_get.sh b/src/minimal_overlay/bundles/static_get/01_get.sh new file mode 100755 index 000000000..4bad67ea3 --- /dev/null +++ b/src/minimal_overlay/bundles/static_get/01_get.sh @@ -0,0 +1,40 @@ +#!/bin/sh + +SRC_DIR=$(pwd) + +# Find the main source directory +cd ../../.. +MAIN_SRC_DIR=$(pwd) +cd $SRC_DIR + +# Grab everything after the '=' character. +DOWNLOAD_URL=$(grep -i STATIC_GET_SOURCE_URL $MAIN_SRC_DIR/.config | cut -f2 -d'=') + +# 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/static-get.sh ] ; then + echo "Shell script $MAIN_SRC_DIR/source/overlay/static-get.sh is missing and will be downloaded." + USE_LOCAL_SOURCE="false" +fi + +cd $MAIN_SRC_DIR/source/overlay + +if [ ! "$USE_LOCAL_SOURCE" = "true" ] ; then + # Downloading static-get shell script file. The '-c' option allows the download to resume. + echo "Downloading static-get shell script from $DOWNLOAD_URL" + wget -O static-get.sh -c $DOWNLOAD_URL +else + echo "Using local static-get shell script $MAIN_SRC_DIR/source/overlay/static-get.sh" +fi + +# Delete folder with previously prepared static-get. +echo "Removing static-get work area. This may take a while..." +rm -rf ../../work/overlay/staget +mkdir ../../work/overlay/staget + +# Copy static-get to folder 'work/overlay/staget'. +cp static-get.sh ../../work/overlay/staget + +cd $SRC_DIR + diff --git a/src/minimal_overlay/bundles/static_get/02_install.sh b/src/minimal_overlay/bundles/static_get/02_install.sh new file mode 100755 index 000000000..9d46357dd --- /dev/null +++ b/src/minimal_overlay/bundles/static_get/02_install.sh @@ -0,0 +1,33 @@ +#!/bin/sh + +SRC_DIR=$(pwd) + +# Find the main source directory +cd ../../.. +MAIN_SRC_DIR=$(pwd) +cd $SRC_DIR + +echo "Removing old static-get artifacts. This may take a while..." +rm -rf $MAIN_SRC_DIR/work/overlay/staget/staget_installed +mkdir -p $MAIN_SRC_DIR/work/overlay/staget/staget_installed/opt/staget +mkdir -p $MAIN_SRC_DIR/work/overlay/staget/staget_installed/bin + +cd $MAIN_SRC_DIR/work/overlay/staget + +cp $MAIN_SRC_DIR/source/overlay/static-get.sh . + +chmod +rx static-get.sh + +cp static-get.sh $MAIN_SRC_DIR/work/overlay/staget/staget_installed/opt/staget + +cd $MAIN_SRC_DIR/work/overlay/staget/staget_installed + +ln -s ../opt/staget/static-get.sh bin/static-get + +cp -r $MAIN_SRC_DIR/work/overlay/staget/staget_installed/* \ + $MAIN_SRC_DIR/work/src/minimal_overlay/rootfs + +echo "static-get has been installed." + +cd $SRC_DIR + diff --git a/src/minimal_overlay/bundles/static_get/bundle.sh b/src/minimal_overlay/bundles/static_get/bundle.sh new file mode 100755 index 000000000..cf641b3e8 --- /dev/null +++ b/src/minimal_overlay/bundles/static_get/bundle.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +SRC_DIR=$(pwd) + +time sh 01_get.sh +time sh 02_install.sh + +cd $SRC_DIR +