meta-rockchip/wic/rk3399-boot.wks
Joshua Watt f0a10e707f wic: Use --offset and --fixed-size instead of --align and --size
The --align argument isn't intended to make a partition exist at a fixed
location like the Rockchip boot ROM requires. Use the recently added
--offset argument which will fail to build the image if the partition
can't be placed at the correct location. Also used --fixed-size to make
sure that Wic isn't inserting hidden padding that changes things around.

Finally, the location of the rootfs isn't required to be at sector
262144 since u-boot and the kernel reads the partition table to find it
and actually hasn't been at this location anyway since Wic has been
padding the /boot partition, so remove it's alignment requirements.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
2020-06-25 16:38:49 -04:00

25 lines
1.3 KiB
Plaintext

# Copyright (C) 2020 Garmin Ltd. or its subsidiaries
# Released under the MIT license (see COPYING.MIT for the terms)
#
# Disk layout
# Note that the reference documentation refers to 512 byte disk sectors, but
# wic uses 1KB blocks
#
# Partition Start Sector Number of Sectors
# loader1 64 8000
# reserved1 8064 128
# reserved2 8192 8192
# loader2 16384 8192
# atf 24576 8192
# boot 32768 229376
# root 262144 - (suggested)
#
part loader1 --offset 32 --fixed-size 4000K --ondisk ${RK_BOOT_DEVICE} --source rawcopy --sourceparams="file=idbloader.img"
part reserved1 --offset 4032 --fixed-size 64K --ondisk ${RK_BOOT_DEVICE}
part reserved2 --offset 4096 --fixed-size 4096K --ondisk ${RK_BOOT_DEVICE}
part loader2 --offset 8192 --fixed-size 4096K --ondisk ${RK_BOOT_DEVICE} --source rawcopy --sourceparams="file=u-boot.itb"
part atf --offset 12288 --fixed-size 4096K --ondisk ${RK_BOOT_DEVICE}
part /boot --offset 16384 --size 114688K --active --ondisk ${RK_BOOT_DEVICE} --source bootimg-partition --fstype=vfat --label boot --sourceparams="loader=u-boot"