Skip to content

Instantly share code, notes, and snippets.

@gdamjan
Created May 17, 2016 13:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gdamjan/dd94057318f9c68327066068cacf99bc to your computer and use it in GitHub Desktop.
Save gdamjan/dd94057318f9c68327066068cacf99bc to your computer and use it in GitHub Desktop.
pacman hook to build an initramfs for kernel (cause the linux-armv7 doesn't do it itself)
# /etc/pacman.d/hooks/initcpio.hook
[Trigger]
Operation = Install
Operation = Upgrade
Type = File
Target = usr/lib/modules/extramodules-*/version
[Action]
When = PostTransaction
Exec = /etc/pacman.d/hooks/initcpio.sh
Depends = mkinitcpio
NeedsTargets
#!/bin/bash
#while read TARGET; do
# echo `<$TARGET`
#done
# TARGET is /usr/lib/modules/extramodules*/version
read TARGET
kver=`<$TARGET`
mkinitcpio -g /boot/initramfs-linux.img -k "$kver"
# TODO: extract KERNEL_NAME from TARGET: for -ARCH it's "", lts, etc
@gdamjan
Copy link
Author

gdamjan commented May 17, 2016

doesn't support more than one kernel, but on my BeagleBoard-xM I can't have that easily anyway

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment