Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sifive builds don't update from overlay directory #182

Closed
dkohlbre opened this issue May 19, 2020 · 6 comments
Closed

sifive builds don't update from overlay directory #182

dkohlbre opened this issue May 19, 2020 · 6 comments
Assignees

Comments

@dkohlbre
Copy link
Collaborator

If you build using cmake -DLINUX_SIFIVE=y, any future modifications to the overlay/ directory will not be picked up in the resulting image. (Note that a non-sifive build works fine)

e.g.

mkdir build; cd build
cmake ../
make
./scripts/run-qemu.sh check files in root, no file $foo
touch overlay/root/$foo
make
./scripts/run-qemu.sh check files in root, $foo found

vs

mkdir build; cd build
cmake ../ -DLINUX_SIFIVE=y
make
./scripts/run-qemu.sh check files in root, no file $foo
touch overlay/root/$foo
make
./scripts/run-qemu.sh check files in root, no $foo found

I suspect this is actually an issue with initramfs builds.

@dayeol
Copy link
Contributor

dayeol commented May 29, 2020

@dkohlbre Plz link commits and close the issue if it was resolved. Thanks!

@dkohlbre
Copy link
Collaborator Author

This is a new issue and is unresolved.

@dkohlbre dkohlbre self-assigned this Jun 23, 2020
@dkohlbre dkohlbre mentioned this issue Jun 24, 2020
Merged
@dkohlbre
Copy link
Collaborator Author

Ok, this occurs when initramfs is enabled, and is entirely related to how Linux gets built. Buildroot copies files/etc correctly, the initramfs data doesn't see changes.

@dkohlbre
Copy link
Collaborator Author

As a temporary fix, you can delete the entire linux.build dir, which will cause the next build to be much longer, but pickup new files from overlay

@dayeol dayeol assigned dayeol and unassigned dkohlbre Aug 28, 2020
@dayeol
Copy link
Contributor

dayeol commented Aug 31, 2020

I was able to figure out,

e9fde5d#diff-af3b638bc2a3e6c650974192a53c7291R196

This change makes linux target not build vmlinux images again if they already exist.
Although sysroot and overlay are defined as dependencies in add_custom_command, it is not picked up.

dayeol added a commit that referenced this issue Sep 1, 2020
Sysroot changes were not picked up by CMake because
add_custom_command does not run the dependent target.
We change it to depend on an actual file, instead of target "sysroot"
dayeol added a commit that referenced this issue Sep 1, 2020
Sysroot changes were not picked up by CMake because
add_custom_command does not run the dependent target.
We change it to depend on an actual file, instead of target "sysroot"
@dayeol
Copy link
Contributor

dayeol commented Sep 1, 2020

Closing

@dayeol dayeol closed this as completed Sep 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants