From 2c0d3ff7b348ab14d6afe535752c88759d229ce6 Mon Sep 17 00:00:00 2001 From: Dieter Reuter Date: Sat, 9 Apr 2016 12:35:28 +0200 Subject: [PATCH 1/8] Upgrade HYPRIOT_OS_VERSION to v0.8.2 --- builder/build.sh | 2 +- .../test-integration/spec/hypriotos-image/base/release_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/builder/build.sh b/builder/build.sh index 7eb2534..b0bc565 100755 --- a/builder/build.sh +++ b/builder/build.sh @@ -15,7 +15,7 @@ BUILD_RESULT_PATH="/workspace" BUILD_PATH="/build" # config vars for the root file system -HYPRIOT_OS_VERSION="v0.8.1" +HYPRIOT_OS_VERSION="v0.8.2" ROOTFS_TAR="rootfs-armhf-raspbian-${HYPRIOT_OS_VERSION}.tar.gz" ROOTFS_TAR_PATH="${BUILD_RESULT_PATH}/${ROOTFS_TAR}" diff --git a/builder/test-integration/spec/hypriotos-image/base/release_spec.rb b/builder/test-integration/spec/hypriotos-image/base/release_spec.rb index 5d3de3c..b35c935 100644 --- a/builder/test-integration/spec/hypriotos-image/base/release_spec.rb +++ b/builder/test-integration/spec/hypriotos-image/base/release_spec.rb @@ -6,7 +6,7 @@ it { should be_file } it { should be_owned_by 'root' } its(:content) { should match /HYPRIOT_OS="HypriotOS\/armhf"/ } - its(:content) { should match /HYPRIOT_OS_VERSION="v0.7.2"/ } + its(:content) { should match /HYPRIOT_OS_VERSION="v0.8.2"/ } its(:content) { should match /HYPRIOT_DEVICE="Raspberry Pi"/ } its(:content) { should match /HYPRIOT_IMAGE_VERSION=/ } end From cf9331b099dfcd0414e2dd7f9e3101c4ef9565ab Mon Sep 17 00:00:00 2001 From: Dieter Reuter Date: Sat, 9 Apr 2016 12:39:13 +0200 Subject: [PATCH 2/8] Upgrade docker-hypriot to 1.10.3-1 --- builder/build.sh | 2 +- .../test-integration/spec/hypriotos-image/docker_spec.rb | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/builder/build.sh b/builder/build.sh index b0bc565..49611c3 100755 --- a/builder/build.sh +++ b/builder/build.sh @@ -34,7 +34,7 @@ export HYPRIOT_IMAGE_VERSION # specific versions of kernel/firmware and docker tools export KERNEL_BUILD="20160404-055934" export KERNEL_VERSION="4.1.20" -export DOCKER_ENGINE_VERSION="1.10.1-1" +export DOCKER_ENGINE_VERSION="1.10.3-1" export DOCKER_COMPOSE_VERSION="1.6.0-27" export DOCKER_MACHINE_VERSION="0.4.1-72" export DEVICE_INIT_VERSION="0.0.14" diff --git a/builder/test-integration/spec/hypriotos-image/docker_spec.rb b/builder/test-integration/spec/hypriotos-image/docker_spec.rb index abb5d06..878643b 100644 --- a/builder/test-integration/spec/hypriotos-image/docker_spec.rb +++ b/builder/test-integration/spec/hypriotos-image/docker_spec.rb @@ -6,7 +6,7 @@ describe command('dpkg -l docker-hypriot') do its(:stdout) { should match /ii docker-hypriot/ } - its(:stdout) { should match /1.10.1-1/ } + its(:stdout) { should match /1.10.3-1/ } its(:exit_status) { should eq 0 } end @@ -55,13 +55,13 @@ end describe command('docker -v') do - its(:stdout) { should match /Docker version 1.10.1, build/ } + its(:stdout) { should match /Docker version 1.10.3, build/ } its(:exit_status) { should eq 0 } end describe command('docker version') do - its(:stdout) { should match /Client:. Version: 1.10.1. API version: 1.22/m } - its(:stdout) { should match /Server:. Version: 1.10.1. API version: 1.22/m } + its(:stdout) { should match /Client:. Version: 1.10.3. API version: 1.22/m } + its(:stdout) { should match /Server:. Version: 1.10.3. API version: 1.22/m } its(:exit_status) { should eq 0 } end From 17c49417beaea4f4e61545d120748a926464aa60 Mon Sep 17 00:00:00 2001 From: Dieter Reuter Date: Sat, 9 Apr 2016 12:40:55 +0200 Subject: [PATCH 3/8] Upgrade docker-compose to 1.6.2-28 --- builder/build.sh | 2 +- .../spec/hypriotos-image/docker-compose_spec.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/builder/build.sh b/builder/build.sh index 49611c3..9d3b2b9 100755 --- a/builder/build.sh +++ b/builder/build.sh @@ -35,7 +35,7 @@ export HYPRIOT_IMAGE_VERSION export KERNEL_BUILD="20160404-055934" export KERNEL_VERSION="4.1.20" export DOCKER_ENGINE_VERSION="1.10.3-1" -export DOCKER_COMPOSE_VERSION="1.6.0-27" +export DOCKER_COMPOSE_VERSION="1.6.2-28" export DOCKER_MACHINE_VERSION="0.4.1-72" export DEVICE_INIT_VERSION="0.0.14" diff --git a/builder/test-integration/spec/hypriotos-image/docker-compose_spec.rb b/builder/test-integration/spec/hypriotos-image/docker-compose_spec.rb index abcf38d..3e9ffe6 100644 --- a/builder/test-integration/spec/hypriotos-image/docker-compose_spec.rb +++ b/builder/test-integration/spec/hypriotos-image/docker-compose_spec.rb @@ -6,7 +6,7 @@ describe command('dpkg -l docker-compose') do its(:stdout) { should match /ii docker-compose/ } - its(:stdout) { should match /1.6.0-27/ } + its(:stdout) { should match /1.6.2-28/ } its(:exit_status) { should eq 0 } end @@ -17,6 +17,6 @@ end describe command('docker-compose --version') do - its(:stdout) { should match /1.6.0/m } + its(:stdout) { should match /1.6.2/m } its(:exit_status) { should eq 0 } end From dc0682c47b8b0ce424cbf662cfd076ea7ef4781b Mon Sep 17 00:00:00 2001 From: Dieter Reuter Date: Sat, 9 Apr 2016 13:44:24 +0200 Subject: [PATCH 4/8] Install WiFi firmware packages --- builder/chroot-script.sh | 8 ++++++++ .../hypriotos-image/base/packages_spec.rb | 20 +++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/builder/chroot-script.sh b/builder/chroot-script.sh index de352e1..e7fefb2 100644 --- a/builder/chroot-script.sh +++ b/builder/chroot-script.sh @@ -20,6 +20,14 @@ echo 'deb https://packagecloud.io/Hypriot/Schatzkiste/debian/ wheezy main' >> /e # reload package sources apt-get update +# install WiFi firmware packages (same as in Raspbian) +apt-get install -y \ + firmware-atheros \ + firmware-brcm80211 \ + firmware-libertas \ + firmware-ralink \ + firmware-realtek + # install kernel- and firmware-packages apt-get install -y \ "raspberrypi-bootloader=${KERNEL_BUILD}" \ diff --git a/builder/test-integration/spec/hypriotos-image/base/packages_spec.rb b/builder/test-integration/spec/hypriotos-image/base/packages_spec.rb index fe47eb5..81d1df6 100644 --- a/builder/test-integration/spec/hypriotos-image/base/packages_spec.rb +++ b/builder/test-integration/spec/hypriotos-image/base/packages_spec.rb @@ -21,3 +21,23 @@ describe package('usbutils') do it { should be_installed } end + +describe package('firmware-atheros') do + it { should be_installed } +end + +describe package('firmware-brcm80211') do + it { should be_installed } +end + +describe package('firmware-libertas') do + it { should be_installed } +end + +describe package('firmware-ralink') do + it { should be_installed } +end + +describe package('firmware-realtek') do + it { should be_installed } +end From e2c5ceff250313232429eb108fbb016ba3070120 Mon Sep 17 00:00:00 2001 From: Dieter Reuter Date: Sat, 9 Apr 2016 13:53:06 +0200 Subject: [PATCH 5/8] Add a default config.txt file --- builder/chroot-script.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/builder/chroot-script.sh b/builder/chroot-script.sh index e7fefb2..7576ecd 100644 --- a/builder/chroot-script.sh +++ b/builder/chroot-script.sh @@ -44,6 +44,11 @@ printf "# Spawn a getty on Raspberry Pi serial line\nT0:23:respawn:/sbin/getty - # boot/cmdline.txt echo "+dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 cgroup-enable=memory swapaccount=1 elevator=deadline rootwait console=ttyAMA0,115200 kgdboc=ttyAMA0,115200" > /boot/cmdline.txt +# create a default boot/config.txt file (details see http://elinux.org/RPiconfig) +echo " +hdmi_force_hotplug=1 +" > boot/config.txt + # /etc/modules echo "vchiq snd_bcm2835 From 2fd862642940a473bd9c616ba66ebdd5f792430e Mon Sep 17 00:00:00 2001 From: Dieter Reuter Date: Sat, 9 Apr 2016 13:54:07 +0200 Subject: [PATCH 6/8] Add tests for Raspberry Pi bootfiles --- .../hypriotos-image/base/bootfiles_spec.rb | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 builder/test-integration/spec/hypriotos-image/base/bootfiles_spec.rb diff --git a/builder/test-integration/spec/hypriotos-image/base/bootfiles_spec.rb b/builder/test-integration/spec/hypriotos-image/base/bootfiles_spec.rb new file mode 100644 index 0000000..decc203 --- /dev/null +++ b/builder/test-integration/spec/hypriotos-image/base/bootfiles_spec.rb @@ -0,0 +1,67 @@ +require 'spec_helper' + +describe file('/boot/bootcode.bin') do + it { should be_file } + it { should be_mode 755 } + it { should be_owned_by 'root' } +end + +describe file('/boot/start.elf') do + it { should be_file } + it { should be_mode 755 } + it { should be_owned_by 'root' } +end + +describe file('/boot/fixup.dat') do + it { should be_file } + it { should be_mode 755 } + it { should be_owned_by 'root' } +end + +describe file('/boot/bcm2708-rpi-b.dtb') do + it { should be_file } + it { should be_mode 755 } + it { should be_owned_by 'root' } +end + +describe file('/boot/bcm2708-rpi-b-plus.dtb') do + it { should be_file } + it { should be_mode 755 } + it { should be_owned_by 'root' } +end + +describe file('/boot/bcm2708-rpi-cm.dtb') do + it { should be_file } + it { should be_mode 755 } + it { should be_owned_by 'root' } +end + +describe file('/boot/bcm2709-rpi-2-b.dtb') do + it { should be_file } + it { should be_mode 755 } + it { should be_owned_by 'root' } +end + +describe file('/boot/bcm2710-rpi-3-b.dtb') do + it { should be_file } + it { should be_mode 755 } + it { should be_owned_by 'root' } +end + +describe file('/boot/cmdline.txt') do + it { should be_file } + it { should be_mode 755 } + it { should be_owned_by 'root' } +end + +describe file('/boot/config.txt') do + it { should be_file } + it { should be_mode 755 } + it { should be_owned_by 'root' } +end + +describe file('/boot/overlays') do + it { should be_directory } + it { should be_mode 755 } + it { should be_owned_by 'root' } +end From cd7cc18c18d80ad99db07ea1286090ff7b8dcd74 Mon Sep 17 00:00:00 2001 From: Dieter Reuter Date: Sat, 9 Apr 2016 16:13:34 +0200 Subject: [PATCH 7/8] Upgrade HYPRIOT_OS_VERSION to v0.8.3 --- builder/build.sh | 2 +- .../spec/hypriotos-image/base/release_spec.rb | 2 +- builder/test/os-release_spec.rb | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/builder/build.sh b/builder/build.sh index 9d3b2b9..7f10300 100755 --- a/builder/build.sh +++ b/builder/build.sh @@ -15,7 +15,7 @@ BUILD_RESULT_PATH="/workspace" BUILD_PATH="/build" # config vars for the root file system -HYPRIOT_OS_VERSION="v0.8.2" +HYPRIOT_OS_VERSION="v0.8.3" ROOTFS_TAR="rootfs-armhf-raspbian-${HYPRIOT_OS_VERSION}.tar.gz" ROOTFS_TAR_PATH="${BUILD_RESULT_PATH}/${ROOTFS_TAR}" diff --git a/builder/test-integration/spec/hypriotos-image/base/release_spec.rb b/builder/test-integration/spec/hypriotos-image/base/release_spec.rb index b35c935..104d4f8 100644 --- a/builder/test-integration/spec/hypriotos-image/base/release_spec.rb +++ b/builder/test-integration/spec/hypriotos-image/base/release_spec.rb @@ -6,7 +6,7 @@ it { should be_file } it { should be_owned_by 'root' } its(:content) { should match /HYPRIOT_OS="HypriotOS\/armhf"/ } - its(:content) { should match /HYPRIOT_OS_VERSION="v0.8.2"/ } + its(:content) { should match /HYPRIOT_OS_VERSION="v0.8.3"/ } its(:content) { should match /HYPRIOT_DEVICE="Raspberry Pi"/ } its(:content) { should match /HYPRIOT_IMAGE_VERSION=/ } end diff --git a/builder/test/os-release_spec.rb b/builder/test/os-release_spec.rb index 17397c9..b2b6d9f 100644 --- a/builder/test/os-release_spec.rb +++ b/builder/test/os-release_spec.rb @@ -36,8 +36,8 @@ expect(stdout).to contain('^HYPRIOT_DEVICE="Raspberry Pi"$') end - it "uses os-rootfs version 'HYPRIOT_OS_VERSION=\"v0.8.1\"'" do - expect(stdout).to contain('^HYPRIOT_OS_VERSION="v0.8.1"$') + it "uses os-rootfs version 'HYPRIOT_OS_VERSION=\"v0.8.3\"'" do + expect(stdout).to contain('^HYPRIOT_OS_VERSION="v0.8.3"$') end if ENV.fetch('TRAVIS_TAG','') != '' From d76fb95a4df2230de350fd54c9eabc9668ad839a Mon Sep 17 00:00:00 2001 From: Dieter Reuter Date: Sat, 9 Apr 2016 17:50:50 +0200 Subject: [PATCH 8/8] Upgrade HYPRIOT_OS_VERSION to v0.8.4 --- builder/build.sh | 2 +- .../spec/hypriotos-image/base/release_spec.rb | 2 +- builder/test/os-release_spec.rb | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/builder/build.sh b/builder/build.sh index 7f10300..d225a75 100755 --- a/builder/build.sh +++ b/builder/build.sh @@ -15,7 +15,7 @@ BUILD_RESULT_PATH="/workspace" BUILD_PATH="/build" # config vars for the root file system -HYPRIOT_OS_VERSION="v0.8.3" +HYPRIOT_OS_VERSION="v0.8.4" ROOTFS_TAR="rootfs-armhf-raspbian-${HYPRIOT_OS_VERSION}.tar.gz" ROOTFS_TAR_PATH="${BUILD_RESULT_PATH}/${ROOTFS_TAR}" diff --git a/builder/test-integration/spec/hypriotos-image/base/release_spec.rb b/builder/test-integration/spec/hypriotos-image/base/release_spec.rb index 104d4f8..34cf64f 100644 --- a/builder/test-integration/spec/hypriotos-image/base/release_spec.rb +++ b/builder/test-integration/spec/hypriotos-image/base/release_spec.rb @@ -6,7 +6,7 @@ it { should be_file } it { should be_owned_by 'root' } its(:content) { should match /HYPRIOT_OS="HypriotOS\/armhf"/ } - its(:content) { should match /HYPRIOT_OS_VERSION="v0.8.3"/ } + its(:content) { should match /HYPRIOT_OS_VERSION="v0.8.4"/ } its(:content) { should match /HYPRIOT_DEVICE="Raspberry Pi"/ } its(:content) { should match /HYPRIOT_IMAGE_VERSION=/ } end diff --git a/builder/test/os-release_spec.rb b/builder/test/os-release_spec.rb index b2b6d9f..c0336b2 100644 --- a/builder/test/os-release_spec.rb +++ b/builder/test/os-release_spec.rb @@ -36,8 +36,8 @@ expect(stdout).to contain('^HYPRIOT_DEVICE="Raspberry Pi"$') end - it "uses os-rootfs version 'HYPRIOT_OS_VERSION=\"v0.8.3\"'" do - expect(stdout).to contain('^HYPRIOT_OS_VERSION="v0.8.3"$') + it "uses os-rootfs version 'HYPRIOT_OS_VERSION=\"v0.8.4\"'" do + expect(stdout).to contain('^HYPRIOT_OS_VERSION="v0.8.4"$') end if ENV.fetch('TRAVIS_TAG','') != ''