mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
SpacemiT: Update opensbi and u-boot to TAG v2.2.7
Signed-off-by: Patrick Yavitz <pyavitz@gmail.com>
This commit is contained in:
committed by
c0rnelius
parent
684936ea72
commit
69f068fd0c
@@ -16,12 +16,12 @@ declare -g ATF_USE_GCC="> 8.0"
|
||||
declare -g ATF_COMPILER="riscv64-linux-gnu-"
|
||||
declare -g ATFSOURCE="https://gitee.com/bianbu-linux/opensbi.git"
|
||||
declare -g ATFDIR="opensbi"
|
||||
declare -g ATFBRANCH="tag:k1-bl-v2.2-release"
|
||||
declare -g ATFBRANCH="tag:k1-bl-v2.2.7-release"
|
||||
declare -g ATF_TARGET_MAP="PLATFORM_DEFCONFIG=k1_defconfig PLATFORM=generic ;;build/platform/generic/firmware/fw_dynamic.itb"
|
||||
|
||||
# U-Boot
|
||||
declare -g BOOTSOURCE="https://gitee.com/bianbu-linux/uboot-2022.10.git"
|
||||
declare -g BOOTBRANCH="${BOOTBRANCH_BOARD:-"tag:k1-bl-v2.2-release"}"
|
||||
declare -g BOOTBRANCH="${BOOTBRANCH_BOARD:-"tag:k1-bl-v2.2.7-release"}"
|
||||
declare -g BOOTDIR='u-boot-spacemit'
|
||||
declare -g BOOTPATCHDIR="${BOOTPATCHDIR:-"legacy/u-boot-spacemit-k1"}"
|
||||
declare -g UBOOT_TARGET_MAP=";;bootinfo_emmc.bin FSBL.bin u-boot.itb fw_dynamic.itb"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
From 62546ea022aba5caab95f9875880671c58154f17 Mon Sep 17 00:00:00 2001
|
||||
From c1bde89e63be8bc517f3514a9d352a28179d9cee Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Yavitz <pyavitz@gmail.com>
|
||||
Date: Sat, 9 Aug 2025 06:47:10 -0400
|
||||
Date: Sun, 21 Sep 2025 11:40:14 -0400
|
||||
Subject: [PATCH] Use default AUTOBOOT
|
||||
|
||||
Signed-off-by: Patrick Yavitz <pyavitz@gmail.com>
|
||||
@@ -9,10 +9,10 @@ Signed-off-by: Patrick Yavitz <pyavitz@gmail.com>
|
||||
1 file changed, 2 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/configs/k1_defconfig b/configs/k1_defconfig
|
||||
index f0f6b869..4f419bc1 100644
|
||||
index 29aca4ce..8861f32a 100644
|
||||
--- a/configs/k1_defconfig
|
||||
+++ b/configs/k1_defconfig
|
||||
@@ -37,10 +37,6 @@ CONFIG_SPL_LOAD_FIT_ADDRESS=0x11000000
|
||||
@@ -37,10 +37,6 @@ CONFIG_SPL_LOAD_FIT_ADDRESS=0x08000000
|
||||
CONFIG_LEGACY_IMAGE_FORMAT=y
|
||||
CONFIG_SUPPORT_RAW_INITRD=y
|
||||
CONFIG_OF_BOARD_SETUP=y
|
||||
@@ -20,7 +20,7 @@ index f0f6b869..4f419bc1 100644
|
||||
-CONFIG_AUTOBOOT_KEYED=y
|
||||
-CONFIG_AUTOBOOT_STOP_STR="s"
|
||||
-CONFIG_USE_BOOTCOMMAND=y
|
||||
CONFIG_BOOTCOMMAND="bootm 0x11000000"
|
||||
CONFIG_BOOTCOMMAND="bootm 0x08000000"
|
||||
CONFIG_LOGLEVEL=7
|
||||
CONFIG_SPL_LOGLEVEL=1
|
||||
@@ -113,6 +109,7 @@ CONFIG_CMD_PXE=y
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
From a29d5bb1e7c83496b4cebadc735e3c6256a090ad Mon Sep 17 00:00:00 2001
|
||||
From bcdf09cc4dc59f483e362b6f6f8f090257f4c383 Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Yavitz <pyavitz@gmail.com>
|
||||
Date: Mon, 11 Aug 2025 06:15:56 -0400
|
||||
Date: Sun, 21 Sep 2025 12:16:15 -0400
|
||||
Subject: [PATCH] Add syslinux and script support
|
||||
|
||||
Signed-off-by: Patrick Yavitz <pyavitz@gmail.com>
|
||||
---
|
||||
board/spacemit/k1-x/k1-x.env | 279 ++++-------------------------------
|
||||
board/spacemit/k1-x/k1x.c | 20 +--
|
||||
board/spacemit/k1-x/k1-x.env | 346 +++--------------------------------
|
||||
board/spacemit/k1-x/k1x.c | 20 +-
|
||||
configs/k1_defconfig | 1 +
|
||||
include/configs/k1-x.h | 21 ++-
|
||||
4 files changed, 47 insertions(+), 274 deletions(-)
|
||||
include/configs/k1-x.h | 21 +--
|
||||
4 files changed, 47 insertions(+), 341 deletions(-)
|
||||
|
||||
diff --git a/board/spacemit/k1-x/k1-x.env b/board/spacemit/k1-x/k1-x.env
|
||||
index f4dadc9a..67c5f1b7 100644
|
||||
index cd1ed726..67c5f1b7 100644
|
||||
--- a/board/spacemit/k1-x/k1-x.env
|
||||
+++ b/board/spacemit/k1-x/k1-x.env
|
||||
@@ -1,253 +1,26 @@
|
||||
@@ -1,320 +1,26 @@
|
||||
-// Common parameter
|
||||
-earlycon=sbi
|
||||
-init=/init
|
||||
@@ -35,6 +35,14 @@ index f4dadc9a..67c5f1b7 100644
|
||||
-// eMMC/SDCard rootfs device
|
||||
-mmc_rootfstype=ext4
|
||||
-
|
||||
-// NAND UBI rootfs device
|
||||
-nand_rootfstype=ubifs
|
||||
-nand_ubi_mtd=6
|
||||
-nand_ubi_dev=0
|
||||
-nand_ubi_bootfs_vol=bootfs
|
||||
-nand_ubi_rootfs_vol=rootfs
|
||||
-nand_mtd_name=user
|
||||
-
|
||||
-// rootfs part number must less than 99
|
||||
-rootfs_part_to_ul=echo "set rootfs_part to ul"; setexpr temp_num_0 ${rootfs_part} / a; \
|
||||
- setexpr temp_num_1 ${rootfs_part} % a; \
|
||||
@@ -197,6 +205,66 @@ index f4dadc9a..67c5f1b7 100644
|
||||
- echo "########### boot failed by default config, check your boot config #############"
|
||||
-
|
||||
-//##############################################################################
|
||||
-# spinand_ubifs boot
|
||||
-fastboot_ubi_size=16
|
||||
-ubifs_list= mtd list; \
|
||||
- ubifsls;
|
||||
-ubifs_loadimg=echo "Loading kernel image..."; \
|
||||
- if ubifsload ${kernel_addr_r} Image.itb; then \
|
||||
- echo "Loaded Image.itb successfully"; \
|
||||
- setenv boot_cmd "bootm"; \
|
||||
- elif ubifsload ${kernel_addr_r} Image; then \
|
||||
- echo "Loaded Image successfully"; \
|
||||
- setenv boot_cmd "booti"; \
|
||||
- else \
|
||||
- echo "Failed to load kernel image"; \
|
||||
- setenv boot_cmd ""; \
|
||||
- fi;
|
||||
-
|
||||
-ubifs_boot=echo "Trying to boot from UBIFS..."; \
|
||||
- run ubifs_loadimg; \
|
||||
- if test -n "${boot_cmd}"; then \
|
||||
- ${boot_cmd} ${kernel_addr_r}; \
|
||||
- else \
|
||||
- echo "No valid kernel image found"; \
|
||||
- fi;
|
||||
-
|
||||
-# Nand boot
|
||||
-set_nand_args=setenv bootargs "${bootargs}" mtdparts=${mtdparts} root=ubi${nand_ubi_dev}:${nand_ubi_rootfs_vol} rootfstype=${nand_rootfstype} ubi.mtd=${nand_ubi_mtd};
|
||||
-
|
||||
-nand_boot=echo "Try to boot from nand flash..."; \
|
||||
- run commonargs; \
|
||||
- run add_bootarg; \
|
||||
- run set_nand_args; \
|
||||
- echo "bootargs: ${bootargs}"; \
|
||||
- run detect_dtb; \
|
||||
- run ubifs_list; \
|
||||
- run ubifs_loadimg; \
|
||||
- if test -n "${boot_cmd}"; then \
|
||||
- if test "${boot_cmd}" = "bootm"; then \
|
||||
- echo "Booting FIT image with embedded DTB and ramdisk..."; \
|
||||
- ${boot_cmd} ${kernel_addr_r}; \
|
||||
- else \
|
||||
- echo "Loading separate DTB and ramdisk for raw kernel..."; \
|
||||
- if test -e ${dtb_name}; then \
|
||||
- echo "Loading dtb from UBIFS..."; \
|
||||
- ubifsload ${dtb_addr} ${dtb_name}; \
|
||||
- fi; \
|
||||
- if test -e ${ramdisk_name}; then \
|
||||
- echo "Loading ramdisk from UBIFS..."; \
|
||||
- ubifsload ${ramdisk_addr} ${ramdisk_name}; \
|
||||
- setenv ramdisk_size ${filesize}; \
|
||||
- setenv ramdisk_combo ${ramdisk_addr}:${ramdisk_size}; \
|
||||
- else \
|
||||
- setenv ramdisk_combo -; \
|
||||
- fi; \
|
||||
- echo "Booting with ${boot_cmd} command..."; \
|
||||
- ${boot_cmd} ${kernel_addr_r} ${ramdisk_combo} ${dtb_addr}; \
|
||||
- fi; \
|
||||
- else \
|
||||
- echo "No valid kernel image found"; \
|
||||
- fi;
|
||||
-
|
||||
-// eMMC/SDCard boot
|
||||
-//##############################################################################
|
||||
-set_mmc_args=setenv bootargs "${bootargs}" rootwait rootfstype=${mmc_rootfstype};
|
||||
@@ -216,7 +284,7 @@ index f4dadc9a..67c5f1b7 100644
|
||||
-nfs_boot=echo "Try to boot from NFS ..."; \
|
||||
- run commonargs; \
|
||||
- run add_bootarg; \
|
||||
- setenv bootargs "${bootargs}" root=/dev/nfs nfsroot=${serverip}:${rootfs_path} bootfs=${serverip}:${bootfs_path} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}::${netdev}:off noipath; \
|
||||
- setenv bootargs "${bootargs}" root=/dev/nfs net.ifnames=0 nfsroot=${serverip}:${rootfs_path} bootfs=${serverip}:${bootfs_path} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}::${netdev}:off noipath; \
|
||||
- echo "bootargs: ${bootargs}"; \
|
||||
- run detect_dtb; \
|
||||
- echo "Loading kernel from NFS..."; \
|
||||
@@ -268,7 +336,6 @@ index f4dadc9a..67c5f1b7 100644
|
||||
-bootmenu_7="recovery from usb"=run flash_from_usb
|
||||
-bootmenu_8="recovery from mmc"=run flash_from_mmc
|
||||
-bootmenu_9="recovery from net"=run flash_from_net
|
||||
-
|
||||
+// SYSLINUX and SCRIPT Support
|
||||
+autoboot=if test -e ${devtype} ${devnum}:${distro_bootpart} /extlinux/extlinux.conf; then \
|
||||
+ sysboot ${devtype} ${devnum}:${distro_bootpart} any 0x2000000 /extlinux/extlinux.conf; \
|
||||
@@ -296,12 +363,12 @@ index f4dadc9a..67c5f1b7 100644
|
||||
+ nvme scan; \
|
||||
+ run autoboot
|
||||
diff --git a/board/spacemit/k1-x/k1x.c b/board/spacemit/k1-x/k1x.c
|
||||
index b2fc28c8..4c788689 100644
|
||||
index 8d0ee1b5..135b7a9c 100644
|
||||
--- a/board/spacemit/k1-x/k1x.c
|
||||
+++ b/board/spacemit/k1-x/k1x.c
|
||||
@@ -530,8 +530,8 @@ void _load_env_from_blk(struct blk_desc *dev_desc, const char *dev_name, int dev
|
||||
#endif
|
||||
}
|
||||
@@ -523,8 +523,8 @@ void _load_env_from_blk(struct blk_desc *dev_desc, const char *dev_name, int dev
|
||||
if (part > MAX_SEARCH_PARTITIONS)
|
||||
return;
|
||||
|
||||
- env_set("bootfs_part", simple_itoa(part));
|
||||
- env_set("bootfs_devname", dev_name);
|
||||
@@ -310,7 +377,7 @@ index b2fc28c8..4c788689 100644
|
||||
|
||||
/*load env.txt and import to uboot*/
|
||||
memset((void *)CONFIG_SPL_LOAD_FIT_ADDRESS, 0, CONFIG_ENV_SIZE);
|
||||
@@ -734,7 +734,7 @@ void setenv_boot_mode(void)
|
||||
@@ -739,7 +739,7 @@ void setenv_boot_mode(void)
|
||||
u32 boot_mode = get_boot_mode();
|
||||
switch (boot_mode) {
|
||||
case BOOT_MODE_NAND:
|
||||
@@ -319,7 +386,7 @@ index b2fc28c8..4c788689 100644
|
||||
break;
|
||||
case BOOT_MODE_NOR:
|
||||
char *blk_name;
|
||||
@@ -745,23 +745,23 @@ void setenv_boot_mode(void)
|
||||
@@ -750,23 +750,23 @@ void setenv_boot_mode(void)
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -351,7 +418,7 @@ index b2fc28c8..4c788689 100644
|
||||
}
|
||||
}
|
||||
diff --git a/configs/k1_defconfig b/configs/k1_defconfig
|
||||
index 4f419bc1..05337aaf 100644
|
||||
index 29908a84..d29bc189 100644
|
||||
--- a/configs/k1_defconfig
|
||||
+++ b/configs/k1_defconfig
|
||||
@@ -291,3 +291,4 @@ CONFIG_PRINT_TIMESTAMP=y
|
||||
|
||||
Reference in New Issue
Block a user