Jakub Czapiga has uploaded a new patch set (#2). ( https://review.coreboot.org/c/coreboot/+/70107 )
Change subject: tests/Makefile.common: Allow to disable test framework with parameter
......................................................................
tests/Makefile.common: Allow to disable test framework with parameter
Test framework can be used as a base for other test-like utilities - for
example look at screenshoot utility in depthcharge. Sometimes CMocka is
not required and even makes things problematic. Thanks to this patch one
can set -no_test_framework parameter to instruct framework not to
include and link selected test against CMocka library.
Signed-off-by: Jakub Czapiga <jacz(a)semihalf.com>
Change-Id: I01dc7c6c50e6ae2f7f71bd6752c2d5f2cc7c3cdc
---
M tests/Makefile.common
1 file changed, 24 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/07/70107/2
--
To view, visit https://review.coreboot.org/c/coreboot/+/70107
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I01dc7c6c50e6ae2f7f71bd6752c2d5f2cc7c3cdc
Gerrit-Change-Number: 70107
Gerrit-PatchSet: 2
Gerrit-Owner: Jakub Czapiga <jacz(a)semihalf.com>
Gerrit-CC: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: newpatchset
Martin L Roth has submitted this change. ( https://review.coreboot.org/c/coreboot/+/69686 )
Change subject: util/cbmem: Provide a way to override coreboot path
......................................................................
util/cbmem: Provide a way to override coreboot path
Right now cbmem uses a fix path to reach coreboot src path (../../).
This makes it impossible to compile cbmem out of the coreboot tree (e.g.
copy just the cbmem directory elsewhere and compile).
This patch adapts the technique from cbfstool and adds a variable called
'TOP' which points to coreboot root directory and which can be
overridden at build time by providing it to make as an argument. This
will enable a stand-alone build of cbmem.
Change-Id: I2732f75310e10716e5aa74e094e0bf628ad22f0b
Signed-off-by: Werner Zeh <werner.zeh(a)siemens.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/69686
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Felix Singer <felixsinger(a)posteo.net>
---
M util/cbmem/Makefile
1 file changed, 24 insertions(+), 1 deletion(-)
Approvals:
build bot (Jenkins): Verified
Felix Singer: Looks good to me, approved
diff --git a/util/cbmem/Makefile b/util/cbmem/Makefile
index a170875..9219a08 100644
--- a/util/cbmem/Makefile
+++ b/util/cbmem/Makefile
@@ -2,7 +2,8 @@
## SPDX-License-Identifier: GPL-2.0-only
PROGRAM = cbmem
-ROOT = ../../src
+TOP ?= $(abspath ../..)
+ROOT = $(TOP)/src
CC ?= $(CROSS_COMPILE)gcc
INSTALL ?= /usr/bin/env install
PREFIX ?= /usr/local
--
To view, visit https://review.coreboot.org/c/coreboot/+/69686
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I2732f75310e10716e5aa74e094e0bf628ad22f0b
Gerrit-Change-Number: 69686
Gerrit-PatchSet: 2
Gerrit-Owner: Werner Zeh <werner.zeh(a)siemens.com>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Martin L Roth <gaumless(a)gmail.com>
Gerrit-Reviewer: Patrick Georgi <patrick(a)coreboot.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Mario Scheithauer <mario.scheithauer(a)siemens.com>
Gerrit-MessageType: merged
Attention is currently required from: Jeremy Soller.
Hello build bot (Jenkins), Jeremy Soller,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/67991
to look at the new patch set (#4).
Change subject: mb/system76/tgl-h: Convert oryp8 to a variant
......................................................................
mb/system76/tgl-h: Convert oryp8 to a variant
Change-Id: Ied55add6d7549f165d8b97032d7f21ede0ce2dde
Signed-off-by: Tim Crawford <tcrawford(a)system76.com>
---
D src/mainboard/system76/oryp8/Kconfig
D src/mainboard/system76/oryp8/Kconfig.name
D src/mainboard/system76/oryp8/Makefile.inc
D src/mainboard/system76/oryp8/acpi/mainboard.asl
D src/mainboard/system76/oryp8/acpi/sleep.asl
D src/mainboard/system76/oryp8/board_info.txt
D src/mainboard/system76/oryp8/bootblock.c
D src/mainboard/system76/oryp8/cmos.default
D src/mainboard/system76/oryp8/cmos.layout
D src/mainboard/system76/oryp8/devicetree.cb
D src/mainboard/system76/oryp8/dsdt.asl
D src/mainboard/system76/oryp8/include/mainboard/gpio.h
D src/mainboard/system76/oryp8/romstage.c
M src/mainboard/system76/tgl-h/Kconfig
M src/mainboard/system76/tgl-h/Kconfig.name
M src/mainboard/system76/tgl-h/Makefile.inc
M src/mainboard/system76/tgl-h/devicetree.cb
M src/mainboard/system76/tgl-h/dsdt.asl
M src/mainboard/system76/tgl-h/variants/gaze16-3050/overridetree.cb
M src/mainboard/system76/tgl-h/variants/gaze16-3060/overridetree.cb
A src/mainboard/system76/tgl-h/variants/oryp8/board_info.txt
R src/mainboard/system76/tgl-h/variants/oryp8/data.vbt
R src/mainboard/system76/tgl-h/variants/oryp8/gpio.c
R src/mainboard/system76/tgl-h/variants/oryp8/gpio_early.c
R src/mainboard/system76/tgl-h/variants/oryp8/hda_verb.c
A src/mainboard/system76/tgl-h/variants/oryp8/overridetree.cb
R src/mainboard/system76/tgl-h/variants/oryp8/ramstage.c
A src/mainboard/system76/tgl-h/variants/oryp8/romstage.c
R src/mainboard/system76/tgl-h/variants/oryp8/tas5825m.c
29 files changed, 156 insertions(+), 506 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/91/67991/4
--
To view, visit https://review.coreboot.org/c/coreboot/+/67991
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ied55add6d7549f165d8b97032d7f21ede0ce2dde
Gerrit-Change-Number: 67991
Gerrit-PatchSet: 4
Gerrit-Owner: Tim Crawford <tcrawford(a)system76.com>
Gerrit-Reviewer: Jeremy Soller <jeremy(a)system76.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Jeremy Soller <jeremy(a)system76.com>
Gerrit-MessageType: newpatchset
Attention is currently required from: Jeremy Soller.
Hello build bot (Jenkins), Jeremy Soller,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/67990
to look at the new patch set (#3).
Change subject: mb/system76: Rename gaze16 to tgl-h
......................................................................
mb/system76: Rename gaze16 to tgl-h
Change-Id: Icbf9348447b9e7acc0caa8082cf5dd00853da37a
Signed-off-by: Tim Crawford <tcrawford(a)system76.com>
---
R src/mainboard/system76/tgl-h/Kconfig
R src/mainboard/system76/tgl-h/Kconfig.name
R src/mainboard/system76/tgl-h/Makefile.inc
R src/mainboard/system76/tgl-h/acpi/mainboard.asl
R src/mainboard/system76/tgl-h/acpi/sleep.asl
R src/mainboard/system76/tgl-h/board_info.txt
R src/mainboard/system76/tgl-h/bootblock.c
R src/mainboard/system76/tgl-h/cmos.default
R src/mainboard/system76/tgl-h/cmos.layout
R src/mainboard/system76/tgl-h/devicetree.cb
R src/mainboard/system76/tgl-h/dsdt.asl
R src/mainboard/system76/tgl-h/include/variant/gpio.h
R src/mainboard/system76/tgl-h/include/variant/romstage.h
R src/mainboard/system76/tgl-h/ramstage.c
R src/mainboard/system76/tgl-h/romstage.c
A src/mainboard/system76/tgl-h/variants/gaze16-3050/board_info.txt
R src/mainboard/system76/tgl-h/variants/gaze16-3050/data.vbt
R src/mainboard/system76/tgl-h/variants/gaze16-3050/gpio.c
R src/mainboard/system76/tgl-h/variants/gaze16-3050/gpio_early.c
R src/mainboard/system76/tgl-h/variants/gaze16-3050/hda_verb.c
R src/mainboard/system76/tgl-h/variants/gaze16-3050/overridetree.cb
R src/mainboard/system76/tgl-h/variants/gaze16-3050/ramstage.c
R src/mainboard/system76/tgl-h/variants/gaze16-3050/romstage.c
A src/mainboard/system76/tgl-h/variants/gaze16-3060/board_info.txt
R src/mainboard/system76/tgl-h/variants/gaze16-3060/data.vbt
R src/mainboard/system76/tgl-h/variants/gaze16-3060/gpio.c
R src/mainboard/system76/tgl-h/variants/gaze16-3060/gpio_early.c
R src/mainboard/system76/tgl-h/variants/gaze16-3060/hda_verb.c
R src/mainboard/system76/tgl-h/variants/gaze16-3060/overridetree.cb
R src/mainboard/system76/tgl-h/variants/gaze16-3060/ramstage.c
R src/mainboard/system76/tgl-h/variants/gaze16-3060/romstage.c
31 files changed, 15 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/90/67990/3
--
To view, visit https://review.coreboot.org/c/coreboot/+/67990
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Icbf9348447b9e7acc0caa8082cf5dd00853da37a
Gerrit-Change-Number: 67990
Gerrit-PatchSet: 3
Gerrit-Owner: Tim Crawford <tcrawford(a)system76.com>
Gerrit-Reviewer: Jeremy Soller <jeremy(a)system76.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Jeremy Soller <jeremy(a)system76.com>
Gerrit-MessageType: newpatchset
Attention is currently required from: Martin L Roth.
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/70110 )
Change subject: [WIP][DO NOT MERGE] ssdtgen: ACPI SSDT generator
......................................................................
Patch Set 1:
(3 comments)
File ssdtgen/Makefile.inc:
Robot Comment from checkpatch (run ID jenkins-coreboot-checkpatch-164784):
https://review.coreboot.org/c/coreboot/+/70110/comment/19879514_7d56b596
PS1, Line 26: # User should provide path to devicetree and optionaly to chipset and override devicetree
'optionaly' may be misspelled - perhaps 'optionally'?
File ssdtgen/ssdtgen_main.c:
Robot Comment from checkpatch (run ID jenkins-coreboot-checkpatch-164784):
https://review.coreboot.org/c/coreboot/+/70110/comment/88284a2f_f4d59dd0
PS1, Line 61: if (dev && dev->chip_ops && dev->chip_ops->enable_dev) {
braces {} are not necessary for single statement blocks
File ssdtgen/ssdtgen_sys.c:
Robot Comment from checkpatch (run ID jenkins-coreboot-checkpatch-164784):
https://review.coreboot.org/c/coreboot/+/70110/comment/39217b9c_6c5731f2
PS1, Line 51:
trailing whitespace
--
To view, visit https://review.coreboot.org/c/coreboot/+/70110
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I78766cd1f47e24b2cd7f9b5cf1cca066441ead06
Gerrit-Change-Number: 70110
Gerrit-PatchSet: 1
Gerrit-Owner: Jakub Czapiga <jacz(a)semihalf.com>
Gerrit-Reviewer: Martin L Roth <gaumless(a)gmail.com>
Gerrit-CC: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Martin L Roth <gaumless(a)gmail.com>
Gerrit-Comment-Date: Tue, 29 Nov 2022 15:11:14 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/70109 )
Change subject: tests/Makefile.common: Allow to override tests defconfig
......................................................................
Patch Set 1:
(1 comment)
Commit Message:
Robot Comment from checkpatch (run ID jenkins-coreboot-checkpatch-164783):
https://review.coreboot.org/c/coreboot/+/70109/comment/a607a6c4_6c3ef941
PS1, Line 8:
Possible repeated word: 'might'
--
To view, visit https://review.coreboot.org/c/coreboot/+/70109
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: If53b9a54ef7389dd979dfe772e6946439f7d6a62
Gerrit-Change-Number: 70109
Gerrit-PatchSet: 1
Gerrit-Owner: Jakub Czapiga <jacz(a)semihalf.com>
Gerrit-CC: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Tue, 29 Nov 2022 15:10:49 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/70107 )
Change subject: tests/Makefile.common: Allow to disable test framework with parameter
......................................................................
Patch Set 1:
(1 comment)
Commit Message:
Robot Comment from checkpatch (run ID jenkins-coreboot-checkpatch-164781):
https://review.coreboot.org/c/coreboot/+/70107/comment/ed4cef7d_751f3399
PS1, Line 12: can set -no_test_framework parameter to instruct framework not to include
Possible unwrapped commit description (prefer a maximum 72 chars per line)
--
To view, visit https://review.coreboot.org/c/coreboot/+/70107
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I01dc7c6c50e6ae2f7f71bd6752c2d5f2cc7c3cdc
Gerrit-Change-Number: 70107
Gerrit-PatchSet: 1
Gerrit-Owner: Jakub Czapiga <jacz(a)semihalf.com>
Gerrit-CC: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Tue, 29 Nov 2022 15:10:05 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Jakub Czapiga has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/70108 )
Change subject: tests: Support linking with system libc
......................................................................
tests: Support linking with system libc
This patch allows for linking selected files with system libc. This
allows for creating libraries interacting with filesystem, standard I/O
and other parts of system. Until now it was only possible using CMocka
proxy functions or functions not masked by code under test.
Signed-off-by: Jakub Czapiga <jacz(a)semihalf.com>
Change-Id: I652362ba61a25e974d706357fc36479ccee763e4
---
M tests/Makefile.common
M tests/Makefile.inc
2 files changed, 48 insertions(+), 14 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/08/70108/1
diff --git a/tests/Makefile.common b/tests/Makefile.common
index fe46aeb..8a4bc9a 100644
--- a/tests/Makefile.common
+++ b/tests/Makefile.common
@@ -27,17 +27,20 @@
TEST_KCONFIG_TRISTATE := $(testobj)/tristate.conf
# Include order should be same as in real build
-TEST_CFLAGS := -include $(src)/include/kconfig.h \
+TEST_INCLUDES := -include $(src)/include/kconfig.h \
-include $(src)/include/rules.h \
-include $(src)/commonlib/bsd/include/commonlib/bsd/compiler.h
# Include generic test mock headers, before original ones
-TEST_CFLAGS += -I$(testsrc)/include/mocks -I$(testsrc)/include
+TEST_INCLUDES += -I$(testsrc)/include/mocks -I$(testsrc)/include
-TEST_CFLAGS += -I$(src) -I$(src)/include -I$(src)/commonlib/include \
+TEST_INCLUDES += -I$(src) -I$(src)/include -I$(src)/commonlib/include \
-I$(src)/commonlib/bsd/include -I$(src)/arch/x86/include \
-I$(top)/3rdparty/vboot/firmware/include
+# Path for Kconfig autoheader
+TEST_INCLUDES += -I$(dir $(TEST_KCONFIG_AUTOHEADER))
+
# Note: This is intentionally just a subset of the warnings in the toplevel
# Makefile.inc. We don't need to be as strict with test code, and things like
# -Wmissing-prototypes just make working with the test framework cumbersome.
@@ -48,9 +51,6 @@
TEST_CFLAGS += -Wno-array-compare -Wno-packed-not-aligned -Wno-trigraphs
TEST_CFLAGS += -Wno-unused-but-set-variables
-# Path for Kconfig autoheader
-TEST_CFLAGS += -I$(dir $(TEST_KCONFIG_AUTOHEADER))
-
TEST_CFLAGS += -std=gnu11 -Os -ffunction-sections -fdata-sections -fno-builtin
TEST_CFLAGS += -D__TEST__
@@ -66,7 +66,14 @@
TEST_LDFLAGS += -no-pie
# Extra attributes for unit tests, declared per test
-attributes := srcs cflags config mocks no_test_framework stage
+# srcs - sources linked with coreboot libc symbols
+# syssrcs - sources linked with system libc, no coreboot includes
+# cflags - attribute with additional CFLAGS
+# config - Kconfig and defines override (`gcc -D` style)
+# mocks - list of symbols to mock
+# no_test_framework - set to `1` not to link test framework
+# stage - name of stage e.g. romstage, bootblock, etc. (default: ramstage)
+attributes := srcs cflags config-file config mocks no_test_framework stage
# Copy attributes of one test to another.
# $1 - input test name
@@ -113,12 +120,15 @@
# Give us a way to distinguish between coreboot source files and test files in code.
$($(1)-srcobjs): TEST_CFLAGS += -D__TEST_SRCOBJ__
+# Add coreboot, vboot, kconfig etc. includes only to non-system libc linked objects
+$(filter-out $($(1)-syslibcobjs),$($(1)-objs)): TEST_CFLAGS += $(TEST_INCLUDES)
+
# Compile sources and apply mocking/wrapping of selected symbols.
# For each listed mock add new symbol with prefix `__real_`,
# and pointing to the same section:address.
$($(1)-objs): $(testobj)/$(1)/%.o: $$$$*.c $$($(1)-config-file)
mkdir -p $$(dir $$@)
- $(HOSTCC) $(HOSTCFLAGS) $$(TEST_CFLAGS) $($(1)-cflags) -MMD \
+ $(HOSTCC) $(HOSTCFLAGS) $$(TEST_CFLAGS) $$(TEST_INCLUDES) $($(1)-cflags) -MMD \
-MF $$(basename $$(a)).d -MT $$@ -c $$< -o $$@.orig
objcopy_wrap_flags=''; \
for sym in $$($(1)-mocks); do \
@@ -132,13 +142,20 @@
done ; \
$(OBJCOPY) $$@.orig $$$$objcopy_wrap_flags $$@
-# Link against Cmocka if not disabled
-$(addsuffix $$(filter-out n 0,$($(1)-no_test_framework)),$($(1)-objs)): TEST_CFLAGS += -I$(cmockasrc)/include
-$($(1)-bin)$$(filter-out n 0,$($(1)-no_test_framework)): TEST_LDFLAGS += -L$(cmockaobj)/src -lcmocka -Wl,-rpath=$(cmockaobj)/src
-$($(1)-bin)$$(filter-out n 0,$($(1)-no_test_framework)): TEST_CFLAGS += -I$(cmockasrc)/include
-$($(1)-bin)$$(filter-out n 0,$($(1)-no_test_framework)): $(CMOCKA_LIB)
+# Compile system-side sources linked with system libc, without mocking symbols
+# or code-under-test includes.
+$($(1)-syslibcobjs): $(testobj)/$(1)/%.o: $$$$*.c $$($(1)-config-file)
+ mkdir -p $$(dir $$@)
+ $(HOSTCC) $(HOSTCFLAGS) $$(TEST_CFLAGS) $($(1)-cflags) -MMD \
+ -MF $$(basename $$(a)).d -MT $$@ -c $$< -o $$@
-$($(1)-bin): $($(1)-objs)
+# Link against Cmocka if not disabled
+$(addsuffix $(filter-out n 0,$($(1)-no_test_framework)),$($(1)-objs)): TEST_CFLAGS += -I$(cmockasrc)/include
+$($(1)-bin)$(filter-out n 0,$($(1)-no_test_framework)): TEST_LDFLAGS += -L$(cmockaobj)/src -lcmocka -Wl,-rpath=$(cmockaobj)/src
+$($(1)-bin)$(filter-out n 0,$($(1)-no_test_framework)): TEST_CFLAGS += -I$(cmockasrc)/include
+$($(1)-bin)$(filter-out n 0,$($(1)-no_test_framework)): $(CMOCKA_LIB)
+
+$($(1)-bin): $($(1)-objs) $($(1)-syslibcobjs)
$(HOSTCC) $$^ $($(1)-cflags) $$(TEST_LDFLAGS) -o $$@
endef
diff --git a/tests/Makefile.inc b/tests/Makefile.inc
index 90f01d1..04792c1 100644
--- a/tests/Makefile.inc
+++ b/tests/Makefile.inc
@@ -51,6 +51,8 @@
$(foreach test, $(alltests), \
$(eval $(test)-srcobjs := $(addprefix $(testobj)/$(test)/, \
$(patsubst %.c,%.o,$(filter src/%,$($(test)-srcs))))) \
+ $(eval $(test)-syslibcobjs := $(addprefix $(testobj)/$(test)/, \
+ $(patsubst %.c,%.o,$($(test)-syssrcs)))) \
$(eval $(test)-objs := $(addprefix $(testobj)/$(test)/, \
$(patsubst %.c,%.o,$($(test)-srcs)))))
$(foreach test, $(alltests), \
--
To view, visit https://review.coreboot.org/c/coreboot/+/70108
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I652362ba61a25e974d706357fc36479ccee763e4
Gerrit-Change-Number: 70108
Gerrit-PatchSet: 1
Gerrit-Owner: Jakub Czapiga <jacz(a)semihalf.com>
Gerrit-MessageType: newchange