Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 145688
b: refs/heads/master
c: 77d1a49
h: refs/heads/master
v: v3
  • Loading branch information
H. Peter Anvin committed May 11, 2009
1 parent 292f712 commit 3cb6e2f
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 02a884c0fe7ec8459d00d34b7d4101af21fc4a86
refs/heads/master: 77d1a4999502c260df0eb2de437d320bf8c64b36
24 changes: 16 additions & 8 deletions trunk/arch/x86/boot/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -86,19 +86,27 @@ $(obj)/vmlinux.bin: $(obj)/compressed/vmlinux FORCE

SETUP_OBJS = $(addprefix $(obj)/,$(setup-y))

sed-offsets := -e 's/^00*/0/' \
-e 's/^\([0-9a-fA-F]*\) . \(input_data\|input_data_end\)$$/\#define \2 0x\1/p'
sed-voffset := -e 's/^\([0-9a-fA-F]*\) . \(_text\|_end\)$$/\#define VO_\2 0x\1/p'

quiet_cmd_offsets = OFFSETS $@
cmd_offsets = $(NM) $< | sed -n $(sed-offsets) > $@
quiet_cmd_voffset = VOFFSET $@
cmd_voffset = $(NM) $< | sed -n $(sed-voffset) > $@

$(obj)/offsets.h: $(obj)/compressed/vmlinux FORCE
$(call if_changed,offsets)
targets += voffset.h
$(obj)/voffset.h: vmlinux FORCE
$(call if_changed,voffset)

sed-zoffset := -e 's/^\([0-9a-fA-F]*\) . \(input_data\|_end\|z_.*\)$$/\#define ZO_\2 0x\1/p'

quiet_cmd_zoffset = ZOFFSET $@
cmd_zoffset = $(NM) $< | sed -n $(sed-zoffset) > $@

targets += zoffset.h
$(obj)/zoffset.h: $(obj)/compressed/vmlinux FORCE
$(call if_changed,zoffset)

targets += offsets.h

AFLAGS_header.o += -I$(obj)
$(obj)/header.o: $(obj)/offsets.h
$(obj)/header.o: $(obj)/voffset.h $(obj)/zoffset.h

LDFLAGS_setup.elf := -T
$(obj)/setup.elf: $(src)/setup.ld $(SETUP_OBJS) FORCE
Expand Down
7 changes: 4 additions & 3 deletions trunk/arch/x86/boot/header.S
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
#include <asm/page_types.h>
#include <asm/setup.h>
#include "boot.h"
#include "offsets.h"
#include "voffset.h"
#include "zoffset.h"

BOOTSEG = 0x07C0 /* original address of boot-sector */
SYSSEG = 0x1000 /* historical load address >> 4 */
Expand Down Expand Up @@ -212,8 +213,8 @@ hardware_subarch: .long 0 # subarchitecture, added with 2.07

hardware_subarch_data: .quad 0

payload_offset: .long input_data
payload_length: .long input_data_end-input_data
payload_offset: .long ZO_input_data
payload_length: .long ZO_z_input_len

setup_data: .quad 0 # 64-bit physical pointer to
# single linked list of
Expand Down

0 comments on commit 3cb6e2f

Please sign in to comment.