mirror of
https://github.com/Fishwaldo/build.git
synced 2025-03-28 09:41:41 +00:00
96 lines
2.7 KiB
Diff
96 lines
2.7 KiB
Diff
diff --git a/configs/mt7623n_bpir2_defconfig b/configs/mt7623n_bpir2_defconfig
|
|
index ae4fb28..ea7f7aa 100644
|
|
--- a/configs/mt7623n_bpir2_defconfig
|
|
+++ b/configs/mt7623n_bpir2_defconfig
|
|
@@ -12,6 +12,7 @@ CONFIG_DEFAULT_FDT_FILE="mt7623n-bananapi-bpi-r2"
|
|
# CONFIG_DISPLAY_BOARDINFO is not set
|
|
CONFIG_HUSH_PARSER=y
|
|
CONFIG_SYS_PROMPT="U-Boot> "
|
|
+CONFIG_CMD_BOOTZ=y
|
|
CONFIG_CMD_BOOTMENU=y
|
|
# CONFIG_CMD_ELF is not set
|
|
# CONFIG_CMD_XIMG is not set
|
|
@@ -24,6 +25,8 @@ CONFIG_CMD_READ=y
|
|
# CONFIG_CMD_SETEXPR is not set
|
|
# CONFIG_CMD_NFS is not set
|
|
CONFIG_CMD_PING=y
|
|
+CONFIG_CMD_EXT4=y
|
|
+CONFIG_CMD_EXT4_WRITE=y
|
|
CONFIG_CMD_FAT=y
|
|
CONFIG_CMD_FS_GENERIC=y
|
|
CONFIG_OF_EMBED=y
|
|
@@ -49,5 +52,7 @@ CONFIG_SYSRESET_WATCHDOG=y
|
|
CONFIG_TIMER=y
|
|
CONFIG_MTK_TIMER=y
|
|
CONFIG_WDT_MTK=y
|
|
+CONFIG_FS_EXT4=y
|
|
+CONFIG_EXT4_WRITE=y
|
|
CONFIG_LZMA=y
|
|
# CONFIG_EFI_LOADER is not set
|
|
diff --git a/include/configs/mt7623.h b/include/configs/mt7623.h
|
|
index ba76350..50c742e 100644
|
|
--- a/include/configs/mt7623.h
|
|
+++ b/include/configs/mt7623.h
|
|
@@ -36,7 +36,7 @@
|
|
GENERATED_GBL_DATA_SIZE)
|
|
|
|
/* UBoot -> Kernel */
|
|
-#define CONFIG_LOADADDR 0x84000000
|
|
+#define CONFIG_LOADADDR 0x82000000
|
|
#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
|
|
|
|
/* MMC */
|
|
@@ -46,11 +46,50 @@
|
|
/* DRAM */
|
|
#define CONFIG_SYS_SDRAM_BASE 0x80000000
|
|
|
|
-/* This is needed for kernel booting */
|
|
-#define FDT_HIGH "fdt_high=0xac000000\0"
|
|
+#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};" \
|
|
|
|
/* Extra environment variables */
|
|
#define CONFIG_EXTRA_ENV_SETTINGS \
|
|
- FDT_HIGH
|
|
+ "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
|