]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arm: kirkwood: Enable bootstd for Sheevaplug board
authorTony Dinh <mibodhi@gmail.com>
Thu, 21 Nov 2024 19:02:27 +0000 (11:02 -0800)
committerStefan Roese <sr@denx.de>
Tue, 26 Nov 2024 12:19:48 +0000 (13:19 +0100)
Enable bootstd for Sheevaplug board.
Remove JFFS2 support. See JFFS2 Vulnerability[1].
Enable LTO to keep board size within limit.
Move default envs to text-base environment

[1] https://lore.kernel.org/u-boot/20241114233005.GN3600562@bill-the-cat/T/#m2fc25da1d2c019bc3cd8676991fdd64b8a21aa9b

Signed-off-by: Tony Dinh <mibodhi@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
board/Marvell/sheevaplug/sheevaplug.env [new file with mode: 0644]
configs/sheevaplug_defconfig
include/configs/sheevaplug.h

diff --git a/board/Marvell/sheevaplug/sheevaplug.env b/board/Marvell/sheevaplug/sheevaplug.env
new file mode 100644 (file)
index 0000000..bcd62db
--- /dev/null
@@ -0,0 +1,20 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * (C) Copyright 2024 Tony Dinh <mibodhi@gmail.com>
+ *
+ *  Environment variables configurations
+ */
+
+kernel_addr_r=0x800000
+fdt_addr_r=0x2c00000
+ramdisk_addr_r=0x01100000
+scriptaddr=0x200000
+fdtfile=CONFIG_DEFAULT_DEVICE_TREE.dtb
+mtdparts=CONFIG_MTDPARTS_DEFAULT
+console=ttyS0,115200
+
+/* Standard Boot */
+bootcmd=
+       bootflow scan -lb
+failed=
+       echo CONFIG_SYS_BOARD boot failed - please check your image
index 9ac40b9e57130e40f98e2fb6a3035bdfc8ee8b8c..a7f6c73ecbaa008f12384e7205bbe61115554805 100644 (file)
@@ -16,16 +16,14 @@ CONFIG_ENV_OFFSET=0x80000
 CONFIG_DEFAULT_DEVICE_TREE="marvell/kirkwood-sheevaplug"
 CONFIG_SYS_LOAD_ADDR=0x800000
 CONFIG_IDENT_STRING="\nMarvell-Sheevaplug"
+CONFIG_LTO=y
 CONFIG_HAS_BOARD_SIZE_LIMIT=y
 CONFIG_BOARD_SIZE_LIMIT=524288
+CONFIG_BOOTSTD_FULL=y
 CONFIG_BOOTDELAY=3
-CONFIG_USE_BOOTCOMMAND=y
-CONFIG_BOOTCOMMAND="${x_bootcmd_kernel}; setenv bootargs ${x_bootargs} ${x_bootargs_root}; bootm 0x6400000;"
 CONFIG_USE_PREBOOT=y
 # CONFIG_DISPLAY_BOARDINFO is not set
-CONFIG_HUSH_PARSER=y
 CONFIG_SYS_MAXARGS=32
-CONFIG_CMD_BOOTZ=y
 # CONFIG_BOOTM_PLAN9 is not set
 # CONFIG_BOOTM_RTEMS is not set
 # CONFIG_BOOTM_VXWORKS is not set
@@ -35,19 +33,10 @@ CONFIG_CMD_MMC=y
 CONFIG_CMD_NAND=y
 CONFIG_CMD_SATA=y
 CONFIG_CMD_USB=y
-CONFIG_CMD_DHCP=y
-CONFIG_CMD_MII=y
-CONFIG_CMD_PING=y
-CONFIG_CMD_EXT2=y
-CONFIG_CMD_EXT4=y
-CONFIG_CMD_FAT=y
-CONFIG_CMD_FS_GENERIC=y
-CONFIG_CMD_JFFS2=y
 CONFIG_CMD_MTDPARTS=y
 CONFIG_MTDIDS_DEFAULT="nand0=orion_nand"
 CONFIG_MTDPARTS_DEFAULT="mtdparts=orion_nand:512K(uboot),512K(env),4M(kernel),-(rootfs)"
 CONFIG_CMD_UBI=y
-CONFIG_ISO_PARTITION=y
 CONFIG_OF_CONTROL=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_NAND=y
@@ -68,6 +57,5 @@ CONFIG_DM_RTC=y
 CONFIG_RTC_MV=y
 CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
-CONFIG_USB_STORAGE=y
 CONFIG_LZMA=y
 CONFIG_BZIP2=y
index 4e0b3c663c77d56d8a46f960bfe7b5ba29ad68a6..0a5f23e4c88066fed83ee0fa35957f08890c3053 100644 (file)
 
 #include "mv-common.h"
 
-/*
- *  Environment variables configurations
- */
-#define CFG_EXTRA_ENV_SETTINGS "x_bootargs=console"    \
-       "=ttyS0,115200 mtdparts=" CONFIG_MTDPARTS_DEFAULT       \
-       "x_bootcmd_kernel=nand read 0x6400000 0x100000 0x400000\0" \
-       "x_bootcmd_usb=usb start\0" \
-       "x_bootargs_root=root=/dev/mtdblock3 rw rootfstype=jffs2\0"
-
 #endif /* _CONFIG_SHEEVAPLUG_H */