|
@ -36,8 +36,7 @@ echo_status "Preparing to build a linux kernel $pkg_linux_mode package." |
|
|
case "$xpkg" in |
|
|
case "$xpkg" in |
|
|
*-cross-*) |
|
|
*-cross-*) |
|
|
pkg_linux_cross="${xpkg#**-cross-}" |
|
|
pkg_linux_cross="${xpkg#**-cross-}" |
|
|
echo_error "Building linux kernel cross packages isn't supported yet." |
|
|
|
|
|
exit 1 |
|
|
|
|
|
|
|
|
abort "Building linux kernel cross packages isn't supported yet." |
|
|
;; |
|
|
;; |
|
|
esac |
|
|
esac |
|
|
|
|
|
|
|
@ -45,7 +44,10 @@ esac |
|
|
treever=${xpkg/linux/} |
|
|
treever=${xpkg/linux/} |
|
|
treever=${treever/-*/} |
|
|
treever=${treever/-*/} |
|
|
|
|
|
|
|
|
[ "$vanilla_ver" ] || vanilla_ver="$ver" |
|
|
|
|
|
|
|
|
: ${vanilla_ver:=$ver} |
|
|
|
|
|
if [[ ${vanilla_ver} == 2.6.* ]] ; then |
|
|
|
|
|
vanilla_ver=$( echo ${vanilla_ver} | cut -d. -f-3 ) |
|
|
|
|
|
fi |
|
|
srctar="linux-${vanilla_ver}.tar.bz2" |
|
|
srctar="linux-${vanilla_ver}.tar.bz2" |
|
|
|
|
|
|
|
|
lx_extraversion="" |
|
|
lx_extraversion="" |
|
@ -90,7 +92,7 @@ for x in $confdir/linux$treever/*.patch; do |
|
|
done |
|
|
done |
|
|
|
|
|
|
|
|
# add hppa patch if needed |
|
|
# add hppa patch if needed |
|
|
if [[ "$arch" == hppa && "$vanillaver" == 2.6* ]]; then |
|
|
|
|
|
|
|
|
if [[ "$arch" == hppa && "$vanillaver" == 2.6.* ]]; then |
|
|
var_insert patchfiles " " "$archdir/patch-2.6.*-pa*.bz2" |
|
|
var_insert patchfiles " " "$archdir/patch-2.6.*-pa*.bz2" |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
@ -281,8 +283,7 @@ lx_config () |
|
|
yes '' | eval $MAKE oldconfig > /dev/null |
|
|
yes '' | eval $MAKE oldconfig > /dev/null |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
echo "Clean up the *.orig and *~ files ... " |
|
|
|
|
|
rm -f .config.old `find -name '*.orig' -o -name '*~'` |
|
|
|
|
|
|
|
|
lx_cleanup |
|
|
|
|
|
|
|
|
echo "Generic linux source configuration finished." |
|
|
echo "Generic linux source configuration finished." |
|
|
} |
|
|
} |
|
@ -291,15 +292,28 @@ pkg_linux_brokenfiles="$base/architecture/$arch/kernel-disable.lst \ |
|
|
$base/architecture/$arch/kernel$treever-disable.lst \ |
|
|
$base/architecture/$arch/kernel$treever-disable.lst \ |
|
|
$confdir/linux$treever/disable-broken.lst $pkg_linux_brokenfiles" |
|
|
$confdir/linux$treever/disable-broken.lst $pkg_linux_brokenfiles" |
|
|
|
|
|
|
|
|
main_lx_src() { |
|
|
|
|
|
|
|
|
lx_source() { |
|
|
echo "Extracting the Linux Kernel Sources [$vanilla_ver] ... " |
|
|
echo "Extracting the Linux Kernel Sources [$vanilla_ver] ... " |
|
|
tar $taropt $archdir/$srctar |
|
|
tar $taropt $archdir/$srctar |
|
|
cd linux-$vanilla_ver |
|
|
cd linux-$vanilla_ver |
|
|
|
|
|
|
|
|
echo "Correcting user and permissions ..." |
|
|
|
|
|
chown -R root:root . ; chmod -R u=rwX,go=rX . |
|
|
|
|
|
|
|
|
if [ -e $archdir/patch-${ver}.bz2 ] ; then |
|
|
|
|
|
echo "Patching up to $ver ..." |
|
|
|
|
|
bzcat $archdir/patch-${ver}.bz2 | patch $patchopt |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
echo "Correcting ownership and permissions ..." |
|
|
|
|
|
chown -R 0:0 . ; chmod -R u=rwX,go=rX . |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
lx_cleanup() { |
|
|
|
|
|
echo "Clean up the *.orig and *~ files ... " |
|
|
|
|
|
find -name '*.orig' -o -name '*~' | xargs rm -f |
|
|
|
|
|
rm -f .config.old .config.[1-9] |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
echo "Configuring kernel source ..." |
|
|
|
|
|
|
|
|
main_lx_src() { |
|
|
|
|
|
lx_source |
|
|
lx_config |
|
|
lx_config |
|
|
|
|
|
|
|
|
echo "Copying to $root/usr/src/linux-${lx_kernelrelease} ..." |
|
|
echo "Copying to $root/usr/src/linux-${lx_kernelrelease} ..." |
|
@ -337,13 +351,12 @@ main_lx_src() { |
|
|
echo "Creating scripts/* because external modules need it ..." |
|
|
echo "Creating scripts/* because external modules need it ..." |
|
|
eval $MAKE scripts/ |
|
|
eval $MAKE scripts/ |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
echo "Clean up the *.orig and *~ files ... " |
|
|
|
|
|
find -name '*.orig' -o -name '*~' | xargs rm -f |
|
|
|
|
|
rm -f .config.old .config.[1-9] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lx_cleanup |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
main_lx() { |
|
|
main_lx() { |
|
|
|
|
|
lx_source |
|
|
lx_config |
|
|
lx_config |
|
|
|
|
|
|
|
|
# we need to rerun the oldconfig since the used .config |
|
|
# we need to rerun the oldconfig since the used .config |
|
@ -478,15 +491,14 @@ main_lx() { |
|
|
fi |
|
|
fi |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
autoextract=0 |
|
|
case "$pkg_linux_mode" in |
|
|
case "$pkg_linux_mode" in |
|
|
source) |
|
|
source) |
|
|
autoextract=0 |
|
|
|
|
|
createdocs=0 |
|
|
createdocs=0 |
|
|
custmain="main_lx_src" |
|
|
custmain="main_lx_src" |
|
|
;; |
|
|
;; |
|
|
image) |
|
|
image) |
|
|
custmain="main_lx" |
|
|
custmain="main_lx" |
|
|
autopatch=0 |
|
|
|
|
|
;; |
|
|
;; |
|
|
esac |
|
|
esac |
|
|
|
|
|
|
|
|