| .. | .. |
|---|
| 15 | 15 | export KBUILD_AFLAGS += -mtext-section-literals |
|---|
| 16 | 16 | |
|---|
| 17 | 17 | boot-y := bootstrap.o |
|---|
| 18 | +targets += $(boot-y) boot.lds |
|---|
| 18 | 19 | |
|---|
| 19 | 20 | OBJS := $(addprefix $(obj)/,$(boot-y)) |
|---|
| 20 | 21 | |
|---|
| 21 | | -$(obj)/Image.o: vmlinux.bin $(OBJS) |
|---|
| 22 | +$(obj)/Image.o: $(obj)/../vmlinux.bin $(OBJS) |
|---|
| 22 | 23 | $(Q)$(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \ |
|---|
| 23 | | - --add-section image=vmlinux.bin \ |
|---|
| 24 | + --add-section image=$< \ |
|---|
| 24 | 25 | --set-section-flags image=contents,alloc,load,load,data \ |
|---|
| 25 | 26 | $(OBJS) $@ |
|---|
| 26 | 27 | |
|---|
| 27 | 28 | $(obj)/../Image.elf: $(obj)/Image.o $(obj)/boot.lds |
|---|
| 28 | | - $(Q)$(LD) $(KBUILD_LDFLAGS) $(LDFLAGS_vmlinux) \ |
|---|
| 29 | + $(Q)$(LD) $(KBUILD_LDFLAGS) \ |
|---|
| 29 | 30 | -T $(obj)/boot.lds \ |
|---|
| 30 | 31 | --build-id=none \ |
|---|
| 31 | 32 | -o $@ $(obj)/Image.o |
|---|