From: Jagan Teki <jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org> To: Kever Yang <kever.yang-TNX95d0MmH7DzftRWevZcw@public.gmane.org>, Simon Glass <sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>, Philipp Tomsich <philipp.tomsich-SN7IsUiht6C/RdPyistoZJqQE7yCjDx5@public.gmane.org> Cc: Jagan Teki <jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>, u-boot-0aAXYlwwYIKGBzrmiIFOJg@public.gmane.org, linux-amarula-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org, Akash Gajjar <akash-oRp2ZoJdM/RWk0Htik3J/w@public.gmane.org>, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org Subject: [PATCH v2 15/16] rockchip: rk3399: Add bootcount support Date: Mon, 26 Aug 2019 23:51:10 +0530 [thread overview] Message-ID: <20190826182111.30999-16-jagan@amarulasolutions.com> (raw) In-Reply-To: <20190826182111.30999-1-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org> Add bootcount support for Rockchip rk3399. The bootcount value is preserved in PMU_SYS_REG0 register, this would help to support redundent boot. Once the redundant boot triggers, the altboot command will look for extlinux-rollback.conf on particular bootable partition which supposed to be a recovery partition where redundant boot required. Signed-off-by: Jagan Teki <jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org> --- arch/arm/mach-rockchip/Kconfig | 2 ++ arch/arm/mach-rockchip/rk3399/Kconfig | 10 ++++++++++ include/configs/rk3399_common.h | 5 ++++- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig index f5a80b4f0c..f3e4d72203 100644 --- a/arch/arm/mach-rockchip/Kconfig +++ b/arch/arm/mach-rockchip/Kconfig @@ -197,6 +197,8 @@ config ROCKCHIP_RK3399 imply TPL_CLK imply TPL_TINY_MEMSET imply TPL_ROCKCHIP_COMMON_BOARD + imply SYS_BOOTCOUNT_SINGLEWORD if BOOTCOUNT_LIMIT + imply CMD_BOOTCOUNT if BOOTCOUNT_LIMIT help The Rockchip RK3399 is a ARM-based SoC with a dual-core Cortex-A72 and quad-core Cortex-A53. diff --git a/arch/arm/mach-rockchip/rk3399/Kconfig b/arch/arm/mach-rockchip/rk3399/Kconfig index 6660d05349..68ac913bcb 100644 --- a/arch/arm/mach-rockchip/rk3399/Kconfig +++ b/arch/arm/mach-rockchip/rk3399/Kconfig @@ -91,6 +91,16 @@ config TPL_STACK config TPL_TEXT_BASE default 0xff8c2000 +if BOOTCOUNT_LIMIT + +config BOOTCOUNT_BOOTLIMIT + default 3 + +config SYS_BOOTCOUNT_ADDR + default 0xff3100f0 # PMU_SYS_REG0 + +endif # BOOTCOUNT_LIMIT + source "board/rockchip/evb_rk3399/Kconfig" source "board/theobroma-systems/puma_rk3399/Kconfig" source "board/vamrs/rock960_rk3399/Kconfig" diff --git a/include/configs/rk3399_common.h b/include/configs/rk3399_common.h index a5e69b26ad..724ea4cbfc 100644 --- a/include/configs/rk3399_common.h +++ b/include/configs/rk3399_common.h @@ -64,7 +64,10 @@ "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \ "partitions=" PARTS_DEFAULT \ ROCKCHIP_DEVICE_SETTINGS \ - BOOTENV + BOOTENV \ + "altbootcmd=" \ + "setenv boot_syslinux_conf extlinux/extlinux-rollback.conf;" \ + "run distro_bootcmd\0" #endif -- 2.18.0.321.gffc6fa0e3
WARNING: multiple messages have this Message-ID (diff)
From: Jagan Teki <jagan@amarulasolutions.com> To: u-boot@lists.denx.de Subject: [U-Boot] [PATCH v2 15/16] rockchip: rk3399: Add bootcount support Date: Mon, 26 Aug 2019 23:51:10 +0530 [thread overview] Message-ID: <20190826182111.30999-16-jagan@amarulasolutions.com> (raw) In-Reply-To: <20190826182111.30999-1-jagan@amarulasolutions.com> Add bootcount support for Rockchip rk3399. The bootcount value is preserved in PMU_SYS_REG0 register, this would help to support redundent boot. Once the redundant boot triggers, the altboot command will look for extlinux-rollback.conf on particular bootable partition which supposed to be a recovery partition where redundant boot required. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> --- arch/arm/mach-rockchip/Kconfig | 2 ++ arch/arm/mach-rockchip/rk3399/Kconfig | 10 ++++++++++ include/configs/rk3399_common.h | 5 ++++- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig index f5a80b4f0c..f3e4d72203 100644 --- a/arch/arm/mach-rockchip/Kconfig +++ b/arch/arm/mach-rockchip/Kconfig @@ -197,6 +197,8 @@ config ROCKCHIP_RK3399 imply TPL_CLK imply TPL_TINY_MEMSET imply TPL_ROCKCHIP_COMMON_BOARD + imply SYS_BOOTCOUNT_SINGLEWORD if BOOTCOUNT_LIMIT + imply CMD_BOOTCOUNT if BOOTCOUNT_LIMIT help The Rockchip RK3399 is a ARM-based SoC with a dual-core Cortex-A72 and quad-core Cortex-A53. diff --git a/arch/arm/mach-rockchip/rk3399/Kconfig b/arch/arm/mach-rockchip/rk3399/Kconfig index 6660d05349..68ac913bcb 100644 --- a/arch/arm/mach-rockchip/rk3399/Kconfig +++ b/arch/arm/mach-rockchip/rk3399/Kconfig @@ -91,6 +91,16 @@ config TPL_STACK config TPL_TEXT_BASE default 0xff8c2000 +if BOOTCOUNT_LIMIT + +config BOOTCOUNT_BOOTLIMIT + default 3 + +config SYS_BOOTCOUNT_ADDR + default 0xff3100f0 # PMU_SYS_REG0 + +endif # BOOTCOUNT_LIMIT + source "board/rockchip/evb_rk3399/Kconfig" source "board/theobroma-systems/puma_rk3399/Kconfig" source "board/vamrs/rock960_rk3399/Kconfig" diff --git a/include/configs/rk3399_common.h b/include/configs/rk3399_common.h index a5e69b26ad..724ea4cbfc 100644 --- a/include/configs/rk3399_common.h +++ b/include/configs/rk3399_common.h @@ -64,7 +64,10 @@ "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \ "partitions=" PARTS_DEFAULT \ ROCKCHIP_DEVICE_SETTINGS \ - BOOTENV + BOOTENV \ + "altbootcmd=" \ + "setenv boot_syslinux_conf extlinux/extlinux-rollback.conf;" \ + "run distro_bootcmd\0" #endif -- 2.18.0.321.gffc6fa0e3
next prev parent reply other threads:[~2019-08-26 18:21 UTC|newest] Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-08-26 18:20 [PATCH v2 00/16] rk3399: Add redundant boot support Jagan Teki 2019-08-26 18:20 ` [U-Boot] " Jagan Teki [not found] ` <20190826182111.30999-1-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org> 2019-08-26 18:20 ` [PATCH v2 01/16] rockchip: Add cpu-info Jagan Teki 2019-08-26 18:20 ` [U-Boot] " Jagan Teki 2019-09-02 8:33 ` Kever Yang 2019-09-02 8:33 ` [U-Boot] " Kever Yang 2019-08-26 18:20 ` [PATCH v2 02/16] rockchip: rk3288/rk3399: Enable DISPLAY_CPUINFO Jagan Teki 2019-08-26 18:20 ` [U-Boot] " Jagan Teki 2019-08-26 18:20 ` [PATCH v2 03/16] arm: rockchip: Add common cru.h Jagan Teki 2019-08-26 18:20 ` [U-Boot] " Jagan Teki 2019-08-26 18:20 ` [PATCH v2 04/16] rockchip: Add rk3399 reset cause Jagan Teki 2019-08-26 18:20 ` [U-Boot] " Jagan Teki 2019-08-26 18:21 ` [PATCH v2 05/16] wdt: designware: Simplify is_enabled function Jagan Teki 2019-08-26 18:21 ` [U-Boot] " Jagan Teki 2019-08-26 18:21 ` [PATCH v2 06/16] wdt: designware: Simplify enable function Jagan Teki 2019-08-26 18:21 ` [U-Boot] " Jagan Teki 2019-08-26 18:21 ` [PATCH v2 07/16] wdt: dw: Add driver-model support Jagan Teki 2019-08-26 18:21 ` [U-Boot] " Jagan Teki 2019-08-26 18:21 ` [PATCH v2 08/16] wdt: dw: Rename to dw_wdt.c Jagan Teki 2019-08-26 18:21 ` [U-Boot] " Jagan Teki 2019-08-26 18:21 ` [PATCH v2 09/16] rockchip: dts: rk3399: Add u-boot, dm-pre-reloc for watchdog Jagan Teki 2019-08-26 18:21 ` [U-Boot] " Jagan Teki 2019-08-26 18:21 ` [PATCH v2 10/16] wdt: Kconfig: Add WDT_DW entry Jagan Teki 2019-08-26 18:21 ` [U-Boot] " Jagan Teki 2019-08-26 18:21 ` [PATCH v2 11/16] wdt: Kconfig: Add TPL_WDT entry Jagan Teki 2019-08-26 18:21 ` [U-Boot] " Jagan Teki 2019-08-26 18:21 ` [PATCH v2 12/16] spl: Add watchdog support fot TPL Jagan Teki 2019-08-26 18:21 ` [U-Boot] " Jagan Teki 2019-08-26 18:21 ` [PATCH v2 13/16] watchdog: Handle TPL build with watchdog disabled Jagan Teki 2019-08-26 18:21 ` [U-Boot] " Jagan Teki 2019-08-26 18:21 ` [DO NOT MERGE] [PATCH v2 14/16] rk3399: rockpro64: Enable watchdog Jagan Teki 2019-08-26 18:21 ` [U-Boot] " Jagan Teki 2019-08-26 18:21 ` Jagan Teki [this message] 2019-08-26 18:21 ` [U-Boot] [PATCH v2 15/16] rockchip: rk3399: Add bootcount support Jagan Teki 2019-08-26 18:21 ` [DO NOT MERGE] [PATCH v2 16/16] rk3399: rockpro64: Enable bootcount Jagan Teki 2019-08-26 18:21 ` [U-Boot] " Jagan Teki
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20190826182111.30999-16-jagan@amarulasolutions.com \ --to=jagan-dyjbcgdgk7pe9whmmfpqlfatqe2ktcn/@public.gmane.org \ --cc=akash-oRp2ZoJdM/RWk0Htik3J/w@public.gmane.org \ --cc=kever.yang-TNX95d0MmH7DzftRWevZcw@public.gmane.org \ --cc=linux-amarula-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org \ --cc=linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \ --cc=philipp.tomsich-SN7IsUiht6C/RdPyistoZJqQE7yCjDx5@public.gmane.org \ --cc=sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \ --cc=u-boot-0aAXYlwwYIKGBzrmiIFOJg@public.gmane.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.