Commit ae4afad6 authored by aTc's avatar aTc

added kernel scripts

parent e7917b53
scripts/* /usr/share/pyra/scripts/
pyra-kpkg.conf /etc/
kernel /etc/
#!/bin/sh
. /etc/pyra-kpkg.conf
version="$1"
vmlinuz_location="$2"
fdtdir=/usr/lib/linux-image-$version
initrd=/boot/initrd.img-$version
if [ ! -f $extlinux_conf ]
then
echo $extlinux_conf not found, skipping.
exit 0
fi
echo 1>&2 Adding entry to $extlinux_conf
echo >> $extlinux_conf
echo "#Autogenerated by kernel-image $version " >> $extlinux_conf
echo label $version >> $extlinux_conf
echo kernel $vmlinuz_location >> $extlinux_conf
echo append root=$root $options >> $extlinux_conf
echo fdtdir $fdtdir >> $extlinux_conf
if [ "$INITRD" = "Yes" ]; then
echo initrd $initrd >> $extlinux_conf
fi
echo "#End kernel-image $version " >> $extlinux_conf
echo 1>&2 Setting default kernel to $version
sed -i "0,/default/s/default.*/default $version/" $extlinux_conf
#!/bin/sh
. /etc/pyra-kpkg.conf
if [ ! -f $extlinux_conf ]
then
echo $extlinux_conf not found, skipping.
exit 0
fi
if [ -x /bin/mktemp ]; then
TMPFILE=$(mktemp -t kpkg-pyra-kernel.XXXXXX) || \
{ echo 1>&2 "Cannot create temporary file" ; exit 1; }
elif [ -x /bin/tempfile ]; then
TMPFILE=$(tempfile -p kpkg-pyra-kernel -m 0600 )|| \
{ echo 1>&2 "Cannot create temporary file" ; exit 1; };
else
set -e
mkdir /tmp/kpkg-pyra-kernel.$$
TMPFILE=/tmp/kpkg-pyra-kernel.$$/tmpfile
set +e
fi
trap "[ -f $TMPFILE ] && rm -f $TMPFILE; exit 1" 1 2 3 13 15
echo 1>&2 "Removing kernel entry $version from $extlinux_conf"
perl -nle "print unless /^#Autogenerated by kernel-image $version/ .. /^#End kernel-image $version/" < $extlinux_conf > $TMPFILE
mv -f $TMPFILE $extlinux_conf
rm -f $TMPFILE
if [ -d /tmp/kpkg-pyra-kernel.$$ ]; then
rmdir /tmp/kpkg-pyra-kernel.$$
fi
exit 0
# Pyra kernel config
# Settings here are used to generate /boot/extlinux/extlinux.conf entries when a new kernel is installed.
# Any changes made here won't change the existing extlinux.conf
extlinux_conf=/boot/extlinux/extlinux.conf
root=/dev/mmcblk1p1
options="console=ttyO2,115200n8 rw rootwait earlyprintk fixrtc omapdrm.num_crtc=2 consoleblank=0 vram=12M omapfb.vram=0:8M,1:4M omapdss.def_disp=hdmi"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment