From e677980e682c70a5a1c354a410e95594eadd0894 Mon Sep 17 00:00:00 2001 From: alexander stefanov Date: Sat, 16 Nov 2024 01:21:57 +0300 Subject: [PATCH] add ROOT_SIZE for ok3568c, minor fixes --- device/rockchip/ok3568c/config | 3 +++ utils/make_disk.py | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/device/rockchip/ok3568c/config b/device/rockchip/ok3568c/config index 155bf1f..1a7c4a7 100644 --- a/device/rockchip/ok3568c/config +++ b/device/rockchip/ok3568c/config @@ -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" diff --git a/utils/make_disk.py b/utils/make_disk.py index 56637c1..dc1744e 100644 --- a/utils/make_disk.py +++ b/utils/make_disk.py @@ -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)")