mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-03-09 00:17:31 +00:00
The boot.sb image is packaged with the kernel, installation is simpler
This commit is contained in:
parent
1dc5a7b7f9
commit
b8704a61d4
2 changed files with 16 additions and 21 deletions
|
@ -14,9 +14,8 @@ _kernelname=${pkgname#kernel26}
|
|||
_basekernel=2.6
|
||||
pkgver=${_basekernel}.35.3
|
||||
pkgrel=4
|
||||
makedepends=('xmlto' 'docbook-xsl' 'make' 'git')
|
||||
optdepends=('elftosb: to install the kernel'
|
||||
'imx-bootlets-olinuxino: to install the kernel')
|
||||
makedepends=('xmlto' 'docbook-xsl' 'make' 'git' 'elftosb' 'imx-bootlets-olinuxino')
|
||||
optdepends=()
|
||||
options=('!strip' '!buildflags' '!makeflags')
|
||||
arch=('arm')
|
||||
CARCH=arm
|
||||
|
@ -190,6 +189,11 @@ package_kernel26-olinuxino() {
|
|||
-e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/g" \
|
||||
-i $startdir/kernel26.install
|
||||
|
||||
# Generate an imx233 boot image
|
||||
msg "Generating sdcard image ..."
|
||||
ln -sf /opt/imx-bootlets-olinuxino
|
||||
elftosb -z -c ./imx-bootlets-olinuxino/linux.bd -o ${pkgdir}/boot/oli-${_kernver}.sb
|
||||
|
||||
# remove build and source links
|
||||
rm -f ${pkgdir}/lib/modules/${_kernver}/{source,build}
|
||||
}
|
||||
|
|
|
@ -2,24 +2,15 @@ KERNEL_NAME=-olinuxino
|
|||
KERNEL_VERSION=2.6.35-4-OLinuXino-ARCH+
|
||||
|
||||
flush_kernel() {
|
||||
if [ -x /usr/local/bin/elftosb -a -d /boot/imx-bootlets-olinuxino ]; then
|
||||
echo "elftosb and the imx-bootlets appear to be installed."
|
||||
echo "Do you want the new kernel flashed onto mmcblk0p1? [y|N] "
|
||||
# something traps the last line of output, so users can't see the
|
||||
# question ...
|
||||
read -r shouldwe
|
||||
if [[ $shouldwe =~ ^([yY][eE][sS]|[yY])$ ]]; then
|
||||
echo
|
||||
pushd /boot
|
||||
echo "Generating sdcard image ..."
|
||||
elftosb -z -c ./imx-bootlets-olinuxino/linux.bd -o imx23-olinuxino.sb
|
||||
echo "Flushing the image on /dev/mmcblk0p1 ..."
|
||||
dd if=imx23-olinuxino.sb of=/dev/mmcblk0p1 ibs=512 seek=4 conv=sync,notrunc
|
||||
popd
|
||||
fi
|
||||
else
|
||||
echo "elftosb and/or the imx-bootlets are not installed."
|
||||
echo "You should burn /boot/zImage onto your boot medium."
|
||||
echo "Do you want the new kernel flashed onto mmcblk0p1? [y|N] "
|
||||
# something traps the last line of output, so users can't see the
|
||||
# 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
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue