From 894a06bd0d675f69d053c74ca5c6e7c7a5089415 Mon Sep 17 00:00:00 2001 From: bauen1 Date: Mon, 13 Nov 2017 19:32:51 +0100 Subject: [PATCH 1/3] Fix small mistakes in several overlay bundles --- src/minimal_overlay/bundles/dropbear/01_get.sh | 2 +- src/minimal_overlay/bundles/lua/01_get.sh | 2 +- src/minimal_overlay/bundles/util_linux/01_get.sh | 0 src/minimal_overlay/bundles/util_linux/02_build.sh | 0 src/minimal_overlay/bundles/util_linux/bundle.sh | 0 5 files changed, 2 insertions(+), 2 deletions(-) mode change 100644 => 100755 src/minimal_overlay/bundles/util_linux/01_get.sh mode change 100644 => 100755 src/minimal_overlay/bundles/util_linux/02_build.sh mode change 100644 => 100755 src/minimal_overlay/bundles/util_linux/bundle.sh diff --git a/src/minimal_overlay/bundles/dropbear/01_get.sh b/src/minimal_overlay/bundles/dropbear/01_get.sh index bcf116a03..06c36109f 100755 --- a/src/minimal_overlay/bundles/dropbear/01_get.sh +++ b/src/minimal_overlay/bundles/dropbear/01_get.sh @@ -22,7 +22,7 @@ cd $MAIN_SRC_DIR/source/overlay if [ ! "$USE_LOCAL_SOURCE" = "true" ] ; then # Downloading Dropbear source bundle file. The '-c' option allows the download to resume. - echo "Downloading Links source bundle from $DOWNLOAD_URL" + echo "Downloading Dropbear source bundle from $DOWNLOAD_URL" wget -c $DOWNLOAD_URL else echo "Using local Dropbear source bundle $MAIN_SRC_DIR/source/overlay/$ARCHIVE_FILE" diff --git a/src/minimal_overlay/bundles/lua/01_get.sh b/src/minimal_overlay/bundles/lua/01_get.sh index b9182c5d3..2a2a91bfa 100755 --- a/src/minimal_overlay/bundles/lua/01_get.sh +++ b/src/minimal_overlay/bundles/lua/01_get.sh @@ -22,7 +22,7 @@ cd $MAIN_SRC_DIR/source/overlay if [ ! "$USE_LOCAL_SOURCE" = "true" ] ; then # Downloading the Lua bundle file. The '-c' option allows the download to resume. - echo "Downloading the Lua source bundle from $DOWNLOAD_URL" + echo "Downloading Lua source bundle from $DOWNLOAD_URL" wget -c $DOWNLOAD_URL else echo "Using local Lua source bundle $MAIN_SRC_DIR/source/overlay/$ARCHIVE_FILE" diff --git a/src/minimal_overlay/bundles/util_linux/01_get.sh b/src/minimal_overlay/bundles/util_linux/01_get.sh old mode 100644 new mode 100755 diff --git a/src/minimal_overlay/bundles/util_linux/02_build.sh b/src/minimal_overlay/bundles/util_linux/02_build.sh old mode 100644 new mode 100755 diff --git a/src/minimal_overlay/bundles/util_linux/bundle.sh b/src/minimal_overlay/bundles/util_linux/bundle.sh old mode 100644 new mode 100755 From c42bfca21f279cfc1c3fc57bfc1402bef2f130fd Mon Sep 17 00:00:00 2001 From: bauen1 Date: Mon, 13 Nov 2017 19:44:31 +0100 Subject: [PATCH 2/3] Created qemu.sh from qemu32.sh and qemu64.sh It automatically detects the architecture to use based on the host system --- src/Makefile | 2 +- src/README | 8 +++----- src/{qemu32.sh => qemu.sh} | 2 +- src/qemu64.sh | 21 --------------------- 4 files changed, 5 insertions(+), 28 deletions(-) rename src/{qemu32.sh => qemu.sh} (90%) delete mode 100755 src/qemu64.sh diff --git a/src/Makefile b/src/Makefile index 94159a217..5bdba0fed 100644 --- a/src/Makefile +++ b/src/Makefile @@ -27,7 +27,7 @@ clean: qemu: @if [ ! -f ./minimal_linux_live.iso ]; then echo "ISO image \"minimal_linux_live.iso\" not found."; exit 1; fi @echo "Launching QEMU..." - @if [ "$(shell uname -m)" = "x86_64" ]; then sh qemu64.sh; else sh qemu32.sh; fi + @qemu.sh src: @echo "Generating source archive..." diff --git a/src/README b/src/README index a53b54655..0edb6c06e 100644 --- a/src/README +++ b/src/README @@ -72,11 +72,9 @@ Currently available overlay bundles: * Lua - The Lua Scripting Language 5.3. Requires ~ 800kb additional space. Use the "lua" command to run an interactive lua interpreter -* nweb - nweb is a very small and easy to use webserver - run it using 'nweb 80 /srv/www' - to portforward port 8080 on the host to port 80 on the guest (minimal) - add '-net nic,model=e1000 -net user,hostfwd=tcp::8080-:80' to the cmd in - qemu64.sh and qemu32.sh +* nweb - nweb is a very small and easy to use webserver, it is run 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 qemu.sh * dhcp - DHCP and DNS functionality diff --git a/src/qemu32.sh b/src/qemu.sh similarity index 90% rename from src/qemu32.sh rename to src/qemu.sh index 812ab9374..0919a190e 100755 --- a/src/qemu32.sh +++ b/src/qemu.sh @@ -10,7 +10,7 @@ # If you get kernel panic with message "No working init found", then try to # increase the RAM from 128M to 256M. -cmd="qemu-system-i386 -m 128M -cdrom minimal_linux_live.iso -boot d -vga std" +cmd="qemu-system-$(uname -m) -m 128M -cdrom minimal_linux_live.iso -boot d -vga std" if [ "$1" = "-hdd" -o "$1" = "-h" ] ; then echo "Starting QEMU with attached ISO image and hard disk." diff --git a/src/qemu64.sh b/src/qemu64.sh deleted file mode 100755 index b3e83fd77..000000000 --- a/src/qemu64.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh - -# Use this script without arguments to run the generated ISO image with QEMU. -# If you pass '-hdd' or '-h' the virtual hard disk 'hdd.img' will be attached. -# Note that this virtual hard disk has to be created in advance. You can use -# the script 'generate_hdd.sh' to generate the hard disk image file. Once you -# have hard disk image, you can use it as overlay device and persist all your -# changes. See the '.config' file for more information on the overlay support. -# -# If you get kernel panic with message "No working init found", then try to -# increase the RAM from 128M to 256M. - -cmd="qemu-system-x86_64 -m 128M -cdrom minimal_linux_live.iso -boot d -vga std" - -if [ "$1" = "-hdd" -o "$1" = "-h" ] ; then - echo "Starting QEMU with attached ISO image and hard disk." - $cmd -hda hdd.img -else - echo "Starting QEMU with attached ISO image." - $cmd -fi From 14517c7d1c690b55c60ff7304d2eb4a5b7fca375 Mon Sep 17 00:00:00 2001 From: bauen1 Date: Mon, 13 Nov 2017 19:48:45 +0100 Subject: [PATCH 3/3] Fixed make qemu target --- src/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Makefile b/src/Makefile index 5bdba0fed..c7f9a24e1 100644 --- a/src/Makefile +++ b/src/Makefile @@ -27,7 +27,7 @@ clean: qemu: @if [ ! -f ./minimal_linux_live.iso ]; then echo "ISO image \"minimal_linux_live.iso\" not found."; exit 1; fi @echo "Launching QEMU..." - @qemu.sh + @./qemu.sh src: @echo "Generating source archive..."