net: Add a function to run dhcp
authorSimon Glass <sjg@chromium.org>
Tue, 17 Jan 2023 17:47:39 +0000 (10:47 -0700)
committerTom Rini <trini@konsulko.com>
Mon, 23 Jan 2023 23:11:40 +0000 (18:11 -0500)
commitc8c3fd24cc0dd9512237dc13528e90eb46e704a7
tree0e4a7e820d9048c144e950b4faf48f7d209aec5e
parent843160fa7afc682651c5eea7d8e15f0767b66497
net: Add a function to run dhcp

At present this must be done by executing the command. Also it involves
fiddling with the environment to determine the correct autoload behaviour.

Ideally it should be possible to run network operations without even
having the command line present (CONFIG_CMDLINE).

For now, add a function to handle DHCP, so it can be called from a bootdev
more easily.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
cmd/net.c
include/net.h