More fixes for Marvell Armada, kernel configuration for NEXT / DEV, fixed failed patch, u-boot packaging, ...

This commit is contained in:
Igor Pečovnik 2016-01-08 19:50:53 +01:00
parent 0d94f71cd5
commit ccbcf0e79d
6 changed files with 7009 additions and 4 deletions

View file

@ -41,6 +41,9 @@ if [ -d "$SOURCES/$BOOTSOURCEDIR" ]; then
[ -f $SOURCES/$BOOTSOURCEDIR/tools/logos/udoo.bmp ] && cp $SRC/lib/bin/armbian-u-boot.bmp $SOURCES/$BOOTSOURCEDIR/tools/logos/udoo.bmp
touch .scmversion
# special compilation for armada
[[ $LINUXFAMILY == "marvell" ]] && local MAKEPARA="u-boot.mmc"
# patch mainline uboot configuration to boot with old kernels
if [[ $BRANCH == "default" && $LINUXFAMILY == sun*i ]] ; then
if [ "$(cat $SOURCES/$BOOTSOURCEDIR/.config | grep CONFIG_ARMV7_BOOT_SEC_DEFAULT=y)" == "" ]; then
@ -49,12 +52,12 @@ if [ -d "$SOURCES/$BOOTSOURCEDIR" ]; then
fi
fi
eval 'make $CTHREADS CROSS_COMPILE="$CCACHE arm-linux-gnueabihf-" 2>&1' \
eval 'make $MAKEPARA $CTHREADS CROSS_COMPILE="$CCACHE arm-linux-gnueabihf-" 2>&1' \
${PROGRESS_LOG_TO_FILE:+' | tee -a $DEST/debug/compilation.log'} \
${OUTPUT_DIALOG:+' | dialog --backtitle "$backtitle" --progressbox "Compiling u-boot..." 20 80'} \
${OUTPUT_VERYSILENT:+' >/dev/null 2>/dev/null'}
else
eval 'make $CTHREADS $BOOTCONFIG CROSS_COMPILE="$CCACHE arm-linux-gnueabihf-" 2>&1' \
eval 'make $MAKEPARA $CTHREADS $BOOTCONFIG CROSS_COMPILE="$CCACHE arm-linux-gnueabihf-" 2>&1' \
${PROGRESS_LOG_TO_FILE:+' | tee -a $DEST/debug/compilation.log'} \
${OUTPUT_DIALOG:+' | dialog --backtitle "$backtitle" --progressbox "Compiling u-boot..." 20 80'} \
${OUTPUT_VERYSILENT:+' >/dev/null 2>/dev/null'}
@ -88,6 +91,8 @@ elif [[ \$DPKG_MAINTSCRIPT_PACKAGE == *odroid* ]] ; then
elif [[ \$DPKG_MAINTSCRIPT_PACKAGE == *udoo* ]] ; then
( dd if=/usr/lib/$CHOOSEN_UBOOT/SPL of=\$DEVICE bs=1k seek=1 status=noxfer ) > /dev/null 2>&1
( dd if=/usr/lib/$CHOOSEN_UBOOT/u-boot.img of=\$DEVICE bs=1K seek=69 status=noxfer ) > /dev/null 2>&1
elif [[ \$DPKG_MAINTSCRIPT_PACKAGE == *armada* ]] ; then
( dd if=/usr/lib/$CHOOSEN_UBOOT/u-boot.mmc of=\$DEVICE bs=512 seek=1 status=noxfer ) > /dev/null 2>&1
else
( dd if=/usr/lib/$CHOOSEN_UBOOT/u-boot-sunxi-with-spl.bin of=\$DEVICE bs=1024 seek=8 status=noxfer ) > /dev/null 2>&1
fi
@ -122,6 +127,8 @@ END
[ ! -f "u-boot.bin" ] || cp u-boot.bin $DEST/debs/$CHOOSEN_UBOOT/usr/lib/$CHOOSEN_UBOOT/
elif [[ $BOARD == udoo* ]] ; then
[ ! -f "u-boot.img" ] || cp SPL u-boot.img $DEST/debs/$CHOOSEN_UBOOT/usr/lib/$CHOOSEN_UBOOT
elif [[ $BOARD == armada* ]] ; then
[ ! -f "u-boot.mmc" ] || cp u-boot.mmc $DEST/debs/$CHOOSEN_UBOOT/usr/lib/$CHOOSEN_UBOOT
else
[ ! -f "u-boot-sunxi-with-spl.bin" ] || cp u-boot-sunxi-with-spl.bin $DEST/debs/$CHOOSEN_UBOOT/usr/lib/$CHOOSEN_UBOOT
fi
@ -463,6 +470,8 @@ write_uboot()
if [[ $BOARD == *cubox* ]] ; then
( dd if=/tmp/usr/lib/"$CHOOSEN_UBOOT"/SPL of=$LOOP bs=512 seek=2 status=noxfer >/dev/null 2>&1)
( dd if=/tmp/usr/lib/"$CHOOSEN_UBOOT"/u-boot.img of=$LOOP bs=1K seek=42 status=noxfer >/dev/null 2>&1)
elif [[ $BOARD == *armada* ]] ; then
( dd if=/tmp/usr/lib/"$CHOOSEN_UBOOT"/u-boot.mmc of=$LOOP bs=512 seek=1 status=noxfer >/dev/null 2>&1)
elif [[ $BOARD == *udoo* ]] ; then
( dd if=/tmp/usr/lib/"$CHOOSEN_UBOOT"/SPL of=$LOOP bs=1k seek=1 status=noxfer >/dev/null 2>&1)
( dd if=/tmp/usr/lib/"$CHOOSEN_UBOOT"/u-boot.img of=$LOOP bs=1k seek=69 conv=fsync >/dev/null 2>&1)

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -509,7 +509,7 @@ index e84c7f2634d3..f19d9a31dccd 100644
/* Cancel Port Reset */
ctrl &= ~MVNETA_GMAC2_PORT_RESET;
mvreg_write(pp, MVNETA_GMAC_CTRL_2, ctrl);
@@ -3243,13 +3316,12 @@ static int mvneta_probe(struct platform_device *pdev)
@@ -3243,13 +3336,12 @@ static int mvneta_probe(struct platform_device *pdev)
const struct mbus_dram_target_info *dram_target_info;
struct resource *res;
struct device_node *dn = pdev->dev.of_node;
@ -521,9 +521,9 @@ index e84c7f2634d3..f19d9a31dccd 100644
char hw_mac_addr[ETH_ALEN];
const char *mac_from;
- const char *managed;
int tx_csum_limit;
int phy_mode;
int err;
int cpu;
@@ -3264,31 +3336,11 @@ static int mvneta_probe(struct platform_device *pdev)
goto err_free_netdev;
}

View file

@ -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

View file

@ -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