All of lore.kernel.org
 help / color / mirror / Atom feed
* How to recreate rootfs image
@ 2015-08-26 15:42 Lenivyy Viktor
  2015-08-26 15:47 ` Nikolay Dimitrov
  0 siblings, 1 reply; 11+ messages in thread
From: Lenivyy Viktor @ 2015-08-26 15:42 UTC (permalink / raw)
  To: yocto@yoctoproject.org

[-- Attachment #1: Type: text/plain, Size: 318 bytes --]

> Can you please try this and share if it works for you:
>
> bitbake -c cleanall dirtypackage myimage
> bitbake myimage
>
> Regards,
> Nikolay

What is dirtypackage? Myimage will be altera-image-minimal in my case, I guess.
I’m wondering whether cleanall doesn’t remove Yocto’s copy of kernel sources?

[-- Attachment #2: Type: text/html, Size: 4964 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread
* How to recreate rootfs image
@ 2015-08-27  8:25 Lenivyy Viktor
  2015-08-28 10:06 ` Paul Eggleton
  0 siblings, 1 reply; 11+ messages in thread
From: Lenivyy Viktor @ 2015-08-27  8:25 UTC (permalink / raw)
  To: yocto@yoctoproject.org

> In your kernel recipe are you using SRC_URI to fetch from a git
> repository (e.g. git:// URI) or from a local directory?

This kernel is fetched from local directory.

> I guess that if you're using a local path, there can be either some
> uncommitted changes, or a stale git index.

No, because kernel built from sources in local directory doesn’t have “-dirty” in version string.

> You can try just for the experiment to add your current kernel sources
> to a test git repo and point the SRC_URI to it, so bitbake can clone
> the repo by git revision (SRCREV = "${AUTOREV}" will skip the need to
> update the recipe revision constantly during development). This should
> work fine, without the "-dirty" version suffix.

I can try this, but it doesn't answer main question:
how can I recreate rootfs image starting from the point after fetching Linux sources, so Yocto’s copy will remain intact?

Regards,
Nikolay

^ permalink raw reply	[flat|nested] 11+ messages in thread
* How to recreate rootfs image
@ 2015-08-26 16:13 Lenivyy Viktor
  2015-08-26 16:17 ` Khem Raj
  0 siblings, 1 reply; 11+ messages in thread
From: Lenivyy Viktor @ 2015-08-26 16:13 UTC (permalink / raw)
  To: yocto@yoctoproject.org

[-- Attachment #1: Type: text/plain, Size: 535 bytes --]

> dirtypackage is the one which you want to rebuild and redeploy in the
> rootfs. If the package source is local, cleanall won't do big harm, but
> otherwise you're correct, it will clean the sources. You can use
> "clean" instead.

> Regards,
> Nikolay

I don’t know exactly which package I need to rebuild, but I guess it’s kernel-modules as modules folder have wrong version.
After
bitbake -c clean kernel-modules altera-image-minimal

there is an error:
…
ERROR: Nothing PROVIDES 'kernel-modules'
…





[-- Attachment #2: Type: text/html, Size: 5755 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread
* How to recreate rootfs image
@ 2015-08-26 14:37 Lenivyy Viktor
  2015-08-26 15:15 ` Nikolay Dimitrov
  0 siblings, 1 reply; 11+ messages in thread
From: Lenivyy Viktor @ 2015-08-26 14:37 UTC (permalink / raw)
  To: yocto@yoctoproject.org

[-- Attachment #1: Type: text/plain, Size: 1625 bytes --]

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?

[-- Attachment #2: Type: text/html, Size: 3928 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-08-28 15:06 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-26 15:42 How to recreate rootfs image Lenivyy Viktor
2015-08-26 15:47 ` Nikolay Dimitrov
  -- strict thread matches above, loose matches on Subject: below --
2015-08-27  8:25 Lenivyy Viktor
2015-08-28 10:06 ` Paul Eggleton
2015-08-28 13:32   ` Lenivyy Viktor
2015-08-28 13:53     ` Paul Eggleton
2015-08-28 15:06       ` Lenivyy Viktor
2015-08-26 16:13 Lenivyy Viktor
2015-08-26 16:17 ` Khem Raj
2015-08-26 14:37 Lenivyy Viktor
2015-08-26 15:15 ` Nikolay Dimitrov

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.