mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-07 16:11:43 +00:00
Moved cgptlib into vboot_firmware
Moved cgptlib tests into tests Review URL: http://codereview.chromium.org/2303003
This commit is contained in:
5
Makefile
5
Makefile
@@ -8,12 +8,11 @@ export TOP = $(shell pwd)
|
||||
export FWDIR=$(TOP)/vboot_firmware
|
||||
export INCLUDES = \
|
||||
-I$(FWDIR)/include \
|
||||
-I$(TOP)/misclibs/include \
|
||||
-I$(TOP)/cgptlib
|
||||
-I$(TOP)/misclibs/include
|
||||
|
||||
export FWLIB=$(FWDIR)/vboot_fw.a
|
||||
|
||||
SUBDIRS=vboot_firmware cgptlib misclibs vfirmware vkernel utility tests
|
||||
SUBDIRS=vboot_firmware misclibs vfirmware vkernel utility tests
|
||||
|
||||
all:
|
||||
set -e; \
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
CFLAGS += -Wall -Werror -ansi
|
||||
INCLUDES += -Itests
|
||||
SUBDIRS = tests
|
||||
|
||||
all: libcgpt.a
|
||||
set -e; \
|
||||
for i in $(SUBDIRS); do \
|
||||
$(MAKE) -C $$i; \
|
||||
done
|
||||
|
||||
.c.o:
|
||||
$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@
|
||||
|
||||
libcgpt.a: cgptlib.o quick_sort.o crc32.o
|
||||
$(AR) rs $@ $^
|
||||
|
||||
clean:
|
||||
set -e; \
|
||||
for i in $(SUBDIRS); do \
|
||||
$(MAKE) -C $$i clean; \
|
||||
done
|
||||
rm -f *.o *~ *.a
|
||||
@@ -1,20 +0,0 @@
|
||||
# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
TOP ?= ../../
|
||||
CFLAGS += -Wall -DNDEBUG -Werror -ansi
|
||||
LIBS = $(TOP)/cgptlib/libcgpt.a $(FWLIB)
|
||||
OBJS = cgptlib_test.o quick_sort_test.o crc32_test.o
|
||||
OUT = cgptlib_test
|
||||
|
||||
all: $(OUT)
|
||||
|
||||
$(OUT): $(OBJS) $(LIBS)
|
||||
$(CC) $(CFLAGS) -o $@ $^
|
||||
|
||||
.c.o:
|
||||
$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@
|
||||
|
||||
clean:
|
||||
rm -rf $(OUT) $(OBJS)
|
||||
@@ -6,6 +6,7 @@ TOP ?= ../
|
||||
CC ?= gcc
|
||||
CFLAGS ?= -Wall -DNDEBUG -O3 -Werror
|
||||
INCLUDES += -I./include \
|
||||
-I$(FWDIR)/lib/cgptlib/include \
|
||||
-I$(FWDIR)/lib/cryptolib/include \
|
||||
-I../misclibs/include \
|
||||
-I../vfirmware/include\
|
||||
@@ -17,6 +18,7 @@ LIBS = $(IMAGE_LIBS) $(UTIL_LIBS) $(FWLIB) -lcrypto
|
||||
|
||||
TEST_BINS = big_firmware_tests \
|
||||
big_kernel_tests \
|
||||
cgptlib_test \
|
||||
firmware_image_tests \
|
||||
firmware_rollback_tests \
|
||||
firmware_splicing_tests \
|
||||
@@ -40,6 +42,9 @@ big_firmware_tests: big_firmware_tests.c rollback_index_mock.c test_common.c
|
||||
big_kernel_tests: big_kernel_tests.c rollback_index_mock.c test_common.c
|
||||
$(CC) $(CFLAGS) $(INCLUDES) $^ -o $@ $(LIBS)
|
||||
|
||||
cgptlib_test: cgptlib_test.c quick_sort_test.c crc32_test.c
|
||||
$(CC) $(CFLAGS) -ansi $(INCLUDES) $^ -o $@ $(LIBS)
|
||||
|
||||
firmware_image_tests: firmware_image_tests.c rollback_index_mock.c test_common.c
|
||||
$(CC) $(CFLAGS) $(INCLUDES) $^ -o $@ $(LIBS)
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ TOP ?= ../
|
||||
CC ?= gcc
|
||||
CXX ?= g++
|
||||
INCLUDES += -I./include \
|
||||
-I$(FWDIR)/lib/cgptlib/include \
|
||||
-I$(FWDIR)/lib/cryptolib/include \
|
||||
-I../misclibs/include \
|
||||
-I../vfirmware/include\
|
||||
|
||||
@@ -6,7 +6,7 @@ TOP ?= ../../
|
||||
CC ?= cc
|
||||
INCLUDES += -I$(TOP)/common/include -I$(TOP)/../../../chroot/usr/include/
|
||||
CFLAGS += -Wall -Werror -ggdb
|
||||
LIBS += $(TOP)/cgptlib/libcgpt.a $(FWLIB)
|
||||
LIBS += $(FWLIB)
|
||||
|
||||
all: cgpt
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ TESTDIR = $(FWTOP)/linktest
|
||||
INC = \
|
||||
-I$(FWTOP)/include \
|
||||
-I$(LIBDIR)/include \
|
||||
-I$(LIBDIR)/cgptlib/include \
|
||||
-I$(LIBDIR)/cryptolib/include
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include "cgptlib.h"
|
||||
#include "firmware_image_fw.h"
|
||||
#include "kernel_image_fw.h"
|
||||
#include "load_kernel_fw.h"
|
||||
@@ -8,6 +9,10 @@
|
||||
|
||||
int main(void)
|
||||
{
|
||||
// cgptlib.h
|
||||
GptInit(0);
|
||||
GptNextKernelEntry(0, 0, 0);
|
||||
GptUpdateKernelEntry(0, 0);
|
||||
|
||||
// firmware_image_fw.h
|
||||
VerifyFirmwareHeader(0, 0, 0, 0);
|
||||
|
||||
Reference in New Issue
Block a user