Permalink
Browse files

Set kernel (#10)

* Enable setting the Kernel version 

* Add a build matrix with the available Kernel versions

* Add and update 'ca-certificates' to container

* Also add 'openssl' to the Docker container
  • Loading branch information...
frzb committed Jan 13, 2019
1 parent ff353fe commit 515b390df8f9c07e0bd3f9a5108fd7a7ed1bfe1d
Showing with 17 additions and 5 deletions.
  1. +5 −2 .travis.yml
  2. +2 −0 docker-compose_travis-ci.yml
  3. +1 −1 docker/Dockerfile
  4. +9 −2 docker/coinboot-download-helper
@@ -3,6 +3,8 @@ sudo: required
language: c
cache: ccache
env:
- KERNEL=4.4.0-139-generic
- KERNEL=4.15.0-39-generic
before_install:
# always quit the build something fails with a non-zero return value
#- set -e
@@ -19,6 +21,7 @@ before_install:
- echo 'allow all' | sudo tee /etc/qemu/bridge.conf
script:
- sudo docker-compose -f docker-compose_travis-ci.yml up -d
- sudo docker-compose exec coinboot env
# This line can be used for debugging Qemu iPXE purposes.
#- sudo qemu-system-x86_64 -m 2048 -smp 2 -nographic -boot n -net nic,model=e1000 -net bridge,br=$(ip a|grep 192.168.1.1/24 | grep -oP br-.*)
# Boot with legacy BIOS
@@ -32,7 +35,7 @@ script:
-net nic,model=e1000
-net bridge,br=$(ip a|grep 192.168.1.1/24 | grep -oP br-.*)
- while ! nc -z 192.168.1.10 22; do echo 'Waiting for Coinboot machine to listen on port 22/SSH ...'; sleep 5; done
- sshpass -p ubuntu ssh -v -o StrictHostKeyChecking=no ubuntu@192.168.1.10 grep -C 10 ${RELEASE} /etc/motd
- sshpass -p ubuntu ssh -v -o StrictHostKeyChecking=no ubuntu@192.168.1.10 "grep -C 10 ${RELEASE} /etc/motd && uname -a"
- sudo killall qemu-system-x86_64
- while nc -z 192.168.1.10 22; do echo 'Waiting for Coinboot machine to stop listen on port 22/SSH ...'; sleep 5; done
# Boot with UEFI/OVMF
@@ -49,4 +52,4 @@ script:
-net bridge,br=$(ip a|grep 192.168.1.1/24 | grep -oP br-.*)
-bios /usr/share/OVMF/OVMF_CODE.fd
- while ! nc -z 192.168.1.10 22; do echo 'Waiting for Coinboot machine to listen on port 22/SSH ...'; sleep 10; done
- sshpass -p ubuntu ssh -v -o StrictHostKeyChecking=no ubuntu@192.168.1.10 "grep -C 10 ${RELEASE} /etc/motd && ls -la /sys/firmware/efi"
- sshpass -p ubuntu ssh -v -o StrictHostKeyChecking=no ubuntu@192.168.1.10 "grep -C 10 ${RELEASE} /etc/motd && ls -la /sys/firmware/efi && uname -a"
@@ -14,6 +14,8 @@ services:
container_name: coinboot
env_file:
- ./conf/environment/default.env
environment:
KERNEL: $KERNEL
build: ./docker/
volumes:
- ./conf/dnsmasq:/etc/dnsmasq.d
@@ -1,7 +1,7 @@
FROM alpine:3.8

#TODO add syslinux/pxelinux files
RUN apk --no-cache add nginx supervisor dnsmasq jq curl
RUN apk --no-cache add nginx supervisor dnsmasq jq curl openssl ca-certificates && update-ca-certificates

RUN mkdir -p /run/nginx /var/lib/tftpboot \
etc/dnsmasq.d /etc/supervisor /srv/plugins /opt/ipxe \
@@ -17,6 +17,10 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

echo '--- Configured environment ---'
env
echo '------------------------------'

BOOTDIR=/var/lib/tftpboot
# RELEASE is set via an environment variable under ./conf/environment
# If the value is 'latest' we determine the latest release, else we use the set value.
@@ -25,8 +29,11 @@ RELEASE=$(curl --silent "https://api.github.com/repos/frzb/coinboot-debirf/tags"
echo "Using latest release: $RELEASE"
fi
URL=https://github.com/frzb/coinboot-debirf/releases/download/${RELEASE}
VMLINUZ=coinboot-vmlinuz-4.4.0-139-generic
INITRAMFS=coinboot-initramfs-4.4.0-139-generic
if [ -z $KERNEL ]; then
KERNEL=4.4.0-139
fi
VMLINUZ=coinboot-vmlinuz-$KERNEL
INITRAMFS=coinboot-initramfs-$KERNEL

if ! [ -f $BOOTDIR/$VMLINUZ ]; then
wget $URL/$VMLINUZ -P $BOOTDIR

0 comments on commit 515b390

Please sign in to comment.