Set devtype devnum and distro_bootpart var when booting from nvme
This will ensure future boot scripts should function correctly. Tested-on: BPI-F3 and MusePi Pro Signed-off-by: Patrick Yavitz <pyavitz@gmail.com>
This commit is contained in:
parent
a4de6bfd42
commit
57694c740d
@ -1,18 +1,18 @@
|
|||||||
From 12836b75b818985a2059921b6882418a2dd60908 Mon Sep 17 00:00:00 2001
|
From 767d386dcc7422266d6afc0585b7b742f631bf28 Mon Sep 17 00:00:00 2001
|
||||||
From: Patrick Yavitz <pyavitz@gmail.com>
|
From: Patrick Yavitz <pyavitz@gmail.com>
|
||||||
Date: Fri, 20 Feb 2026 14:51:24 -0500
|
Date: Sat, 21 Feb 2026 15:56:32 -0500
|
||||||
Subject: [PATCH] Add uefi syslinux and script support
|
Subject: [PATCH] Add syslinux script and uefi support
|
||||||
|
|
||||||
Signed-off-by: Patrick Yavitz <pyavitz@gmail.com>
|
Signed-off-by: Patrick Yavitz <pyavitz@gmail.com>
|
||||||
---
|
---
|
||||||
board/spacemit/k1-x/k1-x.env | 366 +++--------------------------------
|
board/spacemit/k1-x/k1-x.env | 374 ++++-------------------------------
|
||||||
1 file changed, 30 insertions(+), 336 deletions(-)
|
1 file changed, 38 insertions(+), 336 deletions(-)
|
||||||
|
|
||||||
diff --git a/board/spacemit/k1-x/k1-x.env b/board/spacemit/k1-x/k1-x.env
|
diff --git a/board/spacemit/k1-x/k1-x.env b/board/spacemit/k1-x/k1-x.env
|
||||||
index 3499aec7..fe0242cd 100644
|
index 3499aec7..463cbd07 100644
|
||||||
--- a/board/spacemit/k1-x/k1-x.env
|
--- a/board/spacemit/k1-x/k1-x.env
|
||||||
+++ b/board/spacemit/k1-x/k1-x.env
|
+++ b/board/spacemit/k1-x/k1-x.env
|
||||||
@@ -1,336 +1,30 @@
|
@@ -1,336 +1,38 @@
|
||||||
-// Common parameter
|
-// Common parameter
|
||||||
-earlycon=sbi
|
-earlycon=sbi
|
||||||
-init=/init
|
-init=/init
|
||||||
@ -349,7 +349,12 @@ index 3499aec7..fe0242cd 100644
|
|||||||
-bootmenu_7="recovery from usb"=run flash_from_usb
|
-bootmenu_7="recovery from usb"=run flash_from_usb
|
||||||
-bootmenu_8="recovery from mmc"=run flash_from_mmc
|
-bootmenu_8="recovery from mmc"=run flash_from_mmc
|
||||||
-bootmenu_9="recovery from net"=run flash_from_net
|
-bootmenu_9="recovery from net"=run flash_from_net
|
||||||
+// Add UEFI, SYSLINUX and SCRIPT support
|
+// SYSLINUX, SCRIPT and UEFI Support
|
||||||
|
+
|
||||||
|
+nvme_devtype=nvme
|
||||||
|
+nvme_devnum=0
|
||||||
|
+nvme_bootpart=1
|
||||||
|
+
|
||||||
+autoboot=if test -e ${devtype} ${devnum}:${distro_bootpart} /extlinux/extlinux.conf; then \
|
+autoboot=if test -e ${devtype} ${devnum}:${distro_bootpart} /extlinux/extlinux.conf; then \
|
||||||
+ sysboot ${devtype} ${devnum}:${distro_bootpart} any 0x2000000 /extlinux/extlinux.conf; \
|
+ sysboot ${devtype} ${devnum}:${distro_bootpart} any 0x2000000 /extlinux/extlinux.conf; \
|
||||||
+ elif test -e ${devtype} ${devnum}:${distro_bootpart} /boot/extlinux/extlinux.conf; then \
|
+ elif test -e ${devtype} ${devnum}:${distro_bootpart} /boot/extlinux/extlinux.conf; then \
|
||||||
@ -362,16 +367,19 @@ index 3499aec7..fe0242cd 100644
|
|||||||
+ load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} EFI/BOOT/BOOTRISCV64.EFI; bootefi ${kernel_addr_r}; \
|
+ load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} EFI/BOOT/BOOTRISCV64.EFI; bootefi ${kernel_addr_r}; \
|
||||||
+ fi;
|
+ fi;
|
||||||
+ nvme part; \
|
+ nvme part; \
|
||||||
+ if test -e nvme 0:1 /extlinux/extlinux.conf; then \
|
+ setenv devtype $nvme_devtype; \
|
||||||
+ sysboot nvme 0:1 any 0x2000000 /extlinux/extlinux.conf; \
|
+ setenv devnum $nvme_devnum; \
|
||||||
+ elif test -e nvme 0:1 /boot/extlinux/extlinux.conf; then \
|
+ setenv distro_bootpart $nvme_bootpart; \
|
||||||
+ sysboot nvme 0:1 any 0x2000000 /boot/extlinux/extlinux.conf; \
|
+ if test -e ${devtype} ${devnum}:${distro_bootpart} /extlinux/extlinux.conf; then \
|
||||||
+ elif test -e nvme 0:1 /boot.scr; then \
|
+ sysboot ${devtype} ${devnum}:${distro_bootpart} any 0x2000000 /extlinux/extlinux.conf; \
|
||||||
+ load nvme 0:1 0x2000000 /boot.scr; source 0x2000000; \
|
+ elif test -e ${devtype} ${devnum}:${distro_bootpart} /boot/extlinux/extlinux.conf; then \
|
||||||
+ elif test -e nvme 0:1 /boot/boot.scr; then \
|
+ sysboot ${devtype} ${devnum}:${distro_bootpart} any 0x2000000 /boot/extlinux/extlinux.conf; \
|
||||||
+ load nvme 0:1 0x2000000 /boot/boot.scr; source 0x2000000; \
|
+ elif test -e ${devtype} ${devnum}:${distro_bootpart} /boot.scr; then \
|
||||||
+ elif test -e nvme 0:1 EFI/BOOT/BOOTRISCV64.EFI; then \
|
+ load ${devtype} ${devnum}:${distro_bootpart} 0x2000000 /boot.scr; source 0x2000000; \
|
||||||
+ load nvme 0:1 ${kernel_addr_r} EFI/BOOT/BOOTRISCV64.EFI; bootefi ${kernel_addr_r}; \
|
+ elif test -e ${devtype} ${devnum}:${distro_bootpart} /boot/boot.scr; then \
|
||||||
|
+ load ${devtype} ${devnum}:${distro_bootpart} 0x2000000 /boot/boot.scr; source 0x2000000; \
|
||||||
|
+ elif test -e ${devtype} ${devnum}:${distro_bootpart} EFI/BOOT/BOOTRISCV64.EFI; then \
|
||||||
|
+ load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} EFI/BOOT/BOOTRISCV64.EFI; bootefi ${kernel_addr_r}; \
|
||||||
+ fi;
|
+ fi;
|
||||||
+
|
+
|
||||||
+bootcmd=echo "Loading K1-X Environment ..."; \
|
+bootcmd=echo "Loading K1-X Environment ..."; \
|
||||||
Loading…
Reference in New Issue
Block a user