mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-12 19:04:59 +00:00
In order to dual boot Windows and ChromeOS, Windows must
not find a GPT partition table on the disk. So change
ChromeOS to cope with an alternative signature "CHROMEOS"
instead of the standard "EFI PART"
BUG=chrome-os-partner:6108
TEST=rebuild chromeos, install it,
run cgpt legacy /dev/sda
dd if=/dev/sda of=/tmp/x bs=1k
hexdump -C /tmp/X
see the string CHROMEOS
BRANCH=link
Signed-off-by: Stefan Reinauer <reinauer@chromium.org>
Change-Id: Ia88eff33b9880bd73a78c1b8e026c1f8298c4557
Reviewed-on: https://gerrit.chromium.org/gerrit/31264
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Commit-Ready: Stefan Reinauer <reinauer@chromium.org>
Tested-by: Stefan Reinauer <reinauer@chromium.org>
75 lines
1.5 KiB
Makefile
75 lines
1.5 KiB
Makefile
# Copyright (c) 2012 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.
|
|
|
|
BUILD_ROOT := ${BUILD}/cgpt
|
|
|
|
INCLUDES = -I$(FWDIR)/lib/cgptlib/include -I$(FWDIR)/include
|
|
LIBS = ${HOSTLIB}
|
|
LDLIBS += -luuid
|
|
LDFLAGS += -static
|
|
|
|
DESTDIR ?= /usr/bin
|
|
|
|
PROGNAME = ${BUILD_ROOT}/cgpt
|
|
|
|
LIB_CGPT_CC = ${BUILD_ROOT}/libcgpt-cc.a
|
|
|
|
ALL_SRCS = \
|
|
cgpt.c \
|
|
cgpt_create.c \
|
|
cgpt_add.c \
|
|
cgpt_boot.c \
|
|
cgpt_show.c \
|
|
cgpt_repair.c \
|
|
cgpt_prioritize.c \
|
|
cgpt_find.c \
|
|
cgpt_legacy.c \
|
|
cmd_show.c \
|
|
cmd_repair.c \
|
|
cmd_create.c \
|
|
cmd_add.c \
|
|
cmd_boot.c \
|
|
cmd_find.c \
|
|
cmd_prioritize.c \
|
|
cmd_legacy.c \
|
|
cgpt_common.c
|
|
|
|
LIB_CGPT_CC_SRCS = \
|
|
CgptManager.cc \
|
|
cgpt_create.c \
|
|
cgpt_add.c \
|
|
cgpt_boot.c \
|
|
cgpt_show.c \
|
|
cgpt_repair.c \
|
|
cgpt_prioritize.c \
|
|
cgpt_common.c \
|
|
../firmware/lib/cgptlib/crc32.c \
|
|
../firmware/lib/cgptlib/cgptlib_internal.c \
|
|
../firmware/stub/utility_stub.c
|
|
|
|
main: $(PROGNAME)
|
|
|
|
include ../build.mk
|
|
|
|
LIB_CGPT_CC_OBJS = $(filter %.o, \
|
|
$(LIB_CGPT_CC_SRCS:%.c=${BUILD_ROOT}/%.o) \
|
|
$(LIB_CGPT_CC_SRCS:%.cc=${BUILD_ROOT}/%.o))
|
|
LIB_CGPT_CC_DEPS = $(LIB_CGPT_CC_OBJS:%.o=%.o.d)
|
|
|
|
libcgpt_cc: $(LIB_CGPT_CC)
|
|
|
|
$(LIB_CGPT_CC): $(LIB_CGPT_CC_OBJS)
|
|
rm -f $@
|
|
ar qc $@ $^
|
|
|
|
$(PROGNAME): $(ALL_OBJS) $(LIBS)
|
|
$(CC) -o $(PROGNAME) $(CFLAGS) $(LDFLAGS) $^ $(LDLIBS)
|
|
|
|
install: $(PROGNAME)
|
|
mkdir -p $(DESTDIR)
|
|
cp -f $^ $(DESTDIR)
|
|
chmod a+rx $(patsubst ${BUILD_ROOT}/%,$(DESTDIR)/%,$^)
|
|
|
|
.PHONY: all install
|