Replies: 1 comment
-
Hey @snirzango! Thanks for your interest on building your own AMI. Could you please share the output of your command: cargo make --verbose -e BUILDSYS_VARIANT=aws-k8s-1.30 -e BUILDSYS_ARCH=aarch64 -e PACKAGE=incp-module build-package Along with that, could you please make sure you run And just a final ask, could you please fix the formatting of your description so that it is easier to read? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey all, im trying to add&load an out of tree kernel module to bottlerocket AMI, i managed to compile an incp.ko file using kmod kit for aws-k8s-1.31-v1.30.0.
i than created a incp-module dir under packages with the incp.ko file and:
Cargo.toml:
[package] name = "incp-module" version = "0.1.0" edition = "2018" license = "Apache-2.0" publish = false description = "A Bottlerocket package for the incp.ko kernel module"
and a build.rs file:
`use std::env;
use std::fs;
use std::path::PathBuf;
fn main() {
// The Bottlerocket build system sets various env vars.
// One common approach is to parse the kernel version or
// the output directory from environment variables.
//
// For example, if you have a custom environment variable for
// the kernel version or if you want to provide it, you’d do:
//
// let kernel_version = env::var("BUILDSYS_KERNEL_VERSION")
// .unwrap_or_else(|_| "unknown-kernel-version".to_string());
//
// But for this minimal example, we'll assume "5.10.123" or something
// is known, or you can pass it in at build time. Adjust accordingly.
}
i added the the packa
[package]name = "aws-k8s-1_31"
version = "0.1.0"
edition = "2021"
publish = false
build = "../build.rs"
exclude = ["README.md"]
[package.metadata.build-variant.image-features]
grub-set-private-var = true
uefi-secure-boot = true
xfs-data-partition = true
systemd-networkd = true
[package.metadata.build-variant]
included-packages = [
# core
"release",
"kernel-6.1",
# k8s
"cni",
"cni-plugins",
"kubelet-1.31",
"aws-iam-authenticator",
"incp-module",
]
kernel-parameters = [
"console=tty0",
"console=ttyS0,115200n8",
"net.ifnames=0",
"netdog.default-interface=eth0:dhcp4,dhcp6?",
"quiet",
]
[lib]
path = "../variants.rs"
[build-dependencies]
settings-defaults = { path = "../../packages/settings-defaults" }
settings-plugins = { path = "../../packages/settings-plugins" }
settings-migrations = { path = "../../packages/settings-migrations" }
incp-module = { path = "../../packages/incp-module" }`
and added
members = [ "packages/*",
to the Cargo.toml on the bottlerocket dirwhen running cargo make --verbose -e BUILDSYS_VARIANT=aws-k8s-1.30 -e BUILDSYS_ARCH=aarch64 -e PACKAGE=incp-module build-package
the process looks like it succeeding but there is nothing on the build/rpms part and the cargo make build variant failed.
any idea what am i doing wrong?
Beta Was this translation helpful? Give feedback.
All reactions