Skip to content
This repository was archived by the owner on Nov 1, 2025. It is now read-only.

Commit e7ef537

Browse files
authored
temp workarounds
1 parent 28c5fa0 commit e7ef537

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

kernel_builder/utils/build.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import os
22
import re
33
import sys
4+
import shutil
5+
import gzip
6+
import lz4.frame
47
from os import cpu_count
58
from pathlib import Path
69

@@ -82,6 +85,17 @@ def build(
8285

8386
log("Defconfig completed. Starting full build.")
8487
self._make(["Image", "modules"], jobs=jobs, out=out)
88+
89+
raw_image_path = WORKSPACE / "out" / "arch" / "arm64" / "Image"
90+
image_path = WORKSPACE / "out" / "arch" / "arm64" / target
91+
92+
if self.image_comp == "gz":
93+
with open(raw_image_path, 'rb') as i, gzip.open(image_path, 'wb') as o:
94+
shutil.copyfileobj(i, o)
95+
elif self.image_comp == "lz4":
96+
with open(raw_image_path, 'rb') as i, lz4.frame.open(out, 'wb') as o:
97+
shutil.copyfileobj(i, o)
98+
8599
log("Build completed successfully.")
86100

87101
def get_kernel_version(self) -> str:

0 commit comments

Comments
 (0)