From patchwork Wed Oct 10 06:07:55 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Holsgrove X-Patchwork-Id: 190551 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]) by ozlabs.org (Postfix) with SMTP id DB0EC2C0081 for ; Wed, 10 Oct 2012 17:08:39 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=sourceware.org; s=default; x=1350454120; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Content-Type:MIME-Version:Content-Transfer-Encoding: Subject:Message-Id:In-Reply-To:References:User-Agent:Date:From: To:Cc:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Subscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=yRv0/mAsaIZuZ186OvMNsXWOcfs=; b=pOj+yY4DOwObiHt pNepSdJk8OnqyFkepN16U56EyyYPibEzYh2R1aQajSUEnl4ZWfyevy5BFDfMY8FM z6pCgB+L8AvtCd4cBHj7c0kwlaNf8dkKPro6sxOlyPA00m6xdsCuDv4vqN1OmS3n 7BFrWRApTJueLGydLoj0f8o3ouHY= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=sourceware.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:X-Google-DKIM-Signature:Received:Received:Content-Type:MIME-Version:Content-Transfer-Encoding:Subject:X-Mercurial-Node:Message-Id:In-Reply-To:References:User-Agent:Date:From:To:Cc:X-Gm-Message-State:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Subscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=cCtZ5xSLQPMMaEHIDrjI5TJMQfkMbvM5wVgc7bzp1hbjjz09j/o4JSpy5lPUdZ nwevXTxWOsj1i0PPQhqHC1SMXNQ6gomaHAJD+SBPKE8NOvDff6137l2FcUELfjqS bc0i1NqGHiPnBOZwZw+EFAxbixFDfuHIkeVf3mtSnfg58=; Received: (qmail 14539 invoked by alias); 10 Oct 2012 06:08:17 -0000 Received: (qmail 14431 invoked by uid 22791); 10 Oct 2012 06:08:15 -0000 X-SWARE-Spam-Status: No, hits=-3.1 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, KHOP_THREADED, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-pa0-f41.google.com (HELO mail-pa0-f41.google.com) (209.85.220.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 10 Oct 2012 06:08:09 +0000 Received: by mail-pa0-f41.google.com with SMTP id fa10so273060pad.0 for ; Tue, 09 Oct 2012 23:08:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:content-type:mime-version:content-transfer-encoding:subject :x-mercurial-node:message-id:in-reply-to:references:user-agent:date :from:to:cc:x-gm-message-state; bh=3OPDAclhUabzdsN2H/hAZTlJp6QOmJafpAznaut5qGE=; b=Ut+Ofqc2FlMc5XbcgpisCIgEvWBgSVbc91mkVIsvtAD+dZUUMHVhiGm5ARI5KnnEQI yx47PJ4Ae2PRgsxmNYYgZbesMv4yZo3K30qHSivPJBP/2cTOzXjUm+6p3QjsEzLotSra 9en53TPEm7dMGTlfhAUqoMy7qH7jN2ZRs09HEdo/7Mt1QuVlgt7W4NNT3u46DkpunTB1 jNwSdIe1Tl+rIg0zFVAdwOdYxDOyzd16e8qFEhO3gu5xCLdeRbCEdg/9jlwZHxbvNme6 hINms23psYILCz8CxoqePLSjS8EaLRo3wTeKMT0Wgu0P1FIvd1LNlw38MzkAA/R97Y9V cr8g== Received: by 10.68.197.104 with SMTP id it8mr71718389pbc.167.1349849289509; Tue, 09 Oct 2012 23:08:09 -0700 (PDT) Received: from localhost ([124.148.20.9]) by mx.google.com with ESMTPS id kp3sm508336pbc.64.2012.10.09.23.08.07 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 09 Oct 2012 23:08:08 -0700 (PDT) MIME-Version: 1.0 Subject: [PATCH 2 of 6] kernel/linux: Extract custom location function and use generic GetCustom X-Mercurial-Node: b6b1b07f7ab14184f457e907db6269057cdd6126 Message-Id: In-Reply-To: References: User-Agent: Mercurial-patchbomb/2.3.1 Date: Wed, 10 Oct 2012 16:07:55 +1000 From: David Holsgrove To: bryanhundven@gmail.com, yann.morin.1998@free.fr Cc: crossgcc@sourceware.org X-Gm-Message-State: ALoCoQlJv6UKDaQD5oVHnYgjduBAqPVv5GG4qtiajv8KLZIRZFs7pF+j7bJY8Id/2XriYnpjykPS X-IsSubscribed: yes 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 # HG changeset patch # User David Holsgrove # Date 1349847853 -36000 # Node ID b6b1b07f7ab14184f457e907db6269057cdd6126 # Parent 54e6f8f3b141d3502e51e35cdda8aded03b597f4 kernel/linux: Extract custom location function and use generic GetCustom Config options remain the same as before, just generalised to be used by other components also --- For unsubscribe information see http://sourceware.org/lists.html#faq diff -r 54e6f8f3b141 -r b6b1b07f7ab1 scripts/build/kernel/linux.sh --- a/scripts/build/kernel/linux.sh Thu Oct 04 13:26:14 2012 +1000 +++ b/scripts/build/kernel/linux.sh Wed Oct 10 15:44:13 2012 +1000 @@ -29,23 +29,12 @@ fi if [ "${CT_KERNEL_LINUX_CUSTOM}" = "y" ]; then - if [ ! -d "${CT_KERNEL_LINUX_CUSTOM_LOCATION}" ]; then - # Wee need to know the custom tarball extension, - # so we can create a properly-named symlink, which - # we use later on in 'extract' - case "${CT_KERNEL_LINUX_CUSTOM_LOCATION}" in - *.tar.bz2) custom_name="linux-custom.tar.bz2";; - *.tar.gz|*.tgz) custom_name="linux-custom.tar.gz";; - *.tar) custom_name="linux-custom.tar";; - *) CT_Abort "Unknown extension for custom linux tarball '${CT_KERNEL_LINUX_CUSTOM_LOCATION}'";; - esac - CT_DoExecLog DEBUG ln -sf "${CT_KERNEL_LINUX_CUSTOM_LOCATION}" \ - "${CT_TARBALLS_DIR}/${custom_name}" - else - custom_name="linux-custom" - CT_DoExecLog DEBUG ln -sf "${CT_KERNEL_LINUX_CUSTOM_LOCATION}" \ - "${CT_SRC_DIR}/${custom_name}" + CT_TestAndAbort "Custom linux: CT_CUSTOM_LOCATION_ROOT_DIR or CT_KERNEL_LINUX_CUSTOM_LOCATION must be set." \ + -z "${CT_CUSTOM_LOCATION_ROOT_DIR}" -a -z "${CT_KERNEL_LINUX_CUSTOM_LOCATION}" + if [ -n "${CT_CUSTOM_LOCATION_ROOT_DIR}" -a -z "${CT_KERNEL_LINUX_CUSTOM_LOCATION}" ]; then + CT_KERNEL_LINUX_CUSTOM_LOCATION="${CT_CUSTOM_LOCATION_ROOT_DIR}/linux" fi + CT_GetCustom "linux-${CT_KERNEL_VERSION}" "${CT_KERNEL_LINUX_CUSTOM_LOCATION}" else # Not a custom tarball case "${CT_KERNEL_VERSION}" in 2.6.*.*|3.*.*)