From patchwork Sat May 4 11:29:47 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerzy Grzegorek X-Patchwork-Id: 241442 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "localhost", Issuer "www.qmailtoaster.com" (not verified)) by ozlabs.org (Postfix) with ESMTPS id B6B442C00D8 for ; Sat, 4 May 2013 21:31:16 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:content-type:mime-version :content-transfer-encoding:subject:message-id:in-reply-to :references:date:from:to:cc; q=dns; s=default; b=rI1lpMMLJN0vIMO 0MGj1YNPFEGCoFHEWxy5FqWjZlXk0Pk4u1AzsQZsQph0p6ECSXwXPyxazIko/q0Y G2CWUDoO1vbe/yoVqN4UJQFs3GrDFyndy5j7VLWduIWbFQG4xjfd094SEEcpowdw N1mHOFA31FO9P0Iex0u5grGePw9w= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:content-type:mime-version :content-transfer-encoding:subject:message-id:in-reply-to :references:date:from:to:cc; s=default; bh=ahAvaeFVR+zCy2aS8v2Gw QuZhuY=; b=ZwSTgwWQZGWKRcjmyFNDcPAYTNR0AcxCt2heYZMxvgb/1fshKf0No qyJQA1lwMOvTxTUfiRVSq/MxU05cmEe3K4KxwttbWgE71l1L6GDSBdjmg+Qxocua GjZQV+PPlArZKTIKXnuNKk6LzVQ7s22nQIHaJEhAC/LxYTbnoR/m00= Received: (qmail 28112 invoked by alias); 4 May 2013 11:30:55 -0000 Mailing-List: contact crossgcc-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: crossgcc-owner@sourceware.org Delivered-To: mailing list crossgcc@sourceware.org Received: (qmail 28069 invoked by uid 89); 4 May 2013 11:30:55 -0000 X-Spam-SWARE-Status: No, score=-3.9 required=5.0 tests=AWL, BAYES_05, KHOP_THREADED, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.1 Received: from tasak.trzebnica.net (HELO poczta.trzebnica.net) (91.195.232.70) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Sat, 04 May 2013 11:30:53 +0000 Received: from [127.0.1.1] (93-181-142-99.internetia.net.pl [93.181.142.99]) by poczta.trzebnica.net (Postfix) with ESMTP id 6D7F037EF6; Sat, 4 May 2013 13:30:50 +0200 (CEST) MIME-Version: 1.0 Subject: [PATCH 1 of 2] kernel/linux: add a check for existance of linux-custom tarball X-Mercurial-Node: 722db80eb1f5c5189699ae471a52c78366dccf78 Message-Id: <722db80eb1f5c5189699.1367666987@NX5000> In-Reply-To: References: User-Agent: Mercurial-patchbomb/2.0.2 Date: Sat, 04 May 2013 13:29:47 +0200 From: Jerzy Grzegorek To: "Yann E. MORIN" Cc: crossgcc@sourceware.org # HG changeset patch # User "Jerzy Grzegorek" # Date 1367665469 -7200 # Node ID 722db80eb1f5c5189699ae471a52c78366dccf78 # Parent 285b83c60e29fe0b733404b22cfd743b926d47ad kernel/linux: add a check for existance of linux-custom tarball Signed-off-by: Jerzy Grzegorek --- For unsubscribe information see http://sourceware.org/lists.html#faq diff -r 285b83c60e29 -r 722db80eb1f5 scripts/build/kernel/linux.sh --- a/scripts/build/kernel/linux.sh Fri May 03 15:36:11 2013 +0000 +++ b/scripts/build/kernel/linux.sh Sat May 04 13:04:29 2013 +0200 @@ -23,37 +23,50 @@ local custom_name local rel_dir local korg_base mirror_base + local kernel_version if [ "${CT_KERNEL_LINUX_USE_CUSTOM_HEADERS}" = "y" ]; then return 0 fi if [ "${CT_KERNEL_LINUX_CUSTOM}" = "y" ]; then + # linux-custom + # example: /dir/linux-3.4.tar.xz -> 3.4.tar.xz + kernel_version="${CT_KERNEL_LINUX_CUSTOM_LOCATION##*-}" + # example: 3.4.tar.xz -> 3.4.tar + kernel_version="${kernel_version%.*}" + # example: 3.4.tar -> 3.4 + kernel_version="${kernel_version%.*}" + else + kernel_version="${CT_KERNEL_VERSION}" + fi + + case "${kernel_version}" in + 2.6.*.*|3.*.*) + # 4-part versions (for 2.6 stables and long-terms), and + # 3-part versions (for 3.x.y stables and long-terms), + # we need to trash the last digit + k_ver="${kernel_version%.*}" + ;; + 2.6.*|3.*) + # 3-part version (for 2.6.x initial releases), and 2-part + # versions (for 3.x initial releases), use all of it + k_ver="${kernel_version}" + ;; + esac + case "${kernel_version}" in + 2.6.*) rel_dir=v2.6;; + 3.*) rel_dir=v3.x;; + esac + korg_base="http://ftp.kernel.org/pub/linux/kernel/${rel_dir}" + CT_GetFile "linux-${kernel_version}" \ + "${korg_base}" \ + "${korg_base}/longterm/v${k_ver}" \ + "${korg_base}/longterm" + + if [ "${CT_KERNEL_LINUX_CUSTOM}" = "y" ]; then CT_GetCustom "linux" "${CT_KERNEL_VERSION}" \ "${CT_KERNEL_LINUX_CUSTOM_LOCATION}" - else # Not a custom tarball - case "${CT_KERNEL_VERSION}" in - 2.6.*.*|3.*.*) - # 4-part versions (for 2.6 stables and long-terms), and - # 3-part versions (for 3.x.y stables and long-terms), - # we need to trash the last digit - k_ver="${CT_KERNEL_VERSION%.*}" - ;; - 2.6.*|3.*) - # 3-part version (for 2.6.x initial releases), and 2-part - # versions (for 3.x initial releases), use all of it - k_ver="${CT_KERNEL_VERSION}" - ;; - esac - case "${CT_KERNEL_VERSION}" in - 2.6.*) rel_dir=v2.6;; - 3.*) rel_dir=v3.x;; - esac - korg_base="http://ftp.kernel.org/pub/linux/kernel/${rel_dir}" - CT_GetFile "linux-${CT_KERNEL_VERSION}" \ - "${korg_base}" \ - "${korg_base}/longterm/v${k_ver}" \ - "${korg_base}/longterm" fi }