From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from stoexhub02.domain01.net ([83.145.59.143]) by linuxtogo.org with esmtp (Exim 4.72) (envelope-from ) id 1RKm51-0001TO-04 for openembedded-devel@lists.openembedded.org; Mon, 31 Oct 2011 08:14:47 +0100 Received: from ad.chargestorm.se (193.235.91.228) by stoexhub02.domain01.net (10.12.10.2) with Microsoft SMTP Server (TLS) id 8.3.83.0; Mon, 31 Oct 2011 08:08:42 +0100 Date: Mon, 31 Oct 2011 08:08:40 +0100 From: Anders Darander To: Message-ID: <20111031070840.GA4012@ad.chargestorm.se> Mail-Followup-To: openembedded-devel@lists.openembedded.org References: <4EAC051D.2090708@telia.com> <4EAC0BE5.5030500@telia.com> <13765A18-0776-47BA-9517-B88FA62900B6@chargestorm.se> <4EAC2342.1090401@telia.com> MIME-Version: 1.0 In-Reply-To: <4EAC2342.1090401@telia.com> X-Accept-Language: sv, en, de X-GPG-Fingerprint: 5AF0 B2E9 78FE 9D75 D110 6F8F 3E31 84D7 920E 938C X-GPG-Key-Id: 0x920E938C X-GPG-Keyserver: hkp://keys.gnupg.net Organization: ChargeStorm AB User-Agent: Mutt/1.5.21 (2010-09-15) X-GFI-SMTP-Submission: 1 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: Mon, 31 Oct 2011 07:14:47 -0000 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline * Ulf Samuelsson [111029 18:02]: > 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}" Well, maybe IMAGE_PREPROCESS_COMMAND from image.bbclass could be used to do this? (I've not tested this myself, though). You'll also have IMAGE_POSTPROCESS_COMMAND and MACHINE_POSTPROCESS_COMMAND being executed in that order. Although in your case, IMAGE_PREPROCESS_COMMAND should be the one to look at. Cheers, Anders > 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}" -- Anders Darander ChargeStorm AB / eStorm AB