Skip to content
This repository has been archived by the owner on Aug 14, 2023. It is now read-only.

Upgrade versions, install WiFi firmware and further improvements #40

Merged
merged 8 commits into from
Apr 9, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions builder/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.4"
ROOTFS_TAR="rootfs-armhf-raspbian-${HYPRIOT_OS_VERSION}.tar.gz"
ROOTFS_TAR_PATH="${BUILD_RESULT_PATH}/${ROOTFS_TAR}"

Expand All @@ -34,8 +34,8 @@ 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_COMPOSE_VERSION="1.6.0-27"
export DOCKER_ENGINE_VERSION="1.10.3-1"
export DOCKER_COMPOSE_VERSION="1.6.2-28"
export DOCKER_MACHINE_VERSION="0.4.1-72"
export DEVICE_INIT_VERSION="0.0.14"

Expand Down
13 changes: 13 additions & 0 deletions builder/chroot-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}" \
Expand All @@ -36,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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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.4"/ }
its(:content) { should match /HYPRIOT_DEVICE="Raspberry Pi"/ }
its(:content) { should match /HYPRIOT_IMAGE_VERSION=/ }
end
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
8 changes: 4 additions & 4 deletions builder/test-integration/spec/hypriotos-image/docker_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions builder/test/os-release_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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.4\"'" do
expect(stdout).to contain('^HYPRIOT_OS_VERSION="v0.8.4"$')
end

if ENV.fetch('TRAVIS_TAG','') != ''
Expand Down