Update bootstrap scripts to Ubuntu 20.04
This commit is contained in:
parent
81db5a6d6a
commit
81234fc3a6
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
package qemu
|
package qemu
|
||||||
|
|
||||||
const testConfigVmlinuz = "../tools/qemu-debian-img/ubuntu1804.vmlinuz"
|
const testConfigVmlinuz = "../tools/qemu-debian-img/ubuntu2004.vmlinuz"
|
||||||
const testConfigInitrd = "../tools/qemu-debian-img/ubuntu1804.initrd"
|
const testConfigInitrd = "../tools/qemu-debian-img/ubuntu2004.initrd"
|
||||||
const testConfigRootfs = "../tools/qemu-debian-img/ubuntu1804.img"
|
const testConfigRootfs = "../tools/qemu-debian-img/ubuntu2004.img"
|
||||||
const testConfigSampleKo = "../tools/qemu-debian-img/ubuntu1804.ko"
|
const testConfigSampleKo = "../tools/qemu-debian-img/ubuntu2004.ko"
|
||||||
|
@ -4,24 +4,24 @@
|
|||||||
#
|
#
|
||||||
# Usage:
|
# Usage:
|
||||||
#
|
#
|
||||||
# $ docker build -t gen-ubuntu1804-image .
|
# $ docker build -t gen-ubuntu2004-image .
|
||||||
# $ docker run --privileged -v $(pwd):/shared -t gen-ubuntu1804-image
|
# $ docker run --privileged -v $(pwd):/shared -t gen-ubuntu2004-image
|
||||||
#
|
#
|
||||||
# ubuntu1804.img will be created in current directory. You can change $(pwd) to
|
# ubuntu2004.img will be created in current directory. You can change $(pwd) to
|
||||||
# different directory to use different destination for image.
|
# different directory to use different destination for image.
|
||||||
#
|
#
|
||||||
FROM ubuntu:18.04
|
FROM ubuntu:20.04
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
RUN apt update
|
RUN apt update
|
||||||
RUN apt install -y debootstrap qemu
|
RUN apt install -y debootstrap qemu-utils
|
||||||
RUN apt install -y linux-image-generic
|
RUN apt install -y linux-image-generic
|
||||||
|
|
||||||
ENV TMPDIR=/tmp/ubuntu
|
ENV TMPDIR=/tmp/ubuntu
|
||||||
ENV IMAGEDIR=/tmp/image
|
ENV IMAGEDIR=/tmp/image
|
||||||
ENV IMAGE=/shared/ubuntu1804.img
|
ENV IMAGE=/shared/ubuntu2004.img
|
||||||
ENV REPOSITORY=http://archive.ubuntu.com/ubuntu
|
ENV REPOSITORY=http://archive.ubuntu.com/ubuntu
|
||||||
ENV RELEASE=bionic
|
ENV RELEASE=focal
|
||||||
|
|
||||||
RUN mkdir $IMAGEDIR
|
RUN mkdir $IMAGEDIR
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
#!/bin/sh -eux
|
#!/bin/sh -eux
|
||||||
cd $(dirname $(realpath $0))
|
cd $(dirname $(realpath $0))
|
||||||
|
|
||||||
docker build -t gen-ubuntu1804-image .
|
docker build -t gen-ubuntu2004-image .
|
||||||
docker run --privileged -v $(pwd):/shared -t gen-ubuntu1804-image
|
docker run --privileged -v $(pwd):/shared -t gen-ubuntu2004-image
|
||||||
RUN="docker run -v $(pwd):/shared -t gen-ubuntu1804-image"
|
RUN="docker run -v $(pwd):/shared -t gen-ubuntu2004-image"
|
||||||
$RUN sh -c 'chmod 644 /vmlinuz && cp /vmlinuz /shared/ubuntu1804.vmlinuz'
|
$RUN sh -c 'chmod 644 /vmlinuz && cp /vmlinuz /shared/ubuntu2004.vmlinuz'
|
||||||
$RUN sh -c 'cp /initrd.img /shared/ubuntu1804.initrd'
|
$RUN sh -c 'cp /initrd.img /shared/ubuntu2004.initrd'
|
||||||
$RUN sh -c 'cp $(find /lib/modules -name test_static_key_base.ko) /shared/ubuntu1804.ko'
|
$RUN sh -c 'cp $(find /lib/modules -name test_static_key_base.ko) /shared/ubuntu2004.ko'
|
||||||
|
Loading…
Reference in New Issue
Block a user