SPARC: added U-Boot build target: uImage
PATCH v2 1/1 SPARC: added U-Boot build target: uImage
This is only for LEON as u-boot for SPARC only supports LEON.
--- arch/sparc/Kconfig | 33 +++++++++++++++++++++++++++++++ arch/sparc/Makefile | 3 +- arch/sparc/boot/Makefile | 48 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 83 insertions(+), 1 deletions(-)
arch/sparc/Kconfig +33 -0
@@ -467,6 +467,39 @@ config SPARC_LEON from www.gaisler.com. You can download a sparc-linux cross-compilation toolchain at www.gaisler.com. +if SPARC_LEON +menu "U-Boot options" + +config UBOOT_LOAD_ADDR + hex "uImage Load Address" + default 0x40004000 + ---help--- + U-Boot kernel load address, the address in physical address space + where u-boot will place the Linux kernel before booting it. + This address is normally the base address of main memory + 0x4000. + +config UBOOT_FLASH_ADDR + hex "uImage.o Load Address" + default 0x00080000 + ---help--- + Optional setting only affecting the uImage.o ELF-image used to + download the uImage file to the target using a ELF-loader other than + U-Boot. It may for example be used to download an uImage to FLASH with + the GRMON utility before even starting u-boot. + +config UBOOT_ENTRY_ADDR + hex "uImage Entry Address" + default 0xf0004000 + ---help--- + Do not change this unless you know what you're doing. This is + hardcoded by the SPARC32 and LEON port. + + This is the virtual address u-boot jumps to when booting the Linux + Kernel. + +endmenu +endif + endmenu menu "Bus options (PCI etc.)"
arch/sparc/Makefile +2 -1
@@ -88,7 +88,7 @@ boot := arch/sparc/boot # Default target all: zImage -image zImage tftpboot.img vmlinux.aout: vmlinux +image zImage uImage tftpboot.img vmlinux.aout: vmlinux $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ archclean:
@@ -102,6 +102,7 @@ ifeq ($(ARCH),sparc) define archhelp echo '* image - kernel image ($(boot)/image)' echo '* zImage - stripped kernel image ($(boot)/zImage)' + echo ' uImage - U-Boot SPARC32/LEON Image' echo ' tftpboot.img - image prepared for tftp' endef else
arch/sparc/boot/Makefile +48 -0
59 lines not on this page · raw message
Signature · 1 line
1.5.4
Hi Daniel.
Looks better...
Quoted 5 lines
define archhelp
echo '* image - kernel image ($(boot)/image)' echo '* zImage - stripped kernel image ($(boot)/zImage)' + echo ' uImage - U-Boot SPARC32/LEON Image' echo ' tftpboot.img - image prepared for tftp'
On the commandline you use "sparc32" - so to be consistent I think we should use "sparc32" in the help text too. But I do not feel strong about this at all.
arch/sparc/boot/Makefile $(obj)/tftpboot.img: $(obj)/image $(obj)/piggyback_64 System.map $(ROOT_IMG) FOR · line 103
Quoted 3 lines
arch/sparc/boot/Makefile +3
-0+OBJCOPYFLAGS_image.bin := -S -O binary -R .note -R .comment +$(obj)/image.bin: $(obj)/image FORCE + $(call if_changed,objcopy)
I recall that we remove .note in similar places.
Could you double check what other archs do here.
arch/sparc/boot/Makefile $(obj)/tftpboot.img: $(obj)/image $(obj)/piggyback_64 System.map $(ROOT_IMG) FOR · line 111
Quoted 8 lines
arch/sparc/boot/Makefile +8
-0+ +$(obj)/image.gz: $(obj)/image.bin + $(call if_changed,gzip) + +# Start of Main memory which this Linux kernel will be loaded to. +ifndef CONFIG_UBOOT_LOAD_ADDR +CONFIG_UBOOT_LOAD_ADDR=0x40004000 +endif
I do not see that value in testign for the three newly introduced Kconfig symbols.
In your backported kernel it may make sense but in mainline the symbols will always be defined as Kconfig define them.
So just reference them direct.
Sam
Quoted 20 lines · Sam Ravnborg
Hi Daniel.
Looks better...
Quoted 7 lines
define archhelp
echo '* image - kernel image ($(boot)/image)' echo '* zImage - stripped kernel image ($(boot)/zImage)'+ echo ' uImage - U-Boot SPARC32/LEON Image'
echo ' tftpboot.img - image prepared for tftp'On the commandline you use "sparc32" - so to be consistent I think we should use "sparc32" in the help text too. But I do not feel strong about this at all.
Quoted 10 lines
arch/sparc/boot/Makefile $(obj)/tftpboot.img: $(obj)/image $(obj)/piggyback_64 System.map $(ROOT_IMG) FOR · line 103
Quoted 5 lines
arch/sparc/boot/Makefile +3
-0+OBJCOPYFLAGS_image.bin := -S -O binary -R .note -R .comment +$(obj)/image.bin: $(obj)/image FORCE + $(call if_changed,objcopy)I recall that we remove .note in similar places.
Could you double check what other archs do here.
It seems to me that x86 also removes .note when making bin format.
Quoted 18 lines
arch/sparc/boot/Makefile $(obj)/tftpboot.img: $(obj)/image $(obj)/piggyback_64 System.map $(ROOT_IMG) FOR · line 111
Quoted 12 lines
arch/sparc/boot/Makefile +8
-0+ +$(obj)/image.gz: $(obj)/image.bin + $(call if_changed,gzip) + +# Start of Main memory which this Linux kernel will be loaded to. +ifndef CONFIG_UBOOT_LOAD_ADDR +CONFIG_UBOOT_LOAD_ADDR=0x40004000 +endifI do not see that value in testign for the three newly introduced
Kconfigsymbols.
In your backported kernel it may make sense but in mainline the symbols will always be defined asKconfigdefine them.
Quoted 3 lines
So just reference them direct.
Good point, see new patch.
Thanks,
Daniel