summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKalyan Nagabhirava <kalyankumar.nagabhirava@linaro.org>2018-02-12 16:01:21 +0530
committerArd Biesheuvel <ard.biesheuvel@linaro.org>2018-03-02 14:47:58 +0000
commita628fc23b0af7e82b930b641a57805340fdf8af4 (patch)
tree458d6a5fbd5046465f4c3a758741fc4a2340a6a6
parentc255b21b95cb6da522cbcde80669b2ef186b5473 (diff)
downloadedk2-platforms-a628fc23b0af7e82b930b641a57805340fdf8af4.tar.xz
Platform/Comcast: add RDK Disaster Recovery (DRI) Application
Application will Download platform code Image (kernel + DTB + rootfs) and writes into Flash partition. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Moorthy Baskaravenkatraman <moorthy.baskaravenkatraman-sambamoorthy@linaro.org> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
-rw-r--r--Platform/Comcast/Application/Dri/Dri.c26
-rw-r--r--Platform/Comcast/Application/Dri/Dri.inf43
-rw-r--r--Platform/Comcast/Application/DriSecureBoot/DriSecureBoot.c32
-rw-r--r--Platform/Comcast/Application/DriSecureBoot/DriSecureBoot.inf43
4 files changed, 144 insertions, 0 deletions
diff --git a/Platform/Comcast/Application/Dri/Dri.c b/Platform/Comcast/Application/Dri/Dri.c
new file mode 100644
index 0000000000..4e5ede2e0c
--- /dev/null
+++ b/Platform/Comcast/Application/Dri/Dri.c
@@ -0,0 +1,26 @@
+/*
+# Copyright (c) 2014-2018, Linaro Limited. All rights reserved.
+#
+# This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+ */
+#include <RdkBootManagerLib.h>
+
+EFI_STATUS
+EFIAPI
+DriEntryPoint (
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_SYSTEM_TABLE *SystemTable
+ )
+{
+ EFI_STATUS Status;
+
+ Status = RdkHttpBoot ();
+ return Status;
+}
diff --git a/Platform/Comcast/Application/Dri/Dri.inf b/Platform/Comcast/Application/Dri/Dri.inf
new file mode 100644
index 0000000000..ba0656cbc6
--- /dev/null
+++ b/Platform/Comcast/Application/Dri/Dri.inf
@@ -0,0 +1,43 @@
+#
+# Copyright (c) 2014-2018, Linaro Limited. All rights reserved.
+# Copyright (c) 2016-2017, Comcast. All rights reserved.
+#
+# This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+
+################################################################################
+#
+# Defines Section - statements that will be processed to create a Makefile.
+#
+################################################################################
+
+[Defines]
+ INF_VERSION = 0x0001001A
+ BASE_NAME = RdkDriLoader
+ FILE_GUID = 081ba18a-d71e-40a7-99a9-cdb86463966d
+ MODULE_TYPE = UEFI_APPLICATION
+ VERSION_STRING = 1.0
+ ENTRY_POINT = DriEntryPoint
+
+[Sources]
+ Dri.c
+
+[Packages]
+ ArmPkg/ArmPkg.dec
+ EmbeddedPkg/EmbeddedPkg.dec
+ MdePkg/MdePkg.dec
+ MdeModulePkg/MdeModulePkg.dec
+ NetworkPkg/NetworkPkg.dec
+ ShellPkg/ShellPkg.dec
+ SecurityPkg/SecurityPkg.dec
+ Platform/Comcast/Library/RdkBootManagerLib/RdkBootManagerLib.dec
+
+[LibraryClasses]
+ RdkBootManagerLib
+ UefiApplicationEntryPoint
diff --git a/Platform/Comcast/Application/DriSecureBoot/DriSecureBoot.c b/Platform/Comcast/Application/DriSecureBoot/DriSecureBoot.c
new file mode 100644
index 0000000000..1ebead919a
--- /dev/null
+++ b/Platform/Comcast/Application/DriSecureBoot/DriSecureBoot.c
@@ -0,0 +1,32 @@
+/*
+# Copyright (c) 2014-2018, Linaro Limited. All rights reserved.
+#
+# This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+ */
+#include <RdkBootManagerLib.h>
+
+EFI_STATUS
+EFIAPI
+DriSecureBootEntryPoint (
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_SYSTEM_TABLE *SystemTable
+ )
+{
+ EFI_STATUS Status;
+
+ Status = RdkHttpBoot ();
+
+ Status = RdkSecureBoot (
+ ImageHandle,
+ SystemTable->BootServices
+ );
+
+ return Status;
+}
diff --git a/Platform/Comcast/Application/DriSecureBoot/DriSecureBoot.inf b/Platform/Comcast/Application/DriSecureBoot/DriSecureBoot.inf
new file mode 100644
index 0000000000..39d25e5028
--- /dev/null
+++ b/Platform/Comcast/Application/DriSecureBoot/DriSecureBoot.inf
@@ -0,0 +1,43 @@
+#
+# Copyright (c) 2014-2018, Linaro Limited. All rights reserved.
+# Copyright (c) 2016-2017, Comcast. All rights reserved.
+#
+# This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+
+################################################################################
+#
+# Defines Section - statements that will be processed to create a Makefile.
+#
+################################################################################
+
+[Defines]
+ INF_VERSION = 0x0001001A
+ BASE_NAME = RdkDriSecureLoader
+ FILE_GUID = dd52d1d7-0de2-4552-98e0-8dbee458a502
+ MODULE_TYPE = UEFI_APPLICATION
+ VERSION_STRING = 1.0
+ ENTRY_POINT = DriSecureBootEntryPoint
+
+[Sources]
+ DriSecureBoot.c
+
+[Packages]
+ ArmPkg/ArmPkg.dec
+ EmbeddedPkg/EmbeddedPkg.dec
+ MdePkg/MdePkg.dec
+ MdeModulePkg/MdeModulePkg.dec
+ ShellPkg/ShellPkg.dec
+ SecurityPkg/SecurityPkg.dec
+ NetworkPkg/NetworkPkg.dec
+ Platform/Comcast/Library/RdkBootManagerLib/RdkBootManagerLib.dec
+
+[LibraryClasses]
+ RdkBootManagerLib
+ UefiApplicationEntryPoint