Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
c6d4e8e30e
!12 add support for loongarch64
From: @dpdwaj 
Reviewed-by: @dillon_chen 
Signed-off-by: @dillon_chen
2024-02-28 00:37:39 +00:00
doupengda
9827a5a4b8 add support for loongarch64 2024-02-27 16:45:59 +08:00
openeuler-ci-bot
2676efa3fa
!11 Upgrade to 20230127 to fix build error
From: @cherry530 
Reviewed-by: @caodongxia 
Signed-off-by: @caodongxia
2023-07-22 06:36:38 +00:00
cherry530
cda413b9bc Upgrade to 20230127 to fix build error
Signed-off-by: cherry530 <707078654@qq.com>
2023-07-19 15:52:28 +08:00
openeuler-ci-bot
7bced28225
!7 【轻量级 PR】:fix spec changelog date error
From: @jxy_git 
Reviewed-by: @overweight 
Signed-off-by: @overweight
2022-06-10 01:13:27 +00:00
jiangxinyu
ad78b9f364
fix spec changelog date error 2022-06-09 02:40:29 +00:00
openeuler-ci-bot
72ee0263fa !6 upgrade to 20190823 to fix build error
From: @si-gui
Reviewed-by: @overweight
Signed-off-by: @overweight
2021-08-02 03:07:01 +00:00
sunguoshuai
59393872bc upgrade to 20190823 2021-07-30 19:01:37 +08:00
openeuler-ci-bot
7adce5681d !5 disable python2
From: @jackie_wu123
Reviewed-by: @xiezhipeng1
Signed-off-by: @xiezhipeng1
2020-10-30 14:16:20 +08:00
jackie_wu
ece3a4aa89 disable python2 2020-10-29 19:48:20 +08:00
7 changed files with 97 additions and 130 deletions

View File

@ -1,53 +0,0 @@
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

View File

@ -0,0 +1,48 @@
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

View File

@ -1,42 +0,0 @@
--- 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}

View File

@ -0,0 +1,12 @@
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)

View File

@ -1,11 +0,0 @@
--- 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},)

View File

@ -1,51 +1,64 @@
%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
Name: vboot-utils
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
Patch0: vboot-utils-9b08a3c4.patch
Patch1: flashrom-ensure-flashrom-symbols-are-not-loaded-if-U.patch
BuildRequires: gcc-c++ openssl-devel trousers-devel libyaml-devel xz-devel libuuid-devel python3
%description
Verify boot is a collection of utilities for chromebook computers. Package and sign the kernel and
manage gpt partitions.
%prep
%autosetup -n vboot-utils-2cc35b0 -p1
%autosetup -n vboot-utils-9b08a3c4 -p1
%build
%ifarch aarch64
%global ARCH arm
%endif
%ifarch x86_64
%global ARCH x86_64
%endif
%make_build V=1 ARCH=%{ARCH} COMMON_FLAGS="$RPM_OPT_FLAGS"
%ifarch loongarch64
%global ARCH loongarch64
%endif
%make_build V=1 ARCH=%{ARCH} COMMON_FLAGS="$RPM_OPT_FLAGS" USE_FLASHROM=0
%install
%make_install V=1 DESTDIR=%{buildroot}/usr ARCH=%{ARCH} COMMON_FLAGS="$RPM_OPT_FLAGS"
%check
make runtests || true
%make_install V=1 DESTDIR=%{buildroot} ARCH=%{ARCH} COMMON_FLAGS="$RPM_OPT_FLAGS" USE_FLASHROM=0
mkdir -p %{buildroot}%{_datadir}/vboot/
cp -rf tests/devkeys %{buildroot}%{_datadir}/vboot/
rm -rf %{buildroot}/usr/lib/pkgconfig/
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
%doc README LICENSE
%{_bindir}/*
/usr/default/
/usr/lib/pkgconfig/
%{_datadir}/vboot/devkeys/
%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
- fix unaligned point value with GCC9