From 5dda4df4246ff4b4fe4e84311c6fc7b723ad7efb Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Tue, 1 Dec 2015 17:58:08 -0800 Subject: cbfstool: remove trampoline_start and trampoline_size It's not needed, so we can remove some extra file mangling, too. Change-Id: I80d707708e70c07a29653258b4cb6e9cd88d3de3 Signed-off-by: Stefan Reinauer Reviewed-on: https://review.coreboot.org/12508 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth --- util/cbfstool/Makefile | 3 --- util/cbfstool/cbfs-payload-linux.c | 8 ++++---- util/cbfstool/linux_trampoline.c | 6 ++---- 3 files changed, 6 insertions(+), 11 deletions(-) (limited to 'util') diff --git a/util/cbfstool/Makefile b/util/cbfstool/Makefile index b595297c8d..61a1a63257 100644 --- a/util/cbfstool/Makefile +++ b/util/cbfstool/Makefile @@ -24,9 +24,6 @@ linux_trampoline.c: linux_trampoline.S $(OBJCOPY) -Obinary -j .data linux_trampoline trampoline echo "/* This file is automatically generated. Do not manually change */" > trampoline.c xxd -c 16 -i trampoline >> trampoline.c - perl -pi -e 's,unsigned int.*$$,,g;s,unsigned char,const unsigned char,g' trampoline.c - echo "const void * const trampoline_start = &trampoline;" >> trampoline.c - echo "const unsigned long trampoline_size = sizeof trampoline;" >> trampoline.c mv trampoline.c linux_trampoline.c rm linux_trampoline trampoline diff --git a/util/cbfstool/cbfs-payload-linux.c b/util/cbfstool/cbfs-payload-linux.c index 249276602d..84e348de11 100644 --- a/util/cbfstool/cbfs-payload-linux.c +++ b/util/cbfstool/cbfs-payload-linux.c @@ -22,8 +22,8 @@ #include "linux.h" /* trampoline */ -extern void *trampoline_start; -extern long trampoline_size; +extern unsigned char trampoline[]; +extern unsigned int trampoline_len; /* * Current max number of segments include: @@ -97,8 +97,8 @@ static void bzp_add_segment(struct bzpayload *bzp, struct buffer *b, void *data, static int bzp_add_trampoline(struct bzpayload *bzp) { - bzp_add_segment(bzp, &bzp->trampoline, trampoline_start, - trampoline_size); + bzp_add_segment(bzp, &bzp->trampoline, trampoline, + trampoline_len); return 0; } diff --git a/util/cbfstool/linux_trampoline.c b/util/cbfstool/linux_trampoline.c index c5956d651d..c3df214f69 100644 --- a/util/cbfstool/linux_trampoline.c +++ b/util/cbfstool/linux_trampoline.c @@ -1,5 +1,5 @@ /* This file is automatically generated. Do not manually change */ -const unsigned char trampoline[] = { +unsigned char trampoline[] = { 0xfc, 0x31, 0xd2, 0xb9, 0x00, 0x00, 0x00, 0x00, 0xbb, 0x00, 0x00, 0x01, 0x00, 0x01, 0xcb, 0x8b, 0x01, 0x3d, 0x4c, 0x42, 0x49, 0x4f, 0x74, 0x07, 0x83, 0xc1, 0x10, 0x39, 0xcb, 0x75, 0xe9, 0x39, 0xcb, 0x0f, 0x84, 0x87, 0x00, 0x00, 0x00, 0x8b, 0x59, 0x04, 0x01, 0xcb, 0x8b, 0x49, 0x14, 0x83, @@ -13,6 +13,4 @@ const unsigned char trampoline[] = { 0x93, 0xcf, 0x00, 0xbe, 0x00, 0x00, 0x09, 0x00, 0xff, 0x25, 0x14, 0x02, 0x09, 0x00, 0xf4, 0xeb, 0xfd }; - -const void * const trampoline_start = &trampoline; -const unsigned long trampoline_size = sizeof trampoline; +unsigned int trampoline_len = 177; -- cgit v1.2.3