-
Notifications
You must be signed in to change notification settings - Fork 259
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
split existing Makefile #2096
split existing Makefile #2096
Conversation
The existing Makefile grew pretty large and now has a few additional dependencies like python and crypto for SNP targets. The idea behind the split is that the new Makefile.bootfiles can be used to create Linux boot files and it depends only on `delta*.tar.gz`. This is useful in e.g. multi staged build process, where `delta*.tar.gz` artifacts can be produced separately from the final boot files. Since the delta can be applied to any base image, the build job that does it, wouldn't need go runtime or C compiler. Signed-off-by: Maksim An <maksiman@microsoft.com>
rm -rf rootfs-conv | ||
|
||
out/initrd.img: $(BASE) $(DELTA_TARGET) $(SRCROOT)/hack/catcpio.sh | ||
$(SRCROOT)/hack/catcpio.sh "$(BASE)" $(DELTA_TARGET) > out/initrd.img.uncompressed |
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.
Just a note here, not necessarily something you need to look into. I'd really like to move away from this catcpio if we can. Do you have any concerns or thoughts on that?
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 haven't really given it much thought. What's the concern with current approach? Is it perf? or the hacky nature of it?
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.
imo, its hacky and hard to read, plus, its weird that our build process is:
- create the boot rootfs by combining
$(BASE)
and$(DELTA)
together in amktemp
directory - cpio archive and then gzip the temp directory to initrd.img
2.1. forget the temp directory with the rootfs exists - delete the ungzip'ed cpio archive
- ungzip and extract the cpio archive, then tar it
- delete the ungzip'ed cpio archive
VMGS_TOOL:= | ||
IGVM_TOOL:= | ||
KERNEL_PATH:= | ||
TAR2EXT4_TOOL:=bin/cmd/tar2ext4 |
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.
Should we add a make command to build this?
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 wanted to make sure that Makefile.bootfiles
doesn't depend on go runtime. It's useful in a multi job build process, where different container images could be used. e.g. for creating delta*.tar.gz
files it could be a golang
based container, for creating SNP boot files it'll be a python
based one.
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.
One question otherwise lgtm
The existing Makefile grew pretty large and now has a few additional dependencies like python and crypto for SNP targets.
The idea behind the split is that the new Makefile.bootfiles can be used to create Linux boot files and it depends only on
delta*.tar.gz
. This is useful in e.g. multi staged build process, wheredelta*.tar.gz
artifacts can be produced separately from the final boot files. Since the delta can be applied to any base image, the build job that does it, wouldn't need go runtime or C compiler.