hitmoon / rpms / kernel

Forked from rpms/kernel 4 years ago
Clone
6d8bbf
#!/bin/bash
6d8bbf
set -e
6d8bbf
6d8bbf
. /etc/os-release
6d8bbf
6d8bbf
kernelver=$1 && shift
6d8bbf
rootfs=$1 && shift
6d8bbf
variant=$1 && shift
6d8bbf
6d8bbf
output="${rootfs}/lib/modules/${kernelver}/bls.conf"
6d8bbf
date=$(date -u +%Y%m%d%H%M%S)
6d8bbf
6d8bbf
if [ "${variant:-5}" = "debug" ]; then
6d8bbf
    debugname=" with debugging"
6d8bbf
    debugid="-debug"
6d8bbf
else
6d8bbf
    debugname=""
6d8bbf
    debugid=""
6d8bbf
fi
6d8bbf
6d8bbf
cat >${output} <
6d8bbf
title ${NAME} (${kernelver}) ${VERSION}${debugname}
6d8bbf
version ${kernelver}${debugid}
6d8bbf
linux ${bootprefix}/vmlinuz-${kernelver}
6d8bbf
initrd ${bootprefix}/initramfs-${kernelver}.img
6d8bbf
options \$kernelopts
6d8bbf
id ${ID}-${date}-${kernelver}${debugid}
6d8bbf
grub_users \$grub_users
6d8bbf
grub_arg --unrestricted
6d8bbf
grub_class kernel${variant}
6d8bbf
EOF