[yocto] How to recreate rootfs image

Lenivyy Viktor Viktor.Lenivyy at author.kiev.ua
Wed Aug 26 07:37:03 PDT 2015


Hello.
I have “altera-image-minimal” recipe which creates minimal rootfs based on Linux kernel provided by “linux-altera-local” recipe. This kernel is fetched from local directory.
After first time building “altera-image-minimal”, it produced rootfs with modules version contained “-dirty” at the end. However kernel built from sources in local directory doesn’t have “-dirty” in version string. Thus kernel can’t run with produced rootfs.
I opened directory which contains Yocto’s copy of Linux sources
build/tmp/work/socfpga_socrates-poky-linux-gnueabi/linux-altera-local-1.0-r1/socrates_linux/
then run “make ARCH=arm kernelrelease” to investigate kernel version. This command outputs the version with “-dirty”. I have found that “-dirty” string is appended from script in kernel sources. That script uses output from “git diff-index --name-only HEAD” to determine if working directory is “dirty”. To find changed files, I ran same command, it’s oddly but the output was empty. Then I rerun “make ARCH=arm kernelrelease”. This time it prints  the version without “-dirty”.
Does someone have any clue why it can be so?

My main question is: how can I recreate rootfs image starting from the point after fetching Linux sources, so Yocto’s copy will remain intact?

I spent lot of time trying to figure it out by myself with no luck. My idea was to find sequence of commands used to create image and run only commands after fetching kernel sources. Unfortunately I didn’t manage to find the sequence anywhere. How such things need to be solved in Yocto?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20150826/b8c1155c/attachment.html>


More information about the yocto mailing list