From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (NAM10-DM6-obe.outbound.protection.outlook.com [40.107.93.121]) by mx.groups.io with SMTP id smtpd.web11.5410.1622023969198367564 for ; Wed, 26 May 2021 03:12:49 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@os.amperecomputing.com header.s=selector2 header.b=g98E39Ji; spf=pass (domain: os.amperecomputing.com, ip: 40.107.93.121, mailfrom: nhi@os.amperecomputing.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mhSoY2QCdWU4InetMotK0nv6t7GsTr180kgjobcge3FVWUhN8yootSm93uJtScXqoZ7kZlQyQ+E+q7l77y4dB0sxdXn+joWhv3T+JRp1R8Tp06DsQSod1JxdE2hleLoc3qocWpQtRYAJzgEeYBtrU6KjBG6wp1mx+SFlG+U5IZAkzihWRlv43IBfRxINVGj5p8r1k4UCtIKVn8iI63MHfy2yq3OoXw9VgnGbOiWdpgNa7etu4GRZJ5HbLQkdxd/r3/7FNhfOkyHOcBVlxRMzNOpUbhhU4G+udfL8niDW+Oep9xEOxkvdH5BMw5dtcPBV3ggX+h03qbevOP6ebDlr4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=f76A8nNhuQpQ083damVqRhT1f8AkjX7o9q/lKlANSSg=; b=E81egFNzTyTKLZyvoknzpPFKgl/vE0A/2qrO+X9hY6/wXtkIpane2LWwX7nPby/EhVAWwUE3DCfawHfXnck2XloA1lfiWVp3vLWm/gxv57kQxTQWTWdbUmxptBiQ3uOPfKP8QXWISO1Qqx75n98aCKZeRliZHL4gEYGx6b1dj/23tgA8sT8/WTmq4pZA3as50caDdNxQi8m1rZyz3bsW1tlz7AhIXrDDNQr0ZQGgOteAG97ubPg6KGlr1Jul2rzCsmSMICs3/kWRlo7pjn17pRkgIQCHTpwd8pS477m9oYOPUY6+H2OBUJieEPg+XH5+x/PPLo91yFgKihXRbspzGA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=os.amperecomputing.com; dmarc=pass action=none header.from=os.amperecomputing.com; dkim=pass header.d=os.amperecomputing.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=os.amperecomputing.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=f76A8nNhuQpQ083damVqRhT1f8AkjX7o9q/lKlANSSg=; b=g98E39Ji8yJofkFs14aT1NJRA1FKIRN7uTuspcFkg/oaUptkI2/pOOwtnyVysFkjL7g9T7kUsWUzUdJIth2emvpvcJVYG4XVNwg3yyz9PkCG2YCcg2gMgolNbhoHCPwNohAD7iFmIC/jroN0mclCAWJGgRYHtLeDEiEJW0fYU2A= Authentication-Results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=os.amperecomputing.com; Received: from DM6PR01MB5849.prod.exchangelabs.com (2603:10b6:5:205::20) by DM5PR0101MB3067.prod.exchangelabs.com (2603:10b6:4:31::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.28; Wed, 26 May 2021 10:12:48 +0000 Received: from DM6PR01MB5849.prod.exchangelabs.com ([fe80::60d2:86dd:1f1c:51dd]) by DM6PR01MB5849.prod.exchangelabs.com ([fe80::60d2:86dd:1f1c:51dd%7]) with mapi id 15.20.4173.020; Wed, 26 May 2021 10:12:48 +0000 From: "Nhi Pham" To: devel@edk2.groups.io CC: Nhi Pham , Thang Nguyen , Chuong Tran , Phong Vo , Leif Lindholm , Michael D Kinney , Ard Biesheuvel , Nate DeSimone Subject: [edk2-platforms][PATCH v2 31/32] Platform/Ampere: Introduce the LinuxBootPkg Date: Wed, 26 May 2021 17:07:23 +0700 Message-ID: <20210526100724.5359-33-nhi@os.amperecomputing.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210526100724.5359-1-nhi@os.amperecomputing.com> References: <20210526100724.5359-1-nhi@os.amperecomputing.com> X-Originating-IP: [118.69.219.201] X-ClientProxiedBy: HKAPR04CA0008.apcprd04.prod.outlook.com (2603:1096:203:d0::18) To DM6PR01MB5849.prod.exchangelabs.com (2603:10b6:5:205::20) Return-Path: nhi@os.amperecomputing.com MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (118.69.219.201) by HKAPR04CA0008.apcprd04.prod.outlook.com (2603:1096:203:d0::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4173.20 via Frontend Transport; Wed, 26 May 2021 10:12:45 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a4aacb2c-c470-49a9-758a-08d9202ed020 X-MS-TrafficTypeDiagnostic: DM5PR0101MB3067: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5797; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zHPs29uRDP96ynmyJO8lJf1HtcdhLu6XsCp3vH4ONgt9lNSaF2WLqtI0VWRlA2uh1pLi9kWZikqoC2lTx2lPOaADpsRkM5rnjC9usHKMzAhI9zy858jz0jBxdyXj4MgmkRkRzP8qhg79MBrgpH4xKXUwS748z19OsXWRW1q72VpLUfvGb82pYc8HptoAseJLd+l2tstfhHEm46tEg3BWVjkkUp8jnvTOtxmvrMAZNKh3oKiifSyi4mkAj640qvux+dLzfw6+xWqFg3zeYoHaUOlxNSvo172jPkoSXeDJ1/8C7nOPs6WRyKeRH4wPrveadA/iRxScg3g5h+XDckALZYfHJGE/2tyyCDkq5sX8drxrTlveVdeRC3W3XXoLeVbfU/92FbVWui3DMcQ3sHaE9ny8ayy7vTRopbY3L92SXtD3JiGDPN0nC8IBTgD3It8/XS5fPgliT0ZIWcQhHWExoDtzDgQyXN+/3jLx6NUMwJPyrFIrfnAGpyWXNdr2YxYtRl0aQsRnc71sht5eMFxjI+siVRQNbkat4EcRYMQavvOQ7/WNrdMYv/YLI1ygIxadCsPzzQ8aIUvJ/3njCa13cM0y5W/UnpG57y4eV0Cax6kPq8+99Qp2WecnVjLhhn8Cq+Saj8Znxy+9WO2SmbX2VjttKA5MCCQScZtNG0Ku5R1I6J4me43/FpKY1f3HnygUIfD50uVtgEz4TtX0Zjgm55qsTNJzuXKEe2XBopSFECTGNhMrNOc312c78FrZGvbs41rVf7X9gE4P1jX0HDBD2vbFEnn40sgfdRiLTcjcA78jSbtX4r5YvnF7cdL1Q1yU X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR01MB5849.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(4636009)(396003)(39840400004)(346002)(136003)(376002)(366004)(4326008)(26005)(19627235002)(6666004)(1076003)(2616005)(38350700002)(6506007)(86362001)(2906002)(6486002)(8676002)(956004)(52116002)(8936002)(186003)(54906003)(66556008)(6916009)(66476007)(6512007)(66946007)(38100700002)(5660300002)(966005)(16526019)(478600001)(316002)(69590400013);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData: =?us-ascii?Q?dTd15WOMqVDkkW0PiGX2pjTboJtSqYc1O+pKPL4F6I18fUqmDQi14B3Z6ynk?= =?us-ascii?Q?78KjR9p2V0SOpaEQOXTEOxTtyx4anxCFO0MqalWq/gnHbVo+/JaaYVnvWvq9?= =?us-ascii?Q?lw+m5BX3H8zybxEXLfzHHZ8GQbtZnetlJ9vciPSR09l4mRNIFupNftmtZA+N?= =?us-ascii?Q?x8jUGVwJgIvYaXbeW75I18mZ5Ge2L3Fad+B0exnxGVQWRaG1WdYZuMxDD5dE?= =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fUgZO6p27lHs0sCceJ0sv+Khprao?= =?us-ascii?Q?ibxzQ4gKb3YVK//54rTBWsu0SN2M0NMNpX4kOxEY1VRPVw40ae0dmvnVO7qd?= =?us-ascii?Q?HMv4GqCRo3x00ELhlLIRhq7R8GGOWQBseLNxBm0Y7NesB4MNE8oR3ZipYLNN?= =?us-ascii?Q?dEIZODzewpCd4gLuUcw0kJbwn2jbUfHaB427+MJ9XfZjUTxAavWNmhd+reKW?= =?us-ascii?Q?X7hvmtKbd4XcFlWBlTGoDu6+?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: a4aacb2c-c470-49a9-758a-08d9202ed020 X-MS-Exchange-CrossTenant-AuthSource: DM6PR01MB5849.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 May 2021 10:12:48.3497 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3bc2b170-fd94-476d-b0ce-4229bdc904a7 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 2STnX/cdX0jBcDIVQjbfbkvCwzUFFhD3FOnJ+OIq6F8TY6h5BrI1/Yawyksn7AiVMbEVpWF7DOt4/ScsvlnM7dBGtQ+9Ri/UR0F5BD6ZET4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR0101MB3067 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain LinuxBoot is a firmware that replaces specific firmware functionality like the UEFI DXE phase with a Linux kernel and runtime. At the end of the DXE phase, UEFI will hand over the control to the LinuxBoot kernel. This package contains the LinuxBoot binary (flashkernel) which is built and added manually by following the instructions in the Readme.md ("Platform/Ampere/LinuxBootPkg/AArch64/Readme.md"). Cc: Thang Nguyen Cc: Chuong Tran Cc: Phong Vo Cc: Leif Lindholm Cc: Michael D Kinney Cc: Ard Biesheuvel Cc: Nate DeSimone Signed-off-by: Nhi Pham --- Platform/Ampere/LinuxBootPkg/LinuxBoot.inf | 17 ++++++++++++ Platform/Ampere/LinuxBootPkg/AArch64/Readme.md | 29 ++++++++++++++++++++ 2 files changed, 46 insertions(+) diff --git a/Platform/Ampere/LinuxBootPkg/LinuxBoot.inf b/Platform/Ampere/L= inuxBootPkg/LinuxBoot.inf new file mode 100644 index 000000000000..5e8f6f83dfb2 --- /dev/null +++ b/Platform/Ampere/LinuxBootPkg/LinuxBoot.inf @@ -0,0 +1,17 @@ +## @file +# +# Copyright (c) 2020 - 2021, Ampere Computing LLC. All rights reserved. +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +[Defines] + INF_VERSION =3D 0x0001001B + BASE_NAME =3D LinuxBoot + FILE_GUID =3D D834A5AD-459C-4AED-B0D0-8CBCB28838D7 + MODULE_TYPE =3D UEFI_APPLICATION + VERSION_STRING =3D 1.0 + +[Binaries.AArch64] + PE32|AArch64/flashkernel|* diff --git a/Platform/Ampere/LinuxBootPkg/AArch64/Readme.md b/Platform/Ampe= re/LinuxBootPkg/AArch64/Readme.md new file mode 100644 index 000000000000..92c6c3165eac --- /dev/null +++ b/Platform/Ampere/LinuxBootPkg/AArch64/Readme.md @@ -0,0 +1,29 @@ +# flashkernel + +The LinuxBoot image, named flashkernel, is required to build the final EDK= 2 image with LinuxBoot support. +The flashkernel image consists of [Linux](https://kernel.org) kernel and i= nitramfs generated using [u-root](https://github.com/u-root/u-root). + +## Overview + +LinuxBoot is a firmware that replaces specific firmware functionality +like the UEFI DXE phase with a Linux kernel and runtime. It is built-in +UEFI image like an application as it will be executed at the end of DXE ph= ase. + +The flashkernel is built completely from the [linuxboot/mainboards](https:= //github.com/linuxboot/mainboards) repository. + +## How to build + +1. Clone the `linuxboot/mainboards` repository: + + ```Bash + git clone https://github.com/linuxboot/mainboards.git + ``` + +2. Build with the following command: + + ```Bash + cd ampere/jade + make fetch flashkernel + ``` + +Once the build is done, copy the flashkernel into the edk2-platform under = the `Platform/Ampere/LinuxBootPkg/AArch64` directory. --=20 2.17.1