mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-28 22:57:37 +00:00
99 lines
3.7 KiB
Text
99 lines
3.7 KiB
Text
# arg 1: the new package version
|
|
# arg 2: the old package version
|
|
|
|
KERNEL_NAME=-orion
|
|
KERNEL_VERSION=3.2.1-1-orion
|
|
|
|
patch_kernel() {
|
|
if [ -e "etc/machid.bin" ]; then
|
|
echo "Saved machine type found. Patching Kernel"
|
|
cp etc/machid.bin tmp/machid
|
|
else
|
|
echo "The kernel needs to be patched to include the machine type"
|
|
echo ""
|
|
echo "Please select your machine (enter any other value to skip):"
|
|
|
|
echo " 1. Marvell Orion-2 Development Board"
|
|
echo " 2. Marvell Orion-NAS Reference Design"
|
|
echo " 3. Buffalo Linkstation Pro/Live"
|
|
echo " 4. Buffalo/Revogear Kurobox Pro"
|
|
echo " 5. Buffalo Terastation Pro II/Live"
|
|
echo " 6. Buffalo Linkstation Mini"
|
|
echo " 7. Buffalo Linkstation LS-HGL"
|
|
echo " 8. D-Link DNS-323"
|
|
echo " 9. QNAP TS-109/TS-209"
|
|
echo "10. QNAP TS-409"
|
|
echo "11. Linksys WRT350N v2"
|
|
echo "12. HP Media Vault mv2120"
|
|
echo "13. LaCie Ethernet Disk mini V2"
|
|
echo "14. LaCie Big Disk Network"
|
|
echo "15. LaCie d2 Network"
|
|
echo "16. LaCie 2Big Network"
|
|
echo "17. Maxtor Shared Storage II"
|
|
echo "18. Netgear WNR854T"
|
|
echo "19. Marvell Orion-VoIP GE Reference Design"
|
|
echo "20. Marvell Orion-VoIP FXO Reference Design"
|
|
echo "21. Marvell Orion-1-90 AP GE Reference Design"
|
|
echo "22. Buffalo Linkstation LiveV3 (LS-CHL)"
|
|
echo -n "--> "
|
|
|
|
read arch
|
|
|
|
case $arch in
|
|
1) devio > tmp/machid 'wl 0xe3a01c05,4' 'wl 0xe381104e,4' ;;
|
|
2) devio > tmp/machid 'wl 0xe3a01c05,4' 'wl 0xe38110e4,4' ;;
|
|
3) devio > tmp/machid 'wl 0xe3a01c06,4' 'wl 0xe3811031,4' ;;
|
|
4) devio > tmp/machid 'wl 0xe3a01c05,4' 'wl 0xe38110e5,4' ;;
|
|
5) devio > tmp/machid 'wl 0xe3a01c06,4' 'wl 0xe3811030,4' ;;
|
|
6) devio > tmp/machid 'wl 0xe3a01c07,4' 'wl 0xe3811042,4' ;;
|
|
7) devio > tmp/machid 'wl 0xe3a01c07,4' 'wl 0xe38110d5,4' ;;
|
|
8) devio > tmp/machid 'wl 0xe3a01c06,4' 'wl 0xe3811006,4' ;;
|
|
9) devio > tmp/machid 'wl 0xe3a01c06,4' 'wl 0xe381101d,4' ;;
|
|
10) devio > tmp/machid 'wl 0xe3a01c06,4' 'wl 0xe3811041,4' ;;
|
|
11) devio > tmp/machid 'wl 0xe3a01c06,4' 'wl 0xe3811061,4' ;;
|
|
12) devio > tmp/machid 'wl 0xe3a01c06,4' 'wl 0xe381109d,4' ;;
|
|
13) devio > tmp/machid 'wl 0xe3a01c06,4' 'wl 0xe38110dc,4' ;;
|
|
14) devio > tmp/machid 'wl 0xe3a01c08,4' 'wl 0xe38110eb,4' ;;
|
|
15) devio > tmp/machid 'wl 0xe3a01c08,4' 'wl 0xe38110ea,4' ;;
|
|
16) devio > tmp/machid 'wl 0xe3a01c09,4' 'wl 0xe3811026,4' ;;
|
|
17) devio > tmp/machid 'wl 0xe3a01c06,4' 'wl 0xe38110e6,4' ;;
|
|
18) devio > tmp/machid 'wl 0xe3a01c07,4' 'wl 0xe3811009,4' ;;
|
|
19) devio > tmp/machid 'wl 0xe3a01c07,4' 'wl 0xe3811014,4' ;;
|
|
20) devio > tmp/machid 'wl 0xe3a01c07,4' 'wl 0xe381101a,4' ;;
|
|
21) devio > tmp/machid 'wl 0xe3a01c07,4' 'wl 0xe3811066,4' ;;
|
|
22) devio > tmp/machid 'wl 0xe3a01c0b,4' 'wl 0xe3811016,4' ;;
|
|
esac
|
|
|
|
cp tmp/machid etc/machid.bin
|
|
fi
|
|
|
|
echo "Generating patched zImage"
|
|
cat boot/zImage >> tmp/machid
|
|
|
|
echo "Generating uImage"
|
|
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -d tmp/machid boot/uImage
|
|
rm tmp/machid
|
|
}
|
|
|
|
post_install () {
|
|
patch_kernel
|
|
|
|
# updating module dependencies
|
|
echo ">>> Updating module dependencies. Please wait ..."
|
|
depmod ${KERNEL_VERSION}
|
|
}
|
|
|
|
post_upgrade() {
|
|
patch_kernel
|
|
|
|
if grep "^[^#]*[[:space:]]/boot" etc/fstab 2>&1 >/dev/null; then
|
|
if ! grep "[[:space:]]/boot" etc/mtab 2>&1 >/dev/null; then
|
|
echo "WARNING: /boot appears to be a seperate partition but is not mounted."
|
|
echo " You probably just broke your system. Congratulations."
|
|
fi
|
|
fi
|
|
|
|
# updating module dependencies
|
|
echo ">>> Updating module dependencies. Please wait ..."
|
|
depmod ${KERNEL_VERSION}
|
|
}
|