Compare commits
22 Commits
cherry-69e
...
fix-net2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eef0d75174 | ||
|
|
1bf80a2df9 | ||
|
|
c983d4bf75 | ||
|
|
6b696a1308 | ||
|
|
6967abb8d5 | ||
|
|
307522af23 | ||
|
|
eff963c4e3 | ||
|
|
1c322798ad | ||
|
|
ea837d13a3 | ||
|
|
9360b2920a | ||
|
|
0a092d7300 | ||
|
|
b8a08e9684 | ||
|
|
475fdf68e3 | ||
|
|
a7d82d54f5 | ||
|
|
d4e047735a | ||
|
|
1a1ebb0347 | ||
|
|
421e147102 | ||
|
|
06139bee86 | ||
|
|
96477c1e74 | ||
|
|
06c9a116bf | ||
|
|
635f9fb922 | ||
|
|
6dbb451889 |
@@ -3,6 +3,7 @@
|
|||||||
* Copyright (c) 2010-2016, NVIDIA CORPORATION.
|
* Copyright (c) 2010-2016, NVIDIA CORPORATION.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <env.h>
|
||||||
#include <fdtdec.h>
|
#include <fdtdec.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <asm/arch-tegra/cboot.h>
|
#include <asm/arch-tegra/cboot.h>
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
* Copyright (C) 2015 Phil Sutter <phil@nwl.cc>
|
* Copyright (C) 2015 Phil Sutter <phil@nwl.cc>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <env.h>
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <miiphy.h>
|
#include <miiphy.h>
|
||||||
#include <asm/global_data.h>
|
#include <asm/global_data.h>
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
* Copyright 2019-2023 Kococonnector GmbH
|
* Copyright 2019-2023 Kococonnector GmbH
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <env.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <linux/libfdt.h>
|
#include <linux/libfdt.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <dm.h>
|
#include <dm.h>
|
||||||
|
#include <env.h>
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <net.h>
|
#include <net.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
|
|||||||
@@ -3,7 +3,8 @@
|
|||||||
* Copyright 2018 congatec AG
|
* Copyright 2018 congatec AG
|
||||||
* Copyright (C) 2019 Oliver Graute <oliver.graute@kococonnector.com>
|
* Copyright (C) 2019 Oliver Graute <oliver.graute@kococonnector.com>
|
||||||
*/
|
*/
|
||||||
#include <config.h>
|
|
||||||
|
#include <env.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <linux/libfdt.h>
|
#include <linux/libfdt.h>
|
||||||
#include <fsl_esdhc.h>
|
#include <fsl_esdhc.h>
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <dm.h>
|
#include <dm.h>
|
||||||
|
#include <env.h>
|
||||||
#include <i2c_eeprom.h>
|
#include <i2c_eeprom.h>
|
||||||
#include <net.h>
|
#include <net.h>
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
* Copyright 2020 NXP
|
* Copyright 2020 NXP
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <env.h>
|
||||||
#include <miiphy.h>
|
#include <miiphy.h>
|
||||||
#include <netdev.h>
|
#include <netdev.h>
|
||||||
#include <asm/arch/imx8ulp-pins.h>
|
#include <asm/arch/imx8ulp-pins.h>
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
* Copyright (C) 2015 Freescale Semiconductor, Inc.
|
* Copyright (C) 2015 Freescale Semiconductor, Inc.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <env.h>
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <net.h>
|
#include <net.h>
|
||||||
#include <asm/arch/clock.h>
|
#include <asm/arch/clock.h>
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
* Copyright 2021 Gateworks Corporation
|
* Copyright 2021 Gateworks Corporation
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <env.h>
|
||||||
#include <fdt_support.h>
|
#include <fdt_support.h>
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <led.h>
|
#include <led.h>
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2022 Google LLC
|
* Copyright 2022 Google LLC
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <env.h>
|
||||||
#include <net.h>
|
#include <net.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include "mercury_aa1.h"
|
#include "mercury_aa1.h"
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <env.h>
|
||||||
#include <fdt_support.h>
|
#include <fdt_support.h>
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <log.h>
|
#include <log.h>
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
* Author: Daniel Schultz <d.schultz@phytec.de>
|
* Author: Daniel Schultz <d.schultz@phytec.de>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <env.h>
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
#include <u-boot/crc.h>
|
#include <u-boot/crc.h>
|
||||||
#include <net.h>
|
#include <net.h>
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
* Copyright 2018 NXP
|
* Copyright 2018 NXP
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <env.h>
|
||||||
#include <miiphy.h>
|
#include <miiphy.h>
|
||||||
#include <asm-generic/gpio.h>
|
#include <asm-generic/gpio.h>
|
||||||
#include <asm/arch/imx8mq_pins.h>
|
#include <asm/arch/imx8mq_pins.h>
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
* Copyright (C) 2017 NXP Semiconductors
|
* Copyright (C) 2017 NXP Semiconductors
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <env.h>
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <net.h>
|
#include <net.h>
|
||||||
#include <asm/arch/clock.h>
|
#include <asm/arch/clock.h>
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <cpu_func.h>
|
#include <cpu_func.h>
|
||||||
|
#include <env.h>
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <net.h>
|
#include <net.h>
|
||||||
#include <asm/arch/clock.h>
|
#include <asm/arch/clock.h>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* Copyright 2020-2021 Toradex
|
* Copyright 2020-2021 Toradex
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <config.h>
|
#include <env.h>
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <asm/arch/clock.h>
|
#include <asm/arch/clock.h>
|
||||||
#include <asm/arch/sys_proto.h>
|
#include <asm/arch/sys_proto.h>
|
||||||
|
|||||||
45
cmd/elf.c
45
cmd/elf.c
@@ -242,31 +242,34 @@ int do_bootvx(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
|||||||
* The following parameters are only needed if 'bootdev'
|
* The following parameters are only needed if 'bootdev'
|
||||||
* is an ethernet device, otherwise they are optional.
|
* is an ethernet device, otherwise they are optional.
|
||||||
*/
|
*/
|
||||||
tmp = env_get("ipaddr");
|
if (IS_ENABLED(CONFIG_NET) || IS_ENABLED(CONFIG_NET_LWIP)) {
|
||||||
if (tmp) {
|
tmp = env_get("ipaddr");
|
||||||
ptr += sprintf(build_buf + ptr, "e=%s", tmp);
|
|
||||||
tmp = env_get("netmask");
|
|
||||||
if (tmp) {
|
if (tmp) {
|
||||||
u32 mask = env_get_ip("netmask").s_addr;
|
ptr += sprintf(build_buf + ptr, "e=%s", tmp);
|
||||||
ptr += sprintf(build_buf + ptr,
|
tmp = env_get("netmask");
|
||||||
":%08x ", ntohl(mask));
|
if (tmp) {
|
||||||
} else {
|
u32 mask = env_get_ip("netmask").s_addr;
|
||||||
ptr += sprintf(build_buf + ptr, " ");
|
|
||||||
|
ptr += sprintf(build_buf + ptr,
|
||||||
|
":%08x ", ntohl(mask));
|
||||||
|
} else {
|
||||||
|
ptr += sprintf(build_buf + ptr, " ");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tmp = env_get("serverip");
|
||||||
|
if (tmp)
|
||||||
|
ptr += sprintf(build_buf + ptr, "h=%s ", tmp);
|
||||||
|
|
||||||
|
tmp = env_get("gatewayip");
|
||||||
|
if (tmp)
|
||||||
|
ptr += sprintf(build_buf + ptr, "g=%s ", tmp);
|
||||||
|
|
||||||
|
tmp = env_get("hostname");
|
||||||
|
if (tmp)
|
||||||
|
ptr += sprintf(build_buf + ptr, "tn=%s ", tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
tmp = env_get("serverip");
|
|
||||||
if (tmp)
|
|
||||||
ptr += sprintf(build_buf + ptr, "h=%s ", tmp);
|
|
||||||
|
|
||||||
tmp = env_get("gatewayip");
|
|
||||||
if (tmp)
|
|
||||||
ptr += sprintf(build_buf + ptr, "g=%s ", tmp);
|
|
||||||
|
|
||||||
tmp = env_get("hostname");
|
|
||||||
if (tmp)
|
|
||||||
ptr += sprintf(build_buf + ptr, "tn=%s ", tmp);
|
|
||||||
|
|
||||||
tmp = env_get("othbootargs");
|
tmp = env_get("othbootargs");
|
||||||
if (tmp) {
|
if (tmp) {
|
||||||
strcpy(build_buf + ptr, tmp);
|
strcpy(build_buf + ptr, tmp);
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <cpu_func.h>
|
#include <cpu_func.h>
|
||||||
#include <dm.h>
|
#include <dm.h>
|
||||||
|
#include <env.h>
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
#include <net.h>
|
#include <net.h>
|
||||||
#include <netdev.h>
|
#include <netdev.h>
|
||||||
|
|||||||
@@ -4,8 +4,6 @@
|
|||||||
#define __NET_COMMON_H__
|
#define __NET_COMMON_H__
|
||||||
|
|
||||||
#include <asm/cache.h>
|
#include <asm/cache.h>
|
||||||
#include <command.h>
|
|
||||||
#include <env.h>
|
|
||||||
#include <hexdump.h>
|
#include <hexdump.h>
|
||||||
#include <linux/if_ether.h>
|
#include <linux/if_ether.h>
|
||||||
#include <linux/sizes.h>
|
#include <linux/sizes.h>
|
||||||
@@ -13,6 +11,8 @@
|
|||||||
#include <rand.h>
|
#include <rand.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
|
struct cmd_tbl;
|
||||||
|
|
||||||
#define DEBUG_NET_PKT_TRACE 0 /* Trace all packet data */
|
#define DEBUG_NET_PKT_TRACE 0 /* Trace all packet data */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -463,10 +463,7 @@ int update_tftp(ulong addr, char *interface, char *devstring);
|
|||||||
* 0 to 255
|
* 0 to 255
|
||||||
* Return: IP address, or 0 if invalid
|
* Return: IP address, or 0 if invalid
|
||||||
*/
|
*/
|
||||||
static inline struct in_addr env_get_ip(char *var)
|
struct in_addr env_get_ip(char *var);
|
||||||
{
|
|
||||||
return string_to_ip(env_get(var));
|
|
||||||
}
|
|
||||||
|
|
||||||
int net_init(void);
|
int net_init(void);
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
#include <log.h>
|
#include <log.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <linux/if_ether.h>
|
#include <linux/if_ether.h>
|
||||||
|
#include <linux/string.h>
|
||||||
|
|
||||||
struct bd_info;
|
struct bd_info;
|
||||||
struct cmd_tbl;
|
struct cmd_tbl;
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
#define __NET6_H__
|
#define __NET6_H__
|
||||||
|
|
||||||
#include <net.h>
|
#include <net.h>
|
||||||
|
#include <asm/byteorder.h>
|
||||||
#include <linux/ctype.h>
|
#include <linux/ctype.h>
|
||||||
#include <linux/errno.h>
|
#include <linux/errno.h>
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0
|
// SPDX-License-Identifier: GPL-2.0
|
||||||
|
#include <env.h>
|
||||||
#include <net-common.h>
|
#include <net-common.h>
|
||||||
|
|
||||||
void copy_filename(char *dst, const char *src, int size)
|
void copy_filename(char *dst, const char *src, int size)
|
||||||
@@ -25,3 +26,8 @@ int wget_request(ulong dst_addr, char *uri, struct wget_http_info *info)
|
|||||||
wget_info = info ? info : &default_wget_info;
|
wget_info = info ? info : &default_wget_info;
|
||||||
return wget_with_dns(dst_addr, uri);
|
return wget_with_dns(dst_addr, uri);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct in_addr env_get_ip(char *var)
|
||||||
|
{
|
||||||
|
return string_to_ip(env_get(var));
|
||||||
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
* Copyright 2019 Ramon Fried <rfried.dev@gmail.com>
|
* Copyright 2019 Ramon Fried <rfried.dev@gmail.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <env.h>
|
||||||
#include <net.h>
|
#include <net.h>
|
||||||
#include <net/pcap.h>
|
#include <net/pcap.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|||||||
Reference in New Issue
Block a user