mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-10-12 15:45:19 +00:00
The scripts used to scrape the various repositories to build and push package for all foreign kernels. They were designed to be run periodically and provide "official" foreign kernel packages. Needless to say we did not run them periodically and the linuxkit packages became out-dated quickly. Now, we just provide users who are interested in using foreign kernels the means to build their own package from specific vendor kernels. Each script uses slightly different command line arguments as the location and naming of the kernel packages differ wildly. The help message provide a working example which has been tested with a minimal LinuxKit YAML file. Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
31 lines
1.0 KiB
Bash
Executable File
31 lines
1.0 KiB
Bash
Executable File
#! /bin/sh
|
|
|
|
if [ "$#" -ne 3 ]; then
|
|
echo "Usage: $0 <org/repo> <ABI version> <kernel version>"
|
|
echo
|
|
echo "Example:"
|
|
echo "$0 foobar/kernel-debian 4.14.0-2 4.14.7-1"
|
|
echo
|
|
echo "This will create a local LinuxKit kernel package:"
|
|
echo "foobar/kernel-debian:4.14.7-1"
|
|
echo "which you can then push to hub or just use locally"
|
|
exit 1
|
|
fi
|
|
|
|
# List all available kernels with:
|
|
# curl -s http://mirrors.kernel.org/debian/pool/main/l/linux/ | sed -n 's/.*href="\([^"]*\).*/\1/p' | grep -o "linux-image-[0-9]\.[0-9]\+\.[0-9]\+-[0-9]\+-amd64[^ ]\+_amd64\.deb
|
|
|
|
REPO=$1
|
|
VER1=$2
|
|
VER2=$3
|
|
URL=http://mirrors.kernel.org/debian/pool/main/l/linux
|
|
ARCH=amd64
|
|
|
|
KERNEL_DEB="${URL}/linux-image-${VER1}-${ARCH}_${VER2}_${ARCH}.deb"
|
|
HEADERS_DEB="${URL}/linux-headers-${VER1}-${ARCH}_${VER2}_${ARCH}.deb"
|
|
HEADERS_ALL_DEB="${URL}/linux-headers-${VER1}-all_${VER2}_${ARCH}.deb"
|
|
|
|
DEB_URLS="${KERNEL_DEB} ${HEADERS_DEB} ${HEADERS_ALL_DEB}"
|
|
|
|
docker build -t "${REPO}:${VER2}" -f Dockerfile.deb --no-cache --build-arg DEB_URLS="${DEB_URLS}" .
|