Merge pull request #414 from Googulator/builder-hex0-submodule
Use builder-hex0 stages from submodule
This commit is contained in:
commit
06b40f3f00
|
@ -5,3 +5,7 @@
|
|||
[submodule "seed/stage0-posix"]
|
||||
path = seed/stage0-posix
|
||||
url = https://github.com/oriansj/stage0-posix
|
||||
|
||||
[submodule "builder-hex0"]
|
||||
path = builder-hex0
|
||||
url = https://github.com/ironmeld/builder-hex0
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 8a6be6d30fda0357fdeb4aa4bbbc6d475f9869b2
|
File diff suppressed because it is too large
Load Diff
|
@ -236,13 +236,14 @@ class Generator():
|
|||
|
||||
def create_builder_hex0_disk_image(self, image_file_name, size):
|
||||
"""Create builder-hex0 disk image"""
|
||||
shutil.copyfile(os.path.join('seed', 'stage0-posix', 'bootstrap-seeds',
|
||||
'NATIVE', 'x86', 'builder-hex0-x86-stage1.img'),
|
||||
image_file_name)
|
||||
|
||||
with open(image_file_name, 'ab') as image_file:
|
||||
# Compile and write stage1 binary seed
|
||||
with open(os.path.join('builder-hex0', 'builder-hex0-x86-stage1.hex0'),
|
||||
encoding="utf-8") as infile:
|
||||
for line in infile:
|
||||
image_file.write(bytes.fromhex(line.split('#')[0].split(';')[0].strip()))
|
||||
# Append stage2 hex0 source
|
||||
with open(os.path.join('kernel-bootstrap', 'builder-hex0-x86-stage2.hex0'),
|
||||
with open(os.path.join('builder-hex0', 'builder-hex0-x86-stage2.hex0'),
|
||||
encoding="utf-8") as infile:
|
||||
image_file.write(infile.read().encode())
|
||||
# Pad to next sector
|
||||
|
|
Loading…
Reference in New Issue