Skip to content

Instantly share code, notes, and snippets.

@chenhengqi
Created February 12, 2023 13:30
Show Gist options
  • Save chenhengqi/c10472d03eb0347b9ecafcb2ffeafb79 to your computer and use it in GitHub Desktop.
Save chenhengqi/c10472d03eb0347b9ecafcb2ffeafb79 to your computer and use it in GitHub Desktop.
Build kernel on LoongArch machine

make menuconfig

Build initramfs

$ cp /etc/mkinitcpio.d/linux.preset /etc/mkinitcpio.d/${feature}.preset
# update ${feature}.preset
# set ALL_kver field to kernel version
# set default_image field to /path/to/${feature}.img
$ mkinitcpio -p ${feature}
$ cp /path/to/${feature}.img /boot

GRUB update

$ grub-mkconfig -o grub.cfg
$ diff -y /boot/grub/grub.cfg grub.cfg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment