ARM: mvebu: introduce multi image support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
f8761636f2
commit
dbd47524f4
|
@ -1 +1,2 @@
|
|||
obj-y += board.o
|
||||
lwl-y += lowlevel.o
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
* Copyright (C) 2013
|
||||
* Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
* Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <sizes.h>
|
||||
#include <asm/barebox-arm.h>
|
||||
#include <asm/barebox-arm-head.h>
|
||||
#include <mach/lowlevel.h>
|
||||
|
||||
extern char __dtb_dove_cubox_start[];
|
||||
|
||||
ENTRY_FUNCTION(start_solidrun_cubox)(void)
|
||||
{
|
||||
uint32_t fdt;
|
||||
|
||||
__barebox_arm_head();
|
||||
|
||||
arm_cpu_lowlevel_init();
|
||||
|
||||
fdt = (uint32_t)__dtb_dove_cubox_start - get_runtime_offset();
|
||||
|
||||
mvebu_barebox_entry(fdt);
|
||||
}
|
|
@ -5,11 +5,15 @@ CONFIG_ARCH_DOVE=y
|
|||
CONFIG_AEABI=y
|
||||
CONFIG_CMD_ARM_MMUINFO=y
|
||||
CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
|
||||
CONFIG_ARM_UNWIND=y
|
||||
CONFIG_MALLOC_TLSF=y
|
||||
CONFIG_KALLSYMS=y
|
||||
CONFIG_RELOCATABLE=y
|
||||
CONFIG_LONGHELP=y
|
||||
CONFIG_CMDLINE_EDITING=y
|
||||
CONFIG_AUTO_COMPLETE=y
|
||||
CONFIG_DEBUG_LL=y
|
||||
CONFIG_CONSOLE_ACTIVATE_NONE=y
|
||||
CONFIG_DEBUG_LL=y
|
||||
CONFIG_CMD_EDIT=y
|
||||
CONFIG_CMD_SLEEP=y
|
||||
CONFIG_CMD_MSLEEP=y
|
||||
|
|
|
@ -18,6 +18,7 @@ pbl-$(CONFIG_MACH_FREESCALE_MX51_PDK) += imx51-babbage.dtb.o
|
|||
pbl-$(CONFIG_MACH_FREESCALE_MX53_LOCO) += imx53-qsb.dtb.o
|
||||
pbl-$(CONFIG_MACH_PHYTEC_PFLA02) += imx6q-phytec-pbab01.dtb.o
|
||||
pbl-$(CONFIG_MACH_REALQ7) += imx6q-dmo-realq7.dtb.o
|
||||
pbl-$(CONFIG_MACH_SOLIDRUN_CUBOX) += dove-cubox.dtb.o
|
||||
pbl-$(CONFIG_MACH_GK802) += imx6q-gk802.dtb.o
|
||||
pbl-$(CONFIG_MACH_TQMA6X) += imx6dl-mba6x.dtb.o imx6q-mba6x.dtb.o
|
||||
|
||||
|
|
|
@ -88,6 +88,7 @@ choice
|
|||
|
||||
config MACH_SOLIDRUN_CUBOX
|
||||
bool "SolidRun CuBox"
|
||||
select HAVE_PBL_MULTI_IMAGES
|
||||
|
||||
endchoice
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
lwl-y += lowlevel.o
|
||||
obj-y += common.o
|
||||
lwl-y += common.o
|
||||
obj-$(CONFIG_ARCH_ARMADA_370) += armada-370-xp.o
|
||||
obj-$(CONFIG_ARCH_ARMADA_XP) += armada-370-xp.o
|
||||
obj-$(CONFIG_ARCH_DOVE) += dove.o
|
||||
|
|
|
@ -49,9 +49,9 @@ static void mvebu_remap_registers(void)
|
|||
#define MVEBU_BOOTUP_MEMORY_BASE 0x00000000
|
||||
#define MVEBU_BOOTUP_MEMORY_SIZE SZ_64M
|
||||
|
||||
void __naked __noreturn mvebu_barebox_entry(void)
|
||||
void __naked __noreturn mvebu_barebox_entry(uint32_t boarddata)
|
||||
{
|
||||
mvebu_remap_registers();
|
||||
barebox_arm_entry(MVEBU_BOOTUP_MEMORY_BASE,
|
||||
MVEBU_BOOTUP_MEMORY_SIZE, 0);
|
||||
MVEBU_BOOTUP_MEMORY_SIZE, boarddata);
|
||||
}
|
||||
|
|
|
@ -18,6 +18,6 @@
|
|||
#ifndef __MACH_LOWLEVEL_H__
|
||||
#define __MACH_LOWLEVEL_H__
|
||||
|
||||
void mvebu_barebox_entry(void);
|
||||
void mvebu_barebox_entry(uint32_t boarddata);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -24,5 +24,5 @@
|
|||
void __naked barebox_arm_reset_vector(void)
|
||||
{
|
||||
arm_cpu_lowlevel_init();
|
||||
mvebu_barebox_entry();
|
||||
mvebu_barebox_entry(0);
|
||||
}
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
*.imximg
|
||||
*.map
|
||||
*.src
|
||||
*.kwbimg
|
||||
*.kwbuartimg
|
||||
pbl.lds
|
||||
barebox.x
|
||||
barebox.z
|
||||
|
|
|
@ -108,6 +108,7 @@ $(obj)/%.img: $(obj)/$$(FILE_$$(@F))
|
|||
$(call if_changed,shipped)
|
||||
|
||||
include $(srctree)/images/Makefile.imx
|
||||
include $(srctree)/images/Makefile.mvebu
|
||||
|
||||
targets += $(image-y) pbl.lds barebox.x barebox.z
|
||||
targets += $(patsubst %,%.pblx,$(pblx-y))
|
||||
|
@ -121,5 +122,6 @@ SECONDARY: $(addprefix $(obj)/,$(targets))
|
|||
images: $(addprefix $(obj)/, $(image-y)) FORCE
|
||||
@echo "images built:\n" $(patsubst %,%\\n,$(image-y))
|
||||
|
||||
clean-files := *.pbl *.pblb *.pblx *.map start_*.imximg *.img barebox.z
|
||||
clean-files := *.pbl *.pblb *.pblx *.map start_*.imximg *.img barebox.z start_*.kwbimg \
|
||||
start_*.kwbuartimg
|
||||
clean-files += pbl.lds
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
#
|
||||
# barebox image generation Makefile for Marvell mvebu
|
||||
#
|
||||
|
||||
# %.kwbimg - convert into kwb image
|
||||
# ----------------------------------------------------------------
|
||||
$(obj)/%.kwbimg: $(obj)/% FORCE
|
||||
$(call if_changed,kwb_image)
|
||||
$(obj)/%.kwbuartimg: $(obj)/% FORCE
|
||||
$(call if_changed,kwb_image)
|
||||
|
||||
board = $(srctree)/arch/$(ARCH)/boards
|
||||
|
||||
# ----------------------- Dove 88AP510 based boards ---------------------------
|
||||
SOLIDRUN_CUBOX_KWBOPTS = -c -i $(board)/solidrun-cubox/kwbimage.cfg -d 0x1000000 -e 0x1000000
|
||||
pblx-$(CONFIG_MACH_SOLIDRUN_CUBOX) += start_solidrun_cubox
|
||||
OPTS_start_solidrun_cubox.pblx.kwbimg = $(SOLIDRUN_CUBOX_KWBOPTS)
|
||||
FILE_barebox-solidrun-cubox.img = start_solidrun_cubox.pblx.kwbimg
|
||||
image-$(CONFIG_MACH_SOLIDRUN_CUBOX) += barebox-solidrun-cubox.img
|
||||
|
||||
OPTS_start_solidrun_cubox.pblx.kwbuartimg = -m uart $(SOLIDRUN_CUBOX_KWBOPTS)
|
||||
FILE_barebox-solidrun-cubox-uart.img = start_solidrun_cubox.pblx.kwbuartimg
|
||||
image-$(CONFIG_MACH_SOLIDRUN_CUBOX) += barebox-solidrun-cubox-uart.img
|
||||
|
||||
FILE_barebox-solidrun-cubox-2nd.img = start_solidrun_cubox.pblx
|
||||
image-$(CONFIG_MACH_SOLIDRUN_CUBOX) += barebox-solidrun-cubox-2nd.img
|
|
@ -343,3 +343,6 @@ imximg-tmp = $(subst $(comma),_,$(dot-target).imxcfg.tmp)
|
|||
quiet_cmd_imx_image = IMX-IMG $@
|
||||
cmd_imx_image = $(CPP) $(imxcfg_cpp_flags) -o $(imximg-tmp) $(CFG_$(@F)) ; \
|
||||
$(objtree)/scripts/imx/imx-image -o $@ -b -c $(imximg-tmp) -f $<
|
||||
|
||||
quiet_cmd_kwb_image = KWB $@
|
||||
cmd_kwb_image = scripts/kwbimage -p $< $(OPTS_$(@F)) -o $@
|
||||
|
|
Loading…
Reference in New Issue