From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 49DE4E00790; Thu, 9 Oct 2014 18:45:26 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.192.179 listed in list.dnswl.org] Received: from mail-pd0-f179.google.com (mail-pd0-f179.google.com [209.85.192.179]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 0886EE00769 for ; Thu, 9 Oct 2014 18:45:23 -0700 (PDT) Received: by mail-pd0-f179.google.com with SMTP id r10so720799pdi.10 for ; Thu, 09 Oct 2014 18:45:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=cZyLaL2hx5Jf4hcHBzXv+hSpvpFVzIcdWL/kCVGqUfA=; b=AbiZrELDC3P5yazKuDtJf29KCMIsBUG0BXaTjhQ8Gq4JX1ptWjAyESdaihhA4UMlgx wScewJl+eUiqyBnvefpKk+syXbWc+l7fbnm8BsVvdzAc0G9TkhkQJVH35sCNEud4z/Js DCscVohOrGjdia9LibiKS3HFPeFnOqY9BE5rR4JehYXuav0zd4YccApXSkrv72YX7Zdh 13Sd0gbB32T/CJkAaT173YedCktjLGNNCB6hhBcEP5h04gDyzKH4+asHMt2FkrWx6o2l ABkhUZ1hXOvZgI5xAAK9eSctpePIEkpTlFvDajfg7rKehPVbg/4ys9W3nq/Z6wr6Iv3F uqWQ== X-Gm-Message-State: ALoCoQmiWJacO2JhOEa27+z9REo9AAUwTndpBS1WVC7E0UspmrF59FbmE+dzE6AFzDOqBTs01O0n X-Received: by 10.68.220.164 with SMTP id px4mr1797844pbc.102.1412905523044; Thu, 09 Oct 2014 18:45:23 -0700 (PDT) Received: from [29.6.1.8] (75-172-191-34.phnx.qwest.net. [75.172.191.34]) by mx.google.com with ESMTPSA id o4sm1717837pdh.56.2014.10.09.18.45.09 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Oct 2014 18:45:22 -0700 (PDT) Message-ID: <54373A1C.2070701@boundarydevices.com> Date: Thu, 09 Oct 2014 18:45:00 -0700 From: Eric Nelson User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: Otavio Salvador References: <543721BA.9080804@boundarydevices.com> In-Reply-To: Cc: "meta-freescale@yoctoproject.org" , Troy Subject: Re: Kernel 3.10.31 and SD card numbering and boot scripts X-BeenThere: meta-freescale@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Usage and development list for the meta-fsl-* layers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Oct 2014 01:45:26 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Thanks for the feedback Otavio, On 10/09/2014 06:18 PM, Otavio Salvador wrote: > On Thu, Oct 9, 2014 at 9:00 PM, Eric Nelson > wrote: >> The 3.10.31 kernel contains a nifty bit of code from Sascha Hauer >> that addresses the question of SD card numbering (device naming) >> quite well: >> >> http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/commit/drivers/mmc/card/block.c?h=imx_3.10.31_1.1.0_beta&id=5f9447e5d97060207c4742d5a06e5548de45972d >> https://www.mail-archive.com/linux-mmc@vger.kernel.org/msg26472.html >> >> Unfortunately, it also changes the requirements for the kernel >> command-line and breaks our boot scripts. > > Yes. > >> This is probably a good time to ask a related question about >> where we're keeping boot scripts. >> >> We have been compiling boot scripts out of our U-Boot tree >> from a Yocto-specific "6x_bootscript-yocto.txt" that implements >> the conventions of the Freescale Community BSP (kernel in >> the root of partition 1 and rootfs in partition 2). >> >> Since boot scripts have dependencies on a lot of things, it's >> not clear to me that they belong in the U-Boot source tree >> and that a Yocto-specific boot script really belongs directly >> in the Yocto tree somewhere. >> >> Since a Yocto build knows about the PREFERRED_VERSION of the >> kernel, it would be straightforward to have multiple versions >> of a boot script. >> >> Otherwise, we'd need to place a couple of versions in the >> U-Boot tree: >> 6x_bootscript-yocto.txt >> 6x_bootscript-yocto-after-3.10.17.txt >> and we'd also need some logic in u-boot-script-boundary.bb >> to choose between them. >> >> Before crafting a patch to do this, I'd like to get some feedback. > > It is harder than it seems to be. The providing system does not track > versions so you'd need to do some "uglyness" to make this work. > I haven't tried, but it seems generally useful to allow conditionals based on kernel versions in Yocto/OE and I'm surprised that there isn't a stock way of doing this. > Personally I think it is easier to address this on the bootscript > itself using the setexpr command in U-Boot and with the REGEX config > enabled. So you could try to match the kernel version on it somehow. > > Not sure if we have a command to 'ask' for the kernel version loaded though... > Not currently. Using a root=PARTUUID=blah would also be nice and might allow the same command-line on multiple kernel versions. Unfortunately, this doesn't seem to work: https://github.com/boundarydevices/linux-imx6/blob/boundary-imx_3.10.31_1.1.0_beta/init/do_mounts.c#L213