treewide: Move list.h to commonlib
It is needed in order to move device_tree.c into commonlib in a subsequent commit. Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com> Change-Id: I16eb7b743fb1d36301f0eda563a62364e7a9cfec Reviewed-on: https://review.coreboot.org/c/coreboot/+/77968 Reviewed-by: Julius Werner <jwerner@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
366ceeef0f
commit
a99b580c75
@ -70,6 +70,9 @@ INCLUDES := -Iinclude -Iinclude/$(ARCHDIR-y) -I$(obj)
|
|||||||
INCLUDES += -include include/kconfig.h
|
INCLUDES += -include include/kconfig.h
|
||||||
INCLUDES += -include $(coreboottop)/src/commonlib/bsd/include/commonlib/bsd/compiler.h
|
INCLUDES += -include $(coreboottop)/src/commonlib/bsd/include/commonlib/bsd/compiler.h
|
||||||
INCLUDES += -I$(coreboottop)/src/commonlib/bsd/include
|
INCLUDES += -I$(coreboottop)/src/commonlib/bsd/include
|
||||||
|
ifeq ($(CONFIG_LP_GPL),y)
|
||||||
|
INCLUDES += -I$(coreboottop)/src/commonlib/include
|
||||||
|
endif
|
||||||
INCLUDES += -I$(VBOOT_SOURCE)/firmware/include
|
INCLUDES += -I$(VBOOT_SOURCE)/firmware/include
|
||||||
|
|
||||||
CFLAGS += $(INCLUDES) -Os -pipe -nostdinc -ggdb3
|
CFLAGS += $(INCLUDES) -Os -pipe -nostdinc -ggdb3
|
||||||
|
@ -48,4 +48,7 @@ ifeq ($(CONFIG_LP_LIBC),y)
|
|||||||
libc-srcs += $(coreboottop)/src/commonlib/bsd/elog.c
|
libc-srcs += $(coreboottop)/src/commonlib/bsd/elog.c
|
||||||
libc-srcs += $(coreboottop)/src/commonlib/bsd/gcd.c
|
libc-srcs += $(coreboottop)/src/commonlib/bsd/gcd.c
|
||||||
libc-srcs += $(coreboottop)/src/commonlib/bsd/ipchksum.c
|
libc-srcs += $(coreboottop)/src/commonlib/bsd/ipchksum.c
|
||||||
|
ifeq ($(CONFIG_LP_GPL),y)
|
||||||
|
libc-srcs += $(coreboottop)/src/commonlib/list.c
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
@ -53,6 +53,8 @@ romstage-y += bsd/lz4_wrapper.c
|
|||||||
ramstage-y += bsd/lz4_wrapper.c
|
ramstage-y += bsd/lz4_wrapper.c
|
||||||
postcar-y += bsd/lz4_wrapper.c
|
postcar-y += bsd/lz4_wrapper.c
|
||||||
|
|
||||||
|
all-y += list.c
|
||||||
|
|
||||||
ramstage-y += sort.c
|
ramstage-y += sort.c
|
||||||
|
|
||||||
romstage-y += bsd/elog.c
|
romstage-y += bsd/elog.c
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
/* Taken from depthcharge: src/base/list.h */
|
/* Taken from depthcharge: src/base/list.h */
|
||||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||||
|
|
||||||
#ifndef __LIST_H__
|
#ifndef __COMMONLIB_LIST_H__
|
||||||
#define __LIST_H__
|
#define __COMMONLIB_LIST_H__
|
||||||
|
|
||||||
|
#include <commonlib/helpers.h>
|
||||||
|
|
||||||
struct list_node {
|
struct list_node {
|
||||||
struct list_node *next;
|
struct list_node *next;
|
||||||
@ -24,4 +26,4 @@ void list_append(struct list_node *node, struct list_node *head);
|
|||||||
(ptr) = container_of((ptr)->member.next, \
|
(ptr) = container_of((ptr)->member.next, \
|
||||||
typeof(*(ptr)), member))
|
typeof(*(ptr)), member))
|
||||||
|
|
||||||
#endif /* __LIST_H__ */
|
#endif /* __COMMONLIB_LIST_H__ */
|
@ -1,7 +1,7 @@
|
|||||||
/* Taken from depthcharge: src/base/list.c */
|
/* Taken from depthcharge: src/base/list.c */
|
||||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||||
|
|
||||||
#include <list.h>
|
#include <commonlib/list.h>
|
||||||
|
|
||||||
void list_remove(struct list_node *node)
|
void list_remove(struct list_node *node)
|
||||||
{
|
{
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <list.h>
|
#include <commonlib/list.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Flattened device tree structures/constants.
|
* Flattened device tree structures/constants.
|
||||||
|
@ -4,11 +4,11 @@
|
|||||||
#ifndef __LIB_FIT_H__
|
#ifndef __LIB_FIT_H__
|
||||||
#define __LIB_FIT_H__
|
#define __LIB_FIT_H__
|
||||||
|
|
||||||
|
#include <commonlib/list.h>
|
||||||
|
#include <device_tree.h>
|
||||||
|
#include <program_loading.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <device_tree.h>
|
|
||||||
#include <list.h>
|
|
||||||
#include <program_loading.h>
|
|
||||||
|
|
||||||
struct fit_image_node {
|
struct fit_image_node {
|
||||||
const char *name;
|
const char *name;
|
||||||
|
@ -28,8 +28,6 @@ CFLAGS_ramstage += $(CFLAGS_asan)
|
|||||||
$(obj)/ramstage/lib/asan.o: CFLAGS_asan =
|
$(obj)/ramstage/lib/asan.o: CFLAGS_asan =
|
||||||
endif
|
endif
|
||||||
|
|
||||||
all-y += list.c
|
|
||||||
|
|
||||||
decompressor-y += decompressor.c
|
decompressor-y += decompressor.c
|
||||||
$(call src-to-obj,decompressor,$(dir)/decompressor.c): $(objcbfs)/bootblock.lz4
|
$(call src-to-obj,decompressor,$(dir)/decompressor.c): $(objcbfs)/bootblock.lz4
|
||||||
$(call src-to-obj,decompressor,$(dir)/decompressor.c): CCACHE_EXTRAFILES=$(objcbfs)/bootblock.lz4
|
$(call src-to-obj,decompressor,$(dir)/decompressor.c): CCACHE_EXTRAFILES=$(objcbfs)/bootblock.lz4
|
||||||
|
@ -6,10 +6,10 @@
|
|||||||
#include <cbmem.h>
|
#include <cbmem.h>
|
||||||
#include <commonlib/bsd/cbfs_private.h>
|
#include <commonlib/bsd/cbfs_private.h>
|
||||||
#include <commonlib/bsd/compression.h>
|
#include <commonlib/bsd/compression.h>
|
||||||
|
#include <commonlib/list.h>
|
||||||
#include <console/console.h>
|
#include <console/console.h>
|
||||||
#include <fmap.h>
|
#include <fmap.h>
|
||||||
#include <lib.h>
|
#include <lib.h>
|
||||||
#include <list.h>
|
|
||||||
#include <metadata_hash.h>
|
#include <metadata_hash.h>
|
||||||
#include <security/tpm/tspi/crtm.h>
|
#include <security/tpm/tspi/crtm.h>
|
||||||
#include <security/vboot/vboot_common.h>
|
#include <security/vboot/vboot_common.h>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
#include <framebuffer_info.h>
|
#include <framebuffer_info.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <list.h>
|
#include <commonlib/list.h>
|
||||||
|
|
||||||
struct fb_info {
|
struct fb_info {
|
||||||
struct list_node node;
|
struct list_node node;
|
||||||
|
@ -2,9 +2,13 @@
|
|||||||
|
|
||||||
subdirs-y += bsd
|
subdirs-y += bsd
|
||||||
|
|
||||||
|
tests-y += list-test
|
||||||
tests-y += rational-test
|
tests-y += rational-test
|
||||||
tests-y += region-test
|
tests-y += region-test
|
||||||
|
|
||||||
|
list-test-srcs += tests/commonlib/list-test.c
|
||||||
|
list-test-srcs += src/commonlib/list.c
|
||||||
|
|
||||||
rational-test-srcs += tests/commonlib/rational-test.c
|
rational-test-srcs += tests/commonlib/rational-test.c
|
||||||
rational-test-srcs += src/commonlib/rational.c
|
rational-test-srcs += src/commonlib/rational.c
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#include <tests/test.h>
|
#include <tests/test.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <list.h>
|
#include <commonlib/list.h>
|
||||||
|
|
||||||
struct test_container {
|
struct test_container {
|
||||||
int value;
|
int value;
|
@ -9,7 +9,6 @@ tests-y += timestamp-test
|
|||||||
tests-y += edid-test
|
tests-y += edid-test
|
||||||
tests-y += cbmem_console-romstage-test
|
tests-y += cbmem_console-romstage-test
|
||||||
tests-y += cbmem_console-ramstage-test
|
tests-y += cbmem_console-ramstage-test
|
||||||
tests-y += list-test
|
|
||||||
tests-y += fmap-test
|
tests-y += fmap-test
|
||||||
tests-y += imd_cbmem-romstage-test
|
tests-y += imd_cbmem-romstage-test
|
||||||
tests-y += imd_cbmem-ramstage-test
|
tests-y += imd_cbmem-ramstage-test
|
||||||
@ -74,9 +73,6 @@ cbmem_console-ramstage-test-stage := ramstage
|
|||||||
cbmem_console-ramstage-test-srcs += tests/lib/cbmem_console-test.c
|
cbmem_console-ramstage-test-srcs += tests/lib/cbmem_console-test.c
|
||||||
cbmem_console-ramstage-test-srcs += tests/stubs/console.c
|
cbmem_console-ramstage-test-srcs += tests/stubs/console.c
|
||||||
|
|
||||||
list-test-srcs += tests/lib/list-test.c
|
|
||||||
list-test-srcs += src/lib/list.c
|
|
||||||
|
|
||||||
fmap-test-srcs += tests/lib/fmap-test.c
|
fmap-test-srcs += tests/lib/fmap-test.c
|
||||||
fmap-test-srcs += src/lib/fmap.c
|
fmap-test-srcs += src/lib/fmap.c
|
||||||
fmap-test-srcs += tests/stubs/console.c
|
fmap-test-srcs += tests/stubs/console.c
|
||||||
|
Loading…
x
Reference in New Issue
Block a user