From 2cc7164a990f02c10967cde9c86a697abadfc228 Mon Sep 17 00:00:00 2001 From: Thierry Laurion Date: Fri, 18 Aug 2023 11:39:48 -0400 Subject: [PATCH] nv41/ns50: coreboot+coreboot patch+CircleCI config: adapt to have nv41/ns50 build on top of #1417 and #1462 --- .circleci/config.yml | 31 +++++++++++++++---- Makefile | 8 ++++- modules/coreboot | 9 ++++++ ...ge_acpica-unix2_location_to_a_mirror.patch | 23 ++++++++++++++ 4 files changed, 64 insertions(+), 7 deletions(-) create mode 100644 patches/coreboot-nitrokey-clevo_release/0001-change_acpica-unix2_location_to_a_mirror.patch diff --git a/.circleci/config.yml b/.circleci/config.yml index dd36a649..64ae659f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -215,7 +215,7 @@ workflows: # version. The last board in the sequence is the dependency # for the parallel boards built at the end, and also save_cache. - # Coreboot 4.19 + # coreboot 4.19 - build_and_persist: name: x230-hotp-maximized target: x230-hotp-maximized @@ -223,7 +223,7 @@ workflows: requires: - prep_env - # Coreboot 4.17 + # coreboot-git librems - build_and_persist: name: librem_14 target: librem_14 @@ -231,7 +231,19 @@ workflows: requires: - x230-hotp-maximized - # Coreboot for Talos (PPC) + # coreboot-git Nitropads depending on x230-hotp-maximized cache + # since kernel is 6.x and coreboot is git is unshared + # We use nitropad's coreboot's fork crossgcc + # No need to wait further for other board's cache. + # We reuse built modules from x230-hotp-maximized cache only + - build_and_persist: + name: nitropad-nv41 + target: nitropad-nv41 + subcommand: "" + requires: + - x230-hotp-maximized + + # coreboot-git Talos II (PPC) - build_and_persist: name: talos-2 arch: ppc64 @@ -243,10 +255,9 @@ workflows: #Cache one workspace per architecture. Make sure workspace caches are chainloaded and the last in chain for an arch is saved. - save_cache: requires: - - librem_14 - talos-2 + - nitropad-nv41 -# # # Those onboarding new boards should add their entries below. # @@ -498,7 +509,7 @@ workflows: requires: - x230-hotp-maximized -#Coreboot 4.17 boards +#coreboot-git librem boards - build: name: librem_13v2 target: librem_13v2 @@ -541,6 +552,14 @@ workflows: requires: - librem_14 +#coreboot-git dasharo clevo_release + staging IASL patch + - build: + name: nitropad-ns50 + target: nitropad-ns50 + subcommand: "" + requires: + - nitropad-nv41 + # - build: # name: UNTESTED_kgpe-d16_workstation-usb_keyboard # target: UNTESTED_kgpe-d16_workstation-usb_keyboard diff --git a/Makefile b/Makefile index 501ca8da..1b200db0 100644 --- a/Makefile +++ b/Makefile @@ -304,11 +304,17 @@ define define_module = echo -n '$($1_repo)|$($1_commit_hash)' > "$$@"; \ elif [ "$$$$(cat "$$@")" != '$($1_repo)|$($1_commit_hash)' ]; then \ echo "Switching $1 to $($1_repo) at $($1_commit_hash)" && \ - git -C "$(build)/$($1_base_dir)" fetch $($1_repo) $($1_commit_hash) && \ + git -C "$(build)/$($1_base_dir)" reset --hard HEAD^ && \ + echo "git fetch $($1_repo) $($1_commit_hash) --recurse-submodules=no" && \ + git -C "$(build)/$($1_base_dir)" fetch $($1_repo) $($1_commit_hash) --recurse-submodules=no && \ + echo "git reset --hard $($1_commit_hash)" && \ git -C "$(build)/$($1_base_dir)" reset --hard $($1_commit_hash) && \ + echo "git clean" && \ git -C "$(build)/$($1_base_dir)" clean -df && \ git -C "$(build)/$($1_base_dir)" clean -dffx payloads util/cbmem && \ + echo "git submodule sync" && \ git -C "$(build)/$($1_base_dir)" submodule sync && \ + echo "git submodule update" && \ git -C "$(build)/$($1_base_dir)" submodule update --init --checkout && \ echo -n '$($1_repo)|$($1_commit_hash)' > "$$@"; \ fi diff --git a/modules/coreboot b/modules/coreboot index aa1e83a2..bbb3baa9 100644 --- a/modules/coreboot +++ b/modules/coreboot @@ -85,6 +85,14 @@ coreboot-purism_repo := https://source.puri.sm/firmware/coreboot.git coreboot-purism_commit_hash := a899f08d2789db1dd9b02cff34179c4d38e6d0e3 $(eval $(call coreboot_module,purism,)) +#Nitrokey nv41/ns50 are based on Dasharo coreboot port, +# with patches staging under coreboot-clevo_release +coreboot-nitrokey_repo := https://github.com/dasharo/coreboot +coreboot-nitrokey_commit_hash := ae10b20f5c6abc9c23f709b65c46be6525da8c13 +coreboot-nitrokey_patch_version := clevo_release +#We use clevo_release's crossgcc for now, unshared but between nitropad nv41/ns50 +$(eval $(call coreboot_module,nitrokey,)) + # Check that the board configured the coreboot version correctly ifeq "$(CONFIG_COREBOOT_VERSION)" "" $(error "$(BOARD): does not specify coreboot version under CONFIG_COREBOOT_VERSION") @@ -99,6 +107,7 @@ coreboot_dir := $($(coreboot_module)_dir) coreboot_base_dir := $($(coreboot_module)_base_dir) $(coreboot_module)_depends += $(if $(CONFIG_PURISM_BLOBS), purism-blobs) +$(coreboot_module)_depends += $(if $(CONFIG_NITROKEY_BLOBS), nitrokey-blobs) # coreboot builds are specialized on a per-target basis. # The builds are done in a per-target subdirectory diff --git a/patches/coreboot-nitrokey-clevo_release/0001-change_acpica-unix2_location_to_a_mirror.patch b/patches/coreboot-nitrokey-clevo_release/0001-change_acpica-unix2_location_to_a_mirror.patch new file mode 100644 index 00000000..f5dd9ec2 --- /dev/null +++ b/patches/coreboot-nitrokey-clevo_release/0001-change_acpica-unix2_location_to_a_mirror.patch @@ -0,0 +1,23 @@ +From 6328eebb101fd0ded7168e1377da6a1a82a8e2da Mon Sep 17 00:00:00 2001 +From: Markus Meissner +Date: Wed, 19 Jul 2023 20:36:57 +0200 +Subject: [PATCH] change acpica-unix2 location to a mirror + +--- + util/crossgcc/buildgcc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc +index 03c24da1be9..8880c89ea66 100755 +--- a/util/crossgcc/buildgcc ++++ b/util/crossgcc/buildgcc +@@ -52,7 +52,7 @@ MPFR_ARCHIVE="https://ftpmirror.gnu.org/mpfr/mpfr-${MPFR_VERSION}.tar.xz" + MPC_ARCHIVE="https://ftpmirror.gnu.org/mpc/mpc-${MPC_VERSION}.tar.gz" + GCC_ARCHIVE="https://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.xz" + BINUTILS_ARCHIVE="https://ftpmirror.gnu.org/binutils/binutils-${BINUTILS_VERSION}.tar.xz" +-IASL_ARCHIVE="https://acpica.org/sites/acpica/files/acpica-unix2-${IASL_VERSION}.tar.gz" ++IASL_ARCHIVE="https://gsdview.appspot.com/chromeos-localmirror/distfiles/acpica-unix2-${IASL_VERSION}.tar.gz" + # CLANG toolchain archive locations + LLVM_ARCHIVE="https://github.com/llvm/llvm-project/releases/download/llvmorg-${CLANG_VERSION}/llvm-${CLANG_VERSION}.src.tar.xz" + CLANG_ARCHIVE="https://github.com/llvm/llvm-project/releases/download/llvmorg-${CLANG_VERSION}/clang-${CLANG_VERSION}.src.tar.xz" +