From patchwork Sun Aug 19 02:29:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: nl6720 via arch-releng X-Patchwork-Id: 738 Return-Path: Delivered-To: patchwork@archlinux.org Received: from apollo.archlinux.org (localhost [127.0.0.1]) by apollo.archlinux.org (Postfix) with ESMTP id 867BF653905D for ; Sun, 19 Aug 2018 02:29:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on apollo X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED=0.1, DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3,T_DKIMWL_WL_HIGH=-0.01 autolearn=ham autolearn_force=no version=3.4.1 X-Spam-BL-Results: [127.0.9.2] [127.0.0.11] Received: from orion.archlinux.org (orion.archlinux.org [88.198.91.70]) by apollo.archlinux.org (Postfix) with ESMTPS for ; Sun, 19 Aug 2018 02:29:56 +0000 (UTC) Received: from orion.archlinux.org (localhost [127.0.0.1]) by orion.archlinux.org (Postfix) with ESMTP id 79CDDCCF04E8B; Sun, 19 Aug 2018 02:29:48 +0000 (UTC) Received: from luna.archlinux.org (luna.archlinux.org [5.9.250.164]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by orion.archlinux.org (Postfix) with ESMTPS; Sun, 19 Aug 2018 02:29:48 +0000 (UTC) Received: from luna.archlinux.org (luna.archlinux.org [127.0.0.1]) by luna.archlinux.org (Postfix) with ESMTP id 67B9B2BFFA; Sun, 19 Aug 2018 02:29:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=archlinux.org; s=luna2; t=1534645788; bh=k4b39S/J7E2QilB53W4DEFvnUNZ4UoMHL6Tmvtejg8U=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc; b=DrBSFZq9CF5D37DEzwnDVNfuMNVQDCCEKgdK5AfzXNI/SVdUP3VMu0d05CHlECMNH Q34ce+Zm5oelYbcag0NVw5Yh1yC58y8o5Ra2eF05w0IVIdZtP8GMsSbnCxjMC87yY2 HbehEKmoQZXHXZ8LdjIMqdqwxH4fZ5Sr9boMMjdBVfXj0ZghWH/ThpIypddf3fvn63 VPwphWuRu9AEU/BGn9Mml7vHM/+6bkGa656Kv3cokn5hU/ur7RymXPPXaEI/NToatD irbxz7+wpmryzUp/ZtzfhA/zAGgc67Jt3ecwiyTneJiQMOK95pclTEa0WjGTVEU4Yh u8xpzuhWUfSaW/xkB8tbvwgj6YrDF4rL/HIk2M8zIKO9//Y7DkyKglM97cyYgTVWXy nhxoMzFZIuPxoIDNinoYbrQPSw95mxh7OhOTQPN+emsov4vuQmKHpPj6g4plLB8si5 NNSO2kRLg1QXbF0YcE9ssw+nr6O2RWVBv5dq9JXFHQlE8RLkMMaCw8eu/3x+jQDk61 TNhSprpZ/3s+0b/uL5dNZxIApieoChb+1Dl1vEszLnTk+wCLduEhrBTAM+mR2eBuT6 INZvkW2/QxuBHjY3VXXFMC5BwsYuHkbvdJ8iRqdo1e9flmm/7AofDBg+ojVtHryRPw RPVSQc/hphw7gB2626Ke6eVE= Received: from luna.archlinux.org (luna.archlinux.org [127.0.0.1]) by luna.archlinux.org (Postfix) with ESMTP id 14C572BDC0 for ; Sun, 19 Aug 2018 02:29:44 +0000 (UTC) Received: from orion.archlinux.org (orion.archlinux.org [IPv6:2a01:4f8:160:6087::1]) by luna.archlinux.org (Postfix) with ESMTPS for ; Sun, 19 Aug 2018 02:29:44 +0000 (UTC) Received: from orion.archlinux.org (localhost [127.0.0.1]) by orion.archlinux.org (Postfix) with ESMTP id 65596CCF04E8A for ; Sun, 19 Aug 2018 02:29:36 +0000 (UTC) Received: from mail-qt0-x232.google.com (mail-qt0-x232.google.com [IPv6:2607:f8b0:400d:c0d::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by orion.archlinux.org (Postfix) with ESMTPS for ; Sun, 19 Aug 2018 02:29:36 +0000 (UTC) Received: by mail-qt0-x232.google.com with SMTP id r21-v6so12847522qtm.2 for ; Sat, 18 Aug 2018 19:29:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=15H9BCQ1TXI3XbSysIGNfz8jQcW1taA2V/eWmSaomTw=; b=O6p4p7rmifZYWH8c7SSiIpGorPCb8seeShyvBtTGmdLQsY3frwvfu3ZV2xHy9XY+Fe 8vY63i3NvmPptFatXUCL80gxh33oKCyvS2FeBx5A2zYHBZXFCEF5RFqPsjlFdos2KzlX SjFFa6YZx6VzB2daJJlVdYQTspsaKu3PSy8gYvSbGi2kSISqIp7sO14bm9w0xuCVr6u5 2aKhdDUiwNx/F5V8fc62KGZtGU/dyWDOwN/I6ZKmVlVBqpNCZxfDAr2J06lm2MXkeH8Z h25NWCBUlaWQHsa9SquWKQ1a4Red8x9h8v5sY2B0oIN2NrUY0Jw74qnDfQSvM8gomWqk E4FQ== X-Gm-Message-State: AOUpUlEPFzHVZN1dw3D49rGeXX9Tq8H8AI9PDFvsmSM9kToFfEWFKQEF M1U5yLfhKEx3bAZFr8OiLiwM84YhVDU= X-Google-Smtp-Source: AA+uWPzNCdGjNNOW4RABb58EEclxwxQ/d90oi+Pwo4srZSuEIpvucBZcV7AkThOcWmkEA+j6Fhe7Aw== X-Received: by 2002:a0c:ac85:: with SMTP id m5-v6mr36142825qvc.197.1534645774967; Sat, 18 Aug 2018 19:29:34 -0700 (PDT) Received: from localhost ([181.90.188.232]) by smtp.gmail.com with ESMTPSA id p21-v6sm4063356qtb.32.2018.08.18.19.29.33 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 18 Aug 2018 19:29:34 -0700 (PDT) To: arch-releng@archlinux.org Date: Sat, 18 Aug 2018 23:29:29 -0300 Message-Id: <20180819022929.24175-1-vmlinuz386@gmail.com> X-Mailer: git-send-email 2.18.0 Subject: [arch-releng] [RFC] [PATCH] [configs/releng] Make and use amd_ucode.bin for initrd. X-BeenThere: arch-releng@archlinux.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Arch Linux Release Engineering List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Gerardo Exequiel Pozzi via arch-releng Reply-To: Arch Linux Release Engineering Cc: Gerardo Exequiel Pozzi Errors-To: arch-releng-bounces@archlinux.org Sender: "arch-releng" Requested at FS#59694 --- configs/releng/build.sh | 14 ++++++++++++++ .../efiboot/loader/entries/archiso-x86_64-cd.conf | 1 + .../efiboot/loader/entries/archiso-x86_64-usb.conf | 1 + configs/releng/syslinux/archiso_pxe.cfg | 6 +++--- configs/releng/syslinux/archiso_sys.cfg | 2 +- 5 files changed, 20 insertions(+), 4 deletions(-) diff --git a/configs/releng/build.sh b/configs/releng/build.sh index f5524e8..3272cd8 100755 --- a/configs/releng/build.sh +++ b/configs/releng/build.sh @@ -107,6 +107,16 @@ make_customize_airootfs() { rm ${work_dir}/x86_64/airootfs/root/customize_airootfs.sh } +# Prepare amd_ucode +make_amd_ucode_img() { + mkdir -p ${work_dir}/amd-ucode/kernel/x86/microcode + cat ${work_dir}/x86_64/airootfs/lib/firmware/amd-ucode/microcode_amd*.bin > ${work_dir}/amd-ucode/kernel/x86/microcode/AuthenticAMD.bin + pushd ${work_dir}/amd-ucode > /dev/null + echo kernel/x86/microcode/AuthenticAMD.bin | bsdcpio -o -H newc -R 0:0 > amd-ucode.img + popd > /dev/null + cp ${work_dir}/amd-ucode/amd-ucode.img ${work_dir}/x86_64/airootfs/boot/amd-ucode.img +} + # Prepare kernel/initramfs ${install_dir}/boot/ make_boot() { mkdir -p ${work_dir}/iso/${install_dir}/boot/x86_64 @@ -120,6 +130,8 @@ make_boot_extra() { cp ${work_dir}/x86_64/airootfs/usr/share/licenses/common/GPL2/license.txt ${work_dir}/iso/${install_dir}/boot/memtest.COPYING cp ${work_dir}/x86_64/airootfs/boot/intel-ucode.img ${work_dir}/iso/${install_dir}/boot/intel_ucode.img cp ${work_dir}/x86_64/airootfs/usr/share/licenses/intel-ucode/LICENSE ${work_dir}/iso/${install_dir}/boot/intel_ucode.LICENSE + cp ${work_dir}/x86_64/airootfs/boot/amd-ucode.img ${work_dir}/iso/${install_dir}/boot/amd_ucode.img + cp ${work_dir}/x86_64/airootfs/usr/share/licenses/linux-firmware/LICENSE.amd-ucode ${work_dir}/iso/${install_dir}/boot/amd_ucode.LICENSE } # Prepare /${install_dir}/boot/syslinux @@ -185,6 +197,7 @@ make_efiboot() { cp ${work_dir}/iso/${install_dir}/boot/x86_64/archiso.img ${work_dir}/efiboot/EFI/archiso/archiso.img cp ${work_dir}/iso/${install_dir}/boot/intel_ucode.img ${work_dir}/efiboot/EFI/archiso/intel_ucode.img + cp ${work_dir}/iso/${install_dir}/boot/amd_ucode.img ${work_dir}/efiboot/EFI/archiso/amd_ucode.img mkdir -p ${work_dir}/efiboot/EFI/boot cp ${work_dir}/x86_64/airootfs/usr/share/efitools/efi/PreLoader.efi ${work_dir}/efiboot/EFI/boot/bootx64.efi @@ -253,6 +266,7 @@ run_once make_basefs run_once make_packages run_once make_setup_mkinitcpio run_once make_customize_airootfs +run_once make_amd_ucode_img run_once make_boot run_once make_boot_extra run_once make_syslinux diff --git a/configs/releng/efiboot/loader/entries/archiso-x86_64-cd.conf b/configs/releng/efiboot/loader/entries/archiso-x86_64-cd.conf index d503f11..b77ed98 100644 --- a/configs/releng/efiboot/loader/entries/archiso-x86_64-cd.conf +++ b/configs/releng/efiboot/loader/entries/archiso-x86_64-cd.conf @@ -1,5 +1,6 @@ title Arch Linux archiso x86_64 UEFI CD linux /EFI/archiso/vmlinuz.efi initrd /EFI/archiso/intel_ucode.img +initrd /EFI/archiso/amd_ucode.img initrd /EFI/archiso/archiso.img options archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% diff --git a/configs/releng/efiboot/loader/entries/archiso-x86_64-usb.conf b/configs/releng/efiboot/loader/entries/archiso-x86_64-usb.conf index 14f3d02..09adca4 100644 --- a/configs/releng/efiboot/loader/entries/archiso-x86_64-usb.conf +++ b/configs/releng/efiboot/loader/entries/archiso-x86_64-usb.conf @@ -1,5 +1,6 @@ title Arch Linux archiso x86_64 UEFI USB linux /%INSTALL_DIR%/boot/x86_64/vmlinuz initrd /%INSTALL_DIR%/boot/intel_ucode.img +initrd /%INSTALL_DIR%/boot/amd_ucode.img initrd /%INSTALL_DIR%/boot/x86_64/archiso.img options archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% diff --git a/configs/releng/syslinux/archiso_pxe.cfg b/configs/releng/syslinux/archiso_pxe.cfg index 481371a..92af749 100644 --- a/configs/releng/syslinux/archiso_pxe.cfg +++ b/configs/releng/syslinux/archiso_pxe.cfg @@ -7,7 +7,7 @@ It allows you to install Arch Linux or perform system maintenance. ENDTEXT MENU LABEL Boot Arch Linux (x86_64) (NBD) LINUX boot/x86_64/vmlinuz -INITRD boot/intel_ucode.img,boot/x86_64/archiso.img +INITRD boot/intel_ucode.img,boot/amd_ucode.img,boot/x86_64/archiso.img APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% archiso_nbd_srv=${pxeserver} SYSAPPEND 3 @@ -18,7 +18,7 @@ It allows you to install Arch Linux or perform system maintenance. ENDTEXT MENU LABEL Boot Arch Linux (x86_64) (NFS) LINUX boot/x86_64/vmlinuz -INITRD boot/intel_ucode.img,boot/x86_64/archiso.img +INITRD boot/intel_ucode.img,boot/amd_ucode.img,boot/x86_64/archiso.img APPEND archisobasedir=%INSTALL_DIR% archiso_nfs_srv=${pxeserver}:/run/archiso/bootmnt SYSAPPEND 3 @@ -29,7 +29,7 @@ It allows you to install Arch Linux or perform system maintenance. ENDTEXT MENU LABEL Boot Arch Linux (x86_64) (HTTP) LINUX boot/x86_64/vmlinuz -INITRD boot/intel_ucode.img,boot/x86_64/archiso.img +INITRD boot/intel_ucode.img,boot/amd_ucode.img,boot/x86_64/archiso.img APPEND archisobasedir=%INSTALL_DIR% archiso_http_srv=http://${pxeserver}/ SYSAPPEND 3 diff --git a/configs/releng/syslinux/archiso_sys.cfg b/configs/releng/syslinux/archiso_sys.cfg index 0c82573..a35a1ea 100644 --- a/configs/releng/syslinux/archiso_sys.cfg +++ b/configs/releng/syslinux/archiso_sys.cfg @@ -7,7 +7,7 @@ It allows you to install Arch Linux or perform system maintenance. ENDTEXT MENU LABEL Boot Arch Linux (x86_64) LINUX boot/x86_64/vmlinuz -INITRD boot/intel_ucode.img,boot/x86_64/archiso.img +INITRD boot/intel_ucode.img,boot/amd_ucode.img,boot/x86_64/archiso.img APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% INCLUDE boot/syslinux/archiso_tail.cfg