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

pad uefi fat file length #180

Merged
merged 1 commit into from
Aug 22, 2021
Merged

Conversation

Freax13
Copy link
Member

@Freax13 Freax13 commented Jun 21, 2021

I got the following error during build:

Error: failed to create UEFI disk image

Caused by:
    No space left on device
thread 'main' panicked at 'build failed', simple_boot/src/main.rs:100:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Aborted (core dumped)

This error occured because the file size of the uefi binary was too close to the created uefi fat file size (in my case the uefi binary was 4184064 bytes and the fat file was 4194304 bytes big). I solved it by adding some padding to make sure that the difference between the binary's size and fat file's size isn't too small. I don't know much about fat so I just guessed the padding. If there's a proper way to calculate the required padding we should probably add that instead.

@phil-opp
Copy link
Member

Thank you! I'm not sure if there is a better solution either, so let's just merge this for now.

@phil-opp phil-opp merged commit 346cfe6 into rust-osdev:main Aug 22, 2021
@Freax13 Freax13 deleted the fix-filesystem-size branch August 22, 2021 13:37
phil-opp added a commit that referenced this pull request Aug 22, 2021
@phil-opp
Copy link
Member

Published together with #182 as v0.10.8

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

Successfully merging this pull request may close these issues.

2 participants