21 lines
1.1 KiB
Plaintext
21 lines
1.1 KiB
Plaintext
# short-description: Create SD card image for Beaglebone
|
|
# long-description: Creates a partitioned SD card image for Beaglebone.
|
|
|
|
# offset 1S => 1 sector (1x512 byte)
|
|
# The bootloader can be at 4 different position in raw mode: 0S, 256S, 512S, 768S
|
|
# MBR disk use only the sector 0, so 1S is free
|
|
# GPT disk use sector 0-33S, so first free slot is 256S
|
|
# Offset are from the BBB default settings
|
|
part --offset 256S --source rawcopy --sourceparams="file=MLO" --ondisk mmcblk0 --fixed-size 256K --part-name "mlo"
|
|
part --offset 768S --source rawcopy --sourceparams="file=u-boot.img" --ondisk mmcblk0 --fixed-size 4M --part-name "uboot"
|
|
|
|
|
|
# Let's define a 4MiB maximum size for the bootloader
|
|
# 4MiB => 4*1024*1024/512=8192S | 768S + 8192S => 8960S
|
|
${WKS_PART_EFI} --ondisk mmcblk0 --offset 8960S --fixed-size 32M
|
|
${WKS_PART_EFIBOOTGUARD_A} --ondisk mmcblk0 --fixed-size ${PART_EFIBG_SIZE}
|
|
${WKS_PART_EFIBOOTGUARD_B} --ondisk mmcblk0 --fixed-size ${PART_EFIBG_SIZE}
|
|
${WKS_PART_ROOT_A} --ondisk mmcblk0 --fixed-size ${PART_ROOT_SIZE}
|
|
${WKS_PART_ROOT_B} --ondisk mmcblk0 --fixed-size ${PART_ROOT_SIZE}
|
|
bootloader --ptable gpt
|