-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support different dhcp client in Linux #9490
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pullapprove
bot
requested review from
andy31415,
bzbarsky-apple,
chrisdecenzo,
Damian-Nordic,
hawk248,
jepenven-silabs,
msandstedt and
pan-apple
September 6, 2021 04:10
Some Linux environment like Yocto has no dhclient tools. So add a macro named CHIP_DEVICE_CONFIG_LINUX_DHCPC_CMD to config the command which used to query the IP address from the DHCP server. For example in Yocto cross compile : PLATFORM_CFLAGS='-DCHIP_DEVICE_CONFIG_WIFI_STATION_IF_NAME=\"mlan0\"", "-DCHIP_DEVICE_CONFIG_LINUX_DHCPC_CMD=\"udhcpc -b -i %s & \"' Signed-off-by: Haoran Wang <[email protected]>
kghost
approved these changes
Sep 7, 2021
andy31415
approved these changes
Sep 7, 2021
woody-apple
approved these changes
Sep 7, 2021
saurabhst
approved these changes
Sep 7, 2021
Closed
kpschoedel
pushed a commit
to kpschoedel/connectedhomeip
that referenced
this pull request
Sep 9, 2021
Some Linux environment like Yocto has no dhclient tools. So add a macro named CHIP_DEVICE_CONFIG_LINUX_DHCPC_CMD to config the command which used to query the IP address from the DHCP server. For example in Yocto cross compile : PLATFORM_CFLAGS='-DCHIP_DEVICE_CONFIG_WIFI_STATION_IF_NAME=\"mlan0\"", "-DCHIP_DEVICE_CONFIG_LINUX_DHCPC_CMD=\"udhcpc -b -i %s & \"' Signed-off-by: Haoran Wang <[email protected]>
TE-N-ElvenWang
added a commit
to TE-N-ElvenWang/connectedhomeip
that referenced
this pull request
Sep 24, 2021
Some Linux environment like Yocto has no dhclient tools. So add a macro named CHIP_DEVICE_CONFIG_LINUX_DHCPC_CMD to config the command which used to query the IP address from the DHCP server. For example in Yocto cross compile : PLATFORM_CFLAGS='-DCHIP_DEVICE_CONFIG_WIFI_STATION_IF_NAME=\"mlan0\"", "-DCHIP_DEVICE_CONFIG_LINUX_DHCPC_CMD=\"udhcpc -b -i %s & \"' Signed-off-by: Haoran Wang <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Some Linux environment like Yocto has no dhclient tool set.
So add a macro named CHIP_DEVICE_CONFIG_LINUX_DHCPC_CMD to config
the command which used to query the IP address from the DHCP server.
The macro didn't added into CHIPDeviceConfig.h due it is only used for Linux and by default the command is reset to using "dhclient".
For example in Yocto arm64 cross compile :
#Yocto using udhcpc to fetch IP and DNS info
PLATFORM_CFLAGS='-DCHIP_DEVICE_CONFIG_WIFI_STATION_IF_NAME="mlan0"", "-DCHIP_DEVICE_CONFIG_LINUX_DHCPC_CMD="udhcpc -b -i %s & "'
PKG_CONFIG_SYSROOT_DIR=${PKG_CONFIG_SYSROOT_DIR}
PKG_CONFIG_LIBDIR=${PKG_CONFIG_PATH}
gn gen out/aarch64 --args="target_os="linux" target_cpu="arm64" arm_arch="armv8-a"
import("//build_overrides/build.gni")
target_cflags=[ "--sysroot=${SDKTARGETSYSROOT}", "${PLATFORM_CFLAGS}" ]
target_ldflags = [ "--sysroot=${SDKTARGETSYSROOT}" ]
custom_toolchain="${build_root}/toolchain/custom"
target_cc="${OECORE_NATIVE_SYSROOT}/usr/bin/aarch64-poky-linux/aarch64-poky-linux-gcc"
target_cxx="${OECORE_NATIVE_SYSROOT}/usr/bin/aarch64-poky-linux/aarch64-poky-linux-g++"
target_ar="${OECORE_NATIVE_SYSROOT}/usr/bin/aarch64-poky-linux/aarch64-poky-linux-ar""
Signed-off-by: Haoran Wang [email protected]