mirror of
https://github.com/rosalinux/image-builder.git
synced 2025-02-23 10:22:50 +00:00
add blobs for ok3568c adjust uboot.py
This commit is contained in:
parent
a68c5dac73
commit
b505dcd815
3 changed files with 25 additions and 7 deletions
BIN
device/rockchip/ok3568c/blobs/rk3568_bl31_v1.44.elf
Normal file
BIN
device/rockchip/ok3568c/blobs/rk3568_bl31_v1.44.elf
Normal file
Binary file not shown.
BIN
device/rockchip/ok3568c/blobs/rk3568_ddr_1560MHz_v1.21.bin
Normal file
BIN
device/rockchip/ok3568c/blobs/rk3568_ddr_1560MHz_v1.21.bin
Normal file
Binary file not shown.
|
@ -9,19 +9,37 @@ from utils.patch import apply_uboot_patches
|
|||
|
||||
|
||||
def build_uboot(TMP_DIR, BASE_DIR, config, vendor, device):
|
||||
uboot_git = config.get("UBOOT")
|
||||
uboot_branch = config.get("UBOOT_VERSION")
|
||||
|
||||
if "UBOOT" not in config or "UBOOT_VERSION" not in config:
|
||||
print("U-Boot configuration not found. Skipping U-Boot build.")
|
||||
return
|
||||
|
||||
uboot_git = config.get("UBOOT")
|
||||
uboot_branch = config.get("UBOOT_VERSION")
|
||||
uboot_config = config.get("UBOOT_CONFIG")
|
||||
uboot_build_cmd = config.get("UBOOT_BUILD")
|
||||
mkimage_cmd = config.get("MKIMAGE_CMD")
|
||||
|
||||
blobs_dir = os.path.join(BASE_DIR, "device", vendor, device, "blobs")
|
||||
rk_ddr = os.path.join(blobs_dir, config.get("RK_DDR", ""))
|
||||
bl31 = os.path.join(blobs_dir, config.get("BL31", ""))
|
||||
|
||||
if not os.path.isfile(rk_ddr) or not os.path.isfile(bl31):
|
||||
print(f"Missing required files in blobs directory: {rk_ddr}, {bl31}")
|
||||
return
|
||||
|
||||
uboot_dir = os.path.join(TMP_DIR, vendor, device, "u-boot")
|
||||
clone_repo(uboot_git, uboot_branch, uboot_dir, "u-boot")
|
||||
apply_uboot_patches(BASE_DIR, vendor, device, uboot_dir)
|
||||
|
||||
|
||||
#os.chdir(uboot_dir)
|
||||
#subprocess.run(["make", config["UBOOT_CONFIG"]], check=True)
|
||||
#subprocess.run(["make", "-j" + NUM_CORES], check=True)
|
||||
os.chdir(uboot_dir)
|
||||
try:
|
||||
print(f"Building U-Boot for {vendor}/{device} {uboot_config}...")
|
||||
subprocess.run(["make", uboot_config], check=True)
|
||||
build_command = uboot_build_cmd.format(BL31=bl31, ARCH=config.get("ARCH", "aarch64"))
|
||||
subprocess.run(build_command, shell=True, check=True)
|
||||
mkimage_command = mkimage_cmd.format(BOOT_SOC=config.get("BOOT_SOC", ""), RK_DDR=rk_ddr)
|
||||
subprocess.run(mkimage_command, shell=True, check=True)
|
||||
print("U-Boot build completed successfully.")
|
||||
except subprocess.CalledProcessError as e:
|
||||
print(f"Error during U-Boot build: {e}")
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue