Compare commits
No commits in common. "c6d4e8e30e83dd21f53f6242ff9c632908ac140d" and "4e2ab1e8fafc058079fbfc6a3927c51769764a13" have entirely different histories.
c6d4e8e30e
...
4e2ab1e8fa
53
0001-fix-unaligned-point-value-with-GCC9.patch
Normal file
53
0001-fix-unaligned-point-value-with-GCC9.patch
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
From 6e13a3b539105b2773e43055c2d44912cbba7a29 Mon Sep 17 00:00:00 2001
|
||||||
|
From: lei_ju <lj3074194431@163.com>
|
||||||
|
Date: Wed, 3 Jun 2020 09:03:49 +0800
|
||||||
|
Subject: [PATCH] fix unaligned point value with GCC9
|
||||||
|
|
||||||
|
---
|
||||||
|
firmware/2lib/include/2struct.h | 2 +-
|
||||||
|
firmware/include/gpt.h | 2 +-
|
||||||
|
firmware/include/vboot_struct.h | 2 +-
|
||||||
|
3 files changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/firmware/2lib/include/2struct.h b/firmware/2lib/include/2struct.h
|
||||||
|
index 1d5b353..b045a0b 100644
|
||||||
|
--- a/firmware/2lib/include/2struct.h
|
||||||
|
+++ b/firmware/2lib/include/2struct.h
|
||||||
|
@@ -213,7 +213,7 @@ struct vb2_shared_data {
|
||||||
|
uint32_t gbb_size;
|
||||||
|
|
||||||
|
|
||||||
|
-} __attribute__((packed));
|
||||||
|
+} __attribute__((aligned));
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
|
||||||
|
diff --git a/firmware/include/gpt.h b/firmware/include/gpt.h
|
||||||
|
index 4570237..f1da14d 100644
|
||||||
|
--- a/firmware/include/gpt.h
|
||||||
|
+++ b/firmware/include/gpt.h
|
||||||
|
@@ -120,7 +120,7 @@ typedef struct {
|
||||||
|
} attrs;
|
||||||
|
uint16_t name[36]; /* UTF-16 encoded partition name */
|
||||||
|
/* Remainder of entry is reserved and should be 0 */
|
||||||
|
-} __attribute__((packed)) GptEntry;
|
||||||
|
+} __attribute__((aligned)) GptEntry;
|
||||||
|
|
||||||
|
#define GPTENTRY_EXPECTED_SIZE 128
|
||||||
|
|
||||||
|
diff --git a/firmware/include/vboot_struct.h b/firmware/include/vboot_struct.h
|
||||||
|
index fd5777a..a06d038 100644
|
||||||
|
--- a/firmware/include/vboot_struct.h
|
||||||
|
+++ b/firmware/include/vboot_struct.h
|
||||||
|
@@ -478,7 +478,7 @@ typedef struct VbSharedDataHeader {
|
||||||
|
* all the fields it knows about are present. Newer firmware needs to
|
||||||
|
* use reasonable defaults when accessing older structs.
|
||||||
|
*/
|
||||||
|
-} __attribute__((packed)) VbSharedDataHeader;
|
||||||
|
+} __attribute__((aligned)) VbSharedDataHeader;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Size of VbSharedDataheader for each version
|
||||||
|
--
|
||||||
|
2.23.0
|
||||||
|
|
||||||
@ -1,48 +0,0 @@
|
|||||||
From f9ae6c12bd0b67ee336089ce15d5255d7d6d11b7 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Nobel Barakat <nobelbarakat@google.com>
|
|
||||||
Date: Tue, 22 Nov 2022 00:40:20 +0000
|
|
||||||
Subject: [PATCH] flashrom: ensure flashrom symbols are not loaded if
|
|
||||||
!USE_FLASHROM
|
|
||||||
|
|
||||||
The linking process during the installation phase of this package
|
|
||||||
breaks if you compile with make USE_FLASHROM=0. A new conditional has
|
|
||||||
been added to the make file that prevents utility/crossystem from
|
|
||||||
compiling if USE_FLASHROM is either not set or set to the number 0.
|
|
||||||
|
|
||||||
BUG=b:256682063
|
|
||||||
TEST=cros_run_unit_tests --board amd64-generic --packages vboot_reference
|
|
||||||
TEST=env USE="test -flashrom" emerge-amd64-generic vboot_reference
|
|
||||||
TEST=env USE="-flashrom" emerge-amd64-generic vboot_reference
|
|
||||||
BRANCH=none
|
|
||||||
|
|
||||||
Signed-off-by: Nobel Barakat nobelbarakat@google.com
|
|
||||||
Change-Id: Ia8cdd24653fdb74c9bb5f4de86b7711b138299cf
|
|
||||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4045302
|
|
||||||
Commit-Queue: Nobel Barakat <nobelbarakat@google.com>
|
|
||||||
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
||||||
Tested-by: Nobel Barakat <nobelbarakat@google.com>
|
|
||||||
---
|
|
||||||
Makefile | 5 ++++-
|
|
||||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/Makefile b/Makefile
|
|
||||||
index 129ace99a424..cb504ff33a62 100644
|
|
||||||
--- a/Makefile
|
|
||||||
+++ b/Makefile
|
|
||||||
@@ -593,10 +593,13 @@ UTIL_BIN_NAMES_SDK = \
|
|
||||||
utility/signature_digest_utility \
|
|
||||||
utility/verify_data
|
|
||||||
UTIL_BIN_NAMES_BOARD = \
|
|
||||||
- utility/crossystem \
|
|
||||||
utility/dumpRSAPublicKey \
|
|
||||||
utility/tpmc
|
|
||||||
|
|
||||||
+ifneq ($(filter-out 0,${USE_FLASHROM}),)
|
|
||||||
+UTIL_BIN_NAMES_BOARD += utility/crossystem
|
|
||||||
+endif
|
|
||||||
+
|
|
||||||
UTIL_SCRIPTS_SDK = $(addprefix ${BUILD}/,${UTIL_SCRIPT_NAMES_SDK})
|
|
||||||
UTIL_SCRIPTS_BOARD = $(addprefix ${BUILD}/,${UTIL_SCRIPT_NAMES_BOARD})
|
|
||||||
UTIL_BINS_SDK = $(addprefix ${BUILD}/,${UTIL_BIN_NAMES_SDK})
|
|
||||||
--
|
|
||||||
2.39.1
|
|
||||||
42
vboot-utils-00-disable-static-linking.patch
Normal file
42
vboot-utils-00-disable-static-linking.patch
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
--- vboot-utils-a1c5f7c/Makefile.orig 2017-06-04 14:06:10.707762796 +0100
|
||||||
|
+++ vboot-utils-a1c5f7c/Makefile 2017-06-04 14:07:04.347718848 +0100
|
||||||
|
@@ -227,12 +227,6 @@
|
||||||
|
CXX ?= g++
|
||||||
|
PKG_CONFIG ?= pkg-config
|
||||||
|
|
||||||
|
-# Static?
|
||||||
|
-ifneq (${STATIC},)
|
||||||
|
-LDFLAGS += -static
|
||||||
|
-PKG_CONFIG += --static
|
||||||
|
-endif
|
||||||
|
-
|
||||||
|
# Determine QEMU architecture needed, if any
|
||||||
|
ifeq (${ARCH},${HOST_ARCH})
|
||||||
|
# Same architecture; no need for QEMU
|
||||||
|
@@ -999,7 +993,6 @@
|
||||||
|
# Link tests for external repos
|
||||||
|
${BUILD}/host/linktest/extern: ${HOSTLIB}
|
||||||
|
${BUILD}/host/linktest/extern: LIBS = ${HOSTLIB}
|
||||||
|
-${BUILD}/host/linktest/extern: LDLIBS += -static
|
||||||
|
TEST_OBJS += ${BUILD}/host/linktest/extern.o
|
||||||
|
|
||||||
|
.PHONY: hostlib
|
||||||
|
@@ -1090,9 +1083,6 @@
|
||||||
|
${UTIL_BINS} ${UTIL_BINS_STATIC}: ${UTILLIB}
|
||||||
|
${UTIL_BINS} ${UTIL_BINS_STATIC}: LIBS = ${UTILLIB}
|
||||||
|
|
||||||
|
-# Utilities for auto-update toolkits must be statically linked.
|
||||||
|
-${UTIL_BINS_STATIC}: LDFLAGS += -static
|
||||||
|
-
|
||||||
|
|
||||||
|
.PHONY: utils
|
||||||
|
utils: ${UTIL_BINS} ${UTIL_SCRIPTS}
|
||||||
|
@@ -1124,7 +1114,7 @@
|
||||||
|
|
||||||
|
${FUTIL_STATIC_BIN}: ${FUTIL_STATIC_OBJS} ${UTILLIB}
|
||||||
|
@${PRINTF} " LD $(subst ${BUILD}/,,$@)\n"
|
||||||
|
- ${Q}${LD} -o $@ ${CFLAGS} ${LDFLAGS} -static $^ ${LDLIBS}
|
||||||
|
+ ${Q}${LD} -o $@ ${CFLAGS} ${LDFLAGS} $^ ${LDLIBS}
|
||||||
|
|
||||||
|
${FUTIL_BIN}: LDLIBS += ${CRYPTO_LIBS} ${FWLIB20}
|
||||||
|
${FUTIL_BIN}: ${FUTIL_OBJS} ${UTILLIB} ${FWLIB20} ${UTILBDB}
|
||||||
Binary file not shown.
@ -1,12 +0,0 @@
|
|||||||
diff -ru vboot-utils-61971455-orig/futility/updater_utils.c vboot-utils-61971455/futility/updater_utils.c
|
|
||||||
--- vboot-utils-61971455-orig/futility/updater_utils.c 2022-06-16 02:45:02.000000000 +0200
|
|
||||||
+++ vboot-utils-61971455/futility/updater_utils.c 2022-06-20 15:06:24.192678422 +0200
|
|
||||||
@@ -700,7 +700,7 @@
|
|
||||||
if (!cmd)
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
- VB2_DEBUG(cmd);
|
|
||||||
+ VB2_DEBUG("flashrom cmd: %s\n", cmd);
|
|
||||||
r = system(cmd);
|
|
||||||
free(cmd);
|
|
||||||
if (r)
|
|
||||||
11
vboot-utils-cflags.patch
Normal file
11
vboot-utils-cflags.patch
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
--- vboot-utils-a1c5f7c/Makefile.orig 2017-06-04 13:24:39.666009720 +0100
|
||||||
|
+++ vboot-utils-a1c5f7c/Makefile 2017-06-04 13:25:23.960977143 +0100
|
||||||
|
@@ -158,7 +158,7 @@
|
||||||
|
else
|
||||||
|
# FIRMWARE_ARCH not defined; assuming local compile.
|
||||||
|
CC ?= gcc
|
||||||
|
-CFLAGS += -DCHROMEOS_ENVIRONMENT -Wall ${WERROR} ${DEBUG_FLAGS}
|
||||||
|
+CFLAGS += $(COMMON_FLAGS) -DCHROMEOS_ENVIRONMENT -Wall ${WERROR} ${DEBUG_FLAGS}
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifneq (${CUSTOM_MUSIC},)
|
||||||
@ -1,64 +1,51 @@
|
|||||||
%define _default_patch_fuzz 2
|
%define _default_patch_fuzz 2
|
||||||
Name: vboot-utils
|
|
||||||
Version: 20230127
|
|
||||||
Release: 2
|
|
||||||
Summary: Chromium OS verified boot utility
|
|
||||||
License: BSD
|
|
||||||
URL: https://chromium.googlesource.com/chromiumos/platform/vboot_reference
|
|
||||||
ExclusiveArch: aarch64 x86_64 loongarch64
|
|
||||||
Source0: %{name}-9b08a3c4.tar.xz
|
|
||||||
|
|
||||||
Patch0: vboot-utils-9b08a3c4.patch
|
Name: vboot-utils
|
||||||
Patch1: flashrom-ensure-flashrom-symbols-are-not-loaded-if-U.patch
|
Version: 20180531
|
||||||
|
Release: 4
|
||||||
|
Summary: Chromium OS verified boot utility
|
||||||
|
License: BSD
|
||||||
|
URL: https://chromium.googlesource.com/chromiumos/platform/vboot_reference
|
||||||
|
ExclusiveArch: aarch64 x86_64
|
||||||
|
# https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+archive/2cc35b0f31fe1cf69ce6781e7d502f07c64c93c9.tar.gz
|
||||||
|
Source0: %{name}-2cc35b0.tar.xz
|
||||||
|
Patch0001: vboot-utils-00-disable-static-linking.patch
|
||||||
|
Patch0002: vboot-utils-cflags.patch
|
||||||
|
Patch0003: 0001-fix-unaligned-point-value-with-GCC9.patch
|
||||||
|
|
||||||
|
BuildRequires: gcc-c++ openssl-devel trousers-devel libyaml-devel xz-devel libuuid-devel python2
|
||||||
|
|
||||||
BuildRequires: gcc-c++ openssl-devel trousers-devel libyaml-devel xz-devel libuuid-devel python3
|
|
||||||
%description
|
%description
|
||||||
Verify boot is a collection of utilities for chromebook computers. Package and sign the kernel and
|
Verify boot is a collection of utilities for chromebook computers. Package and sign the kernel and
|
||||||
manage gpt partitions.
|
manage gpt partitions.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n vboot-utils-9b08a3c4 -p1
|
%autosetup -n vboot-utils-2cc35b0 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%ifarch aarch64
|
%ifarch aarch64
|
||||||
%global ARCH arm
|
%global ARCH arm
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%ifarch x86_64
|
%ifarch x86_64
|
||||||
%global ARCH x86_64
|
%global ARCH x86_64
|
||||||
%endif
|
%endif
|
||||||
%ifarch loongarch64
|
|
||||||
%global ARCH loongarch64
|
%make_build V=1 ARCH=%{ARCH} COMMON_FLAGS="$RPM_OPT_FLAGS"
|
||||||
%endif
|
|
||||||
%make_build V=1 ARCH=%{ARCH} COMMON_FLAGS="$RPM_OPT_FLAGS" USE_FLASHROM=0
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%make_install V=1 DESTDIR=%{buildroot} ARCH=%{ARCH} COMMON_FLAGS="$RPM_OPT_FLAGS" USE_FLASHROM=0
|
%make_install V=1 DESTDIR=%{buildroot}/usr ARCH=%{ARCH} COMMON_FLAGS="$RPM_OPT_FLAGS"
|
||||||
mkdir -p %{buildroot}%{_datadir}/vboot/
|
|
||||||
cp -rf tests/devkeys %{buildroot}%{_datadir}/vboot/
|
%check
|
||||||
rm -rf %{buildroot}/usr/lib/pkgconfig/
|
make runtests || true
|
||||||
rm -rf %{buildroot}/usr/default/
|
|
||||||
rm -rf %{buildroot}/etc/default/
|
|
||||||
rm -rf %{buildroot}/usr/share/vboot/bin/
|
|
||||||
rm -f %{buildroot}/usr/lib/libvboot_host.a
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%doc README LICENSE
|
%doc README LICENSE
|
||||||
%{_bindir}/*
|
%{_bindir}/*
|
||||||
%{_datadir}/vboot/devkeys/
|
/usr/default/
|
||||||
|
/usr/lib/pkgconfig/
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Tue Feb 27 2024 doupengda <doupengda@loongson.cn> - 20230127-2
|
|
||||||
- add support for loongarch64
|
|
||||||
|
|
||||||
* Wed Jul 19 2023 xu_ping <707078654@qq.com> - 20230127-1
|
|
||||||
- upgrade to 20230127
|
|
||||||
|
|
||||||
* Fri Jul 30 2021 sunguoshuai <sunguoshuai@huawei.com> - 20190823-6
|
|
||||||
- upgrade to 20190823
|
|
||||||
|
|
||||||
* Tue Oct 27 2020 Anan Fu <fuanan3@huawei.com> - 20180531-5
|
|
||||||
- disable python2
|
|
||||||
|
|
||||||
* Wed Jan 8 2020 leiju <leiju4@huawei.com> - 20180531-4
|
* Wed Jan 8 2020 leiju <leiju4@huawei.com> - 20180531-4
|
||||||
- fix unaligned point value with GCC9
|
- fix unaligned point value with GCC9
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user