blob: e8ca76dfcfaf68cb0fb7289d899a31515b662dcb [file] [log] [blame]
huang lina77e50c2015-12-07 11:08:57 +08001/*
2 * (C) Copyright 2015 Rockchip Electronics Co., Ltd
3 *
4 * SPDX-License-Identifier: GPL-2.0+
5 */
6
7#ifndef __CONFIG_H
8#define __CONFIG_H
9
Jeffy Chen3e43a3e2016-01-14 10:19:41 +080010#include <linux/sizes.h>
huang lina77e50c2015-12-07 11:08:57 +080011#include <configs/rk3036_common.h>
12
Jeffy Chen4d533cd2016-01-14 10:19:38 +080013#ifndef CONFIG_SPL_BUILD
14
Jeffy Chen3e43a3e2016-01-14 10:19:41 +080015/* Store env in emmc */
16#undef CONFIG_ENV_SIZE
17#define CONFIG_ENV_SIZE SZ_32K
18#undef CONFIG_ENV_IS_NOWHERE
19#define CONFIG_ENV_IS_IN_MMC
20#define CONFIG_SYS_MMC_ENV_DEV 0 /* emmc */
21#define CONFIG_SYS_MMC_ENV_PART 0 /* user area */
22#define CONFIG_ENV_OFFSET (SZ_4M - SZ_64K) /* reserved area */
23#define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
24#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
25
Jeffy Chen4d533cd2016-01-14 10:19:38 +080026/* Enable gpt partition table */
27#define CONFIG_CMD_GPT
28#define CONFIG_RANDOM_UUID
Jeffy Chen4d533cd2016-01-14 10:19:38 +080029#define PARTS_DEFAULT \
30 "uuid_disk=${uuid_gpt_disk};" \
31 "name=loader,start=32K,size=4000K,uuid=${uuid_gpt_loader};" \
32 "name=reserved,size=64K,uuid=${uuid_gpt_reserved};" \
33 "name=misc,size=4M,uuid=${uuid_gpt_misc};" \
34 "name=recovery,size=32M,uuid=${uuid_gpt_recovery};" \
35 "name=boot_a,size=32M,uuid=${uuid_gpt_boot_a};" \
36 "name=boot_b,size=32M,uuid=${uuid_gpt_boot_b};" \
37 "name=system_a,size=818M,uuid=${uuid_gpt_system_a};" \
38 "name=system_b,size=818M,uuid=${uuid_gpt_system_b};" \
39 "name=vendor_a,size=50M,uuid=${uuid_gpt_vendor_a};" \
40 "name=vendor_b,size=50M,uuid=${uuid_gpt_vendor_b};" \
41 "name=cache,size=100M,uuid=${uuid_gpt_cache};" \
42 "name=metadata,size=16M,uuid=${uuid_gpt_metadata};" \
43 "name=persist,size=4M,uuid=${uuid_gpt_persist};" \
44 "name=userdata,size=-,uuid=${uuid_gpt_userdata};\0" \
45
46#undef CONFIG_EXTRA_ENV_SETTINGS
47#define CONFIG_EXTRA_ENV_SETTINGS \
48 "partitions=" PARTS_DEFAULT \
49
50#endif
51
Jeffy Chena32d0092016-01-14 10:19:40 +080052#define CONFIG_BOARD_LATE_INIT
53#define CONFIG_PREBOOT
54
huang lina77e50c2015-12-07 11:08:57 +080055#endif