From 7a5f4e4c2f8956b3e4d5b0957990b9ea1818bedb Mon Sep 17 00:00:00 2001 From: Mayuresh Chitale Date: Tue, 2 May 2023 21:40:20 +0530 Subject: spl: ext: Use partition size for mount Since commit 9905cae65e03 ("fs: ext4: check the minimal partition size to mount"), a valid size needs to be provided when mounting an ext filesystem. Fix the spl ext driver to use the parition size instead of 0 when mounting the filesystem. Signed-off-by: Mayuresh Chitale --- common/spl/spl_ext.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/spl/spl_ext.c b/common/spl/spl_ext.c index f117c630bfe..2bf34344391 100644 --- a/common/spl/spl_ext.c +++ b/common/spl/spl_ext.c @@ -28,7 +28,7 @@ int spl_load_image_ext(struct spl_image_info *spl_image, ext4fs_set_blk_dev(block_dev, &part_info); - err = ext4fs_mount(0); + err = ext4fs_mount(part_info.size); if (!err) { #ifdef CONFIG_SPL_LIBCOMMON_SUPPORT printf("%s: ext4fs mount err - %d\n", __func__, err); @@ -82,7 +82,7 @@ int spl_load_image_ext_os(struct spl_image_info *spl_image, ext4fs_set_blk_dev(block_dev, &part_info); - err = ext4fs_mount(0); + err = ext4fs_mount(part_info.size); if (!err) { #ifdef CONFIG_SPL_LIBCOMMON_SUPPORT printf("%s: ext4fs mount err - %d\n", __func__, err); -- cgit v1.2.3 From 89d8c56f44c11d65237c39fced33f95138cd4062 Mon Sep 17 00:00:00 2001 From: Eugen Hristev Date: Wed, 17 May 2023 13:41:24 +0300 Subject: net: rtl8169: add depends on PCI The rtl8169 driver uses calls to dm_pci_bus_to_phys, which are compiled under CONFIG_PCI. Without CONFIG_PCI, this happens: drivers/net/rtl8169.o: in function `rtl_recv_common': drivers/net/rtl8169.c:555: undefined reference to `dm_pci_bus_to_phys' It is only natural that this driver depends on CONFIG_PCI then. The device does not work connected in another way anyway, and the driver does not assume anything else at this moment. Signed-off-by: Eugen Hristev Reviewed-by: Ramon Fried --- drivers/net/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index 09039a283eb..39eee98ca79 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig @@ -633,6 +633,7 @@ config RTL8139 config RTL8169 bool "Realtek 8169 series Ethernet controller driver" + depends on PCI help This driver supports Realtek 8169 series gigabit ethernet family of PCI/PCIe chipsets/adapters. -- cgit v1.2.3 From bcb1d269a4b9870033baced22b8225c089aa005a Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 22 Feb 2023 14:06:23 -0700 Subject: bootstd: Make BOOTSTD_FULL depend on BOOTSTD Move BOOTSTD_FULL down in the file so that it can be enabled only when BOOTSTD is enabled. This prevents a build error if BOOTSTD is disabled but BOOTSTD_FULL is enabled. Signed-off-by: Simon Glass Reviewed-by: Ilias Apalodimas --- boot/Kconfig | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/boot/Kconfig b/boot/Kconfig index eea5ed6040f..a643a3d1286 100644 --- a/boot/Kconfig +++ b/boot/Kconfig @@ -397,19 +397,6 @@ config BOOTSTD U-Boot) - bootflow - a description of how to boot (owned by the distro) -config BOOTSTD_FULL - bool "Enhanced features for standard boot" - default y if SANDBOX - help - This enables various useful features for standard boot, which are not - essential for operation: - - - bootdev, bootmeth commands - - extra features in the bootflow command - - support for selecting the ordering of bootmeths ("bootmeth order") - - support for selecting the ordering of bootdevs using the devicetree - as well as the "boot_targets" environment variable - config SPL_BOOTSTD bool "Standard boot support in SPL" depends on SPL && SPL_DM && SPL_OF_CONTROL && SPL_BLK @@ -432,6 +419,19 @@ config VPL_BOOTSTD if BOOTSTD +config BOOTSTD_FULL + bool "Enhanced features for standard boot" + default y if SANDBOX + help + This enables various useful features for standard boot, which are not + essential for operation: + + - bootdev, bootmeth commands + - extra features in the bootflow command + - support for selecting the ordering of bootmeths ("bootmeth order") + - support for selecting the ordering of bootdevs using the devicetree + as well as the "boot_targets" environment variable + config BOOTSTD_DEFAULTS bool "Select some common defaults for standard boot" depends on BOOTSTD -- cgit v1.2.3 From a7e4dffcd8c582bf4344548270d2fc7ac6c0f9ec Mon Sep 17 00:00:00 2001 From: Jonas Karlman Date: Fri, 9 Jun 2023 14:59:01 +0000 Subject: bootstd: Fix relative path use in extlinux bootmeth Using relative path in a /boot/extlinux/extlinux.conf file fails to load linux kernel. Using a /boot/extlinux/extlinux.conf file: LABEL test LINUX ../linux/Image Result in following error: Retrieving file: ../linux/Image Skipping test for failure retrieving kernel Boot failed (err=-14) However, using sysboot cmd successfully load kernel using same file: sysboot mmc 1:1 any ${scriptaddr} /boot/extlinux/extlinux.conf Retrieving file: /boot/extlinux/../linux/Image Fix relative path using bootmeth extlinux by supplying bootfile path instead of subdir path in the call to pxe_setup_ctx, same as done in the sysboot command. Fixes: 31aefaf89a5b ("bootstd: Add an implementation of distro boot") Signed-off-by: Jonas Karlman Reviewed-by: Simon Glass --- boot/bootmeth_extlinux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boot/bootmeth_extlinux.c b/boot/bootmeth_extlinux.c index 24be0760229..6b2b8400383 100644 --- a/boot/bootmeth_extlinux.c +++ b/boot/bootmeth_extlinux.c @@ -150,7 +150,7 @@ static int extlinux_boot(struct udevice *dev, struct bootflow *bflow) info.dev = dev; info.bflow = bflow; ret = pxe_setup_ctx(&ctx, &cmdtp, extlinux_getfile, &info, true, - bflow->subdir, false); + bflow->fname, false); if (ret) return log_msg_ret("ctx", -EINVAL); -- cgit v1.2.3 From 70ca9f62f3ac3cb67be696815e8be8600623795f Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Sun, 11 Jun 2023 18:18:34 +0100 Subject: rockchip: Pinephone Pro: Add DDR RAM type config Add the RAM_ROCKCHIP_LPDDR4 to fix the Pinephone Pro booting. When the configs were updated in 26f92be07e2 it somehow broke the PPP boot process so let's fix it. Signed-off-by: Peter Robinson CC: Jagan Teki CC: Kever Yang --- configs/pinephone-pro-rk3399_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/pinephone-pro-rk3399_defconfig b/configs/pinephone-pro-rk3399_defconfig index 4edea88665f..e4a8beeb1ab 100644 --- a/configs/pinephone-pro-rk3399_defconfig +++ b/configs/pinephone-pro-rk3399_defconfig @@ -73,6 +73,7 @@ CONFIG_PMIC_RK8XX=y CONFIG_REGULATOR_PWM=y CONFIG_REGULATOR_RK8XX=y CONFIG_PWM_ROCKCHIP=y +CONFIG_RAM_ROCKCHIP_LPDDR4=y CONFIG_DM_RNG=y CONFIG_RNG_ROCKCHIP=y CONFIG_BAUDRATE=1500000 -- cgit v1.2.3 From 1b3117db3ecdb0ec281899a00c8662b22059c01b Mon Sep 17 00:00:00 2001 From: Sean Edmond Date: Thu, 18 May 2023 12:35:40 -0700 Subject: net: ipv6: Fix CID 453851 and CID 436278 CID 453851 : sprintf() shouldn't copy from/to tmp CID 436278 : DHCP6 option_len should be checked before use Signed-off-by: Sean Edmond Reviewed-by: Ramon Fried --- cmd/net.c | 12 ++++++------ net/dhcpv6.c | 5 +++++ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/cmd/net.c b/cmd/net.c index 68d406291ef..9e1f40a56e9 100644 --- a/cmd/net.c +++ b/cmd/net.c @@ -209,7 +209,7 @@ U_BOOT_CMD( static void netboot_update_env(void) { - char tmp[44]; + char tmp[46]; if (net_gateway.s_addr) { ip_to_string(net_gateway, tmp); @@ -274,20 +274,20 @@ static void netboot_update_env(void) if (IS_ENABLED(CONFIG_IPV6)) { if (!ip6_is_unspecified_addr(&net_ip6) || net_prefix_length != 0) { - sprintf(tmp, "%pI6c", &net_ip6); if (net_prefix_length != 0) - sprintf(tmp, "%s/%d", tmp, net_prefix_length); - + snprintf(tmp, sizeof(tmp), "%pI6c/%d", &net_ip6, net_prefix_length); + else + snprintf(tmp, sizeof(tmp), "%pI6c", &net_ip6); env_set("ip6addr", tmp); } if (!ip6_is_unspecified_addr(&net_server_ip6)) { - sprintf(tmp, "%pI6c", &net_server_ip6); + snprintf(tmp, sizeof(tmp), "%pI6c", &net_server_ip6); env_set("serverip6", tmp); } if (!ip6_is_unspecified_addr(&net_gateway6)) { - sprintf(tmp, "%pI6c", &net_gateway6); + snprintf(tmp, sizeof(tmp), "%pI6c", &net_gateway6); env_set("gatewayip6", tmp); } } diff --git a/net/dhcpv6.c b/net/dhcpv6.c index 0d1c600632f..73a1067877c 100644 --- a/net/dhcpv6.c +++ b/net/dhcpv6.c @@ -316,6 +316,11 @@ static void dhcp6_parse_options(uchar *rx_pkt, unsigned int len) option_ptr = ((uchar *)option_hdr) + sizeof(struct dhcp6_hdr); option_len = ntohs(option_hdr->option_len); + if (option_ptr + option_len > rx_pkt + len) { + debug("Invalid option length\n"); + return; + } + switch (ntohs(option_hdr->option_id)) { case DHCP6_OPTION_CLIENTID: if (memcmp(option_ptr, sm_params.duid, option_len) -- cgit v1.2.3 From 2f7c7159ea4c0e5c2aa7671c5b5a2889d0abe7ce Mon Sep 17 00:00:00 2001 From: Sean Edmond Date: Thu, 18 May 2023 12:35:41 -0700 Subject: net: dhcp6: Fix VCI string Change VCI string from "U-boot" to "U-Boot". Signed-off-by: Sean Edmond Reviewed-by: Ramon Fried --- net/dhcpv6.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/dhcpv6.h b/net/dhcpv6.h index 80ca5204325..65c8e4c71d3 100644 --- a/net/dhcpv6.h +++ b/net/dhcpv6.h @@ -38,7 +38,7 @@ #define DUID_MAX_SIZE DUID_LL_SIZE /* only supports DUID-LL currently */ /* vendor-class-data to send in vendor clas option */ -#define DHCP6_VCI_STRING "U-boot" +#define DHCP6_VCI_STRING "U-Boot" #define DHCP6_MULTICAST_ADDR "ff02::1:2" /* DHCP multicast address */ -- cgit v1.2.3