From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtprelay-h21.telenor.se ([195.54.99.196]) by linuxtogo.org with esmtp (Exim 4.72) (envelope-from ) id 1RKBR9-0008Cd-GR for openembedded-devel@lists.openembedded.org; Sat, 29 Oct 2011 18:07:11 +0200 Received: from iph4.telenor.se (iph4.telenor.se [195.54.127.135]) by smtprelay-h21.telenor.se (Postfix) with ESMTP id 03E26D4B7 for ; Sat, 29 Oct 2011 18:01:08 +0200 (CEST) X-SENDER-IP: [83.227.59.253] X-LISTENER: [smtp.bredband.net] X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ak0dABUjrE5T4zv9PGdsb2JhbAAMNppXjykBAQEBN4IkAQEBAQMBAQE1NgoRCxgJFgQLCQMCAQIBFQEbFBMGAgEBiAazEoNBhUEEkXKCHJFh X-IronPort-AV: E=Sophos;i="4.69,424,1315173600"; d="scan'208";a="1997088834" Received: from c-fd3be353.011-39-73746f12.cust.bredbandsbolaget.se (HELO [10.175.196.249]) ([83.227.59.253]) by iph4.telenor.se with ESMTP; 29 Oct 2011 18:01:06 +0200 Message-ID: <4EAC2342.1090401@telia.com> Date: Sat, 29 Oct 2011 18:01:06 +0200 From: Ulf Samuelsson User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: openembedded-devel@lists.openembedded.org References: <4EAC051D.2090708@telia.com> <4EAC0BE5.5030500@telia.com> <13765A18-0776-47BA-9517-B88FA62900B6@chargestorm.se> In-Reply-To: <13765A18-0776-47BA-9517-B88FA62900B6@chargestorm.se> Subject: Re: How best replace /etc/init.d files with debugging versions right before jffs2 file is generated? X-BeenThere: openembedded-devel@lists.openembedded.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: openembedded-devel@lists.openembedded.org List-Id: Using the OpenEmbedded metadata to build Distributions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Oct 2011 16:07:11 -0000 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 2011-10-29 17:00, Anders Darander skrev: > On 29 okt 2011, at 16:22, "Ulf Samuelsson" wrote: > >> 2011-10-29 15:52, Ulf Samuelsson skrev: >>> Having some problems booting a rootfs generated by openembedded, >>> >>> "hwclock can't find /dev/misc/rtc" >>> >>> and I would like to emit some debug information by replacing some files >>> in the /etc/init.d directory before the rootfs is finalized. >>> >>> If I try to "install" from another package, I will get a conflict. >>> >>> I guess I could loop mount the file system and then copy. >>> Any other suggestions? >>> >> Just discovered that loop mounting jffs2 isn't that easy. >> Need to find the blkmtd driver somewhere, recompile kernel? > Yes, loop mounting filesystems designed for raw flash requires quite some extra steps. It's generally doable, but... > >> I can of course add some files to tmp/rootfs and regenerate the jffs2. >> >> Other ideas (allowing automation) appreciated. > Well, you could always use a bbappend to the recipe in question, and override/replace the files that way. Or, if it's just temporarily, just modify the scripts directly in the oe tree, or if the file is taken from a tarball, modify it in the build directory and force a re-install and packaging. > > Cheers, > Anders > _______________________________________________ > Openembedded-devel mailing list > Openembedded-devel@lists.openembedded.org > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel One would think that it was possible to do something with the rootfs, just before the mkfs.jffs2 was started. Key seems to be redefining "IMAGE_CMD_jffs2" This is set in conf/bitbake.conf: IMAGE_CMD_jffs2 = "mkfs.jffs2 -x lzo --root=${IMAGE_ROOTFS} --faketime --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 ${EXTRA_IMAGECMD}" It is possible to add something either in this file, or override in "local.conf" PREPROCESS_JFFS2 = "tar -jxvf .tar.bz2 -C ${IMAGE_ROOTFS}" IMAGE_CMD_jffs2 = "${PREPROCESS_JFFS2} ; mkfs.jffs2 -x lzo --root=${IMAGE_ROOTFS} --faketime --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 ${EXTRA_IMAGECMD}" If it is added to bitbake.conf, then PREPROCESS_JFFS2 needs to be set to something harmless. PREPROCESS_JFFS2 ?= "touch ${IMAGE_ROOTFS}" BTW: Why not run sumtool on the final result? This should speed up the load. ---------------------------------------- This works for me without making a kludge of the openembedded tree. -- Best Regards Ulf Samuelsson