diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..ef1be81 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,9 @@ +language: cpp + +install: | + cd "$TRAVIS_BUILD_DIR" + ./configure -t + +script: | + cd "$TRAVIS_BUILD_DIR" + ./run -n diff --git a/configure b/configure new file mode 100755 index 0000000..4076626 --- /dev/null +++ b/configure @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +y='' +while getopts t OPT; do + case "$OPT" in + t) + y='-y' + ;; + esac +done +shift $(($OPTIND - 1)) +sudo apt-get update $y +# Building SDL for QEMU in Buildroot was rejected upstream because it adds many dependencies: +# https://patchwork.ozlabs.org/patch/770684/ +# We are just using the host SDL for now, if it causes too much problems we might remove it. +# libsdl2-dev needs to be installed separatedly from sudo apt-get build-dep qemu +# because Ubuntu 16.04's QEMU uses SDL 1. +sudo apt-get install $y build-essential libsdl2-dev +sudo apt-get build-dep $y qemu diff --git a/getting-started.md b/getting-started.md index b2b19fd..ac1b7b6 100644 --- a/getting-started.md +++ b/getting-started.md @@ -46,8 +46,7 @@ Reserve 12Gb of disk: git clone --recursive https://github.com/cirosantilli/linux-kernel-module-cheat cd linux-kernel-module-cheat - sudo apt-get install libsdl2-dev - sudo apt-get build-dep qemu + ./configure ./run The first build will take a while ([GCC](https://stackoverflow.com/questions/10833672/buildroot-environment-with-host-toolchain), Linux kernel), e.g.: diff --git a/run b/run index 2941678..521da2f 100755 --- a/run +++ b/run @@ -53,11 +53,6 @@ make O="$outdir" olddefconfig # # Even if were an autotools package, there is no general way currently to pass extra configs to it: # https://stackoverflow.com/questions/44341188/how-to-pass-extra-custom-configure-autotools-options-to-a-buildroot-package/44341225#44341225 -# -# SDL support was rejected upstream because it adds many dependencies: https://patchwork.ozlabs.org/patch/770684/ -# We are just using the host SDL for now, if it causes too much problems we might remove it. -# libsdl2-dev needs to be installed separatedly from sudo apt-get build-dep qemu -# because Ubuntu 16.04's QEMU uses SDL 1. time \ env \ -u LD_LIBRARY_PATH \