From 1deb201e2565d8d46f915a5f04ce3bdb0254bbde Mon Sep 17 00:00:00 2001 From: Mikhail Klementev Date: Thu, 19 Jan 2023 17:22:25 +0000 Subject: [PATCH] Switch to Ubuntu 22.04 for testing --- README.md | 10 +--------- qemu/test.config.go | 8 ++++---- tools/qemu-debian-img/Dockerfile | 12 ++++++------ tools/qemu-debian-img/bootstrap.sh | 12 ++++++------ 4 files changed, 17 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index 594fde8..10609cb 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,6 @@ [![Codacy Badge](https://api.codacy.com/project/badge/Grade/aba4aad2046b4d1a9a99cf98e22c018b)](https://app.codacy.com/app/jollheef/out-of-tree?utm_source=github.com&utm_medium=referral&utm_content=jollheef/out-of-tree&utm_campaign=Badge_Grade_Dashboard) [![Go Report Card](https://goreportcard.com/badge/code.dumpstack.io/tools/out-of-tree)](https://goreportcard.com/report/code.dumpstack.io/tools/out-of-tree) [![Documentation Status](https://readthedocs.org/projects/out-of-tree/badge/?version=latest)](https://out-of-tree.readthedocs.io/en/latest/?badge=latest) -[![Donate](https://img.shields.io/badge/donate-paypal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=R8W2UQPZ5X5JE&source=url) -[![Donate](https://img.shields.io/badge/donate-bitcoin-green.svg)](https://blockchair.com/bitcoin/address/bc1q23fyuq7kmngrgqgp6yq9hk8a5q460f39m8nv87) # [out-of-tree](https://out-of-tree.io) @@ -64,13 +62,7 @@ Use custom kernels config Generate all kernels - $ out-of-tree kernel genall --distro Ubuntu --ver 20.04 - -## Troubleshooting - -If anything happens that you cannot solve -- just remove `$HOME/.out-of-tree`. - -But it'll be better if you'll write the bug report. + $ out-of-tree kernel genall --distro Ubuntu --ver 22.04 ## Development diff --git a/qemu/test.config.go b/qemu/test.config.go index 74eed8f..846398a 100644 --- a/qemu/test.config.go +++ b/qemu/test.config.go @@ -4,7 +4,7 @@ package qemu -const testConfigVmlinuz = "../tools/qemu-debian-img/ubuntu2004.vmlinuz" -const testConfigInitrd = "../tools/qemu-debian-img/ubuntu2004.initrd" -const testConfigRootfs = "../tools/qemu-debian-img/ubuntu2004.img" -const testConfigSampleKo = "../tools/qemu-debian-img/ubuntu2004.ko" +const testConfigVmlinuz = "../tools/qemu-debian-img/ubuntu2204.vmlinuz" +const testConfigInitrd = "../tools/qemu-debian-img/ubuntu2204.initrd" +const testConfigRootfs = "../tools/qemu-debian-img/ubuntu2204.img" +const testConfigSampleKo = "../tools/qemu-debian-img/ubuntu2204.ko" diff --git a/tools/qemu-debian-img/Dockerfile b/tools/qemu-debian-img/Dockerfile index 3e8f02d..633c8da 100644 --- a/tools/qemu-debian-img/Dockerfile +++ b/tools/qemu-debian-img/Dockerfile @@ -4,13 +4,13 @@ # # Usage: # -# $ docker build -t gen-ubuntu2004-image . -# $ docker run --privileged -v $(pwd):/shared -t gen-ubuntu2004-image +# $ docker build -t gen-ubuntu2204-image . +# $ docker run --privileged -v $(pwd):/shared -t gen-ubuntu2204-image # -# ubuntu2004.img will be created in current directory. You can change $(pwd) to +# ubuntu2204.img will be created in current directory. You can change $(pwd) to # different directory to use different destination for image. # -FROM ubuntu:20.04 +FROM ubuntu:22.04 ENV DEBIAN_FRONTEND=noninteractive RUN apt update @@ -19,9 +19,9 @@ RUN apt install -y linux-image-generic ENV TMPDIR=/tmp/ubuntu ENV IMAGEDIR=/tmp/image -ENV IMAGE=/shared/ubuntu2004.img +ENV IMAGE=/shared/ubuntu2204.img ENV REPOSITORY=http://archive.ubuntu.com/ubuntu -ENV RELEASE=focal +ENV RELEASE=jammy RUN mkdir $IMAGEDIR diff --git a/tools/qemu-debian-img/bootstrap.sh b/tools/qemu-debian-img/bootstrap.sh index 4d191f9..0706a72 100755 --- a/tools/qemu-debian-img/bootstrap.sh +++ b/tools/qemu-debian-img/bootstrap.sh @@ -1,9 +1,9 @@ #!/bin/sh -eux cd $(dirname $(realpath $0)) -docker build -t gen-ubuntu2004-image . -docker run --privileged -v $(pwd):/shared -t gen-ubuntu2004-image -RUN="docker run -v $(pwd):/shared -t gen-ubuntu2004-image" -$RUN sh -c 'chmod 644 /boot/vmlinuz && cp /boot/vmlinuz /shared/ubuntu2004.vmlinuz' -$RUN sh -c 'cp /boot/initrd.img /shared/ubuntu2004.initrd' -$RUN sh -c 'cp $(find /lib/modules -name test_bpf.ko) /shared/ubuntu2004.ko' +docker build -t gen-ubuntu2204-image . +docker run --privileged -v $(pwd):/shared -t gen-ubuntu2204-image +RUN="docker run -v $(pwd):/shared -t gen-ubuntu2204-image" +$RUN sh -c 'chmod 644 /boot/vmlinuz && cp /boot/vmlinuz /shared/ubuntu2204.vmlinuz' +$RUN sh -c 'cp /boot/initrd.img /shared/ubuntu2204.initrd' +$RUN sh -c 'cp $(find /lib/modules -name test_bpf.ko) /shared/ubuntu2204.ko'