* How best replace /etc/init.d files with debugging versions right before jffs2 file is generated? @ 2011-10-29 13:52 Ulf Samuelsson 2011-10-29 14:21 ` Ulf Samuelsson 2011-10-31 9:27 ` Paul Eggleton 0 siblings, 2 replies; 6+ messages in thread From: Ulf Samuelsson @ 2011-10-29 13:52 UTC (permalink / raw) To: openembedded-devel 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? -- Best Regards Ulf Samuelsson ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How best replace /etc/init.d files with debugging versions right before jffs2 file is generated? 2011-10-29 13:52 How best replace /etc/init.d files with debugging versions right before jffs2 file is generated? Ulf Samuelsson @ 2011-10-29 14:21 ` Ulf Samuelsson 2011-10-29 15:00 ` Anders Darander 2011-10-31 9:27 ` Paul Eggleton 1 sibling, 1 reply; 6+ messages in thread From: Ulf Samuelsson @ 2011-10-29 14:21 UTC (permalink / raw) To: openembedded-devel 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? I can of course add some files to tmp/rootfs and regenerate the jffs2. Other ideas (allowing automation) appreciated. -- Best Regards Ulf Samuelsson ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How best replace /etc/init.d files with debugging versions right before jffs2 file is generated? 2011-10-29 14:21 ` Ulf Samuelsson @ 2011-10-29 15:00 ` Anders Darander 2011-10-29 16:01 ` Ulf Samuelsson 0 siblings, 1 reply; 6+ messages in thread From: Anders Darander @ 2011-10-29 15:00 UTC (permalink / raw) To: openembedded-devel@lists.openembedded.org On 29 okt 2011, at 16:22, "Ulf Samuelsson" <ulf_samuelsson@telia.com> 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How best replace /etc/init.d files with debugging versions right before jffs2 file is generated? 2011-10-29 15:00 ` Anders Darander @ 2011-10-29 16:01 ` Ulf Samuelsson 2011-10-31 7:08 ` Anders Darander 0 siblings, 1 reply; 6+ messages in thread From: Ulf Samuelsson @ 2011-10-29 16:01 UTC (permalink / raw) To: openembedded-devel 2011-10-29 17:00, Anders Darander skrev: > On 29 okt 2011, at 16:22, "Ulf Samuelsson"<ulf_samuelsson@telia.com> 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 <myfile>.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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How best replace /etc/init.d files with debugging versions right before jffs2 file is generated? 2011-10-29 16:01 ` Ulf Samuelsson @ 2011-10-31 7:08 ` Anders Darander 0 siblings, 0 replies; 6+ messages in thread From: Anders Darander @ 2011-10-31 7:08 UTC (permalink / raw) To: openembedded-devel * Ulf Samuelsson <ulf_samuelsson@telia.com> [111029 18:02]: > 2011-10-29 17:00, Anders Darander skrev: > > On 29 okt 2011, at 16:22, "Ulf Samuelsson"<ulf_samuelsson@telia.com> 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 <myfile>.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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How best replace /etc/init.d files with debugging versions right before jffs2 file is generated? 2011-10-29 13:52 How best replace /etc/init.d files with debugging versions right before jffs2 file is generated? Ulf Samuelsson 2011-10-29 14:21 ` Ulf Samuelsson @ 2011-10-31 9:27 ` Paul Eggleton 1 sibling, 0 replies; 6+ messages in thread From: Paul Eggleton @ 2011-10-31 9:27 UTC (permalink / raw) To: Ulf Samuelsson; +Cc: openembedded-devel On Saturday 29 October 2011 14:52:29 Ulf Samuelsson wrote: > 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? Perhaps you could do this by appending to ROOTFS_POSTPROCESS_COMMAND within the image recipe? Cheers, Paul -- Paul Eggleton Intel Open Source Technology Centre ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-10-31 9:33 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-10-29 13:52 How best replace /etc/init.d files with debugging versions right before jffs2 file is generated? Ulf Samuelsson 2011-10-29 14:21 ` Ulf Samuelsson 2011-10-29 15:00 ` Anders Darander 2011-10-29 16:01 ` Ulf Samuelsson 2011-10-31 7:08 ` Anders Darander 2011-10-31 9:27 ` Paul Eggleton
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.