[kernel] cleaning and grub

This commit is contained in:
Gwenhael Le Moine 2022-07-08 22:36:47 +02:00
parent e7bec0668b
commit 381de43c20
No known key found for this signature in database
GPG key ID: FDFE3669426707A7

View file

@ -56,10 +56,6 @@ make oldconfig $*
make $NUMJOBS
make modules $NUMJOBS
make modules_install INSTALL_MOD_PATH=$PKG
# if [[ "$ARCH" == "aarch64" ]]; then
# make dtbs
# make dtbs_install INSTALL_DTBS_PATH=$PKG/boot/dtb
# fi
if [ -z "${HEADERS_ARCH}" ]; then
case "$(uname -m)" in
@ -90,35 +86,39 @@ mkdir -p $PKG/install
mkdir -p $PKG/boot/
cp System.map $PKG/boot/System.map-gwh-$VERSION
cp .config $PKG/boot/config-gwh-$VERSION
# if [[ "$ARCH" == "aarch64" ]]; then
# cp arch/arm64/boot/Image $PKG/boot/vmlinux-gwh-$VERSION
# ( cd $PKG/boot/
# ln -s vmlinux-gwh-$VERSION vmlinux-gwh
# )
# cat <<EOF > $PKG/install/doinst.sh
# [ -e /boot/Image ] && mv /boot/Image /boot/Image.old
# cp /boot/vmlinux-gwh-$VERSION /boot/Image
# eval \$(/usr/share/mkinitrd/mkinitrd_command_generator.sh -k $VERSION -r )
# cp /boot/initrd.gz /boot/initrd-gwh.gz
# EOF
# else
cp arch/${ARCH}/boot/bzImage $PKG/boot/vmlinuz-gwh-$VERSION
# ( cd $PKG/boot/
# ln -s vmlinuz-gwh-$VERSION vmlinuz-gwh
# )
cp arch/${ARCH}/boot/bzImage $PKG/boot/vmlinuz-gwh-$VERSION
( cd $PKG/boot/
ln -s vmlinuz-gwh-$VERSION vmlinuz-gwh
)
cat <<EOF > $PKG/install/doinst.sh
cp /boot/elilo-x86_64.efi /boot/efi/EFI/Slackware/elilo.efi
cp /boot/vmlinuz-gwh-$VERSION /boot/efi/EFI/Slackware/vmlinuz-gwh
if [ -e /boot/intel-ucode.cpio ]; then
cp /boot/intel-ucode.cpio /boot/efi/EFI/Slackware/
eval \$(/usr/share/mkinitrd/mkinitrd_command_generator.sh -a '-P /boot/intel-ucode.cpio' -k $VERSION -r -m crc32-pclmul:crc32c-intel:crc32_generic\$(lspci | grep -iq radeon && echo ':amdgpu:radeon'))
else
eval \$(/usr/share/mkinitrd/mkinitrd_command_generator.sh -k $VERSION -r -m crc32-pclmul:crc32c-intel:crc32_generic\$(lspci | grep -iq radeon && echo ':amdgpu:radeon'))
fi
cp /boot/initrd.gz /boot/efi/EFI/Slackware/initrd-gwh.gz
EOF
# cat <<EOF > $PKG/install/doinst.sh
# cp /boot/elilo-x86_64.efi /boot/efi/EFI/Slackware/elilo.efi
# cp /boot/vmlinuz-gwh-$VERSION /boot/efi/EFI/Slackware/vmlinuz-gwh
# if [ -e /boot/intel-ucode.cpio ]; then
# cp /boot/intel-ucode.cpio /boot/efi/EFI/Slackware/
# eval \$(/usr/share/mkinitrd/mkinitrd_command_generator.sh -a '-P /boot/intel-ucode.cpio' -k $VERSION -r -m crc32-pclmul:crc32c-intel:crc32_generic\$(lspci | grep -iq radeon && echo ':amdgpu:radeon'))
# else
# eval \$(/usr/share/mkinitrd/mkinitrd_command_generator.sh -k $VERSION -r -m crc32-pclmul:crc32c-intel:crc32_generic\$(lspci | grep -iq radeon && echo ':amdgpu:radeon'))
# fi
# cp /boot/initrd.gz /boot/efi/EFI/Slackware/initrd-gwh.gz
# EOF
cat <<EOF > $PKG/install/doinst.sh
echo -n "updating grub... "
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub
echo OK
[ -e /boot/initrd.gz ] && mv /boot/initrd.gz /boot/initrd.gz.orig
echo -n "building initrd... "
eval \$(/usr/share/mkinitrd/mkinitrd_command_generator.sh -k $VERSION -r)
echo OK
mv /boot/initrd.gz /boot/initrd-gwh-${VERSION}.gz
ln -s /boot/initrd-gwh-${VERSION}.gz /boot/initrd-gwh.gz
[ -e /boot/initrd.gz.orig ] && mv /boot/initrd.gz.orig /boot/initrd.gz
EOF
make clean