Pull more Helios4 changes from #812
This commit is contained in:
parent
8d8dcc7afb
commit
aa062e64b1
3
config/bootenv/helios-default.txt
Normal file
3
config/bootenv/helios-default.txt
Normal file
@ -0,0 +1,3 @@
|
||||
verbosity=1
|
||||
ethaddr=00:50:43:84:fb:2f
|
||||
|
||||
15
config/sources/mvebu-u-boot-clearfog.inc
Normal file
15
config/sources/mvebu-u-boot-clearfog.inc
Normal file
@ -0,0 +1,15 @@
|
||||
case $BRANCH in
|
||||
default|next)
|
||||
BOOTSOURCE='https://github.com/SolidRun/u-boot-armada38x'
|
||||
BOOTBRANCH='branch:u-boot-2013.01-15t1-clearfog'
|
||||
BOOTDIR='u-boot-armada'
|
||||
BOOTSCRIPT='boot-marvell.cmd:boot.cmd'
|
||||
|
||||
UBOOT_TARGET_MAP="u-boot.mmc;;u-boot.mmc u-boot-uart.mmc
|
||||
u-boot.sata;sata;u-boot.sata u-boot-uart.sata
|
||||
u-boot.flash;spi;u-boot.flash u-boot-uart.flash"
|
||||
|
||||
UBOOT_USE_GCC='== 4.9'
|
||||
UBOOT_COMPILER='arm-linux-gnueabi-'
|
||||
;;
|
||||
esac
|
||||
15
config/sources/mvebu-u-boot-helios.inc
Normal file
15
config/sources/mvebu-u-boot-helios.inc
Normal file
@ -0,0 +1,15 @@
|
||||
case $BRANCH in
|
||||
default|next)
|
||||
BOOTSOURCE='https://github.com/helios-4/u-boot-marvell.git'
|
||||
BOOTBRANCH='branch:u-boot-2013.01-15t1-helios4'
|
||||
BOOTDIR='u-boot-armada'
|
||||
BOOTSCRIPT='boot-marvell.cmd:boot.cmd'
|
||||
|
||||
UBOOT_TARGET_MAP="u-boot.mmc;;u-boot.mmc"
|
||||
|
||||
UBOOT_USE_GCC='== 4.9'
|
||||
UBOOT_COMPILER='arm-linux-gnueabi-'
|
||||
|
||||
BOOTPATCHDIR='u-boot-helios4'
|
||||
;;
|
||||
esac
|
||||
@ -1,38 +1,23 @@
|
||||
BOOTENV_FILE='clearfog-default.txt'
|
||||
HAS_UUID_SUPPORT=yes
|
||||
|
||||
if [[ $BOARD == helios4 ]]; then
|
||||
source "${BASH_SOURCE%/*}/mvebu-u-boot-helios.inc"
|
||||
BOOTENV_FILE='helios-default.txt'
|
||||
else
|
||||
source "${BASH_SOURCE%/*}/mvebu-u-boot-clearfog.inc"
|
||||
BOOTENV_FILE='clearfog-default.txt'
|
||||
fi
|
||||
|
||||
case $BRANCH in
|
||||
default)
|
||||
BOOTSOURCE='https://github.com/SolidRun/u-boot-armada38x'
|
||||
BOOTBRANCH='branch:u-boot-2013.01-15t1-clearfog'
|
||||
BOOTDIR='u-boot-armada'
|
||||
BOOTSCRIPT='boot-marvell.cmd:boot.cmd'
|
||||
|
||||
UBOOT_TARGET_MAP="u-boot.mmc;;u-boot.mmc u-boot-uart.mmc
|
||||
u-boot.sata;sata;u-boot.sata u-boot-uart.sata
|
||||
u-boot.flash;spi;u-boot.flash u-boot-uart.flash"
|
||||
|
||||
UBOOT_USE_GCC='== 4.9'
|
||||
UBOOT_COMPILER='arm-linux-gnueabi-'
|
||||
|
||||
KERNELSOURCE='https://github.com/moonman/linux-stable'
|
||||
KERNELBRANCH='branch:linux-4.4.y-marvell'
|
||||
KERNELDIR='linux-armada-lts'
|
||||
|
||||
KERNEL_USE_GCC='> 5.0'
|
||||
;;
|
||||
|
||||
next)
|
||||
BOOTSOURCE='https://github.com/SolidRun/u-boot-armada38x'
|
||||
BOOTBRANCH='branch:u-boot-2013.01-15t1-clearfog'
|
||||
BOOTDIR='u-boot-armada'
|
||||
BOOTSCRIPT='boot-marvell.cmd:boot.cmd'
|
||||
|
||||
UBOOT_TARGET_MAP="u-boot.mmc;;u-boot.mmc u-boot-uart.mmc
|
||||
u-boot.sata;sata;u-boot.sata u-boot-uart.sata
|
||||
u-boot.flash;spi;u-boot.flash u-boot-uart.flash"
|
||||
|
||||
UBOOT_USE_GCC='== 4.9'
|
||||
UBOOT_COMPILER='arm-linux-gnueabi-'
|
||||
|
||||
KERNELSOURCE=$MAINLINE_KERNEL_SOURCE
|
||||
KERNELBRANCH='branch:linux-4.13.y'
|
||||
KERNELDIR=$MAINLINE_KERNEL_DIR
|
||||
|
||||
15
patch/u-boot/u-boot-helios4/add-fdtfile-env.patch
Normal file
15
patch/u-boot/u-boot-helios4/add-fdtfile-env.patch
Normal file
@ -0,0 +1,15 @@
|
||||
diff --git a/board/mv_ebu/a38x/mv_main_a38x.c b/board/mv_ebu/a38x/mv_main_a38x.c
|
||||
index 4b43a9c..cf77da9 100755
|
||||
--- a/board/mv_ebu/a38x/mv_main_a38x.c
|
||||
+++ b/board/mv_ebu/a38x/mv_main_a38x.c
|
||||
@@ -331,6 +331,10 @@ void misc_init_r_env(void)
|
||||
if (!env)
|
||||
setenv("console", "console=ttyS0,115200");
|
||||
|
||||
+ env = getenv("fdtfile");
|
||||
+ if (!env)
|
||||
+ setenv("fdtfile", "armada-388-helios4.dtb");
|
||||
+
|
||||
env = getenv("mtdids");
|
||||
if (!env) {
|
||||
#if defined(MV_NAND) && defined(MV_INCLUDE_SPI)
|
||||
53
patch/u-boot/u-boot-helios4/add-mmc-target.patch
Normal file
53
patch/u-boot/u-boot-helios4/add-mmc-target.patch
Normal file
@ -0,0 +1,53 @@
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 07debc4..3d91d1d 100755
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -477,6 +477,9 @@ ifndef CONFIG_SYS_UBOOT_START
|
||||
CONFIG_SYS_UBOOT_START := 0
|
||||
endif
|
||||
|
||||
+$(obj)u-boot.mmc: $(obj)u-boot.bin
|
||||
+ echo y | $(obj)tools/marvell/doimage -T mmc -D 0x0 -E 0x0 -G $(obj)tools/marvell/bin_hdr/bin_hdr.bin u-boot.bin u-boot.mmc
|
||||
+
|
||||
$(obj)u-boot.img: $(obj)u-boot.bin
|
||||
$(obj)tools/mkimage -A $(ARCH) -T firmware -C none \
|
||||
-O u-boot -a $(CONFIG_SYS_TEXT_BASE) \
|
||||
diff --git a/boards.cfg b/boards.cfg
|
||||
index 7e8d713..4d9f810 100644
|
||||
--- a/boards.cfg
|
||||
+++ b/boards.cfg
|
||||
@@ -55,7 +55,7 @@ armada_38x arm armv7 a38x mv_ebu
|
||||
armada_38x_customer0 arm armv7 a38x mv_ebu mvca9 armada_38x:CUSTOMER_BOARD_0,ARMADA_38X
|
||||
armada_38x_customer1 arm armv7 a38x mv_ebu mvca9 armada_38x:CUSTOMER_BOARD_1,ARMADA_38X
|
||||
armada_38x_clearfog arm armv7 a38x mv_ebu mvca9 armada_38x:CLEARFOG_BOARD,ARMADA_38X
|
||||
-armada_38x_helios4 arm armv7 a38x mv_ebu mvca9 armada_38x:HELIOS4_BOARD,ARMADA_38X
|
||||
+armada_38x_helios4 arm armv7 a38x mv_ebu mvca9 armada_38x:HELIOS4_BOARD,ARMADA_38X,MV_MMC_BOOT,MV_INCLUDE_SPI,DDR3
|
||||
armada_39x arm armv7 a38x mv_ebu mvca9 armada_38x:ARMADA_39X
|
||||
armada_39x_customer0 arm armv7 a38x mv_ebu mvca9 armada_38x:CUSTOMER_BOARD_0,ARMADA_39X
|
||||
armada_39x_customer1 arm armv7 a38x mv_ebu mvca9 armada_38x:CUSTOMER_BOARD_1,ARMADA_39X
|
||||
diff --git a/include/configs/armada_38x.h b/include/configs/armada_38x.h
|
||||
index 1ae5256..23d681d 100644
|
||||
--- a/include/configs/armada_38x.h
|
||||
+++ b/include/configs/armada_38x.h
|
||||
@@ -286,6 +286,10 @@ extern unsigned int mvUartPortGet(void);
|
||||
|
||||
/* SPI Flash configuration */
|
||||
/*****************************/
|
||||
+#if defined(CONFIG_MV_INCLUDE_SPI)
|
||||
+ #define MV_INCLUDE_SPI
|
||||
+#endif
|
||||
+
|
||||
#if defined(MV_INCLUDE_SPI)
|
||||
#define CONFIG_CMD_SPI
|
||||
#define CONFIG_CMD_SF
|
||||
@@ -563,6 +567,10 @@ extern int nand_get_env_offs(void);
|
||||
/*****************************/
|
||||
//#define CONFIG_MMC_TRACE
|
||||
/* Boot from MMC settings */
|
||||
+#if defined(CONFIG_MV_MMC_BOOT)
|
||||
+ #define MV_MMC_BOOT
|
||||
+#endif
|
||||
+
|
||||
#if defined(MV_MMC_BOOT)
|
||||
/* the following commands are supported only with SPI/NAND interfaces */
|
||||
#if (!defined(MV_INCLUDE_SPI) && !defined(MV_NAND))
|
||||
@ -0,0 +1,17 @@
|
||||
diff --git a/tools/marvell/bin_hdr/base.mk b/tools/marvell/bin_hdr/base.mk
|
||||
index 6e0078a..ad3011a 100755
|
||||
--- a/tools/marvell/bin_hdr/base.mk
|
||||
+++ b/tools/marvell/bin_hdr/base.mk
|
||||
@@ -183,7 +183,11 @@ ifeq "$(CONFIG_ALLEYCAT3)" "y"
|
||||
CFLAGS += -DCONFIG_ALLEYCAT3
|
||||
endif
|
||||
|
||||
-CROSS = $(CROSS_COMPILE_BH)
|
||||
+ifneq "$(CROSS_COMPILE_BH)" ""
|
||||
+ CROSS = $(CROSS_COMPILE_BH)
|
||||
+else
|
||||
+ CROSS = $(CROSS_COMPILE)
|
||||
+endif
|
||||
LD = $(CROSS)ld
|
||||
CC = $(CROSS)gcc
|
||||
AS = $(CROSS)as
|
||||
12
patch/u-boot/u-boot-helios4/disable-jffs-support.patch
Normal file
12
patch/u-boot/u-boot-helios4/disable-jffs-support.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff --git a/include/configs/armada_38x.h b/include/configs/armada_38x.h
|
||||
index 75b8bf5..63475cd 100644
|
||||
--- a/include/configs/armada_38x.h
|
||||
+++ b/include/configs/armada_38x.h
|
||||
@@ -203,7 +204,6 @@ extern unsigned int mvUartPortGet(void);
|
||||
#define CONFIG_FS_EXT4
|
||||
#define CONFIG_CMD_EXT4_WRITE
|
||||
#define CONFIG_EXT4_WRITE
|
||||
-#define CONFIG_CMD_JFFS2
|
||||
#define CONFIG_CMD_FAT
|
||||
#define CONFIG_FS_FAT
|
||||
#define CONFIG_SUPPORT_VFAT
|
||||
79
patch/u-boot/u-boot-helios4/loading-boot-scr.patch
Normal file
79
patch/u-boot/u-boot-helios4/loading-boot-scr.patch
Normal file
@ -0,0 +1,79 @@
|
||||
diff --git a/board/mv_ebu/a38x/mv_main_a38x.c b/board/mv_ebu/a38x/mv_main_a38x.c
|
||||
index 0dce7f6..6d69879 100755
|
||||
--- a/board/mv_ebu/a38x/mv_main_a38x.c
|
||||
+++ b/board/mv_ebu/a38x/mv_main_a38x.c
|
||||
@@ -679,25 +679,33 @@ void misc_init_r_env(void)
|
||||
setenv("enaLPAE", "no");
|
||||
#endif
|
||||
|
||||
- /* Flatten Device Tree environment setup */
|
||||
-#ifdef CONFIG_CUSTOMER_BOARD_SUPPORT
|
||||
- #ifdef CONFIG_ARMADA_38X
|
||||
- fdt_env_setup("armada-38x.dtb", MV_FALSE); /* static setup: Skip DT update for customer */
|
||||
- #else
|
||||
- fdt_env_setup("armada-39x.dtb", MV_FALSE);
|
||||
- #endif
|
||||
-#else
|
||||
- #ifdef CONFIG_ARMADA_38X
|
||||
- fdt_env_setup("armada-38x-modular.dtb", MV_TRUE); /* dynamic setup: run DT update */
|
||||
- #else
|
||||
- fdt_env_setup("armada-39x.dtb", MV_FALSE); /* static setup: Skip DT update */
|
||||
- #endif
|
||||
-#endif
|
||||
+ setenv("fdt_skip_update", "yes");
|
||||
+ setenv("boot_a_script",
|
||||
+ "for prefix in /boot/ /; do \
|
||||
+ load ${boot_interface} 0:1 ${script_addr_r} ${prefix}boot.scr && \
|
||||
+ source ${script_addr_r}; \
|
||||
+ done");
|
||||
+ setenv("mmcboot",
|
||||
+ "setenv boot_interface mmc; run boot_a_script;");
|
||||
+ setenv("sataboot",
|
||||
+ "scsi init; setenv boot_interface scsi; run boot_a_script;");
|
||||
+ setenv("usbboot",
|
||||
+ "setenv usbActive 1; setenv usbType 3; usb start; setenv boot_interface usb; run boot_a_script;");
|
||||
|
||||
#if (CONFIG_BOOTDELAY >= 0)
|
||||
env = getenv("bootcmd");
|
||||
if (!env)
|
||||
- setenv("bootcmd", "tftpboot 0x2000000 $image_name;tftpboot $fdtaddr $fdtfile;"
|
||||
+ setenv("bootcmd",
|
||||
+#if defined (MV_MMC_BOOT)
|
||||
+ "echo Trying to boot from MMC; run mmcboot;"
|
||||
+#elif defined (MV_SATA_BOOT)
|
||||
+ "echo Trying to boot from SATA; run sataboot;"
|
||||
+#elif defined (MV_NOR_BOOT)
|
||||
+ "echo Please store the boot environment on the NOR SPI flash to override the default boot sequence;"
|
||||
+#endif /* MV_NOR_BOOT */
|
||||
+ "echo Trying to boot from USB; run usbboot;"
|
||||
+ "echo Default boot sequence failed - falling back to TFTP;"
|
||||
+ "tftpboot 0x2000000 $image_name;tftpboot $fdtaddr $fdtfile;"
|
||||
"setenv bootargs $console $nandEcc $mtdparts $bootargs_root nfsroot=$serverip:$rootpath "
|
||||
"ip=$ipaddr:$serverip$bootargs_end $mvNetConfig video=dovefb:lcd0:$lcd0_params "
|
||||
"clcd.lcd0_enable=$lcd0_enable clcd.lcd_panel=$lcd_panel; bootz 0x2000000 - $fdtaddr;");
|
||||
diff --git a/common/cmd_fs.c b/common/cmd_fs.c
|
||||
index a681d03..9cc5013 100644
|
||||
--- a/common/cmd_fs.c
|
||||
+++ b/common/cmd_fs.c
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
int do_load_wrapper(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
||||
{
|
||||
- return do_load(cmdtp, flag, argc, argv, FS_TYPE_ANY, 0);
|
||||
+ return do_load(cmdtp, flag, argc, argv, FS_TYPE_ANY, 16);
|
||||
}
|
||||
|
||||
U_BOOT_CMD(
|
||||
diff --git a/include/configs/armada_38x.h b/include/configs/armada_38x.h
|
||||
index 1ae5256..2086859 100644
|
||||
--- a/include/configs/armada_38x.h
|
||||
+++ b/include/configs/armada_38x.h
|
||||
@@ -164,7 +164,7 @@ extern unsigned int mvUartPortGet(void);
|
||||
#define CONFIG_CMD_RCVR
|
||||
#define CONFIG_CMD_BOOT_MENU
|
||||
#define CONFIG_CMD_SYS_RESTORE
|
||||
-
|
||||
+#define CONFIG_CMD_FS_GENERIC
|
||||
|
||||
/* Open this define for enabling Secure Boot Mode eFuses modification
|
||||
#define CONFIG_CMD_EFUSE
|
||||
13
patch/u-boot/u-boot-helios4/make-build-more-silent.patch
Normal file
13
patch/u-boot/u-boot-helios4/make-build-more-silent.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 9fd8afe..7591a9e 100755
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -64,6 +64,8 @@ else
|
||||
XECHO = :
|
||||
endif
|
||||
|
||||
+MAKEFLAGS += --no-print-directory
|
||||
+
|
||||
#########################################################################
|
||||
#
|
||||
# U-boot build supports producing a object files to the separate external
|
||||
@ -0,0 +1,31 @@
|
||||
diff --git a/tools/marvell/bin_hdr/base.mk b/tools/marvell/bin_hdr/base.mk
|
||||
index 33ecf70..d1ee228 100755
|
||||
--- a/tools/marvell/bin_hdr/base.mk
|
||||
+++ b/tools/marvell/bin_hdr/base.mk
|
||||
@@ -208,7 +208,7 @@ CPUOPTS = -mthumb -mthumb-interwork -march=armv7 -mlittle-endian
|
||||
BH_ROOT_DIR = $(TOPDIR)/tools/marvell/bin_hdr
|
||||
INCLUDE = -I$(BH_ROOT_DIR)/src_ddr -I$(BH_ROOT_DIR)/src_phy/$(BOARD) -I$(BH_ROOT_DIR)/inc/common \
|
||||
-I$(BH_ROOT_DIR)/inc/ddr3_soc/$(INCNAME) -I$(BH_ROOT_DIR)/inc/ddr3_soc/$(BOARD) -I$(BH_ROOT_DIR)/platform/sysEnv/$(BOARD) -I$(TOPDIR)/include -I$(BH_ROOT_DIR)/src_init/$(BOARD)
|
||||
-HOSTCFLAGS = -Wall $(INCLUDE)
|
||||
+HOSTCFLAGS = -fno-stack-protector -Wall $(INCLUDE)
|
||||
|
||||
ifeq ($(BIN_HDR_DEBUG),1)
|
||||
DEBUG_FLAGS += -g -O0
|
||||
@@ -223,7 +223,7 @@ DEBUG_MODE_FLAG = no
|
||||
endif
|
||||
endif
|
||||
|
||||
-CFLAGS += -Wall $(INCLUDE) $(DEBUG_FLAGS) $(CPUOPTS) -msoft-float -mabi=aapcs
|
||||
+CFLAGS += -fno-stack-protector -Wall $(INCLUDE) $(DEBUG_FLAGS) $(CPUOPTS) -msoft-float -mabi=aapcs
|
||||
|
||||
ifeq ($(BOARD),msys_bc2)
|
||||
CFLAGS += -fPIE -fno-zero-initialized-in-bss -fno-unwind-tables
|
||||
@@ -231,7 +231,7 @@ else
|
||||
CFLAGS += -fdata-sections -ffunction-sections
|
||||
endif
|
||||
|
||||
-EXTRA_LD_FLAGS = -Wl,--gc-sections --entry=_start
|
||||
+EXTRA_LD_FLAGS = -fno-stack-protector -Wl,--gc-sections --entry=_start
|
||||
|
||||
ifeq ($(DDRTYPE),ddr4)
|
||||
CFLAGS += -DCONFIG_DDR4
|
||||
Loading…
Reference in New Issue
Block a user