[PATCH v2] arm: kirkwood: Enable bootstd for Sheevaplug board

Stefan Roese sr at denx.de
Tue Nov 26 09:27:46 CET 2024


On 21.11.24 20:02, Tony Dinh wrote:
> 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 at gmail.com>

Reviewed-by: Stefan Roese <sr at denx.de>

Thanks,
Stefan

> ---
> 
> Changes in v2:
> Move default envs to text-base environment
> 
>   board/Marvell/sheevaplug/sheevaplug.env | 20 ++++++++++++++++++++
>   configs/sheevaplug_defconfig            | 16 ++--------------
>   include/configs/sheevaplug.h            |  9 ---------
>   3 files changed, 22 insertions(+), 23 deletions(-)
>   create mode 100644 board/Marvell/sheevaplug/sheevaplug.env
> 
> diff --git a/board/Marvell/sheevaplug/sheevaplug.env b/board/Marvell/sheevaplug/sheevaplug.env
> new file mode 100644
> index 0000000000..bcd62dbeb7
> --- /dev/null
> +++ b/board/Marvell/sheevaplug/sheevaplug.env
> @@ -0,0 +1,20 @@
> +/* SPDX-License-Identifier: GPL-2.0+ */
> +/*
> + * (C) Copyright 2024 Tony Dinh <mibodhi at 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
> diff --git a/configs/sheevaplug_defconfig b/configs/sheevaplug_defconfig
> index 9ac40b9e57..a7f6c73ecb 100644
> --- a/configs/sheevaplug_defconfig
> +++ b/configs/sheevaplug_defconfig
> @@ -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
> diff --git a/include/configs/sheevaplug.h b/include/configs/sheevaplug.h
> index 4e0b3c663c..0a5f23e4c8 100644
> --- a/include/configs/sheevaplug.h
> +++ b/include/configs/sheevaplug.h
> @@ -12,13 +12,4 @@
>   
>   #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 */

Viele Grüße,
Stefan Roese

-- 
DENX Software Engineering GmbH,      Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr at denx.de



More information about the U-Boot mailing list