Merge branch '2023-06-14-assorted-fixes'
- Fix some issues Coverity Scan reported in IPv6, SPL EXTn support fix, two small bootstd fixes, one Kconfig dependency fix, and fix booting on Pinephone Pro
This commit is contained in:
commit
2f4664f5c3
8 changed files with 30 additions and 23 deletions
26
boot/Kconfig
26
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
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
12
cmd/net.c
12
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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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 */
|
||||
|
||||
|
|
Loading…
Reference in a new issue