From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from AM1EHSOBE004.bigfish.com (am1ehsobe003.messaging.microsoft.com [213.199.154.206]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 0DFC9E0044A for ; Fri, 2 Mar 2012 01:59:45 -0800 (PST) Received: from mail57-am1-R.bigfish.com (10.3.201.244) by AM1EHSOBE004.bigfish.com (10.3.204.24) with Microsoft SMTP Server id 14.1.225.23; Fri, 2 Mar 2012 09:59:43 +0000 Received: from mail57-am1 (localhost [127.0.0.1]) by mail57-am1-R.bigfish.com (Postfix) with ESMTP id D18EF26041A for ; Fri, 2 Mar 2012 09:59:43 +0000 (UTC) X-SpamScore: -4 X-BigFish: VS-4(zzc85fh14ffOzz1202hzz8275bh8275dhz2dh2a8h668h839h8e2h8e3hbe9k) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI Received: from mail57-am1 (localhost.localdomain [127.0.0.1]) by mail57-am1 (MessageSwitch) id 1330682381940794_13198; Fri, 2 Mar 2012 09:59:41 +0000 (UTC) Received: from AM1EHSMHS017.bigfish.com (unknown [10.3.201.247]) by mail57-am1.bigfish.com (Postfix) with ESMTP id D79862E0457 for ; Fri, 2 Mar 2012 09:59:41 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by AM1EHSMHS017.bigfish.com (10.3.207.155) with Microsoft SMTP Server (TLS) id 14.1.225.23; Fri, 2 Mar 2012 09:59:41 +0000 Received: from 039-SN2MPN1-021.039d.mgd.msft.net ([169.254.1.196]) by 039-SN1MMR1-003.039d.mgd.msft.net ([10.84.1.16]) with mapi id 14.01.0355.003; Fri, 2 Mar 2012 03:59:33 -0600 From: Luo Zhenhua-B19537 To: "yocto@yoctoproject.org" Thread-Topic: initramfs support in Yocto Thread-Index: Acz4WymJgw9aJRc3TtywA88GAwT6Hw== Date: Fri, 2 Mar 2012 09:59:32 +0000 Message-ID: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.192.208.129] MIME-Version: 1.0 X-OriginatorOrg: freescale.com Subject: initramfs support in Yocto X-BeenThere: yocto@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Discussion of all things Yocto List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Mar 2012 09:59:46 -0000 Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_CA452391058F6D4E9715FB2C29D9312A0113E694039SN2MPN102103_" --_000_CA452391058F6D4E9715FB2C29D9312A0113E694039SN2MPN102103_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello all, Does Yocto support initramfs build? Best Regards, Zhenhua --_000_CA452391058F6D4E9715FB2C29D9312A0113E694039SN2MPN102103_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hello all,

 

Does Yocto support initramfs build?

 

 

Best Regards,

 

Zhenhua

 

--_000_CA452391058F6D4E9715FB2C29D9312A0113E694039SN2MPN102103_-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 6B85BE003E1 for ; Fri, 2 Mar 2012 08:07:15 -0800 (PST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 02 Mar 2012 08:07:15 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.71,315,1320652800"; d="scan'208";a="124213376" Received: from unknown (HELO envy.home) ([10.255.15.86]) by fmsmga001.fm.intel.com with ESMTP; 02 Mar 2012 08:07:14 -0800 Message-ID: <4F50EFFA.7080809@linux.intel.com> Date: Fri, 02 Mar 2012 08:06:18 -0800 From: Darren Hart User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20120131 Thunderbird/10.0 MIME-Version: 1.0 To: Luo Zhenhua-B19537 References: In-Reply-To: X-Enigmail-Version: 1.3.5 Cc: "yocto@yoctoproject.org" Subject: Re: initramfs support in Yocto X-BeenThere: yocto@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Discussion of all things Yocto List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Mar 2012 16:07:15 -0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi Zhenhua, On 03/02/2012 01:59 AM, Luo Zhenhua-B19537 wrote: > Hello all, > > Does Yocto support initramfs build? Can you be more specific about what you are looking for? When you build an image with the cpio.gz image type, you can boot that as an initramfs with the following kernel command line: initrd=core-image-minimal-fri2.cpio.gz root=/dev/ram0 If you are looking for something beyond that, please elaborate. -- Darren Hart Intel Open Source Technology Center Yocto Project - Linux Kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pw0-f48.google.com (mail-pw0-f48.google.com [209.85.160.48]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 6A3A0E003E1 for ; Fri, 2 Mar 2012 10:09:49 -0800 (PST) Received: by pbcup7 with SMTP id up7so2867512pbc.35 for ; Fri, 02 Mar 2012 10:09:49 -0800 (PST) Received-SPF: pass (google.com: domain of jpuhlman@gmail.com designates 10.68.201.135 as permitted sender) client-ip=10.68.201.135; Authentication-Results: mr.google.com; spf=pass (google.com: domain of jpuhlman@gmail.com designates 10.68.201.135 as permitted sender) smtp.mail=jpuhlman@gmail.com; dkim=pass header.i=jpuhlman@gmail.com Received: from mr.google.com ([10.68.201.135]) by 10.68.201.135 with SMTP id ka7mr18977627pbc.145.1330711789342 (num_hops = 1); Fri, 02 Mar 2012 10:09:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=lwLAHgptx0nkRtOwMGWrOp7d2OCyW+8JkLAXXvs4qbE=; b=jNaRFe20Ec3bNowt6Y3i0iFNen++pawx75zHCebOhtJOxfS8KLMHojrJ+lyrWy0rhm W3P1T5oZYUi1wVLvJ8aNFlqPNKoN9yATftIxUtjTgs1n+S14CDisjsVKFGz4RxGOumUf AMsZR3Id0rtpiEnCLfQqmBrCLQgNQ9cy6wyxaw5vBhrWWkoaAJadIzZXHMJ1uGbLeeP4 hU5w6Rm6uT/JHD5RbWVGVbjdhr5DMuDxn1O1ao5uvqCHCHoElXDSGWVL4J8Ms5Jwb41I CW/SOoP2VLLEcxTrmiVmbRz1P+P7FC5Pgx1mlaqNSK3C6WMwscAhkuFZGmqWw5G00dED inJg== Received: by 10.68.201.135 with SMTP id ka7mr15798500pbc.145.1330711789312; Fri, 02 Mar 2012 10:09:49 -0800 (PST) Received: from [192.168.1.4] (c-76-20-107-156.hsd1.ca.comcast.net. [76.20.107.156]) by mx.google.com with ESMTPS id m5sm5554106pbo.69.2012.03.02.10.09.47 (version=SSLv3 cipher=OTHER); Fri, 02 Mar 2012 10:09:48 -0800 (PST) Message-ID: <4F510CDF.1000509@gmail.com> Date: Fri, 02 Mar 2012 10:09:35 -0800 From: Jeremy Puhlman User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: Darren Hart References: <4F50EFFA.7080809@linux.intel.com> In-Reply-To: <4F50EFFA.7080809@linux.intel.com> Cc: "yocto@yoctoproject.org" Subject: Re: initramfs support in Yocto X-BeenThere: yocto@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Discussion of all things Yocto List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Mar 2012 18:09:49 -0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit > Can you be more specific about what you are looking for? When you build > an image with the cpio.gz image type, you can boot that as an initramfs > with the following kernel command line: > > initrd=core-image-minimal-fri2.cpio.gz root=/dev/ram0 > > If you are looking for something beyond that, please elaborate. > When most people refer to initramfs support it is compiling a built image in to the kernel binary(e.g. CONFIG_INITRAMFS_SOURCE). INITRAMFS_IMAGE is part of the kernel class that should enable that in the build. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pz0-f41.google.com (mail-pz0-f41.google.com [209.85.210.41]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 18142E0044D for ; Sun, 4 Mar 2012 23:20:15 -0800 (PST) Received: by dadv6 with SMTP id v6so4555846dad.28 for ; Sun, 04 Mar 2012 23:20:15 -0800 (PST) Received-SPF: pass (google.com: domain of josh@hipro.co.in designates 10.68.220.105 as permitted sender) client-ip=10.68.220.105; Authentication-Results: mr.google.com; spf=pass (google.com: domain of josh@hipro.co.in designates 10.68.220.105 as permitted sender) smtp.mail=josh@hipro.co.in Received: from mr.google.com ([10.68.220.105]) by 10.68.220.105 with SMTP id pv9mr29839089pbc.109.1330932015615 (num_hops = 1); Sun, 04 Mar 2012 23:20:15 -0800 (PST) Received: by 10.68.220.105 with SMTP id pv9mr25830636pbc.109.1330932015547; Sun, 04 Mar 2012 23:20:15 -0800 (PST) Received: from [192.168.10.207] ([59.99.251.45]) by mx.google.com with ESMTPS id f5sm5446520pbq.43.2012.03.04.23.20.12 (version=SSLv3 cipher=OTHER); Sun, 04 Mar 2012 23:20:14 -0800 (PST) Message-ID: <1330932003.2746.33.camel@babel.joshhome> From: Joshua Immanuel To: Darren Hart Date: Mon, 05 Mar 2012 12:50:03 +0530 In-Reply-To: <4F50EFFA.7080809@linux.intel.com> References: <4F50EFFA.7080809@linux.intel.com> Organization: HiPro IT Solutions Private Limited X-Mailer: Evolution 3.2.2-1 Mime-Version: 1.0 X-Gm-Message-State: ALoCoQl+BbBOC/IGCcq/Hr2j2jL6h1gRsGiLRBAtt5JUSLzxDBz4UGu4J3Y52MQCALDrrbi+VkUY Cc: "yocto@yoctoproject.org" Subject: Re: initramfs support in Yocto X-BeenThere: yocto@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Discussion of all things Yocto List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2012 07:20:16 -0000 X-Groupsio-MsgNum: 5142 Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-eEFfBAmkSfnk+S3QlDxr" --=-eEFfBAmkSfnk+S3QlDxr Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello Darren, On Fri, 2012-03-02 at 08:06 -0800, Darren Hart wrote: > Can you be more specific about what you are looking for? When you > build an image with the cpio.gz image type, you can boot that as an > initramfs=20 I find that the cpio.gz image is created by running the following command inside ${IMAGE_ROOTFS} directory find . | cpio -o -H newc | gzip -c -9 > .rootfs.cpio.gz Which means that the initramfs contains the entire rootfs filesystem including the user space applications and its related libraries. In my case, the size of initramfs comes to 158 MB gziped to 66 MB. Most of the files in that are not needed for initramfs. Is there any other way of reducing the initramfs size? Moreover, I find in the bootimg.bbclass file that it uses the INITRD and ROOTFS variables to generate the final hddimage. And these variables usage is seen in image-live.bbclass. So, I guess I have to point the INITRD variable (in my custom-image.bb recipe and inherit bootimg) to core-image-minimal-initramfs generated file in deploy images directory. The problem with this method is=20 1. It uses syslinux bootloader by default. I have to override this class (bootimg.bbclass) if I want to use something else like grub. 2. I have to point the INITRD variable directly to the initramfs file in the deploy directory. (like ${DEPLOY_DIR_IMAGE}/core-image-minimal-initramfs-${MACHINE}.cpio.gz= ). But the cpio.gz extension is based on machine configuration. It can be c= pio, cpio.gz, cpio.xz or cpio.lzma This is what I inferred from the existing code. Am I completely in the wrong direction? Regards Joshua --=20 Joshua Immanuel HiPro IT Solutions Private Limited http://hipro.co.in --=-eEFfBAmkSfnk+S3QlDxr Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEABECAAYFAk9UaSQACgkQWw85XwuSFML9gQCgzydZ7+Rhu2wBi/8MtzIKT4p4 AzYAn0ynb8SY4ryiD6ITMNvONzHBc89y =Jdgi -----END PGP SIGNATURE----- --=-eEFfBAmkSfnk+S3QlDxr-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 1D895E0074A for ; Mon, 5 Mar 2012 08:41:23 -0800 (PST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 05 Mar 2012 08:41:22 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.67,351,1309762800"; d="scan'208";a="117850248" Received: from unknown (HELO helios.localnet) ([10.252.123.129]) by orsmga002.jf.intel.com with ESMTP; 05 Mar 2012 08:41:20 -0800 From: Paul Eggleton To: yocto@yoctoproject.org Date: Mon, 05 Mar 2012 16:41:18 +0000 Message-ID: <1436379.5jf7mCHgF7@helios> Organization: Intel Corporation User-Agent: KMail/4.8.0 (Linux/3.0.0-16-generic-pae; KDE/4.8.0; i686; ; ) In-Reply-To: <1330932003.2746.33.camel@babel.joshhome> References: <4F50EFFA.7080809@linux.intel.com> <1330932003.2746.33.camel@babel.joshhome> MIME-Version: 1.0 Cc: Darren Hart Subject: Re: initramfs support in Yocto X-BeenThere: yocto@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Discussion of all things Yocto List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2012 16:41:23 -0000 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" On Monday 05 March 2012 12:50:03 Joshua Immanuel wrote: > Which means that the initramfs contains the entire rootfs filesystem > including the user space applications and its related libraries. In my > case, the size of initramfs comes to 158 MB gziped to 66 MB. Most of the > files in that are not needed for initramfs. The recommendation here would be to use a separate recipe to produce the intramfs image - we have an example of this in recipes-core/images/core-image- minimal-initramfs.bb. This way you can fully control the content of the initramfs independent of your root filesystem. Cheers, Paul -- Paul Eggleton Intel Open Source Technology Centre