Package edk2-aarch64: Specfile
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 | %define TOOL_CHAIN_TAG GCC5 %define openssl_ver 1.1.1m # More subpackages to come once licensing issues are fixed Name: edk2-aarch64 Version: 20220221 Release: alt1 Summary: AARCH64 Virtual Machine Firmware License: BSD-2-Clause-Patent Group: Emulators Url: http://www.tianocore.org #Vcs-Git: https://github.com/tianocore/edk2.git Source: %name-%version.tar #Vcs-Git: https://github.com/openssl/openssl Source2: openssl.tar #Vcs-Git: https://github.com/ucb-bar/berkeley-softfloat-3.git Source3: berkeley-softfloat-3.tar Source4: Logo.bmp # ALT-specific JSON "descriptor files" Source20: 70-edk2-aarch64-verbose.json Source21: 60-edk2-aarch64.json Patch1: %name-%version.patch ExclusiveArch: aarch64 BuildArch: noarch Provides: edk2-ovmf-aarch64 = %EVR BuildRequires(pre): rpm-build-python3 BuildRequires: iasl nasm gcc-c++ BuildRequires: python3-devel python3-modules-sqlite3 BuildRequires: libuuid-devel BuildRequires: bc Requires: ipxe-roms-qemu %description EFI Development Kit II AARCH64 UEFI Firmware %prep %setup -q %patch1 -p1 cp -f %SOURCE4 MdeModulePkg/Logo/ # cleanup find . -name '*.efi' -print0 | xargs -0 rm -f rm -rf BaseTools/Bin \ UefiCpuPkg/ResetVector/Vtf0/Bin/*.raw \ EdkCompatibilityPkg/Other \ AppPkg \ DuetPkg/BootSector/bin \ StdLib/LibC/Main/Ia32/ftol2.obj \ BeagleBoardPkg/Debugger_scripts/rvi_dummy.axf \ BaseTools/Source/Python/*/*.pyd \ BaseTools/Source/Python/UPT/Dll/sqlite3.dll \ Vlv2TbltDevicePkg/GenBiosId \ Vlv2TbltDevicePkg/*.exe \ ArmPkg/Library/GccLto/liblto-*.a # Ensure old shell and binary packages are not used rm -rf EdkShellBinPkg rm -rf EdkShellPkg rm -rf FatBinPkg rm -rf ShellBinPkg # add openssl mkdir -p CryptoPkg/Library/OpensslLib/openssl tar -xf %SOURCE2 --strip-components 1 --directory CryptoPkg/Library/OpensslLib/openssl # add berkeley-softfloat-3 mkdir -p ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 tar -xf %SOURCE3 --strip-components 1 --directory ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 %build source ./edksetup.sh # compiler CC_FLAGS="-t %TOOL_CHAIN_TAG" # common features #CC_FLAGS="${CC_FLAGS} --cmd-len=65536 -b DEBUG --hash" #CC_FLAGS="${CC_FLAGS} -b RELEASE" CC_FLAGS="${CC_FLAGS} -b DEBUG --hash" CC_FLAGS="${CC_FLAGS} --cmd-len=65536" CC_FLAGS="${CC_FLAGS} -D NETWORK_IP6_ENABLE" CC_FLAGS="${CC_FLAGS} -D NETWORK_TLS_ENABLE" CC_FLAGS="${CC_FLAGS} -D NETWORK_HTTP_BOOT_ENABLE" CC_FLAGS="${CC_FLAGS} -D TPM_ENABLE" # ovmf features OVMF_FLAGS="${CC_FLAGS}" OVMF_FLAGS="${OVMF_FLAGS} -D FD_SIZE_2MB" # ovmf + secure boot features OVMF_SB_FLAGS="${OVMF_FLAGS}" OVMF_SB_FLAGS="${OVMF_SB_FLAGS} -D SECURE_BOOT_ENABLE" OVMF_SB_FLAGS="${OVMF_SB_FLAGS} -D SMM_REQUIRE" OVMF_SB_FLAGS="${OVMF_SB_FLAGS} -D EXCLUDE_SHELL_FROM_FD" # arm firmware features #ARM_FLAGS="-t %TOOL_CHAIN_TAG -b DEBUG --cmd-len=65536" ARM_FLAGS="${CC_FLAGS}" unset MAKEFLAGS # prepare #cp /usr/share/seabios/bios-csm.bin OvmfPkg/Csm/Csm16/Csm16.bin #cp /usr/share/seabios/bios-csm.bin corebootPkg/Csm/Csm16/Csm16.bin %make_build \ -C BaseTools #(cd UefiCpuPkg/ResetVector/Vtf0; python Build.py) #mkdir -p FatBinPkg/EnhancedFatDxe/{X64,Ia32} #source ./edksetup.sh # build aarch64 firmware mkdir -p AAVMF gcc -c -fpic ArmPkg/Library/GccLto/liblto-aarch64.s -o ArmPkg/Library/GccLto/liblto-aarch64.a # Build with a verbose debug mask first, and stash the binary. build ${ARM_FLAGS} -a AARCH64 -p ArmVirtPkg/ArmVirtQemu.dsc -D DEBUG_PRINT_ERROR_LEVEL=0x8040004F cp -a Build/ArmVirtQemu-AARCH64/*/FV/QEMU_EFI.fd AAVMF/QEMU_EFI.verbose.fd cp -a Build/ArmVirtQemu-AARCH64/*/FV/QEMU_VARS.fd AAVMF/QEMU_VARS.fd # Rebuild with a silent (errors only) debug mask. build ${ARM_FLAGS} -a AARCH64 -p ArmVirtPkg/ArmVirtQemu.dsc -D DEBUG_PRINT_ERROR_LEVEL=0x80000000 cp -a Build/ArmVirtQemu-AARCH64/*/FV/QEMU_EFI.fd AAVMF/QEMU_EFI.fd %install # For distro-provided firmware packages, the specification # (https://git.qemu.org/?p=qemu.git;a=blob;f=docs/interop/firmware.json) # says the JSON "descriptor files" to be searched in this directory: # `/usr/share/firmware/`. Create it. mkdir -p %buildroot%_datadir/qemu/firmware mkdir -p %buildroot%_datadir/{edk2,AAVMF} cat AAVMF/QEMU_EFI.verbose.fd /dev/zero | head -c 64m \ > %buildroot%_datadir/AAVMF/AAVMF_CODE.verbose.fd cat AAVMF/QEMU_EFI.fd /dev/zero | head -c 64m \ > %buildroot%_datadir/AAVMF/AAVMF_CODE.fd cat AAVMF/QEMU_VARS.fd /dev/zero | head -c 64m \ > %buildroot%_datadir/AAVMF/AAVMF_VARS.fd ln -r -s %buildroot%_datadir/AAVMF %buildroot%_datadir/edk2/aarch64 for f in %_sourcedir/*edk2-aarch64*.json; do install -pm 644 $f %buildroot%_datadir/qemu/firmware done # add symlinks for compat ln -r -s %buildroot%_datadir/AAVMF/AAVMF_CODE.verbose.fd %buildroot%_datadir/edk2/aarch64/QEMU_EFI-pflash.raw ln -r -s %buildroot%_datadir/AAVMF/AAVMF_CODE.fd %buildroot%_datadir/edk2/aarch64/QEMU_EFI-silent-pflash.raw ln -r -s %buildroot%_datadir/AAVMF/AAVMF_VARS.fd %buildroot%_datadir/edk2/aarch64/vars-template-pflash.raw %files %_datadir/AAVMF %_datadir/edk2/aarch64 %_datadir/qemu/firmware/*edk2-aarch64*.json %changelog * Fri Mar 04 2022 Alexey Shabalin <shaba@altlinux.org> 20220221-alt1 - edk2-stable202202 * Thu Jan 06 2022 Alexey Shabalin <shaba@altlinux.org> 20211125-alt1 - edk2-stable202111 * Sat Feb 13 2021 Alexey Shabalin <shaba@altlinux.org> 20201127-alt2 - build with -b DEBUG * Sun Jan 17 2021 Alexey Shabalin <shaba@altlinux.org> 20201127-alt1 - edk2-stable202011 (Fixes: CVE-2019-14584, CVE-2019-11098) * Wed Dec 18 2019 Alexey Shabalin <shaba@altlinux.org> 20191122-alt1 - edk2-stable201911 * Wed Jul 31 2019 Alexey Shabalin <shaba@altlinux.org> 20190501-alt2 - build as edk2-aarch64 package * Wed Jun 19 2019 Alexey Shabalin <shaba@altlinux.org> 20190501-alt1 - edk2-stable201905 (Fixes: CVE-2018-12182) * Tue Apr 02 2019 Alexey Shabalin <shaba@altlinux.org> 20190308-alt1 - edk2-stable201903 (Fixes: CVE-2018-12178, CVE-2018-12180, CVE-2018-12181, CVE-2018-3630) * Tue Dec 11 2018 Alexey Shabalin <shaba@altlinux.org> 20181113-alt1 - edk2-stable201811 * Wed Dec 13 2017 Alexey Shabalin <shaba@altlinux.ru> 20170720-alt3 - snapshot of UDK2017 branch * Mon Sep 18 2017 Sergey Bolshakov <sbolshakov@altlinux.ru> 20170720-alt2 - added efi-shell subpackage * Fri Sep 01 2017 Alexey Shabalin <shaba@altlinux.ru> 20170720-alt1 - snapshot of UDK2017 branch * Thu Jan 12 2017 Alexey Shabalin <shaba@altlinux.ru> 20161227-alt1 - UDK2017 branch * Wed May 25 2016 Alexey Shabalin <shaba@altlinux.ru> 20160518-alt1 - master snapshot 855743f7177459bea95798e59b6b18dab867710c * Mon Dec 28 2015 Alexey Shabalin <shaba@altlinux.ru> 20151225-alt1.svn19549 - build from branche UDK2015 * Wed Jun 24 2015 Alexey Shabalin <shaba@altlinux.ru> 20150616svn17642-alt2 - buils ovmf as noarch * Wed Jun 17 2015 Alexey Shabalin <shaba@altlinux.ru> 20150616svn17642-alt1 - svn snapshot r17642 - add ovmf package * Mon Oct 06 2014 Alexey Shabalin <shaba@altlinux.ru> 20140722svn2674-alt1 - svn snapshot r2674 * Fri Aug 09 2013 Alexey Shabalin <shaba@altlinux.ru> 0.1-alt1.svn2594 - initial build |