Merge pull request #110 from bauen1/misc-changes

Misc changes - added deps for some bundles, autorun enhancements, host resolution, code refactoring.
This commit is contained in:
Ivan Davidov 2017-11-18 22:59:03 +02:00 committed by GitHub
commit 23f34f3941
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
23 changed files with 164 additions and 143 deletions

View File

@ -238,29 +238,30 @@ 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).
# cf_cli - CLoud Foundry CLI (command line interface). # cf_cli - CLoud Foundry CLI (command line interface).
# coreutils - set of commonly used GNU executable utilities. # coreutils - set of commonly used GNU executable utilities.
# dhcp - DHCP and DNS functionality. # dhcp - DHCP and DNS functionality.
# dialog - shell scripting for ncurses # dialog - shell scripting for ncurses
# dropbear - SSH server and client. # dropbear - SSH server and client.
# felix - Apache Felix OSGi framework. # felix - Apache Felix OSGi framework.
# fio - I/O load generator. # fio - I/O load generator.
# java - installs Oracle's JRE or JDK. Manual preparations are required. # java - installs Oracle's JRE or JDK. Manual preparations are required.
# kbd - keyboard utilities # kbd - keyboard utilities
# libevent - event notification library. # kexec-tools - execute another kernel from userspace
# links - text browser for the web. # libevent - event notification library.
# lua - scripting language. # links - text browser for the web.
# mll_utils - set of executable utilities (mll-*). # lua - scripting language.
# nano - simple command-line text editor with on-screen shortcuts.git # mll_utils - set of executable utilities (mll-*).
# ncurses - "GUI-like" API that runs within a terminal emulator. # nano - simple command-line text editor with on-screen shortcuts.git
# nweb - simple mini http server. # ncurses - "GUI-like" API that runs within a terminal emulator.
# openjdk - installs Open JDK. All operations are automated. # nweb - simple mini http server.
# static_get - portable binaries for Linux (http://s.minos.io). # openjdk - installs Open JDK. All operations are automated.
# stress - CPU and RAM load generator. # static_get - portable binaries for Linux (http://s.minos.io).
# util_linux - set of executable utilities distributed by the Linux Kernel Org. # stress - CPU and RAM load generator.
# vim - an advanced text editor. # util_linux - set of executable utilities distributed by the Linux Kernel Org.
# zlib - DEFLATE compression/decompression library. # vim - an advanced text editor.
# zlib - DEFLATE compression/decompression library.
# #
# Refer to the README file for more information. # Refer to the README file for more information.
# #

View File

@ -1,12 +1,11 @@
#!/bin/sh #!/bin/sh
set -e
echo "*** CLEAN BEGIN ***" echo "*** CLEAN BEGIN ***"
echo "Cleaning up the main work area. This may take a while..." echo "Cleaning up the main work area. This may take a while..."
rm -rf work rm -rf work
mkdir work mkdir work
# -p stops errors if the directory already exists
mkdir -p source mkdir -p source
echo "*** CLEAN END ***" echo "*** CLEAN END ***"

View File

@ -1,4 +1,5 @@
#!/bin/sh #!/bin/sh
set -e
echo "*** PREPARE SRC BEGIN ***" echo "*** PREPARE SRC BEGIN ***"

View File

@ -1,4 +1,5 @@
#!/bin/sh #!/bin/sh
set -e
echo "*** GENERATE ROOTFS BEGIN ***" echo "*** GENERATE ROOTFS BEGIN ***"

View File

@ -1,4 +1,5 @@
#!/bin/sh #!/bin/sh
set -e
echo "*** PACK ROOTFS BEGIN ***" echo "*** PACK ROOTFS BEGIN ***"

View File

@ -1,4 +1,5 @@
#!/bin/sh #!/bin/sh
set -e
echo "*** GET SYSLINUX BEGIN ***" echo "*** GET SYSLINUX BEGIN ***"

View File

@ -20,100 +20,102 @@ additional software being downloaded, built and installed on the ISO image.
Currently available overlay bundles: Currently available overlay bundles:
* GLIBC - Set of all core GNU C libraries packaged together. Requires ~3MB * GLIBC - Set of all core GNU C libraries packaged together. Requires ~3MB
additional space. This overlay bundle is not host specific and additional space. This overlay bundle is not host specific and
can always be built. The libraries are useful if you plan to use can always be built. The libraries are useful if you plan to use
more software after boot. more software after boot.
This overlay bundle depends on the GLIBC build process. This overlay bundle depends on the GLIBC build process.
* coreutils - set of commonly used GNU executable utilities. * coreutils - set of commonly used GNU executable utilities.
* dhcp - DHCP and DNS functionality to connect to the Internet. * dhcp - DHCP and DNS functionality to connect to the Internet.
* dialog - shell scripting library for ncurses * dialog - shell scripting library for ncurses
This overlay bundle requires ncurses This overlay bundle requires ncurses
* Dropbear - SSH server/client. Requires ~1MB additional space. The build * Dropbear - SSH server/client. Requires ~1MB additional space. The build
process creates user 'root' with password 'toor'. These are process creates user 'root' with password 'toor'. These are
sample commands which demonstrate how to use Dropbear: sample commands which demonstrate how to use Dropbear:
SSH server (Alt + F1): dropbear -E -F SSH server (Alt + F1): dropbear -E -F
SSH client (Alt + F2): dbclient 10.0.2.15 -l root SSH client (Alt + F2): dbclient 10.0.2.15 -l root
This overlay bundle requires GLIBC. This overlay bundle requires GLIBC.
* 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.
This overlay bundle requires JRE or JDK. This overlay bundle requires JRE or JDK.
* fio - I/O load generator that can simulate a wide variety of workloads * fio - I/O load generator that can simulate a wide variety of workloads
on RAM or disks. fio is essential for troubleshooting data on RAM or disks. fio is essential for troubleshooting data
bottlenecks. bottlenecks.
* JRE / JDK - Oracle's JRE or JDK. Requires ~366MB additional space for JDK. * JRE / JDK - Oracle's JRE or JDK. Requires ~366MB additional space for JDK.
This overlay bundle requires some manual preparation steps. Refer This overlay bundle requires some manual preparation steps. Refer
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:
loadkeys de loadkeys de
* libevent - event notification library API provides a mechanism to execute a * libevent - event notification library API provides a mechanism to execute a
callback function when a specific event occurs on a file callback function when a specific event occurs on a file
descriptor or after a timeout has been reached. descriptor or after a timeout has been reached.
* Links - Text based browser. Requires ~1MB additional space. Use the * kexec-tools - Kexec tools, can be used to boot another kernel from userspace
"links" command to activate the browser.
* Open JDK - The open source JDK. No need for manual steps. * Links - Text based browser. Requires ~1MB additional space. Use the
"links" command to activate the browser.
This overlay bundle requires GLIBC and ZLIB. * Open JDK - The open source JDK. No need for manual steps.
* Lua - The Lua Scripting Language 5.3. Requires ~ 800kb additional This overlay bundle requires GLIBC and ZLIB.
space. Use the "lua" command to run an interactive lua
interpreter.
* MLL Utils - Set of experimental shell scripts (mll-*.sh) which provide * Lua - The Lua Scripting Language 5.3. Requires ~ 800kb additional
additional functionality, e.g. installer and useful tools. space. Use the "lua" command to run an interactive lua
interpreter.
This overlay bundle is currently experimental and its build * MLL Utils - Set of experimental shell scripts (mll-*.sh) which provide
process depends on the host machine. additional functionality, e.g. installer and useful tools.
* nano - Simple command-line text editor with on-screen shortcuts. This overlay bundle is currently experimental and its build
process depends on the host machine.
This overlay bundle requires ncurses. * nano - Simple command-line text editor with on-screen shortcuts.
* ncurses - "GUI-like" API that runs within a terminal emulator. This overlay bundle requires ncurses.
* nweb - nweb is a very small and easy to use webserver, it is run * ncurses - "GUI-like" API that runs within a terminal emulator.
automatically on port 80. To portforward port 80 from the
guest (minimal) to port 8080 on the host add
'-net nic,model=e1000 -net user,hostfwd=tcp::8080-:80' to
'cmd' in the qemu.sh file.
* stress - simple workload generator. Imposes a configurable amount of CPU, * nweb - nweb is a very small and easy to use webserver, it is run
memory, I/O, and disk stress on the system. stress is useful for automatically on port 80. To portforward port 80 from the
troubleshooting CPU and RAM. guest (minimal) to port 8080 on the host add
'-net nic,model=e1000 -net user,hostfwd=tcp::8080-:80' to
'cmd' in the qemu.sh file.
* util_linux - Set of executable utilities distributed by the Linux Kernel * stress - simple workload generator. Imposes a configurable amount of CPU,
similar to busybox or GNU Core Utils. memory, I/O, and disk stress on the system. stress is useful for
troubleshooting CPU and RAM.
Some packages in this overlay bundle require ncurses. * util_linux - Set of executable utilities distributed by the Linux Kernel
similar to busybox or GNU Core Utils.
* vim - An advanced text editor that seeks to provide the power of Some packages in this overlay bundle require ncurses.
the de-facto Unix editor 'Vi', with a more complete feature
set.
This package will create symlinks on top of vi. * vim - An advanced text editor that seeks to provide the power of
the de-facto Unix editor 'Vi', with a more complete feature
set.
* ZLIB - Software library used for data compression. This package will create symlinks on top of vi.
* ZLIB - Software library used for data compression.
### ### ### ### ### ###

View File

@ -13,6 +13,8 @@ DESTDIR="$MAIN_SRC_DIR/work/src/minimal_overlay/rootfs"
mkdir -p "$DESTDIR" mkdir -p "$DESTDIR"
install -d -m755 "$DESTDIR/etc" install -d -m755 "$DESTDIR/etc"
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 -m644 "$SRC_DIR/resolv.conf" "$DESTDIR/etc/resolv.conf"
install -d -m755 "$DESTDIR/etc/autorun" install -d -m755 "$DESTDIR/etc/autorun"
install -m755 "$SRC_DIR/01_network.sh" "$DESTDIR/etc/autorun/01_network.sh" install -m755 "$SRC_DIR/01_network.sh" "$DESTDIR/etc/autorun/01_network.sh"
@ -22,6 +24,7 @@ install -m755 "$SRC_DIR/05_rc.dhcp" "$DESTDIR/etc/05_rc.dhcp"
install -d -m755 "$DESTDIR/lib" install -d -m755 "$DESTDIR/lib"
install -m755 "$SYSROOT/lib/libresolv.so.2" "$DESTDIR/lib/libresolv.so.2" install -m755 "$SYSROOT/lib/libresolv.so.2" "$DESTDIR/lib/libresolv.so.2"
install -m755 "$SYSROOT/lib/libnss_dns.so.2" "$DESTDIR/lib/libnss_dns.so.2" install -m755 "$SYSROOT/lib/libnss_dns.so.2" "$DESTDIR/lib/libnss_dns.so.2"
install -m755 "$SYSROOT/lib/libnss_files.so.2" "$DESTDIR/lib/libnss_files.so.2"
strip -g "$DESTDIR/lib/*" 2>/dev/null strip -g "$DESTDIR/lib/*" 2>/dev/null
echo "dhcp scripts and libraries have been installed" echo "dhcp scripts and libraries have been installed"

View File

@ -0,0 +1,5 @@
# /etc/hosts
127.0.0.1 localhost
# ipv6
::1 localhost ipv6-localhost

View File

@ -0,0 +1 @@
hosts: files dns

View File

@ -0,0 +1 @@
ncurses

View File

@ -0,0 +1 @@
glibc_full

View File

@ -0,0 +1 @@
ncurses

View File

@ -24,7 +24,7 @@ install -m644 "$SRC_DIR/index.html" "$DESTDIR/srv/www/index.html"
install -m644 "$SRC_DIR/favicon.ico" "$DESTDIR/srv/www/favicon.ico" install -m644 "$SRC_DIR/favicon.ico" "$DESTDIR/srv/www/favicon.ico"
install -d -m755 "$DESTDIR/etc" install -d -m755 "$DESTDIR/etc"
install -d -m755 "$DESTDIR/etc/autorun" install -d -m755 "$DESTDIR/etc/autorun"
install -m755 "$SRC_DIR/nweb.sh" "$DESTDIR/etc/autorun/90_nweb.sh" 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

@ -0,0 +1 @@
ncurses

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/bin/sh
SRC_DIR=$(pwd) SRC_DIR=$(pwd)

View File

@ -30,8 +30,10 @@ echo -e "Welcome to \\e[1mMinimal \\e[32mLinux \\e[31mLive\\e[0m (/sbin/init)"
if [ -d /etc/autorun ] ; then if [ -d /etc/autorun ] ; then
for AUTOSCRIPT in /etc/autorun/* for AUTOSCRIPT in /etc/autorun/*
do do
echo -e "Executing \\e[32m$AUTOSCRIPT\\e[0m in subshell." if [ -f "$AUTOSCRIPT" ] && [ -x "$AUTOSCRIPT" ]; then
sh $AUTOSCRIPT echo -e "Executing \\e[32m$AUTOSCRIPT\\e[0m in subshell."
$AUTOSCRIPT
fi
done done
fi fi