Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
x-raspberrypi.wks.in 1.27 KiB
# SPDX-FileCopyrightText: Huawei Inc.
#
# SPDX-License-Identifier: Apache-2.0

# short-description: Disk image for RaspberryPi boards
# long-description: Creates a MBR partitioned SD image using VFAT for the first
# partition and common partitions for the rest of the entries.
# We are using a MBR-based setup as the target doesn't support (as of now)
# booting a SD card with a GPT partition table. For more info see:
# https://github.com/raspberrypi/firmware/issues/1465
# https://www.raspberrypi.org/forums/viewtopic.php?t=281678
# https://elinux.org/RPi_Easy_SD_Card_Setup
#
# Disk layout:
#  - ------ ------- ------- ---------------------------------
# | |      |       |       |            extended             |
# | |      |       |       |  --------- --------- ---------  |
# | | boot | sys-a | sys-b | | devdata | sysdata | appdata | |
# | |      |       |       |  --------- --------- ---------  |
#  - ------ ------- ------- ---------------------------------
# ^ ^
# | |
# 0 |
#   4096KiB

bootloader --ptable msdos

part --source bootimg-partition --fstype=vfat --label ${BOOT_PARTITION_LABEL} --align 4096 --fixed-size ${BOOT_PARTITION_SIZE} --active --offset 4096
${WIC_ROOTA_PARTITION}
${WIC_ROOTB_PARTITION}
${WIC_DEVDATA_PARTITION}
${WIC_SYSDATA_PARTITION}
${WIC_APPDATA_PARTITION}