From 2cabc47b1d1e4feae8542f445a0f54a104cf815a Mon Sep 17 00:00:00 2001 From: Stefan Fiedler Date: Sat, 3 Feb 2007 02:01:29 +0000 Subject: [PATCH] Stefan Fiedler: update linux24, linux26 linux26: use correct kernel version; add linux26-headers package fork linux24: remove obsolete patch rediffed: typo in text, remove hppa patch (maintained in-tree now afaics) [2007011205333016846] (https://www.rocklinux.net/submaster) git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@8194 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- package/base/linux/config-500.in | 8 +- package/base/linux/linux.conf | 89 +++++++++++-------- package/base/linux/linux.desc | 12 +-- .../linux24/arch-ppc-horizon-name-clash.patch | 30 ------- package/base/linux/postconfig.in | 13 +++ package/base/linux/preconfig.in | 1 + 6 files changed, 76 insertions(+), 77 deletions(-) delete mode 100644 package/base/linux/linux24/arch-ppc-horizon-name-clash.patch create mode 100644 package/base/linux/postconfig.in diff --git a/package/base/linux/config-500.in b/package/base/linux/config-500.in index 2d871f4c4..eefdf1134 100644 --- a/package/base/linux/config-500.in +++ b/package/base/linux/config-500.in @@ -70,6 +70,10 @@ then ;; esac + choice ROCKCFG_PKG_LINUX_DEFAULT_HEADERS linux-libc \ + linux26 'Use Linux 2.6 headers as system headers' \ + linux-libc 'Use linux-libc-headers package as system headers' + choice ROCKCFG_PKG_LINUX_CONFIG_STYLE modules \ none 'Do not perform any automatic kernel configuration' \ nomodules 'Perform normal kernel configuration without modules' \ @@ -88,6 +92,8 @@ then bool 'Apply custom kernel build configuration settings' \ ROCKCFG_PKG_LINUX_CUSTCONFIG 0 + include "package/*/*/pkg_config_linux.in" + if [ "$ROCKCFG_PKG_LINUX_CUSTCONFIG" = 1 ] ; then block_begin 3 comment 'The kernel config is stored in:' @@ -100,8 +106,6 @@ then rm -f config/$config.$swpid/linux.cfg fi - include "package/*/*/pkg_config_linux.in" - menu_end fi diff --git a/package/base/linux/linux.conf b/package/base/linux/linux.conf index c4f712f09..c7d96b9b4 100644 --- a/package/base/linux/linux.conf +++ b/package/base/linux/linux.conf @@ -1,3 +1,4 @@ +#!/bin/bash # --- ROCK-COPYRIGHT-NOTE-BEGIN --- # # This copyright note is auto-generated by ./scripts/Create-CopyPatch. @@ -29,6 +30,8 @@ case "$xpkg-" in pkg_linux_mode=source ;; *-src-*) abort "If you want to build a source package, use '${xpkg//src/source}'.";; + *-headers-*) + pkg_linux_mode=headers ;; esac echo_status "Preparing to build a linux kernel $pkg_linux_mode package." @@ -107,30 +110,21 @@ auto_config () ;; esac - if [ -f $base/architecture/$arch/kernel$treever.conf.sh ] ; then - echo " using: architecture/$arch/kernel$treever.conf.sh" - . $base/architecture/$arch/kernel$treever.conf.sh > .config - elif [ -f $base/architecture/$arch/kernel$treever.conf.m4 ] ; then - echo " using: architecture/$arch/kernel$treever.conf.m4" - m4 -I $base/architecture/$arch -I $base/architecture/share \ - $base/architecture/$arch/kernel$treever.conf.m4 > .config - elif [ -f $base/architecture/$arch/kernel$treever.conf ] ; then - echo " using: architecture/$arch/kernel$treever.conf" - cp $base/architecture/$arch/kernel$treever.conf .config - elif [ -f $base/architecture/$arch/kernel.conf.sh ] ; then - echo " using: architecture/$arch/kernel.conf.sh" - . $base/architecture/$arch/kernel.conf.sh > .config - elif [ -f $base/architecture/$arch/kernel.conf.m4 ] ; then - echo " using: architecture/$arch/kernel.conf.m4" - m4 -I $base/architecture/$arch -I $base/architecture/share \ - $base/architecture/$arch/kernel.conf.m4 > .config - elif [ -f $base/architecture/$arch/kernel.conf ] ; then - echo " using: architecture/$arch/kernel.conf" - cp $base/architecture/$arch/kernel.conf .config - else - echo " using: no rock kernel config found" - cp arch/$lx_cpu/$defconfig .config - fi + for x in $base/architecture/$arch/kernel{$treever,}.conf{.sh,.m4,} \ + arch/$lx_cpu/$defconfig + do + if [ -f $x ] ; then + echo " using: $x" + case "${x##*.}" in + m4) m4 -I $base/architecture/$arch \ + -I $base/architecture/share \ + $x > .config ;; + sh) . $x > .config ;; + *) cp $x .config ;; + esac + break + fi + done echo " merging (system default): 'arch/$lx_cpu/$defconfig'" grep '^CONF.*=y' arch/$lx_cpu/$defconfig | cut -f1 -d= | \ @@ -142,11 +136,12 @@ auto_config () echo "Enabling all modules ..." yes '' | eval $MAKE no2modconfig > /dev/null ; cp .config .config.2 - if [ -f $base/target/$target/kernel$treever.conf.sh ] ; then - confscripts="$base/target/$target/kernel$treever.conf.sh $confscripts" - elif [ -f $base/target/$target/kernel.conf.sh ] ; then - confscripts="$base/target/$target/kernel.conf.sh $confscripts" - fi + for x in $base/target/$target/kernel{$treever,}.conf.sh ; do + if [ -f $x ] ; then + confscripts="$x $confscripts" + break + fi + done for x in $confscripts ; do echo " running: $x" @@ -156,8 +151,7 @@ auto_config () # merge various text/plain config files for x in $base/config/$config/linux.cfg \ - $base/target/$target/kernel.conf \ - $base/target/$target/kernel$treever.conf ; do + $base/target/$target/kernel{,$treever}.conf ; do if [ -f $x ] ; then echo " merging: '$x'" tag="$(sed '/CONFIG_/ ! d; s,.*CONFIG_\([^ =]*\).*,\1,' \ @@ -237,12 +231,6 @@ lx_injectextraversion () { sleep 1 ; touch Makefile eval $MAKE include/linux/version.h fi - - # get kernel_release - lx_kernelrelease="$( echo -e "#include \nUTS_RELEASE" \ - > conftest.c && \ - gcc -E -I./include conftest.c | tail -n 1 \ - | cut -d '"' -f 2 && rm -f conftest.c )" } lx_config () @@ -283,6 +271,17 @@ lx_config () yes '' | eval $MAKE oldconfig > /dev/null fi + # get kernel_release + if [ $treever == 24 ] ; then + lx_kernelrelease="$( echo -e "#include \nUTS_RELEASE" \ + > conftest.c && \ + gcc -E -I./include conftest.c | tail -n 1 \ + | cut -d '"' -f 2 && rm -f conftest.c )" + else + make include/config/kernel.release + lx_kernelrelease="$( < include/config/kernel.release )" + fi + lx_cleanup echo "Generic linux source configuration finished." @@ -328,8 +327,9 @@ main_lx_src() { echo "Copying kernel patches ... " rm -rf linux$treever-patches ; mkdir -p linux$treever-patches - echo "This directory contains all the stuff used by ROCK Linux" > linux$treever-patches/README - echo "to build the Kernel (in addition to the official Kernel Sources)." >> linux$treever-patches/README + { echo "This directory contains all the stuff used by ROCK Linux to" + echo "build the Kernel (in addition to the official Kernel Sources)." + } > linux$treever-patches/README cp -v $patchfiles linux$treever-patches/ cd linux-${lx_kernelrelease} @@ -491,6 +491,14 @@ main_lx() { fi } +main_lx_headers() { + lx_source + lx_config + + echo "Installing Linux headers in $xroot ..." + eval $MAKE headers_install INSTALL_HDR_PATH=$xroot +} + autoextract=0 case "$pkg_linux_mode" in source) @@ -500,6 +508,9 @@ case "$pkg_linux_mode" in image) custmain="main_lx" ;; + headers) + custmain="main_lx_headers" + ;; esac # ignore pseudo-deps to other modules diff --git a/package/base/linux/linux.desc b/package/base/linux/linux.desc index 82aa22b01..105f48300 100644 --- a/package/base/linux/linux.desc +++ b/package/base/linux/linux.desc @@ -45,15 +45,15 @@ [P] X -?---5---9 100.200 #if xpkg == linux24.* -[V] 2.4.32 -[D] 1385187780 linux-2.4.32.tar.bz2 http://www.kernel.org/pub/linux/kernel/v2.4/ +[V] 2.4.34 +[D] 3444963523 linux-2.4.34.tar.bz2 http://www.kernel.org/pub/linux/kernel/v2.4/ #endif #if xpkg == linux26.* -[V] 2.6.17.7 -[D] 2805024457 linux-2.6.17.tar.bz2 ftp://ftp.kernel.org/pub/linux/kernel/v2.6/ -[D] 120128364 patch-2.6.17.7.bz2 ftp://ftp.kernel.org/pub/linux/kernel/v2.6/ -[D] 2022887016 linux-2.6.17-pa6.tar.bz2 http://cvs.parisc-linux.org/download/linux-2.6/ +[V] 2.6.19.1 +[D] 3663756816 linux-2.6.19.tar.bz2 ftp://ftp.kernel.org/pub/linux/kernel/v2.6/ +[D] 569484420 patch-2.6.19.1.bz2 ftp://ftp.kernel.org/pub/linux/kernel/v2.6/ +# [D] 2022887016 linux-2.6.17-pa6.tar.bz2 http://cvs.parisc-linux.org/download/linux-2.6/ #endif [CD] for x in $cachedir/linux2[46].cache; do cp $x $confdir/$pkg.cache; done diff --git a/package/base/linux/linux24/arch-ppc-horizon-name-clash.patch b/package/base/linux/linux24/arch-ppc-horizon-name-clash.patch deleted file mode 100644 index 3b6de3846..000000000 --- a/package/base/linux/linux24/arch-ppc-horizon-name-clash.patch +++ /dev/null @@ -1,30 +0,0 @@ -# --- ROCK-COPYRIGHT-NOTE-BEGIN --- -# -# This copyright note is auto-generated by ./scripts/Create-CopyPatch. -# Please add additional copyright information _after_ the line containing -# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by -# the ./scripts/Create-CopyPatch script. Do not edit this copyright text! -# -# ROCK Linux: rock-src/package/base/linux/linux24/arch-ppc-horizon-name-clash.patch -# ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf -# -# This patch file is dual-licensed. It is available under the license the -# patched project is licensed under, as long as it is an OpenSource license -# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms -# of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# -# --- ROCK-COPYRIGHT-NOTE-END --- - ---- ./drivers/atm/horizon.c.orig 2003-09-04 20:22:19.000000000 +0200 -+++ ./drivers/atm/horizon.c 2003-09-04 20:24:36.000000000 +0200 -@@ -481,7 +481,7 @@ - return; - } - --static inline void dump_regs (hrz_dev * dev) { -+static inline void dump_horizon_regs (hrz_dev * dev) { - #ifdef DEBUG_HORIZON - PRINTD (DBG_REGS, "CONTROL 0: %#x", rd_regl (dev, CONTROL_0_REG)); - PRINTD (DBG_REGS, "RX CONFIG: %#x", rd_regw (dev, RX_CONFIG_OFF)); diff --git a/package/base/linux/postconfig.in b/package/base/linux/postconfig.in new file mode 100644 index 000000000..ee5cbd86c --- /dev/null +++ b/package/base/linux/postconfig.in @@ -0,0 +1,13 @@ +if [ "$ROCKCFG_PKG_LINUX_DEFAULT_HEADERS" == linux24 ] ; then + pkgenable linux24-headers + pkgremove linux26-headers + pkgremove linux-libc-headers +elif [ "$ROCKCFG_PKG_LINUX_DEFAULT_HEADERS" == linux26 ] ; then + pkgremove linux24-headers + pkgenable linux26-headers + pkgremove linux-libc-headers +elif [ "$ROCKCFG_PKG_LINUX_DEFAULT_HEADERS" == linux-libc ] ; then + pkgremove linux24-headers + pkgremove linux26-headers + pkgenable linux-libc-headers +fi diff --git a/package/base/linux/preconfig.in b/package/base/linux/preconfig.in index 6b6217857..4163a2d87 100644 --- a/package/base/linux/preconfig.in +++ b/package/base/linux/preconfig.in @@ -4,5 +4,6 @@ then pkgfork linux linux24-source unflag CORE pkgfork linux linux26 stages -X---5---9 pkgfork linux linux26-source + pkgfork linux linux26-headers stages 01-------- priority 100.200 pkgremove linux fi