-
Notifications
You must be signed in to change notification settings - Fork 169
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
buildextend-live: add karg embed area offsets to header #1637
Conversation
Requires: coreos/fedora-coreos-config#545 |
Split out prep patches in #1639. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this looks good. I tried to review this one first but was baffled by what "karg files" are until I read coreos/fedora-coreos-config#545
Maybe "bootloader files"?
One of these projects (probably this one) needs a nice big block comment describing this setup with cross links after they merge.
It'd also be good to hoist some of these magic numbers up as constants like ISO_SYSTEM_AREA_SIZE = 32768
, MAX_BOOTLOADER_FILES = 6
etc.
Rebased!
I went the super explicit way and changed it to
Yeah, will do that in coreos-installer.
I did this (and sprinkled a few more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cgwalters, darkmuggle, jlebon The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
I rather enjoy the clever trick of using the iso9660 system area. The only downside is that we need document it in case someone re-masters the ISO. |
@jlebon needs a rebase |
bfcbb1b
to
09d559b
Compare
New changes are detected. LGTM label has been removed. |
This was updated together with coreos/coreos-installer#341 |
09d559b
to
d43fe60
Compare
Try rebasing 🏄 to fix CI |
3a9aa13
to
912f10f
Compare
src/cmd-buildextend-live
Outdated
@@ -341,6 +342,13 @@ def generate_iso(): | |||
buf = newbuf | |||
karg_area_end = re.search(r'(#+) COREOS_KARG_EMBED_AREA\n', buf) | |||
if karg_area_end is not None: | |||
if len(default_kargs) == 0: | |||
default_kargs = buf[karg_area_start.start():karg_area_end.end()] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be
default_kargs = buf[karg_area_start.start():karg_area_end.start()]
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case length will be less than for other karg files. I though, that it's better to have similar files (ending with COREOS_KARG_EMBED_AREA
), than handing different lengths in coreos-installer
.
Or, we can modify header
format and store there TLV
- like structure for each karg file, where Type
can be ro
or rw
2b99e8c
to
a6239dd
Compare
1fd4084
to
f5aa598
Compare
f5aa598
to
1926304
Compare
1926304
to
7f624b5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, this LGTM now! Had one comment, but not worth the respin.
|
||
for i, fn in enumerate(files_with_karg_embed_areas): | ||
offset_in_file = files_with_karg_embed_areas[fn] | ||
offsets[i] = file_offset_in_iso(isoinfo, fn) + offset_in_file | ||
offsets[i + 1] = file_offset_in_iso(isoinfo, fn) + offset_in_file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor/optional: instead of doing + 1
here, I think it'd be cleaner if in the struct.pack()
call below we explicitly split out an arg for the offset to .cmdline
.
Collect ISO files which include karg embed areas, then inject their offsets into the System Area right behind the initramfs header. This information will be used by `coreos-installer iso embed-kargs`.
Add constants for some of our magic numbers, and make it clear that the formatting of these files cannot be changed without first changing coreos-installer.
…karg This allows installer to modify all kargs backed into iso image Signed-off-by: Nikita Dubrovskii <nikita@linux.ibm.com>
…arg reset' Signed-off-by: Nikita Dubrovskii <nikita@linux.ibm.com>
Rebased this now! Since it already had two approvals, just going to add the |
Collect ISO files which include karg embed areas, then inject their
offsets into the System Area right behind the initramfs header. This
information will be used by
coreos-installer iso embed-kargs
.