aboutsummaryrefslogtreecommitdiffstats
path: root/wic/rockchip.wks
blob: 5dafc29ce5d1bfb54af3d8a29df6536359ffbd0a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Copyright (C) 2019,2020 Garmin Ltd. or its subsidiaries
# Copyright (C) 2021 Trevor Woerner
# Released under the MIT license (see COPYING.MIT for the terms)
#
# short-description: Create a disk image suitable for booting Rockchip from SD-card
# long-description: Creates a disk image partitioned using GPT, suitable for Rockchip
# Disk layout
# See: https://opensource.rock-chips.com/wiki_Partitions
#
#   Partition   Start Sector    Number of Sectors
#   loader1     64              7104        (idbloader / U-Boot SPL)
#   v_storage   7168            512         (vendor storage: e.g. serial number, MAC address, etc)
#   reserved    7680            384         (not used)
#   reserved1   8064            64          (legacy DRM key)
#   uboot_env   8128            64          (U-Boo environment)
#   reserved2   8192            8192        (legacy parameters, ATAGS, etc)
#   loader2     16384           8192        (U-Boot proper)
#   atf         24576           8192        (trusted OS e.g. ATF, OP-TEE, etc)
#   root        32768           -

part loader1   --offset 64s    --fixed-size 3552K --fstype=none --source rawcopy --sourceparams="file=${SPL_BINARY}"
part v_storage --offset 7168s  --fixed-size 256K  --fstype=none
part reserved  --offset 7680s  --fixed-size 192K  --fstype=none
part reserved1 --offset 8064s  --fixed-size 32K   --fstype=none
part uboot_env --offset 8128s  --fixed-size 32K   --fstype=none
part reserved2 --offset 8192s  --fixed-size 4096K --fstype=none
part loader2   --offset 16384s --fixed-size 4096K --fstype=none --source rawcopy --sourceparams="file=u-boot.${UBOOT_SUFFIX}"
part atf       --offset 24576s --fixed-size 4096K --fstype=none
part /         --label root    --active           --fstype=ext4 --source rootfs

bootloader --ptable gpt