167 lines
4.5 KiB
Diff
167 lines
4.5 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Igor Pecovnik <igor.pecovnik@****l.com>
|
|
Date: Tue, 13 Jun 2023 14:21:30 +0000
|
|
Subject: Patching u-boot mt7623 files include/configs/mt7623.h
|
|
mt7623n_bpir2_defconfig
|
|
|
|
Signed-off-by: Igor Pecovnik <igor.pecovnik@****l.com>
|
|
---
|
|
include/configs/mt7623.h | 48 ++++++-
|
|
mt7623n_bpir2_defconfig | 70 ++++++++++
|
|
2 files changed, 113 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/include/configs/mt7623.h b/include/configs/mt7623.h
|
|
index db12377b00..3fb983060f 100644
|
|
--- a/include/configs/mt7623.h
|
|
+++ b/include/configs/mt7623.h
|
|
@@ -22,15 +22,31 @@
|
|
|
|
/* DRAM */
|
|
#define CFG_SYS_SDRAM_BASE 0x80000000
|
|
|
|
/* This is needed for kernel booting */
|
|
-#define FDT_HIGH "0xac000000"
|
|
+#define SCRIPT_BOOT \
|
|
+ "fileload=${mmctype}load mmc ${devnum}:${mmcpart} " \
|
|
+ "${loadaddr} ${mmcfile}\0" \
|
|
+ "kernload=setenv loadaddr ${kernel_addr_r};" \
|
|
+ "setenv mmcfile ${mmckernfile};" \
|
|
+ "run fileload\0" \
|
|
+ "initrdload=setenv loadaddr ${rdaddr};" \
|
|
+ "setenv mmcfile ${mmcinitrdfile};" \
|
|
+ "run fileload\0" \
|
|
+ "fdtload=setenv loadaddr ${fdtaddr};" \
|
|
+ "setenv mmcfile ${mmcfdtfile};" \
|
|
+ "run fileload\0" \
|
|
+ "scriptload=setenv loadaddr ${scriptaddr};" \
|
|
+ "setenv mmcfile ${mmcscriptfile};" \
|
|
+ "run fileload\0" \
|
|
+ "scriptboot=echo Running ${mmcscriptfile} from: mmc ${devnum}:${mmcpart} using ${mmcscriptfile};" \
|
|
+ "source ${scriptaddr};" \
|
|
|
|
#define ENV_MEM_LAYOUT_SETTINGS \
|
|
"fdt_high=" FDT_HIGH "\0" \
|
|
- "kernel_addr_r=0x84000000\0" \
|
|
+ "kernel_addr_r=0x82000000\0" \
|
|
"fdt_addr_r=" FDT_HIGH "\0" \
|
|
"fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0"
|
|
|
|
/* Ethernet */
|
|
|
|
@@ -41,11 +57,33 @@
|
|
|
|
#include <config_distro_bootcmd.h>
|
|
|
|
/* Extra environment variables */
|
|
#define CFG_EXTRA_ENV_SETTINGS \
|
|
- ENV_MEM_LAYOUT_SETTINGS \
|
|
- BOOTENV
|
|
-
|
|
+ "loadaddr=0x82000000\0" \
|
|
+ "kernel_addr_r=0x82000000\0" \
|
|
+ "scriptaddr=0x85F80000\0" \
|
|
+ "fdtaddr=0x86000000\0" \
|
|
+ "fdt_addr_r=0x86000000\0" \
|
|
+ "rdaddr=0x86080000\0" \
|
|
+ "ramdisk_addr_r=0x86080000\0" \
|
|
+ "bootm_size=0x10000000\0" \
|
|
+ "mmckernfile=boot/zImage\0" \
|
|
+ "mmcinitrdfile= boot/uInitrd\0" \
|
|
+ "mmcfdtfile=boot/dtb/mt7623n-bananapi-bpi-r2.dtb\0" \
|
|
+ "mmcscriptfile=boot/boot.scr\0" \
|
|
+ "mmctype=ext4\0" \
|
|
+ "devnum=1\0" \
|
|
+ "mmcpart=1\0" \
|
|
+ SCRIPT_BOOT
|
|
+
|
|
+#define CONFIG_BOOTCOMMAND \
|
|
+ "mmc dev 1;" \
|
|
+ "run scriptload;" \
|
|
+ "run scriptboot;" \
|
|
+ "setenv devnum 0;" \
|
|
+ "mmc dev 0;" \
|
|
+ "run scriptload;" \
|
|
+ "run scriptboot"
|
|
#endif /* ifdef CONFIG_DISTRO_DEFAULTS*/
|
|
|
|
#endif
|
|
diff --git a/mt7623n_bpir2_defconfig b/mt7623n_bpir2_defconfig
|
|
new file mode 100644
|
|
index 0000000000..ea8301a604
|
|
--- /dev/null
|
|
+++ b/mt7623n_bpir2_defconfig
|
|
@@ -0,0 +1,70 @@
|
|
+CONFIG_ARM=y
|
|
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
|
|
+CONFIG_SYS_THUMB_BUILD=y
|
|
+CONFIG_ARCH_MEDIATEK=y
|
|
+CONFIG_TEXT_BASE=0x81e00000
|
|
+CONFIG_SYS_MALLOC_F_LEN=0x4000
|
|
+CONFIG_NR_DRAM_BANKS=1
|
|
+CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
|
|
+CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x81ffff10
|
|
+CONFIG_ENV_SIZE=0x1000
|
|
+CONFIG_ENV_OFFSET=0x100000
|
|
+CONFIG_DEFAULT_DEVICE_TREE="mt7623n-bananapi-bpi-r2"
|
|
+CONFIG_SYS_PROMPT="U-Boot> "
|
|
+CONFIG_CMD_BOOTZ=y
|
|
+CONFIG_TARGET_MT7623=y
|
|
+CONFIG_SYS_LOAD_ADDR=0x84000000
|
|
+CONFIG_FIT=y
|
|
+CONFIG_FIT_VERBOSE=y
|
|
+CONFIG_DISTRO_DEFAULTS=y
|
|
+CONFIG_BOOTDELAY=3
|
|
+CONFIG_DEFAULT_FDT_FILE="mt7623n-bananapi-bpi-r2.dtb"
|
|
+CONFIG_SYS_CONSOLE_IS_IN_ENV=y
|
|
+# CONFIG_DISPLAY_BOARDINFO is not set
|
|
+CONFIG_SYS_MAXARGS=8
|
|
+CONFIG_SYS_PBSIZE=1049
|
|
+CONFIG_SYS_BOOTM_LEN=0x4000000
|
|
+CONFIG_CMD_BOOTMENU=y
|
|
+# CONFIG_CMD_ELF is not set
|
|
+# CONFIG_CMD_XIMG is not set
|
|
+CONFIG_CMD_GPIO=y
|
|
+CONFIG_CMD_GPT=y
|
|
+CONFIG_CMD_MMC=y
|
|
+CONFIG_CMD_READ=y
|
|
+CONFIG_CMD_EXT4=y
|
|
+CONFIG_CMD_EXT4_WRITE=y
|
|
+CONFIG_FS_EXT4=y
|
|
+CONFIG_EXT4_WRITE=y
|
|
+# CONFIG_CMD_SETEXPR is not set
|
|
+# CONFIG_CMD_NFS is not set
|
|
+CONFIG_ENV_OVERWRITE=y
|
|
+CONFIG_ENV_IS_IN_MMC=y
|
|
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
|
+CONFIG_NET_RANDOM_ETHADDR=y
|
|
+CONFIG_USE_IPADDR=y
|
|
+CONFIG_IPADDR="192.168.1.1"
|
|
+CONFIG_USE_SERVERIP=y
|
|
+CONFIG_SERVERIP="192.168.1.2"
|
|
+CONFIG_REGMAP=y
|
|
+CONFIG_SYSCON=y
|
|
+CONFIG_CLK=y
|
|
+# CONFIG_MMC_QUIRKS is not set
|
|
+CONFIG_SUPPORT_EMMC_BOOT=y
|
|
+CONFIG_MMC_HS400_SUPPORT=y
|
|
+CONFIG_MMC_MTK=y
|
|
+CONFIG_PHY_FIXED=y
|
|
+CONFIG_MEDIATEK_ETH=y
|
|
+CONFIG_PINCTRL=y
|
|
+CONFIG_PINCONF=y
|
|
+CONFIG_PINCTRL_MT7623=y
|
|
+CONFIG_POWER_DOMAIN=y
|
|
+CONFIG_MTK_POWER_DOMAIN=y
|
|
+CONFIG_DM_SERIAL=y
|
|
+CONFIG_MTK_SERIAL=y
|
|
+CONFIG_SYSRESET=y
|
|
+CONFIG_SYSRESET_WATCHDOG=y
|
|
+CONFIG_TIMER=y
|
|
+CONFIG_MTK_TIMER=y
|
|
+CONFIG_WDT_MTK=y
|
|
+CONFIG_LZMA=y
|
|
+# CONFIG_EFI_GRUB_ARM32_WORKAROUND is not set
|
|
--
|
|
Created with Armbian build tools https://github.com/armbian/build
|
|
|