From 2ec4b79debd86474224cff52e385ebd4147f4060 Mon Sep 17 00:00:00 2001 From: Sudeep Holla Date: Tue, 16 Jul 2024 14:53:18 +0100 Subject: [PATCH 1/2] config: edk2: Remove EDK2 shell timeout to start kernel immediately EDK2 PCD(Platform Configuration Data) `PcdShellDefaultDelay` controls the default delay the shell will offer to the user at the start to check if the user wishes to cancel the script autostart `startup.nsh` The default value of 5 is set. However, when running FVP models with shrinkwrap, there is no need for such a delay. Currently one needs to enter any key to start the kernel immediately without that 5s delay. Let us override the value by setting it to 0. If required, it can changed to desired timeout using the overlays. While at it, also override `PcdPlatformBootTimeOut` for the ArmVirtKvmTool platform used in CCA 3-world config. Signed-off-by: Sudeep Holla --- config/cca-3world.yaml | 2 ++ config/edk2-base.yaml | 1 + documentation/userguide/quickstart.rst | 1 + 3 files changed, 4 insertions(+) diff --git a/config/cca-3world.yaml b/config/cca-3world.yaml index df35276..d2b5166 100644 --- a/config/cca-3world.yaml +++ b/config/cca-3world.yaml @@ -167,6 +167,8 @@ build: -t: GCC5 -p: edk2/ArmVirtPkg/ArmVirtKvmTool.dsc -b: RELEASE + --pcd: PcdShellDefaultDelay=0 + ' --pcd': PcdPlatformBootTimeOut=0 build: - source edk2/edksetup.sh --reconfig diff --git a/config/edk2-base.yaml b/config/edk2-base.yaml index b127752..7897961 100644 --- a/config/edk2-base.yaml +++ b/config/edk2-base.yaml @@ -47,6 +47,7 @@ build: -t: GCC5 -p: Platform/ARM/VExpressPkg/ArmVExpress-FVP-AArch64.dsc -b: RELEASE + --pcd: PcdShellDefaultDelay=0 build: - source edk2/edksetup.sh --reconfig diff --git a/documentation/userguide/quickstart.rst b/documentation/userguide/quickstart.rst index 3d0da12..92e7272 100644 --- a/documentation/userguide/quickstart.rst +++ b/documentation/userguide/quickstart.rst @@ -895,6 +895,7 @@ command: -t: GCC5 -p: Platform/ARM/VExpressPkg/ArmVExpress-FVP-AArch64.dsc -b: RELEASE + --pcd: PcdShellDefaultDelay=0 prebuild: - export WORKSPACE=${param:sourcedir} - export GCC5_AARCH64_PREFIX=$$CROSS_COMPILE -- GitLab From 6a873d3cef33163457ed841583687af85d8d7092 Mon Sep 17 00:00:00 2001 From: Sudeep Holla Date: Wed, 17 Jul 2024 11:30:11 +0100 Subject: [PATCH 2/2] config: edk2: Build Uefi with Shell enabled as default boot option EDK2 PCD(Platform Configuration Data) `PcdUefiShellDefaultBootEnable` controls if the shell is enabled or disabled as default boot option. By enabling the same, we can get rid of the pre-canned flash image loaded into the model that allows to configure UEFI Shell as default boot option. All the changes to configstore/*.rst are auto-generated with genconfigstore.py. Signed-off-by: Sudeep Holla --- config/cca-3world.yaml | 1 + config/edk2-base.yaml | 1 + config/edk2-flash.img | Bin 99075 -> 0 bytes config/ns-edk2.yaml | 18 +++---- .../userguide/configstore/cca-3world.rst | 2 +- .../userguide/configstore/cca-4world.rst | 2 +- .../userguide/configstore/ffa-tftf.rst | 2 +- .../userguide/configstore/ns-edk2-optee.rst | 2 +- .../userguide/configstore/ns-edk2.rst | 4 +- documentation/userguide/quickstart.rst | 48 +++++++----------- 10 files changed, 33 insertions(+), 47 deletions(-) delete mode 100644 config/edk2-flash.img diff --git a/config/cca-3world.yaml b/config/cca-3world.yaml index d2b5166..a3e9b5f 100644 --- a/config/cca-3world.yaml +++ b/config/cca-3world.yaml @@ -169,6 +169,7 @@ build: -b: RELEASE --pcd: PcdShellDefaultDelay=0 ' --pcd': PcdPlatformBootTimeOut=0 + ' --pcd': PcdUefiShellDefaultBootEnable=1 build: - source edk2/edksetup.sh --reconfig diff --git a/config/edk2-base.yaml b/config/edk2-base.yaml index 7897961..08e39f6 100644 --- a/config/edk2-base.yaml +++ b/config/edk2-base.yaml @@ -48,6 +48,7 @@ build: -p: Platform/ARM/VExpressPkg/ArmVExpress-FVP-AArch64.dsc -b: RELEASE --pcd: PcdShellDefaultDelay=0 + ' --pcd': PcdUefiShellDefaultBootEnable=1 build: - source edk2/edksetup.sh --reconfig diff --git a/config/edk2-flash.img b/config/edk2-flash.img deleted file mode 100644 index 7fca2ed1474a8549a56cfae48b92d610a24a4c3e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 99075 zcmeI(`&X280>^QU)`KZpi3%$?ndV&)TICjEaLh_cS5iO_N;EW%xX5(?!4mbD+|-0n zVAc@L3m_ySAVY~05#ksqpr8bUR|asT0S0DxcH#6dxO>j{e$Myz=e%D(JU=|2^A#O5 z95MVDC}ox-M~pBu`1kS)G4Izq9sH@hZHY_8rR|Lz1Q0*~0R#|0009ILKmY**5I_I{ z1Q0*~0R#}xAAt@(i*ciewt?N+m<~gkz=Hq+2q1s}0tg_000IagfB*srAb1Q0*~0R#|0009ILKmY**5I_I{1Q0*~fy7dq8N*}1bD?0m zF&+pYfB*srAb(NA6MvBPhS>{^9LdnNMKzOzKM4)m^{FymRUsL^F{8&1{ zNS2xHBYw+F9HRJRMM?S7n;zn<`3mDBm9mPB6@wRhQxbKjLi!w9`X*?K1_H(!sM>2! zSdZNo>FlG;_;jvOu7`Wj^=^e?Uu~Rt%Y%8bX9ACPeD2a|xzOqSX-NiSYrT(-G4*+O{M)ovku`t#apn^RX-*|d9_`ve7f z)i3K?mG)1=YSa29_9wfZHK^9_b7{%3sp+?A{me|fTw9xbVcKAobV1Q%LR!k zPgIsa{$^&c*y`!z7IjURYP-N==Nw7ZJ3CxYX=W;VZdnH8yuNeqrpw}r2`l^@r8z;( zK^v!h(&W%^NTRwQd_|IVdV}l2lpPEAr5_jFQ)%z+S}E1swyx8)_{KQ6XRJRZmbu!@ zHw*JFJ(}rPZ?Uy$-xRv@U$8VlG zke`&{8!!30d!%l4r&q)uZs!~?3i;bC;=PVfs%XEeYsu*Au6w?2ho`$~%za}?>8!!D zWOea|4zHZ(jn!LrTvRwx}*f9t66ni>#S<}#|a-_cYu zMdNcj=YX|NTai09AfrH8*(J65hrf_HYi5|sdof=})_hu#mv`o&H0pA`#blSQK6C4@ zYybB7hW_t;R!NV3oRXa0G-y2QilghhB5U2^-bclYQWY~xPpuzFvr?6w2`Ni!nm$v} z<{wu(wMK5_yw_viq+qj-=;AG1ie~Td=N+9kUDXfl&u$OAwq50YDL1O#YNz9OO;ZBq zcP+cpZY1c;t!wg=qHm;5o%Jv8U_a*wNs(j9jgstH_kKS#pgx&8QGTtzyX&yJ@V2{< zcD7v}+O%+7K|*6flJvJL;YV{-2Z|QiM{T)ZZFIPu89`Y@FQGfkQ4<5IFR9CKR3=1|FXIrG16+gS_xqtm$SCvMQ nwWiZczWT*}M}tF;{a@ezqFnzPX=?7YH;-QAVfEiDBd`7k#6;ep diff --git a/config/ns-edk2.yaml b/config/ns-edk2.yaml index b6f321b..89c644f 100644 --- a/config/ns-edk2.yaml +++ b/config/ns-edk2.yaml @@ -24,12 +24,12 @@ description: >- is supplied and the config will refuse to run unless it is explicitly specified. - Note that by default, a pre-canned flash image is loaded into the model, which - contains UEFI variables directing EDK2 to boot to the shell. This will cause - startup.nsh to be executed and will start the kernel boot. This way everything - is automatic. By default, all EDK2 output is muxed to stdout. If you prefer - booting UEFI to its UI, override the EDK2FLASH rtvar with an empty string and - override terminals.'bp.terminal_0'.type to 'telnet'. + Note that by default, UEFI variables are build time configured directing EDK2 + to boot to the shell. This will cause startup.nsh to be executed and will + start the kernel boot. This way everything is automatic. By default, all EDK2 + output is muxed to stdout. If you prefer booting UEFI to its UI, override the + the build pcd parameter `PcdUefiShellDefaultBootEnable` using the overlay and + override terminals 'bp.terminal_0'.type to 'telnet'. When booting with device tree, a directory can optionally be shared from the host system into the Linux environment running in the FVP. To do so, set the @@ -53,10 +53,6 @@ build: params: BL33: ${artifact:EDK2} - edk2flash: - artifacts: - EDK2FLASH: ${param:configdir}/edk2-flash.img - run: rtvars: BL1: @@ -89,7 +85,7 @@ run: EDK2FLASH: type: path - value: ${artifact:EDK2FLASH} + value: '' params: -C bp.secureflashloader.fname: ${rtvar:BL1} diff --git a/documentation/userguide/configstore/cca-3world.rst b/documentation/userguide/configstore/cca-3world.rst index 2324173..986a94e 100644 --- a/documentation/userguide/configstore/cca-3world.rst +++ b/documentation/userguide/configstore/cca-3world.rst @@ -109,6 +109,6 @@ CMDLINE console=ttyAMA0 earlycon=pl011,0x1c090000 root=/dev/vda ip=dhcp KERNEL ${artifact:KERNEL} ROOTFS SHARE -EDK2FLASH ${artifact:EDK2FLASH} +EDK2FLASH ============== =============================================================== diff --git a/documentation/userguide/configstore/cca-4world.rst b/documentation/userguide/configstore/cca-4world.rst index 70d4be8..0fc46c8 100644 --- a/documentation/userguide/configstore/cca-4world.rst +++ b/documentation/userguide/configstore/cca-4world.rst @@ -68,6 +68,6 @@ CMDLINE console=ttyAMA0 earlycon=pl011,0x1c090000 root=/dev/vda ip=dhcp KERNEL ${artifact:KERNEL} ROOTFS SHARE -EDK2FLASH ${artifact:EDK2FLASH} +EDK2FLASH ============== =============================================================== diff --git a/documentation/userguide/configstore/ffa-tftf.rst b/documentation/userguide/configstore/ffa-tftf.rst index 308f74b..ee62b95 100644 --- a/documentation/userguide/configstore/ffa-tftf.rst +++ b/documentation/userguide/configstore/ffa-tftf.rst @@ -39,6 +39,6 @@ CMDLINE console=ttyAMA0 earlycon=pl011,0x1c090000 root=/dev/vda ip=dhcp KERNEL ROOTFS SHARE -EDK2FLASH ${artifact:EDK2FLASH} +EDK2FLASH ============== =============================================================== diff --git a/documentation/userguide/configstore/ns-edk2-optee.rst b/documentation/userguide/configstore/ns-edk2-optee.rst index e388751..aa1f085 100644 --- a/documentation/userguide/configstore/ns-edk2-optee.rst +++ b/documentation/userguide/configstore/ns-edk2-optee.rst @@ -39,6 +39,6 @@ CMDLINE console=ttyAMA0 earlycon=pl011,0x1c090000 root=/dev/vda ip=dhcp KERNEL ROOTFS SHARE -EDK2FLASH ${artifact:EDK2FLASH} +EDK2FLASH ============== =============================================================== diff --git a/documentation/userguide/configstore/ns-edk2.rst b/documentation/userguide/configstore/ns-edk2.rst index 3ac99d6..04d321b 100644 --- a/documentation/userguide/configstore/ns-edk2.rst +++ b/documentation/userguide/configstore/ns-edk2.rst @@ -18,7 +18,7 @@ An extra rtvar is added (DTB) which allows specification of a custom device tree By default (if not overriding the rtvars) a sensible command line is used that will set up the console for logging and attempt to mount the rootfs image from the FVP's virtio block device. However the default rootfs image is empty, so the kernel will panic when attempting to mount; the user must supply a rootfs if it is required that the kernel completes its boot. No default kernel image is supplied and the config will refuse to run unless it is explicitly specified. -Note that by default, a pre-canned flash image is loaded into the model, which contains UEFI variables directing EDK2 to boot to the shell. This will cause startup.nsh to be executed and will start the kernel boot. This way everything is automatic. By default, all EDK2 output is muxed to stdout. If you prefer booting UEFI to its UI, override the EDK2FLASH rtvar with an empty string and override terminals.'bp.terminal_0'.type to 'telnet'. +Note that by default, UEFI variables are build time configured directing EDK2 to boot to the shell. This will cause startup.nsh to be executed and will start the kernel boot. This way everything is automatic. By default, all EDK2 output is muxed to stdout. If you prefer booting UEFI to its UI, override the the build pcd parameter `PcdUefiShellDefaultBootEnable` using the overlay and override terminals 'bp.terminal_0'.type to 'telnet'. When booting with device tree, a directory can optionally be shared from the host system into the Linux environment running in the FVP. To do so, set the SHARE rtvar to the desired directory, then mount the share inside the FVP with the following (or automate it in fstab): @@ -54,6 +54,6 @@ CMDLINE console=ttyAMA0 earlycon=pl011,0x1c090000 root=/dev/vda ip=dhcp KERNEL ROOTFS SHARE -EDK2FLASH ${artifact:EDK2FLASH} +EDK2FLASH ============== =============================================================== diff --git a/documentation/userguide/quickstart.rst b/documentation/userguide/quickstart.rst index 92e7272..ca83ce6 100644 --- a/documentation/userguide/quickstart.rst +++ b/documentation/userguide/quickstart.rst @@ -208,7 +208,7 @@ concrete config. You can view non-concrete fragments by providing extra args). root=/dev/vda ip=dhcp KERNEL: None ROOTFS: - EDK2FLASH: ${artifact:EDK2FLASH} + EDK2FLASH: -------------------------------------------------------------------------------- @@ -237,15 +237,14 @@ concrete config. You can view non-concrete fragments by providing extra args). supplied and the config will refuse to run unless it is explicitly specified. - Note that by default, a pre-canned flash image is loaded - into the model, which contains UEFI variables directing - EDK2 to boot to the shell. This will cause startup.nsh to - be executed and will start the kernel boot. This way - everything is automatic. By default, all EDK2 output is - muxed to stdout. If you prefer booting UEFI to its UI, - override the EDK2FLASH rtvar with an empty string and - override terminals.'bp.terminal_0'.type to 'telnet'. - + Note that by default, UEFI variables are build time + configured directing EDK2 to boot to the shell. This will + cause startup.nsh to be executed and will start the kernel + boot. This way everything is automatic. By default, all + EDK2 output is muxed to stdout. If you prefer booting UEFI + to its UI, override the the build pcd parameter + `PcdUefiShellDefaultBootEnable` using the overlay and + override terminals 'bp.terminal_0'.type to 'telnet'. concrete: True run-time variables: LOCAL_NET_PORT: 8022 @@ -257,7 +256,7 @@ concrete config. You can view non-concrete fragments by providing extra args). root=/dev/vda ip=dhcp KERNEL: None ROOTFS: - EDK2FLASH: ${artifact:EDK2FLASH} + EDK2FLASH: -------------------------------------------------------------------------------- @@ -347,7 +346,6 @@ run: # Create directory structure. mkdir -p /data_nvme0n1/ryarob01/shrinkwrap_demo/live/build/source/ns-edk2/dt mkdir -p /data_nvme0n1/ryarob01/shrinkwrap_demo/live/build/source/ns-edk2/edk2 - mkdir -p /data_nvme0n1/ryarob01/shrinkwrap_demo/live/build/source/ns-edk2/edk2flash mkdir -p /data_nvme0n1/ryarob01/shrinkwrap_demo/live/build/source/ns-edk2/tfa mkdir -p /data_nvme0n1/ryarob01/shrinkwrap_demo/live/package/ns-edk2 @@ -812,12 +810,12 @@ command: that the kernel completes its boot. No default kernel image is supplied and the config will refuse to run unless it is explicitly specified. - Note that by default, a pre-canned flash image is loaded into the model, which contains - UEFI variables directing EDK2 to boot to the shell. This will cause startup.nsh - to be executed and will start the kernel boot. This way everything is automatic. - By default, all EDK2 output is muxed to stdout. If you prefer booting UEFI to its - UI, override the EDK2FLASH rtvar with an empty string and override terminals.''bp.terminal_0''.type - to ''telnet''.' + Note that by default, UEFI variables are build time configured directing EDK2 + to boot to the shell. This will cause startup.nsh to be executed and will + start the kernel boot. This way everything is automatic. By default, all EDK2 + output is muxed to stdout. If you prefer booting UEFI to its UI, override the + the build pcd parameter `PcdUefiShellDefaultBootEnable` using the overlay + and override terminals 'bp.terminal_0'.type to 'telnet'. concrete: true graph: {} build: @@ -896,6 +894,7 @@ command: -p: Platform/ARM/VExpressPkg/ArmVExpress-FVP-AArch64.dsc -b: RELEASE --pcd: PcdShellDefaultDelay=0 + ' --pcd': PcdUefiShellDefaultBootEnable=1 prebuild: - export WORKSPACE=${param:sourcedir} - export GCC5_AARCH64_PREFIX=$$CROSS_COMPILE @@ -910,17 +909,6 @@ command: postbuild: [] artifacts: EDK2: ${param:builddir}/RELEASE_GCC5/FV/FVP_AARCH64_EFI.fd - edk2flash: - repo: {} - sourcedir: null - builddir: null - toolchain: null - params: {} - prebuild: [] - build: [] - postbuild: [] - artifacts: - EDK2FLASH: ${param:configdir}/edk2-flash.img tfa: repo: .: @@ -982,7 +970,7 @@ command: value: '' EDK2FLASH: type: path - value: ${artifact:EDK2FLASH} + value: '' params: -C bp.dram_size: 4 -C cluster0.NUM_CORES: 4 -- GitLab