mirror of
https://github.com/rosalinux/image-builder.git
synced 2025-02-23 10:22:50 +00:00
add ROOT_SIZE for ok3568c, minor fixes
This commit is contained in:
parent
bd5cda66a4
commit
e677980e68
2 changed files with 6 additions and 3 deletions
|
@ -6,3 +6,6 @@ UBOOT_VERSION="next-dev-v2024.03"
|
|||
UBOOT_CONFIG="ok3568c-rk3568_defconfig"
|
||||
DTB="rockchip/rk3568-ok3568c"
|
||||
CMDLINE="earlycon=uart8250,mmio32,0xfeb50000 console=ttyFIQ0 console=tty1 consoleblank=0 irqchip.gicv3_pseudo_nmi=0 switolb=1 coherent_pool=2M cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1"
|
||||
|
||||
ROOT_SIZE="1024MB"
|
||||
ROOT_FSTYPE="ext4"
|
||||
|
|
|
@ -6,8 +6,8 @@ import subprocess
|
|||
|
||||
def create_disk_image(tmp_dir, config, vendor, device):
|
||||
|
||||
boot_size = config.get("BOOT_SIZE").rstrip("MB")
|
||||
root_size = config.get("ROOT_SIZE").rstrip("MB")
|
||||
boot_size = config.get("BOOT_SIZE", "").rstrip("MB")
|
||||
root_size = config.get("ROOT_SIZE", "0").rstrip("MB")
|
||||
|
||||
if not root_size:
|
||||
print("Error: ROOT_SIZE is not defined in the configuration.")
|
||||
|
@ -72,7 +72,7 @@ def create_partitions(loop_device, config):
|
|||
subprocess.run(["sudo", "mkfs.ext4", f"{loop_device}p2"], check=True)
|
||||
|
||||
else:
|
||||
fdisk_commands = f"""o\nn\np\n\n\n+{root_size}M\nw\n"""
|
||||
fdisk_commands = f"""o\nn\np\n\n\n\nw\n"""
|
||||
subprocess.run(["sudo", "fdisk", "--wipe", "always", loop_device], input=fdisk_commands, text=True, check=True)
|
||||
|
||||
print(f" - Formatting single root (/) partition as {root_fstype} ({root_size} MB)")
|
||||
|
|
Loading…
Add table
Reference in a new issue