diff --git a/examples/linux-kernel/build_linux_gllvm.sh b/examples/linux-kernel/build_linux_gllvm_git.sh similarity index 80% rename from examples/linux-kernel/build_linux_gllvm.sh rename to examples/linux-kernel/build_linux_gllvm_git.sh index 231cf16..7414485 100755 --- a/examples/linux-kernel/build_linux_gllvm.sh +++ b/examples/linux-kernel/build_linux_gllvm_git.sh @@ -1,10 +1,8 @@ #!/usr/bin/env bash -mkdir -p ${GOPATH} go get github.com/SRI-CSL/gllvm/cmd/... -mkdir ${HOME}/linux_kernel -cd ${HOME}/linux_kernel +cd ${HOME} git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git cd linux-stable diff --git a/examples/linux-kernel/build_linux_gllvm_tarball.sh b/examples/linux-kernel/build_linux_gllvm_tarball.sh new file mode 100644 index 0000000..721675c --- /dev/null +++ b/examples/linux-kernel/build_linux_gllvm_tarball.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +go get github.com/SRI-CSL/gllvm/cmd/... + +cd ${HOME} +wget https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.14.39.tar.xz +tar xvf linux-4.14.39.tar.xz +cd linux-4.14.39 + +cp /vagrant/tinyconfig64 .config + +make CC=gclang HOSTCC=gclang + +get-bc -m -b built-in.o +get-bc -m vmlinux diff --git a/examples/linux-kernel/build_linux_wllvm.sh b/examples/linux-kernel/build_linux_wllvm_git.sh similarity index 84% rename from examples/linux-kernel/build_linux_wllvm.sh rename to examples/linux-kernel/build_linux_wllvm_git.sh index 7b00496..39ebcdc 100755 --- a/examples/linux-kernel/build_linux_wllvm.sh +++ b/examples/linux-kernel/build_linux_wllvm_git.sh @@ -2,8 +2,7 @@ sudo pip install wllvm -mkdir ${HOME}/linux_kernel -cd ${HOME}/linux_kernel +cd ${HOME} git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git cd linux-stable diff --git a/examples/linux-kernel/build_linux_wllvm_tarball.sh b/examples/linux-kernel/build_linux_wllvm_tarball.sh new file mode 100644 index 0000000..6e6d0b1 --- /dev/null +++ b/examples/linux-kernel/build_linux_wllvm_tarball.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +sudo pip install wllvm + +cd ${HOME} +wget https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.14.39.tar.xz +tar xvf linux-4.14.39.tar.xz +cd linux-4.14.39 + +cp /vagrant/tinyconfig64 .config + + +make CC=wllvm HOSTCC=wllvm + +extract-bc -m -b built-in.o +extract-bc -m vmlinux