This repository was archived by the owner on Aug 20, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
README.md: add howto build RDKB (OE 3.1) with prplMesh for TurrisOmnia #24
Draft
MuteSpirit
wants to merge
3
commits into
master
Choose a base branch
from
feature/PPM-316-rdkb-3.1-turris-omnia
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
92256b5
README.md: add howto build RDKB (OE 3.1) with prplMesh for TurrisOmnia
MuteSpirit 1e22eca
prplmesh.bb: define prplMesh wlan ifaces for Turris Omnia board
MuteSpirit 76570b1
prplmesh.bb: bpl: add patch to able use "wifiX" instead of "wlanX" if…
MuteSpirit File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ RDEPENDS_${PN} = "iproute2 busybox" | |
|
||
SRCREV = "d55b727b52158d46b3a0263734445ac29116220f" | ||
SRC_URI = "git://github.com/prplfoundation/prplMesh.git;protocol=http;branch=master \ | ||
file://001-bpl-cfg-explicit-wlan-iface-names.patch \ | ||
" | ||
|
||
PACKAGECONFIG ??= "${BWL_TYPE} ${MSGLIB}" | ||
|
@@ -45,12 +46,22 @@ BEEROCKS_WLAN1_IFACE_raspberrypi-rdk-broadband = "wlan0" | |
BEEROCKS_WLAN2_IFACE_raspberrypi-rdk-broadband = "wlan1" | ||
BEEROCKS_HOSTAP_WLAN1_CTRL_IFACE_raspberrypi-rdk-broadband="/var/run/hostapd0/wlan0" | ||
BEEROCKS_HOSTAP_WLAN2_CTRL_IFACE_raspberrypi-rdk-broadband="/var/run/hostapd4/wlan1" | ||
BEEROCKS_BH_WIRE_IFACE_raspberrypi-rdk-broadband = "erouter0" | ||
# | ||
# Turris Omnia machine specific | ||
# | ||
BEEROCKS_WLAN1_IFACE_turris = "wifi0" | ||
BEEROCKS_WLAN2_IFACE_turris = "wifi1" | ||
BEEROCKS_WLAN3_IFACE_turris = "wifi2" | ||
|
||
BEEROCKS_HOSTAP_WLAN1_CTRL_IFACE="/var/run/hostapd/wifi0" | ||
BEEROCKS_HOSTAP_WLAN2_CTRL_IFACE="/var/run/hostapd/wifi1" | ||
BEEROCKS_HOSTAP_WLAN3_CTRL_IFACE="/var/run/hostapd/wifi2" | ||
Comment on lines
+56
to
+58
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. add "_turris" suffix |
||
# | ||
# RDKB specific | ||
# "ZeroMG" has incompatible license for RDKB so use NNG | ||
MSGLIB_rdk ?= "mq-nng" | ||
|
||
BEEROCKS_BH_WIRE_IFACE_rdk = "erouter0" | ||
BEEROCKS_BRIDGE_IFACE_rdk ?= "brlan0" | ||
# | ||
# FIXME: There is a bug in script printing status | ||
|
45 changes: 45 additions & 0 deletions
45
recipes-connectivity/prplmesh/prplmesh/001-bpl-cfg-explicit-wlan-iface-names.patch
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
diff --git a/framework/platform/bpl/CMakeLists.txt b/framework/platform/bpl/CMakeLists.txt | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need this patch? I think better to create PR in prplmesh project. |
||
index 3fe9d810..9b34a584 100644 | ||
--- a/framework/platform/bpl/CMakeLists.txt | ||
+++ b/framework/platform/bpl/CMakeLists.txt | ||
@@ -25,6 +25,12 @@ set(BEEROCKS_WPA_SUPPLICANT_WLAN3_CTRL_IFACE "/var/run/wpa_supplicant/${BEEROCKS | ||
# Add prplmesh_platform_db config generation | ||
add_subdirectory(platform_db) | ||
|
||
+configure_file( | ||
+ "${CMAKE_CURRENT_SOURCE_DIR}/linux/bpl_cfg.cpp.in" | ||
+ "${CMAKE_CURRENT_SOURCE_DIR}/linux/bpl_cfg.cpp" | ||
+ ) | ||
+ | ||
+ | ||
# OpenWRT | ||
if (TARGET_PLATFORM STREQUAL "openwrt") | ||
|
||
diff --git a/framework/platform/bpl/linux/bpl_cfg.cpp b/framework/platform/bpl/linux/bpl_cfg.cpp.in | ||
similarity index 97% | ||
rename from framework/platform/bpl/linux/bpl_cfg.cpp | ||
rename to framework/platform/bpl/linux/bpl_cfg.cpp.in | ||
index 93975c38..9d4711d4 100644 | ||
--- a/framework/platform/bpl/linux/bpl_cfg.cpp | ||
+++ b/framework/platform/bpl/linux/bpl_cfg.cpp.in | ||
@@ -296,11 +296,15 @@ int cfg_get_hostap_iface(int32_t radio_num, char hostap_iface[BPL_IFNAME_LEN]) | ||
return RETURN_ERR; | ||
} | ||
|
||
- // the linux implementation expects to receive "wlanX" for interface names where the X is: | ||
- // 0,2 for Linux-PC | ||
- // 0,1 for Turris-Omnia and GLInet | ||
- // we return 0,1,2 and the upper layer filters the non-supported interface | ||
- std::string iface_str("wlan" + std::to_string(radio_num)); | ||
+ std::string iface_str; | ||
+ switch (radio_num) { | ||
+ case 0: iface_str = "@BEEROCKS_WLAN1_IFACE@"; break; | ||
+ case 1: iface_str = "@BEEROCKS_WLAN2_IFACE@"; break; | ||
+ case 2: iface_str = "@BEEROCKS_WLAN3_IFACE@"; break; | ||
+ default: | ||
+ MAPF_ERR("cfg_get_hostap_iface: unknown iface index: " + std::to_string(radio_num)); | ||
+ return RETURN_ERR; | ||
+ } | ||
mapf::utils::copy_string(hostap_iface, iface_str.c_str(), BPL_IFNAME_LEN); | ||
return RETURN_OK; | ||
} |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like we just overwrite
BEEROCKS_HOSTAP_WLAN1_CTRL_IFACE
and it can cause the problems in other platforms...