Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

microblaze: support U-BOOT image format

Two version are generated.
linux.bin.ub which is created from linux.bin file
and
simpleImage.<dts>.ub which is created from stripped simpleImage.<dts> file

Load address and entry point is for microblaze first instruction
which is CONFIG_KERNEL_BASE_ADDR variable.

There is possible for simpleImage format parse _start symbol too.

simpleImage.<dts> is still stripped elf file

I cleared simpleImage.<dts>.unstrip file because there are so big.

Signed-off-by: Michal Simek <monstr@monstr.eu>

+13 -2
+13 -2
arch/microblaze/boot/Makefile
··· 2 2 # arch/microblaze/boot/Makefile 3 3 # 4 4 5 + MKIMAGE := $(srctree)/scripts/mkuboot.sh 6 + 5 7 obj-y += linked_dtb.o 6 8 7 9 targets := linux.bin linux.bin.gz simpleImage.% 8 10 9 - OBJCOPYFLAGS_linux.bin := -O binary 11 + OBJCOPYFLAGS := -O binary 10 12 11 13 # Where the DTS files live 12 14 dtstree := $(srctree)/$(src)/dts ··· 26 24 [ -n $(CONFIG_INITRAMFS_SOURCE) ] && [ ! -e $(CONFIG_INITRAMFS_SOURCE) ] && \ 27 25 touch $(CONFIG_INITRAMFS_SOURCE) || echo "No CPIO image" 28 26 $(call if_changed,objcopy) 27 + $(call if_changed,uimage) 29 28 @echo 'Kernel: $@ is ready' ' (#'`cat .version`')' 30 29 31 30 $(obj)/linux.bin.gz: $(obj)/linux.bin FORCE ··· 39 36 quiet_cmd_strip = STRIP $@ 40 37 cmd_strip = $(STRIP) -K _start -K _end -K __log_buf -K _fdt_start vmlinux -o $@ 41 38 39 + quiet_cmd_uimage = UIMAGE $@.ub 40 + cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A microblaze -O linux -T kernel \ 41 + -C none -n 'Linux-$(KERNELRELEASE)' \ 42 + -a $(CONFIG_KERNEL_BASE_ADDR) -e $(CONFIG_KERNEL_BASE_ADDR) \ 43 + -d $@ $@.ub 44 + 42 45 $(obj)/simpleImage.%: vmlinux FORCE 43 46 $(call if_changed,cp,.unstrip) 47 + $(call if_changed,objcopy) 48 + $(call if_changed,uimage) 44 49 $(call if_changed,strip) 45 50 @echo 'Kernel: $@ is ready' ' (#'`cat .version`')' 46 51 ··· 64 53 65 54 clean-kernel += linux.bin linux.bin.gz simpleImage.* 66 55 67 - clean-files += *.dtb 56 + clean-files += *.dtb simpleImage.*.unstrip