From d4acdea668c6baa96b4bfd2771c9878fc0ef89dc Mon Sep 17 00:00:00 2001 From: Dieter Reuter Date: Wed, 4 Oct 2017 22:25:00 +0200 Subject: [PATCH 1/2] Upgrade to Debian Stretch (but inline from Jessie) Signed-off-by: Dieter Reuter --- builder/chroot-script.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/builder/chroot-script.sh b/builder/chroot-script.sh index 4a2c1e5..6dcb9b5 100644 --- a/builder/chroot-script.sh +++ b/builder/chroot-script.sh @@ -238,10 +238,31 @@ echo "Installing rpi-serial-console script" wget -q https://raw.githubusercontent.com/lurch/rpi-serial-console/master/rpi-serial-console -O usr/local/bin/rpi-serial-console chmod +x usr/local/bin/rpi-serial-console +#TODO:+++ remove as soon as we do have a Debian Stretch os-rootfs image +# upgrade to Debian Stretch +# see: https://linuxconfig.org/how-to-upgrade-debian-8-jessie-to-debian-9-stretch +apt-get dist-upgrade -y +sed -i 's/jessie/stretch/g' /etc/apt/sources.list +apt-get update +DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical apt-get -q -y -o "Dpkg::Options::=--force-confdef" -o "Dpkg::Options::=--force-confold" upgrade +DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical apt-get -q -y -o "Dpkg::Options::=--force-confdef" -o "Dpkg::Options::=--force-confold" dist-upgrade +sed -i 's/Linux 8/Linux 9/g' /etc/issue +sed -i 's/Linux 8/Linux 9/g' /etc/issue.net +sed -i 's/Linux 8/Linux 9/g' /etc/motd +#TODO:--- + # cleanup APT cache and lists apt-get clean rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* +#TODO:+++ remove as soon as we do have a Debian Stretch os-rootfs image +# set HypriotOS version infos +BUILD_ARCH="${BUILD_ARCH:-arm64}" +HYPRIOT_OS_VERSION="${HYPRIOT_OS_VERSION:-v1.1.1}" +echo "HYPRIOT_OS=\"HypriotOS/${BUILD_ARCH}\"" >> /etc/os-release +echo "HYPRIOT_OS_VERSION=\"${HYPRIOT_OS_VERSION}\"" >> /etc/os-release +#TODO:--- + # set device label and version number echo "HYPRIOT_DEVICE=\"$HYPRIOT_DEVICE\"" >> /etc/os-release echo "HYPRIOT_IMAGE_VERSION=\"$HYPRIOT_IMAGE_VERSION\"" >> /etc/os-release From e1527a0256724408750f20ea63c468ff9c98c733 Mon Sep 17 00:00:00 2001 From: Dieter Reuter Date: Wed, 4 Oct 2017 22:49:07 +0200 Subject: [PATCH 2/2] Fix renaming eth0 for Debian Stretch Signed-off-by: Dieter Reuter --- builder/chroot-script.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/builder/chroot-script.sh b/builder/chroot-script.sh index 6dcb9b5..04c950d 100644 --- a/builder/chroot-script.sh +++ b/builder/chroot-script.sh @@ -142,7 +142,8 @@ usermod -a -G video pirate printf "# Spawn a getty on Raspberry Pi serial line\nT0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100\n" >> /etc/inittab # boot/cmdline.txt -echo "+dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 cgroup_enable=cpuset cgroup_enable=memory swapaccount=1 elevator=deadline fsck.repair=yes rootwait console=ttyAMA0,115200 kgdboc=ttyAMA0,115200" > /boot/cmdline.txt +echo "+dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 cgroup_enable=cpuset cgroup_enable=memory swapaccount=1 elevator=deadline fsck.repair=yes rootwait console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 net.ifnames=0" > /boot/cmdline.txt +# " net.ifnames=0" is neccessary for Debian Stretch: see https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/ # create a default boot/config.txt file (details see http://elinux.org/RPiconfig) echo "