From 056e0ee1409832e3d25ba87f541b160bea8dcde0 Mon Sep 17 00:00:00 2001 From: FooDeas Date: Wed, 14 Nov 2018 15:06:48 +0100 Subject: [PATCH 1/4] installer: expand initramfs maximum size (solves #163) start software RNG later to save memory --- CHANGELOG.md | 4 ++++ build.sh | 2 +- scripts/opt/raspberrypi-ua-netinst/install.sh | 14 +++++++------- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 356be030..b061feaa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## raspberrypi-ua-netinst v2.2.2 + +- fix compatibility with version 1 model B (with 256MB RAM) + ## raspberrypi-ua-netinst v2.2.1 - fix compatibility with onboard wireless lan on version 3 model B+ (with BCM2837B0) diff --git a/build.sh b/build.sh index 428a2a9a..767a479a 100755 --- a/build.sh +++ b/build.sh @@ -745,7 +745,7 @@ mv raspberrypi-ua-netinst.cpio.gz bootfs/raspberrypi-ua-netinst/ echo "enable_uart=1" } >> bootfs/config.txt -echo "dwc_otg.lpm_enable=0 consoleblank=0 console=serial0,115200 console=tty1 elevator=deadline rootwait" > bootfs/cmdline.txt +echo "rootfstype=ramfs dwc_otg.lpm_enable=0 consoleblank=0 console=serial0,115200 console=tty1 elevator=deadline rootwait" > bootfs/cmdline.txt if [ ! -f bootfs/TIMEOUT ] ; then touch bootfs/TIMEOUT diff --git a/scripts/opt/raspberrypi-ua-netinst/install.sh b/scripts/opt/raspberrypi-ua-netinst/install.sh index e1584aa4..8fdbdf23 100644 --- a/scripts/opt/raspberrypi-ua-netinst/install.sh +++ b/scripts/opt/raspberrypi-ua-netinst/install.sh @@ -674,13 +674,6 @@ echo "==================================================" echo "https://github.com/FooDeas/raspberrypi-ua-netinst/" echo "==================================================" -echo -n "Starting HWRNG... " -if /usr/sbin/rngd -r /dev/hwrng; then - echo "OK" -else - echo "FAILED! (continuing to use the software RNG)" -fi - echo -n "Mounting boot partition... " mount "${bootpartition}" /boot || fail echo "OK" @@ -1546,6 +1539,13 @@ if [ "$(free -m | awk '/^Mem:/{print $2}')" -lt "384" ]; then echo "OK" fi +echo -n "Starting HWRNG... " +if /usr/sbin/rngd -r /dev/hwrng; then + echo "OK" +else + echo "FAILED! (continuing to use the software RNG)" +fi + if [ "${kernel_module}" = true ]; then if [ "${rootfstype}" != "ext4" ]; then mkdir -p /rootfs/etc/initramfs-tools From 78c55e8306a1cf50d06f762517c02444c044c1f4 Mon Sep 17 00:00:00 2001 From: markslater Date: Thu, 15 Nov 2018 23:46:35 +0000 Subject: [PATCH 2/4] build: compatibility with wget < 1.6 (#164) the --show-progress option was only introduced in wget 1.6: http://savannah.gnu.org/forum/forum.php?forum_id=8133. Avoiding it supports a wider range of build environments. --- update.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/update.sh b/update.sh index fdeeb725..021a7b20 100755 --- a/update.sh +++ b/update.sh @@ -122,9 +122,15 @@ packages_sha256= download_file() { local download_source=$1 local download_target=$2 + local progress_option + if wget --show-progress --version &> /dev/null; [ "$?" -eq 2 ]; then + progress_option=( ) + else + progress_option=( --show-progress ) + fi if [ -z "${download_target}" ]; then for i in $(seq 1 5); do - if ! wget -q --show-progress --no-cache "${download_source}"; then + if ! wget "${progress_option[@]}" -q --no-cache "${download_source}"; then if [ "${i}" != "5" ]; then sleep 5 else @@ -137,7 +143,7 @@ download_file() { done else for i in $(seq 1 5); do - if ! wget -q --show-progress --no-cache -O "${download_target}" "${download_source}"; then + if ! wget "${progress_option[@]}" -q --no-cache -O "${download_target}" "${download_source}"; then if [ "${i}" != "5" ]; then sleep 5 else From 718ce936c6fa24cbb5f7fdc59ac06505b6353d46 Mon Sep 17 00:00:00 2001 From: FooDeas Date: Fri, 16 Nov 2018 11:21:42 +0100 Subject: [PATCH 3/4] build: code style --- update.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/update.sh b/update.sh index 021a7b20..cdfda43a 100755 --- a/update.sh +++ b/update.sh @@ -123,10 +123,10 @@ download_file() { local download_source=$1 local download_target=$2 local progress_option - if wget --show-progress --version &> /dev/null; [ "$?" -eq 2 ]; then - progress_option=( ) + if wget --show-progress --version &> /dev/null; [ "${?}" -eq 2 ]; then + progress_option=() else - progress_option=( --show-progress ) + progress_option=("--show-progress") fi if [ -z "${download_target}" ]; then for i in $(seq 1 5); do From 0d76789672140fb25b9ac5e71929b45a8d9abb73 Mon Sep 17 00:00:00 2001 From: FooDeas Date: Fri, 16 Nov 2018 13:38:54 +0100 Subject: [PATCH 4/4] doc: update changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b061feaa..602b680d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## raspberrypi-ua-netinst v2.2.2 +- build improvements + +**Bugfixes:** + - fix compatibility with version 1 model B (with 256MB RAM) ## raspberrypi-ua-netinst v2.2.1