mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
[ mverbu64 ] Add macchiatobin double shot board. (#1416)
This commit is contained in:
committed by
Igor Pečovnik
parent
141ac0f7cd
commit
8830b8aa45
12
config/boards/macchiatobin-doubleshot.csc
Normal file
12
config/boards/macchiatobin-doubleshot.csc
Normal file
@@ -0,0 +1,12 @@
|
||||
# Marvell ARMADA 8040
|
||||
BOARD_NAME="MACCHIATObin Double Shot"
|
||||
BOARDFAMILY="mvebu64"
|
||||
BOOTCONFIG="mvebu_mcbin-88f8040_defconfig"
|
||||
MODULES=""
|
||||
MODULES_NEXT=""
|
||||
BUILD_DESKTOP="no"
|
||||
#
|
||||
KERNEL_TARGET="default"
|
||||
CLI_TARGET="stretch,bionic:default"
|
||||
#
|
||||
CLI_BETA_TARGET=""
|
||||
25
config/bootscripts/boot-macchiatobin-doubleshot.cmd
Normal file
25
config/bootscripts/boot-macchiatobin-doubleshot.cmd
Normal file
@@ -0,0 +1,25 @@
|
||||
# DO NOT EDIT THIS FILE
|
||||
#
|
||||
# Please edit /boot/armbianEnv.txt to set supported parameters
|
||||
#
|
||||
|
||||
# default values
|
||||
setenv rootdev "/dev/mmcblk1p1"
|
||||
setenv verbosity "1"
|
||||
setenv rootfstype "ext4"
|
||||
|
||||
setenv fdt_name /boot/dtb/marvell/armada-8040-mcbin.dtb
|
||||
setenv initrd_image /boot/uInitrd
|
||||
setenv image_name /boot/Image
|
||||
|
||||
load mmc 1:1 ${scriptaddr} /boot/armbianEnv.txt
|
||||
env import -t ${scriptaddr} ${filesize}
|
||||
|
||||
setenv bootargs "$console root=${rootdev} rootfstype=${rootfstype} rootwait loglevel=${verbosity} $extra_params $cpuidle"
|
||||
|
||||
ext4load mmc 1:1 $kernel_addr_r $image_name
|
||||
ext4load mmc 1:1 $initrd_addr $initrd_image
|
||||
ext4load mmc 1:1 $fdt_addr_r $fdt_name
|
||||
|
||||
booti $kernel_addr_r $initrd_addr $fdt_addr_r
|
||||
# mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr
|
||||
@@ -2361,7 +2361,7 @@ CONFIG_FIXED_PHY=y
|
||||
# CONFIG_LSI_ET1011C_PHY is not set
|
||||
# CONFIG_LXT_PHY is not set
|
||||
CONFIG_MARVELL_PHY=y
|
||||
# CONFIG_MARVELL_10G_PHY is not set
|
||||
CONFIG_MARVELL_10G_PHY=y
|
||||
# CONFIG_MICREL_PHY is not set
|
||||
CONFIG_MICROCHIP_PHY=m
|
||||
# CONFIG_MICROSEMI_PHY is not set
|
||||
@@ -5232,7 +5232,7 @@ CONFIG_RESET_CONTROLLER=y
|
||||
CONFIG_GENERIC_PHY=y
|
||||
CONFIG_PHY_XGENE=y
|
||||
# CONFIG_BCM_KONA_USB2_PHY is not set
|
||||
# CONFIG_PHY_MVEBU_CP110_COMPHY is not set
|
||||
CONFIG_PHY_MVEBU_CP110_COMPHY=y
|
||||
# CONFIG_PHY_PXA_28NM_HSIC is not set
|
||||
# CONFIG_PHY_PXA_28NM_USB2 is not set
|
||||
CONFIG_PHY_SAMSUNG_USB2=m
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
ARCH=arm64
|
||||
KERNEL_IMAGE_TYPE=Image
|
||||
|
||||
BOOTSCRIPT="boot-espressobin.cmd:boot.cmd"
|
||||
UBOOT_TARGET_MAP="DEVICE_TREE=armada-3720-espressobin ;;flash-image-*.bin"
|
||||
|
||||
BOOTSOURCE='https://github.com/MarvellEmbeddedProcessors/u-boot-marvell.git'
|
||||
BOOTDIR=$MAINLINE_UBOOT_DIR
|
||||
BOOTBRANCH='branch:u-boot-2018.03-armada-18.12'
|
||||
@@ -17,7 +14,23 @@ ATFDIR='arm-trusted-firmware-espressobin'
|
||||
ATFBRANCH='branch:atf-v1.5-armada-18.12'
|
||||
ATF_USE_GCC='> 7.2'
|
||||
ATF_COMPILER='aarch64-linux-gnu-'
|
||||
ATF_TARGET_MAP='DEBUG=1 USE_COHERENT_MEM=0 LOG_LEVEL=20 SECURE=0 CLOCKSPRESET=CPU_800_DDR_800 DDR_TOPOLOGY=2 BOOTDEV=SPINOR PARTNUM=0 PLAT=a3700;;build/a3700/debug/bl31.bin'
|
||||
|
||||
if [[ $BOARD = macchiatobin-doubleshot ]]; then
|
||||
export SCP_BL2=$SRC/cache/sources/marvell-binaries/mrvl_scp_bl2.img
|
||||
|
||||
ATF_TARGET_MAP="DEBUG=1 USE_COHERENT_MEM=0 LOG_LEVEL=20 MV_DDR_PATH=$SRC/cache/sources/marvell-ddr SECURE=0 PLAT=a80x0_mcbin;;build/a80x0_mcbin/debug/bl31.bin"
|
||||
UBOOT_TARGET_MAP="DEVICE_TREE=armada-8040-mcbin ;;flash-image.bin"
|
||||
|
||||
BOOTSCRIPT="boot-macchiatobin-doubleshot.cmd:boot.cmd"
|
||||
SERIALCON='ttyS0'
|
||||
else
|
||||
ATF_TARGET_MAP="DEBUG=1 USE_COHERENT_MEM=0 LOG_LEVEL=20 SECURE=0 CLOCKSPRESET=CPU_800_DDR_800 DDR_TOPOLOGY=2 BOOTDEV=SPINOR PARTNUM=0 PLAT=a3700;;build/a3700/debug/bl31.bin"
|
||||
UBOOT_TARGET_MAP="DEVICE_TREE=armada-3720-espressobin ;;flash-image-*.bin"
|
||||
|
||||
BOOTSCRIPT="boot-espressobin.cmd:boot.cmd"
|
||||
SERIALCON='ttyMV0'
|
||||
fi
|
||||
|
||||
case $BRANCH in
|
||||
|
||||
default)
|
||||
@@ -42,14 +55,16 @@ CPUMIN=200000
|
||||
CPUMAX=1300000
|
||||
GOVERNOR=ondemand
|
||||
|
||||
SERIALCON='ttyMV0'
|
||||
|
||||
NM_IGNORE_DEVICES="interface-name:eth*,interface-name:wan*,interface-name:lan*,interface-name:br*"
|
||||
|
||||
write_uboot_platform()
|
||||
{
|
||||
# flashing process via u-boot only for now https://www.armbian.com/espressobin/
|
||||
/bin/true
|
||||
if [[ $BOARD = macchiatobin-doubleshot ]]; then
|
||||
dd if=$1/flash-image.bin of=$2 bs=512 seek=1 status=noxfer > /dev/null 2>&1
|
||||
else
|
||||
# flashing process via u-boot only for now https://www.armbian.com/espressobin/
|
||||
/bin/true
|
||||
fi
|
||||
}
|
||||
|
||||
family_tweaks()
|
||||
@@ -79,21 +94,34 @@ uboot_custom_postprocess()
|
||||
local atfdir="$SRC/cache/sources/$ATFDIR/${ATFBRANCH##*:}"
|
||||
local ubootdir="$SRC/cache/sources/$BOOTDIR/${BOOTBRANCH##*:}"
|
||||
cd $atfdir
|
||||
clocks=( 600_600 800_800 1000_800 1200_750 )
|
||||
topology=( 512m_1cs_0 512m_2cs_0 1g_2cs_2 1g_1cs_4 2g_2cs_2 1g_1cs_5 2g_2cs_6 )
|
||||
for i in "${clocks[@]}"
|
||||
do
|
||||
for j in "${topology[@]}"
|
||||
do
|
||||
if [[ $j = *cs_5 || $j = *cs_6 ]]; then local ddrname="DDR4"; else ddrname="DDR3"; fi
|
||||
FILENAME="flash-image-$ddrname-$j-$i.bin"
|
||||
DDR_TOPOLOGY="${j##*_}"
|
||||
CLOCKSPRESET="CPU_${i%_*}_DDR_${i##*_}"
|
||||
display_alert "Building $FILENAME" "" "info"
|
||||
make distclean >> $DEST/debug/compilation.log 2>&1
|
||||
make MV_DDR_PATH=$SRC/cache/sources/marvell-ddr CROSS_COMPILE=$ATF1 DEBUG=1 USE_COHERENT_MEM=0 LOG_LEVEL=20 SECURE=0 CLOCKSPRESET=$CLOCKSPRESET DDR_TOPOLOGY=$DDR_TOPOLOGY BOOTDEV=SPINOR PARTNUM=0 PLAT=a3700 all fip BL33=$BL33 WTP=$SRC/cache/sources/marvell-tools $CTHREADS CROSS_CM3=$ATF2 >> $DEST/debug/compilation.log 2>&1
|
||||
cp build/a3700/debug/flash-image.bin $ubootdir/$FILENAME
|
||||
done
|
||||
done
|
||||
|
||||
if [[ $BOARD = macchiatobin-doubleshot ]]; then
|
||||
make distclean >> $DEST/debug/compilation.log 2>&1
|
||||
|
||||
FILENAME="flash-image.bin"
|
||||
display_alert "Building $FILENAME" "" "info"
|
||||
# http://wiki.macchiatobin.net/tiki-index.php?page=Build+from+source+-+Bootloader#Building_ATF
|
||||
make distclean >> $DEST/debug/compilation.log 2>&1
|
||||
make USE_COHERENT_MEM=0 LOG_LEVEL=20 MV_DDR_PATH=$SRC/cache/sources/marvell-ddr PLAT=a80x0_mcbin CROSS_COMPILE=$ATF1 BL33=$BL33 all fip $CTHREADS >> $DEST/debug/compilation.log 2>&1
|
||||
cp build/a80x0_mcbin/release/flash-image.bin $ubootdir/$FILENAME
|
||||
else
|
||||
clocks=( 600_600 800_800 1000_800 1200_750 )
|
||||
topology=( 512m_1cs_0 512m_2cs_0 1g_2cs_2 1g_1cs_4 2g_2cs_2 1g_1cs_5 2g_2cs_6 )
|
||||
for i in "${clocks[@]}"
|
||||
do
|
||||
for j in "${topology[@]}"
|
||||
do
|
||||
if [[ $j = *cs_5 || $j = *cs_6 ]]; then local ddrname="DDR4"; else ddrname="DDR3"; fi
|
||||
FILENAME="flash-image-$ddrname-$j-$i.bin"
|
||||
DDR_TOPOLOGY="${j##*_}"
|
||||
CLOCKSPRESET="CPU_${i%_*}_DDR_${i##*_}"
|
||||
display_alert "Building $FILENAME" "" "info"
|
||||
make distclean >> $DEST/debug/compilation.log 2>&1
|
||||
make MV_DDR_PATH=$SRC/cache/sources/marvell-ddr CROSS_COMPILE=$ATF1 DEBUG=1 USE_COHERENT_MEM=0 LOG_LEVEL=20 SECURE=0 CLOCKSPRESET=$CLOCKSPRESET DDR_TOPOLOGY=$DDR_TOPOLOGY BOOTDEV=SPINOR PARTNUM=0 PLAT=a3700 all fip BL33=$BL33 WTP=$SRC/cache/sources/marvell-tools $CTHREADS CROSS_CM3=$ATF2 >> $DEST/debug/compilation.log 2>&1
|
||||
cp build/a3700/debug/flash-image.bin $ubootdir/$FILENAME
|
||||
done
|
||||
done
|
||||
fi
|
||||
|
||||
cd $ubootdir
|
||||
}
|
||||
|
||||
@@ -299,6 +299,7 @@ if [[ $IGNORE_UPDATES != yes ]]; then
|
||||
fetch_from_repo "https://github.com/armbian/rkbin" "rkbin-tools" "branch:master"
|
||||
fetch_from_repo "https://github.com/MarvellEmbeddedProcessors/A3700-utils-marvell" "marvell-tools" "branch:A3700_utils-armada-18.12"
|
||||
fetch_from_repo "https://github.com/MarvellEmbeddedProcessors/mv-ddr-marvell.git" "marvell-ddr" "branch:mv_ddr-armada-18.12"
|
||||
fetch_from_repo "https://github.com/MarvellEmbeddedProcessors/binaries-marvell" "marvell-binaries" "branch:binaries-marvell-armada-18.12"
|
||||
fetch_from_repo "https://github.com/armbian/odroidc2-blobs" "odroidc2-blobs" "branch:master"
|
||||
fetch_from_repo "https://git.zx2c4.com/WireGuard" "wireguard" "branch:master"
|
||||
fetch_from_repo "https://github.com/aircrack-ng/rtl8812au" "rtl8812au" "branch:v5.2.20"
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
diff --git a/configs/mvebu_mcbin-88f8040_defconfig b/configs/mvebu_mcbin-88f8040_defconfig
|
||||
index bccbc89..2fd7003 100644
|
||||
--- a/configs/mvebu_mcbin-88f8040_defconfig
|
||||
+++ b/configs/mvebu_mcbin-88f8040_defconfig
|
||||
@@ -9,7 +9,7 @@ CONFIG_DEBUG_UART=y
|
||||
CONFIG_AHCI=y
|
||||
CONFIG_DISTRO_DEFAULTS=y
|
||||
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
|
||||
-CONFIG_BOOTCOMMAND="run get_images; run set_bootargs; booti $kernel_addr $ramfs_addr $fdt_addr"
|
||||
+CONFIG_BOOTCOMMAND="ext4load mmc 1:1 ${scriptaddr} /boot/boot.scr;source ${scriptaddr}"
|
||||
CONFIG_SYS_CONSOLE_ENV_OVERWRITE=y
|
||||
CONFIG_SYS_CONSOLE_INFO_QUIET=y
|
||||
# CONFIG_DISPLAY_CPUINFO is not set
|
||||
@@ -33,7 +33,7 @@ CONFIG_CMD_MVEBU_PHY_FW_DOWNLOAD=y
|
||||
CONFIG_CMD_REGULATOR=y
|
||||
CONFIG_CMD_EXT4_WRITE=y
|
||||
CONFIG_MAC_PARTITION=y
|
||||
-CONFIG_ENV_IS_IN_SPI_FLASH=y
|
||||
+CONFIG_ENV_IS_NOWHERE=y
|
||||
CONFIG_SCSI_AHCI=y
|
||||
CONFIG_AHCI_MVEBU=y
|
||||
CONFIG_BLOCK_CACHE=y
|
||||
diff --git a/include/configs/mvebu_armada-common.h b/include/configs/mvebu_armada-common.h
|
||||
index 84be257..417dbdc 100644
|
||||
--- a/include/configs/mvebu_armada-common.h
|
||||
+++ b/include/configs/mvebu_armada-common.h
|
||||
@@ -34,7 +34,7 @@
|
||||
#define CONFIG_ETHPRIME "eth0"
|
||||
#define CONFIG_ROOTPATH "/srv/nfs/" /* Default Dir for NFS */
|
||||
#define CONFIG_ENV_OVERWRITE /* ethaddr can be reprogrammed */
|
||||
-#define CONFIG_EXTRA_ENV_SETTINGS "bootcmd=run get_images; " \
|
||||
+#define CONFIG_EXTRA_ENV_SETTINGS "nfsboot=run get_images; " \
|
||||
"run set_bootargs; " \
|
||||
"booti $kernel_addr_r " \
|
||||
"$ramdisk_addr_r " \
|
||||
@@ -43,6 +43,7 @@
|
||||
"kernel_addr_r=0x7000000\0" \
|
||||
"initrd_addr=0xa00000\0" \
|
||||
"initrd_size=0x2000000\0" \
|
||||
+ "scriptaddr=0x6e00000\0" \
|
||||
"fdt_addr_r=0x6f00000\0" \
|
||||
"loadaddr=0x6000000\0" \
|
||||
"fdt_high=0xffffffffffffffff\0" \
|
||||
Reference in New Issue
Block a user