[yocto] How to recreate rootfs image

Nikolay Dimitrov picmaster at mail.bg
Wed Aug 26 08:15:55 PDT 2015


Hi Lenivyy Viktor,

On 08/26/2015 05:37 PM, Lenivyy Viktor wrote:
> 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?
>

Can you please try this and share if it works for you:

bitbake -c cleanall dirtypackage myimage
bitbake myimage

Regards,
Nikolay



More information about the yocto mailing list