image.cmd_build(): parse deviceinfo only after building the packages
This commit is contained in:
parent
98140565ef
commit
dd0d848b8f
1 changed files with 7 additions and 7 deletions
14
image.py
14
image.py
|
@ -397,13 +397,6 @@ def cmd_build(profile_name: str = None,
|
||||||
flavour = get_flavour(profile_name)
|
flavour = get_flavour(profile_name)
|
||||||
size_extra_mb: int = int(profile["size_extra_mb"])
|
size_extra_mb: int = int(profile["size_extra_mb"])
|
||||||
|
|
||||||
deviceinfo = device.parse_deviceinfo()
|
|
||||||
sector_size = deviceinfo.flash_pagesize
|
|
||||||
if not sector_size:
|
|
||||||
raise Exception(f"Device {device.name} has no flash_pagesize specified")
|
|
||||||
|
|
||||||
rootfs_size_mb = FLAVOURS[flavour].get('size', 2) * 1000
|
|
||||||
|
|
||||||
packages = BASE_PACKAGES + [device.package.name] + FLAVOURS[flavour]['packages'] + profile['pkgs_include']
|
packages = BASE_PACKAGES + [device.package.name] + FLAVOURS[flavour]['packages'] + profile['pkgs_include']
|
||||||
|
|
||||||
if arch != config.runtime.arch:
|
if arch != config.runtime.arch:
|
||||||
|
@ -413,6 +406,13 @@ def cmd_build(profile_name: str = None,
|
||||||
logging.info("Making sure all packages are built")
|
logging.info("Making sure all packages are built")
|
||||||
build_packages_by_paths(packages, arch, try_download=not no_download_pkgs)
|
build_packages_by_paths(packages, arch, try_download=not no_download_pkgs)
|
||||||
|
|
||||||
|
deviceinfo = device.parse_deviceinfo()
|
||||||
|
sector_size = deviceinfo.flash_pagesize
|
||||||
|
if not sector_size:
|
||||||
|
raise Exception(f"Device {device.name} has no flash_pagesize specified")
|
||||||
|
|
||||||
|
rootfs_size_mb = FLAVOURS[flavour].get('size', 2) * 1000
|
||||||
|
|
||||||
image_path = block_target or get_image_path(device, flavour)
|
image_path = block_target or get_image_path(device, flavour)
|
||||||
|
|
||||||
makedir(os.path.dirname(image_path))
|
makedir(os.path.dirname(image_path))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue