-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml --- r: 3043 b: refs/heads/master c: 4bedea9 h: refs/heads/master i: 3041: 4cf130a 3039: 0490899 v: v3
- Loading branch information
Chris Zankel
authored and
Linus Torvalds
committed
Jun 24, 2005
1 parent
346e6f7
commit 9ff61d1
Showing
14 changed files
with
3,280 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: 8e1a6dd2fddcc73c9e933758361e3d9c076c688a | ||
refs/heads/master: 4bedea94545165364618d403d03b61d797acba0b |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# | ||
# arch/xtensa/boot/Makefile | ||
# | ||
# This file is subject to the terms and conditions of the GNU General Public | ||
# License. See the file "COPYING" in the main directory of this archive | ||
# for more details. | ||
# | ||
# | ||
|
||
|
||
CFLAGS += -fno-builtin -Iarch/$(ARCH)/boot/include | ||
HOSTFLAGS += -Iarch/$(ARCH)/boot/include | ||
|
||
BIG_ENDIAN := $(shell echo -e "\#ifdef __XTENSA_EL__\nint little;\n\#else\nint big;\n\#endif" | $(CC) -E -|grep -c big) | ||
|
||
|
||
export CFLAGS | ||
export AFLAGS | ||
export BIG_ENDIAN | ||
|
||
# Subdirs for the boot loader(s) | ||
|
||
bootdir-$(CONFIG_XTENSA_PLATFORM_ISS) += boot-elf | ||
bootdir-$(CONFIG_XTENSA_PLATFORM_XT2000) += boot-redboot boot-elf | ||
|
||
subdir-y := lib/ | ||
|
||
subdir-y += boot-elf/ boot-redboot/ | ||
|
||
zImage zImage.initrd Image Image.initrd: $(bootdir-y) | ||
|
||
$(bootdir-y): $(addprefix $(obj)/,$(subdir-y)) \ | ||
$(addprefix $(obj)/,$(host-progs)) | ||
$(Q)$(MAKE) $(build)=$(obj)/$@ $(MAKECMDGOALS) | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# | ||
# This file is subject to the terms and conditions of the GNU General Public | ||
# License. See the file "COPYING" in the main directory of this archive | ||
# for more details. | ||
# | ||
|
||
GZIP = gzip | ||
GZIP_FLAGS = -v9fc | ||
|
||
ifeq ($(BIG_ENDIAN),1) | ||
OBJCOPY_ARGS := -O elf32-xtensa-be | ||
else | ||
OBJCOPY_ARGS := -O elf32-xtensa-le | ||
endif | ||
|
||
export OBJCOPY_ARGS | ||
|
||
boot-y := bootstrap.o | ||
|
||
OBJS := $(addprefix $(obj)/,$(boot-y)) | ||
|
||
Image: vmlinux $(OBJS) | ||
$(OBJCOPY) --strip-all -R .comment -R .xt.insn -O binary \ | ||
vmlinux vmlinux.tmp | ||
$(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \ | ||
--add-section image=vmlinux.tmp \ | ||
--set-section-flags image=contents,alloc,load,load,data \ | ||
$(OBJS) $@.tmp | ||
$(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) \ | ||
-T arch/$(ARCH)/boot/boot-elf/boot.ld \ | ||
-o arch/$(ARCH)/boot/$@.elf $@.tmp | ||
rm -f $@.tmp vmlinux.tmp | ||
|
||
Image.initrd: vmlinux $(OBJS) | ||
$(OBJCOPY) --strip-all -R .comment -R .xt.insn -O binary \ | ||
--add-section .initrd=arch/$(ARCH)/boot/ramdisk \ | ||
--set-section-flags .initrd=contents,alloc,load,load,data \ | ||
vmlinux vmlinux.tmp | ||
$(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \ | ||
--add-section image=vmlinux.tmp \ | ||
--set-section-flags image=contents,alloc,load,load,data \ | ||
$(OBJS) $@.tmp | ||
$(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) \ | ||
-T arch/$(ARCH)/boot/boot-elf/boot.ld \ | ||
-o arch/$(ARCH)/boot/$@.elf $@.tmp | ||
rm -f $@.tmp vmlinux.tmp | ||
|
||
|
||
zImage: Image | ||
|
||
zImage.initrd: Image.initrd | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
OUTPUT_ARCH(xtensa) | ||
|
||
SECTIONS | ||
{ | ||
.start 0xD0000000 : { *(.start) } | ||
|
||
.text 0xD0000000: | ||
{ | ||
__reloc_start = . ; | ||
_text_start = . ; | ||
*(.literal .text.literal .text) | ||
_text_end = . ; | ||
} | ||
|
||
.rodata ALIGN(0x04): | ||
{ | ||
*(.rodata) | ||
*(.rodata1) | ||
} | ||
|
||
.data ALIGN(0x04): | ||
{ | ||
*(.data) | ||
*(.data1) | ||
*(.sdata) | ||
*(.sdata2) | ||
*(.got.plt) | ||
*(.got) | ||
*(.dynamic) | ||
} | ||
|
||
__reloc_end = . ; | ||
|
||
.initrd ALIGN(0x10) : | ||
{ | ||
boot_initrd_start = . ; | ||
*(.initrd) | ||
boot_initrd_end = .; | ||
} | ||
|
||
. = ALIGN(0x10); | ||
__image_load = . ; | ||
.image 0xd0001000: | ||
{ | ||
_image_start = .; | ||
*(image) | ||
. = (. + 3) & ~ 3; | ||
_image_end = . ; | ||
} | ||
|
||
|
||
.bss ((LOADADDR(.image) + SIZEOF(.image) + 3) & ~ 3): | ||
{ | ||
__bss_start = .; | ||
*(.sbss) | ||
*(.scommon) | ||
*(.dynbss) | ||
*(.bss) | ||
__bss_end = .; | ||
} | ||
_end = .; | ||
_param_start = .; | ||
|
||
.ResetVector.text 0xfe000020 : | ||
{ | ||
*(.ResetVector.text) | ||
} | ||
|
||
|
||
PROVIDE (end = .); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
|
||
#include <xtensa/config/specreg.h> | ||
#include <xtensa/config/core.h> | ||
|
||
#include <linux/config.h> | ||
#include <asm/bootparam.h> | ||
|
||
|
||
/* ResetVector | ||
*/ | ||
.section .ResetVector.text, "ax" | ||
.global _ResetVector | ||
_ResetVector: | ||
_j reset | ||
.align 4 | ||
RomInitAddr: | ||
.word 0xd0001000 | ||
RomBootParam: | ||
.word _bootparam | ||
reset: | ||
l32r a0, RomInitAddr | ||
l32r a2, RomBootParam | ||
movi a3, 0 | ||
movi a4, 0 | ||
jx a0 | ||
|
||
.align 4 | ||
.section .bootstrap.data, "aw" | ||
|
||
.globl _bootparam | ||
_bootparam: | ||
.short BP_TAG_FIRST | ||
.short 4 | ||
.long BP_VERSION | ||
.short BP_TAG_LAST | ||
.short 0 | ||
.long 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# | ||
# This file is subject to the terms and conditions of the GNU General Public | ||
# License. See the file "COPYING" in the main directory of this archive | ||
# for more details. | ||
# | ||
|
||
GZIP = gzip | ||
GZIP_FLAGS = -v9fc | ||
ifeq ($(BIG_ENDIAN),1) | ||
OBJCOPY_ARGS := -O elf32-xtensa-be | ||
else | ||
OBJCOPY_ARGS := -O elf32-xtensa-le | ||
endif | ||
|
||
LD_ARGS = -T $(obj)/boot.ld | ||
|
||
boot-y := bootstrap.o | ||
|
||
OBJS := $(addprefix $(obj)/,$(boot-y)) | ||
LIBS := arch/$(ARCH)/boot/lib/lib.a arch/$(ARCH)/lib/lib.a | ||
|
||
LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) | ||
|
||
zImage: vmlinux $(OBJS) $(LIBS) | ||
$(OBJCOPY) --strip-all -R .comment -R .xt.insn -O binary \ | ||
$(TOPDIR)/vmlinux vmlinux.tmp | ||
gzip -vf9 vmlinux.tmp | ||
$(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \ | ||
--add-section image=vmlinux.tmp.gz \ | ||
--set-section-flags image=contents,alloc,load,load,data \ | ||
$(OBJS) $@.tmp | ||
$(LD) $(LD_ARGS) -o $@.elf $@.tmp $(LIBS) -L/xtensa-elf/lib $(LIBGCC) | ||
$(OBJCOPY) -S -O binary $@.elf arch/$(ARCH)/boot/images/$@.redboot | ||
# rm -f $@.tmp $@.elf vmlinux.tmp.gz | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
OUTPUT_ARCH(xtensa) | ||
|
||
SECTIONS | ||
{ | ||
.start 0xD0200000 : { *(.start) } | ||
|
||
.text : | ||
{ | ||
__reloc_start = . ; | ||
_text_start = . ; | ||
*(.literal .text.literal .text) | ||
_text_end = . ; | ||
} | ||
|
||
.rodata ALIGN(0x04): | ||
{ | ||
*(.rodata) | ||
*(.rodata1) | ||
} | ||
|
||
.data ALIGN(0x04): | ||
{ | ||
*(.data) | ||
*(.data1) | ||
*(.sdata) | ||
*(.sdata2) | ||
*(.got.plt) | ||
*(.got) | ||
*(.dynamic) | ||
} | ||
|
||
__reloc_end = . ; | ||
|
||
.initrd ALIGN(0x10) : | ||
{ | ||
boot_initrd_start = . ; | ||
*(.initrd) | ||
boot_initrd_end = .; | ||
} | ||
|
||
. = ALIGN(0x10); | ||
__image_load = . ; | ||
.image 0xd0001000: AT(__image_load) | ||
{ | ||
_image_start = .; | ||
*(image) | ||
. = (. + 3) & ~ 3; | ||
_image_end = . ; | ||
} | ||
|
||
|
||
.bss ((LOADADDR(.image) + SIZEOF(.image) + 3) & ~ 3): | ||
{ | ||
__bss_start = .; | ||
*(.sbss) | ||
*(.scommon) | ||
*(.dynbss) | ||
*(.bss) | ||
__bss_end = .; | ||
} | ||
_end = .; | ||
_param_start = .; | ||
|
||
|
||
PROVIDE (end = .); | ||
} |
Oops, something went wrong.