mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
core/kernel26-olinuxino: ntsc and pal images in one package, choose which on install
This commit is contained in:
parent
2215e5c6f4
commit
6e34de5433
2 changed files with 20 additions and 59 deletions
|
@ -8,7 +8,7 @@
|
|||
buildarch=2
|
||||
|
||||
pkgbase="kernel26-olinuxino"
|
||||
pkgname=('kernel26-olinuxino' 'kernel26-olinuxino-ntsc' 'kernel26-headers-olinuxino')
|
||||
pkgname=('kernel26-olinuxino' 'kernel26-headers-olinuxino')
|
||||
_kernelname=${pkgname#kernel26}
|
||||
_basekernel=2.6
|
||||
pkgver=${_basekernel}.35.3
|
||||
|
@ -94,8 +94,7 @@ package_kernel26-olinuxino() {
|
|||
'alsa-driver' 'ieee80211' 'hostap-driver26'
|
||||
'pwc' 'nforce' 'squashfs' 'unionfs' 'ivtv'
|
||||
'zd1211' 'kvm-modules' 'iwlwifi' 'rt2x00-cvs'
|
||||
'gspcav1' 'atl2' 'wlan-ng26' 'rt2500' 'nouveau-drm'
|
||||
'kernel26-olinuxino-ntsc')
|
||||
'gspcav1' 'atl2' 'wlan-ng26' 'rt2500' 'nouveau-drm')
|
||||
provides=("kernel26=${pkgver}" "linux=${pkgver}")
|
||||
install=kernel26.install
|
||||
KARCH=arm
|
||||
|
@ -120,65 +119,20 @@ package_kernel26-olinuxino() {
|
|||
-i $startdir/kernel26.install
|
||||
|
||||
# Generate an imx233 boot image
|
||||
msg "Generating sdcard image ..."
|
||||
msg "Generating PAL sdcard image ..."
|
||||
ln -sf /opt/imx-bootlets-olinuxino
|
||||
elftosb -z -c ./imx-bootlets-olinuxino/linux.bd -o ${pkgdir}/boot/oli-${_kernver}.sb
|
||||
elftosb -z -c ./imx-bootlets-olinuxino/linux.bd -o ${pkgdir}/boot/oli-${_kernver}-pal.sb
|
||||
|
||||
# remove build and source links
|
||||
rm -f ${pkgdir}/lib/modules/${_kernver}/{source,build}
|
||||
|
||||
# Now we call depmod...
|
||||
depmod -b "$pkgdir" -F System.map "$_kernver"
|
||||
|
||||
# move module tree /lib -> /usr/lib
|
||||
mkdir -p "${pkgdir}/usr"
|
||||
mv "$pkgdir/lib" "$pkgdir/usr"
|
||||
}
|
||||
|
||||
package_kernel26-olinuxino-ntsc() {
|
||||
pkgdesc="The Linux Kernel and modules for iMX233-OLinuXino-Maxi"
|
||||
groups=('base')
|
||||
depends=('coreutils' 'module-init-tools')
|
||||
replaces=('kernel24' 'kernel24-scsi' 'kernel26-scsi'
|
||||
'alsa-driver' 'ieee80211' 'hostap-driver26'
|
||||
'pwc' 'nforce' 'squashfs' 'unionfs' 'ivtv'
|
||||
'zd1211' 'kvm-modules' 'iwlwifi' 'rt2x00-cvs'
|
||||
'gspcav1' 'atl2' 'wlan-ng26' 'rt2500' 'nouveau-drm'
|
||||
'kernel26-olinuxino')
|
||||
provides=("kernel26=${pkgver}" "linux=${pkgver}")
|
||||
install=kernel26.install
|
||||
KARCH=arm
|
||||
|
||||
cd ${srcdir}/${__gitname}
|
||||
|
||||
# get kernel version
|
||||
_kernver="$(make kernelrelease)"
|
||||
|
||||
# Install zImage, System.map and the config for reference
|
||||
mkdir -p ${pkgdir}/{lib/modules,lib/firmware,boot}
|
||||
make INSTALL_MOD_PATH="${pkgdir}" modules_install
|
||||
#cp arch/$KARCH/boot/uImage ${pkgdir}/boot/uImage
|
||||
cp arch/$KARCH/boot/zImage ${pkgdir}/boot/zImage
|
||||
cp .config ${pkgdir}/boot/config-${_kernver}
|
||||
cp System.map System.map-${_kernver}
|
||||
|
||||
# set correct depmod command for install
|
||||
sed \
|
||||
-e "s/KERNEL_NAME=.*/KERNEL_NAME=${_kernelname}/g" \
|
||||
-e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/g" \
|
||||
-i $startdir/kernel26.install
|
||||
|
||||
# Generate an imx233 boot image
|
||||
msg "Generating sdcard image ..."
|
||||
msg "Generating NTSC sdcard image ..."
|
||||
ln -sf /opt/imx-bootlets-olinuxino-ntsc
|
||||
elftosb -z -c ./imx-bootlets-olinuxino-ntsc/linux.bd -o ${pkgdir}/boot/oli-${_kernver}.sb
|
||||
|
||||
elftosb -z -c ./imx-bootlets-olinuxino-ntsc/linux.bd -o ${pkgdir}/boot/oli-${_kernver}-ntsc.sb
|
||||
|
||||
# remove build and source links
|
||||
rm -f ${pkgdir}/lib/modules/${_kernver}/{source,build}
|
||||
|
||||
|
||||
# Now we call depmod...
|
||||
depmod -b "$pkgdir" -F System.map "$_kernver"
|
||||
|
||||
|
||||
# move module tree /lib -> /usr/lib
|
||||
mkdir -p "${pkgdir}/usr"
|
||||
mv "$pkgdir/lib" "$pkgdir/usr"
|
||||
|
|
|
@ -7,10 +7,17 @@ flush_kernel() {
|
|||
# question ...
|
||||
read -r shouldwe
|
||||
if [[ $shouldwe =~ ^([yY][eE][sS]|[yY])$ ]]; then
|
||||
echo "Writing the kernel image on /dev/mmcblk0p1 ..."
|
||||
# this first dd is probably unnecessary
|
||||
#dd if=/dev/zero of=/dev/mmcblk0p1 bs=512 count=4
|
||||
dd if=/boot/oli-${KERNEL_VERSION}.sb of=/dev/mmcblk0p1 ibs=512 seek=4 conv=sync,notrunc
|
||||
echo ""
|
||||
echo "Specify NTSC or PAL display output [N|P]: "
|
||||
read -r disp
|
||||
if [[ $disp =~ ^([nN][tT][sS][cC]|[nN])$ ]]; then
|
||||
echo "Writing the NTSC kernel image on /dev/mmcblk0p1 ..."
|
||||
dd if=/boot/oli-${KERNEL_VERSION}-ntsc.sb of=/dev/mmcblk0p1 ibs=512 seek=4 conv=sync,notrunc
|
||||
fi
|
||||
if [[ $disp =~ ^([pP][aA][lL]|[pP])$ ]]; then
|
||||
echo "Writing the PAL kernel image on /dev/mmcblk0p1 ..."
|
||||
dd if=/boot/oli-${KERNEL_VERSION}-pal.sb of=/dev/mmcblk0p1 ibs=512 seek=4 conv=sync,notrunc
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue