Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "builders": [
- {
- "name": "kernel-ami",
- "region": "eu-west-1",
- "type": "amazon-ebs",
- "ami_name": "kernel-ami/images/hvm-ebs/kernel-ami--{{isotime \"20060102T150405\"}}",
- "sriov_support" : true,
- "instance_type": "c5.9xlarge",
- "temporary_key_pair_type": "ed25519",
- "skip_create_ami": true,
- "subnet_filter": {
- "most_free": true,
- "random": true
- },
- "source_ami_filter": {
- "filters": {
- "architecture": "x86_64",
- "name": "*ubuntu-*-22.04-amd64-server-*",
- "root-device-type": "ebs",
- "virtualization-type": "hvm",
- "state": "available"
- },
- "owners": [ "099720109477" ],
- "most_recent": true
- },
- "launch_block_device_mappings": [
- {
- "device_name": "/dev/sda1",
- "volume_size": "100",
- "volume_type": "gp2",
- "delete_on_termination": true
- }
- ],
- "shutdown_behavior": "terminate",
- "ssh_username": "ubuntu",
- "ssh_timeout": "5m"
- }
- ],
- "provisioners": [
- {
- "type": "shell",
- "inline": [
- "while [ ! -f /var/lib/cloud/instance/boot-finished ]; do echo 'Waiting for cloud-init...'; sleep 1; done"
- ]
- },
- {
- "type": "shell",
- "inline": [
- "sudo sed -i '/deb-src/s/^# //' /etc/apt/sources.list",
- "sudo apt-get update",
- "sudo apt-get -y dist-upgrade",
- "sudo apt-get -y build-dep linux",
- "sudo apt-get -y install wget",
- "wget https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.2.2.tar.xz",
- "tar -xf linux-6.2.2.tar.xz"
- ]
- },
- {
- "type": "file",
- "source": "disable-dbg-deb.patch",
- "destination": "disable-dbg-deb.patch"
- },
- {
- "type": "file",
- "source": "linux-6.2.2/.config",
- "destination": "linux-6.2.2/.config"
- },
- {
- "type": "file",
- "source": "kernel-signing.key",
- "destination": "linux-6.2.2/certs/signing_key.pem"
- },
- {
- "type": "shell",
- "inline": [
- "patch -p1 < disable-dbg-deb.patch",
- "cd linux-6.2.2",
- "ls -la .",
- "make clean",
- "make -j 128 deb-pkg",
- "ls -la ../",
- "mkdir ../deb/",
- "mv ../*.deb ../deb/"
- ]
- },
- {
- "type": "file",
- "source": "./deb/",
- "destination": "./",
- "direction": "download"
- }
- ]
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement