Created
May 17, 2016 13:40
-
-
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)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
doesn't support more than one kernel, but on my BeagleBoard-xM I can't have that easily anyway