Blackfin: initial XIP support
Signed-off-by: Barry Song <barry.song@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:

committed by
Mike Frysinger

parent
aad16f3228
commit
d86bfb1600
@@ -8,14 +8,18 @@
|
||||
|
||||
MKIMAGE := $(srctree)/scripts/mkuboot.sh
|
||||
|
||||
targets := vmImage vmImage.bin vmImage.bz2 vmImage.gz vmImage.lzma
|
||||
extra-y += vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma
|
||||
targets := vmImage vmImage.bin vmImage.bz2 vmImage.gz vmImage.lzma vmImage.xip
|
||||
extra-y += vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma vmlinux.bin.xip
|
||||
|
||||
UIMAGE_OPTS-y :=
|
||||
UIMAGE_OPTS-$(CONFIG_RAMKERNEL) += -a $(CONFIG_BOOT_LOAD)
|
||||
UIMAGE_OPTS-$(CONFIG_ROMKERNEL) += -a $(CONFIG_ROM_BASE) -x
|
||||
|
||||
quiet_cmd_uimage = UIMAGE $@
|
||||
cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A $(ARCH) -O linux -T kernel \
|
||||
-C $(2) -n '$(MACHINE)-$(KERNELRELEASE)' -a $(CONFIG_BOOT_LOAD) \
|
||||
-C $(2) -n '$(MACHINE)-$(KERNELRELEASE)' \
|
||||
-e $(shell $(NM) vmlinux | awk '$$NF == "__start" {print $$1}') \
|
||||
-d $< $@
|
||||
$(UIMAGE_OPTS-y) -d $< $@
|
||||
|
||||
$(obj)/vmlinux.bin: vmlinux FORCE
|
||||
$(call if_changed,objcopy)
|
||||
@@ -29,6 +33,12 @@ $(obj)/vmlinux.bin.bz2: $(obj)/vmlinux.bin FORCE
|
||||
$(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE
|
||||
$(call if_changed,lzma)
|
||||
|
||||
# The mkimage tool wants 64bytes prepended to the image
|
||||
quiet_cmd_mk_bin_xip = BIN $@
|
||||
cmd_mk_bin_xip = ( printf '%64s' | tr ' ' '\377' ; cat $< ) > $@
|
||||
$(obj)/vmlinux.bin.xip: $(obj)/vmlinux.bin FORCE
|
||||
$(call if_changed,mk_bin_xip)
|
||||
|
||||
$(obj)/vmImage.bin: $(obj)/vmlinux.bin
|
||||
$(call if_changed,uimage,none)
|
||||
|
||||
@@ -41,10 +51,15 @@ $(obj)/vmImage.gz: $(obj)/vmlinux.bin.gz
|
||||
$(obj)/vmImage.lzma: $(obj)/vmlinux.bin.lzma
|
||||
$(call if_changed,uimage,lzma)
|
||||
|
||||
$(obj)/vmImage.xip: $(obj)/vmlinux.bin.xip
|
||||
$(call if_changed,uimage,none)
|
||||
|
||||
suffix-y := bin
|
||||
suffix-$(CONFIG_KERNEL_GZIP) := gz
|
||||
suffix-$(CONFIG_KERNEL_BZIP2) := bz2
|
||||
suffix-$(CONFIG_KERNEL_LZMA) := lzma
|
||||
suffix-$(CONFIG_ROMKERNEL) := xip
|
||||
|
||||
$(obj)/vmImage: $(obj)/vmImage.$(suffix-y)
|
||||
@ln -sf $(notdir $<) $@
|
||||
|
||||
|
Reference in New Issue
Block a user