Skip to content

Commit

Permalink
oob: Fix OOB findings
Browse files Browse the repository at this point in the history
* Install missing `libXcursor` package needed by Fast-models third
party add-ons installer
* Install missing `libncursesw5` package needed by arm-none-eabi-gdb
* Install ninja build tool
* Fix incorrect link for `container_post_startup.sh` in
devcontainer.json
* Improve documentation based on OOB feedback

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
  • Loading branch information
urutva committed Mar 28, 2024
1 parent 2c555d0 commit a995430
Show file tree
Hide file tree
Showing 8 changed files with 87 additions and 21 deletions.
3 changes: 3 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,16 @@ RUN apt-get update && \
liblzma-dev \
libncurses5 \
libncurses5-dev \
libncursesw5 \
libpython3.9-dev \
libreadline6-dev \
libsndfile1 \
libsqlite3-dev \
libssl-dev \
libxcursor-dev \
lzma \
lzma-dev \
ninja-build \
pkg-config \
python3.9 \
python3-pip \
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
}
},
"remoteUser": "ubuntu",
"postCreateCommand": "bash /workspaces/tmp-project-fri-devcontainer/tools/scripts/container_post_startup.sh",
"postCreateCommand": "bash /workspaces/iot-reference-arm-corstone3xx/tools/scripts/container_post_startup.sh",
"remoteEnv": {
"PATH": "${containerEnv:PATH}"
}
Expand Down
2 changes: 2 additions & 0 deletions .github/.cSpellWords.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ ASYM
BBOOL
blinky
Blinky
buildx
BWCAP
CALIB
cbor
Expand Down Expand Up @@ -138,6 +139,7 @@ Merkle
Mfcc
MFCC
MFLN
mlek
mqtt
mqttconfig
Mqtt
Expand Down
1 change: 0 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"gdbTarget": ":31627",
"overrideLaunchCommands": [
"-enable-pretty-printing",
"load ${input:FRIApplication}.axf",
"break main.c:main",
"add-symbol-file iot_reference_arm_corstone3xx/components/security/trusted_firmware-m/integration/trusted_firmware-m-build-prefix/src/trusted_firmware-m-build-build/api_ns/bin/bl2.axf",
"add-symbol-file iot_reference_arm_corstone3xx/components/security/trusted_firmware-m/integration/trusted_firmware-m-build-prefix/src/trusted_firmware-m-build-build/api_ns/bin/tfm_s.axf",
Expand Down
18 changes: 9 additions & 9 deletions docs/applications/aws_iot/setting_up_aws_connectivity.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ AWS IoT Core authenticates device connections with the help of X.509 certificate
and a certificate that's signed with this key.
* Optionally you can specify metadata for the certificate. Use the ```-h``` flag for the Python script to see the available options.
```bash
python ./tools/scripts/generate_credentials.py --certificate_valid_time <validity duration in days > \
--certificate_country_name <Country Name (2 letter code)> \
--certificate_state_province_name <State or Province Name (full name)> \
--certificate_locality_name <Locality Name (eg, city)> \
--certificate_org_name <Organization Name (eg, company)> \
--certificate_org_unit_name <Organizational Unit Name (eg, section)> \
--certificate_email_address_name <Email Address> \
--certificate_out_path <output path> \
--private_key_out_path <output path>
python3 ./tools/scripts/generate_credentials.py --certificate_valid_time <validity duration in days > \
--certificate_country_name <Country Name (2 letter code)> \
--certificate_state_province_name <State or Province Name (full name)> \
--certificate_locality_name <Locality Name (eg, city)> \
--certificate_org_name <Organization Name (eg, company)> \
--certificate_org_unit_name <Organizational Unit Name (eg, section)> \
--certificate_email_address_name <Email Address> \
--certificate_out_path <output path> \
--private_key_out_path <output path>
```
1. In the left navigation panel **Manager** section of the AWS IoT console,
expand **Security**, and then select **Certificates**.
Expand Down
16 changes: 16 additions & 0 deletions docs/development_environment/linux_dev_env.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@
git config --global user.email "email@address"
git config --global user.name "User Name"
```

* Installing CMake

```bash
sudo apt update
sudo apt install cmake -y
```

* Setting up Python 3 virtual environment

```bash
Expand Down Expand Up @@ -97,3 +105,11 @@ argument, you should run:
```
git submodule update --init --recursive
```

## Troubleshooting

* If the error `[MQTT Agent Task] DNS_ReadReply returns -11` is appearing, then
try disabling DHCP in FreeRTOS TCP/IP stack:
* In the file,
`applications/<application_name>/configs/freertos_config/FreeRTOSIPConfig.h`,
set `ipconfigUSE_DHCP` to value `0`
65 changes: 55 additions & 10 deletions docs/development_environment/vscode_dev_env_build_and_debug.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ https://github.com/FreeRTOS/iot-reference-arm-corstone3xx
* The VS Code window (instance) will reload, clone the source code, and start
building the dev container. A progress notification provides status updates.

If building the container fails, then check the [troubleshooting](#troubleshooting)
section for possible solutions.

Note:
`zsh` and `ohmyzsh` is setup by default in the container. If you would like to
use `bash`, then:
Expand Down Expand Up @@ -156,16 +159,33 @@ These options allow you to run reference applications in debug mode.
* On the top right corner, click on `Downloads`
* In the search window enter `FM000A`
* Click on the search result `Fast Models (FM000A)`
* Download `Third Party Add-ons for Fast Models` for your operating system
* The `Third Party Add-ons for Fast Models` installer needs Graphical User
Interface, therefore, if you are running the installer in VS Code devcontainer,
then make sure X11 forwarding is working between devcontainer and host before
running following the following:
* copy downloaded ``Third Party Add-ons for Fast Models` to devcontainer
(drag and drop from host to devcontainer)
* tar -xzf FastModels_ThirdParty_IP_11-25_b15_Linux64_armv8l.tgz
* cd FastModels_ThirdParty_IP_11-25_Linux64_armv8l
* ./setup.bin
* Download `Third Party Add-ons for Fast Models <version> on Linux`[AArch64/x86]
based on the processor architecture of the machine
* copy downloaded ``Third Party Add-ons for Fast Models` to devcontainer
(drag and drop from host to devcontainer)

```bash
tar -xzf FastModels_ThirdParty_IP_11-25_b15_Linux64[_armv8l].tgz
cd FastModels_ThirdParty_IP_11-25_Linux64[_armv8l]
./setup.bin --i-accept-the-end-user-license-agreement
```

> Note:
Using this option means you have read and accepted the terms and
conditions of the End User License Agreement for the product and version
installed.

NOTICE FOR SOFTWARE FILES DELIVERED BY ARM LIMITED FOR CONVENIENCE ONLY

THIS NOTICE ("NOTICE") IS FOR THE USE OF THE SOFTWARE ACCOMPANYING THIS
NOTICE. ARM IS ONLY DELIVERING THE SOFTWARE TO YOU FOR CONVENIENCE ON
CONDITION THAT YOU ACCEPT THAT THE SOFTWARE IS NOT LICENSED TO YOU BY ARM
BUT THAT THE SOFTWARE IS SUBJECT TO A SEPARATE LICENSE. BY CLICKING
"I AGREE" OR BY INSTALLING OR OTHERWISE USING OR COPYING THE SOFTWARE YOU
INDICATE THAT YOU AGREE TO BE BOUND BY ALL THE TERMS OF THE INDIVIDUAL
LICENSE AGREEMENTS OF THE SOFTWARE AND IF YOU DO NOT AGREE TO THE TERMS OF
THIS NOTICE, ARM IS UNWILLING TO DELIVER THE SOFTWARE TO YOU AND YOU MAY
NOT INSTALL, USE OR COPY THE SOFTWARE.

Once the installation is successful, the GDBRemoteConnection library can be
found in
Expand Down Expand Up @@ -195,3 +215,28 @@ Run and Debug (Ctrl+Shift+D)

As soon as a debugging session starts, the DEBUG CONSOLE panel is displayed and
shows debugging output.

## Troubleshooting

### Linux machines

* If building the container fails with:
```
ERROR [3/5] RUN apk add --no-cache git-lfs nodejs python3 npm make g++
docker-cli docker-cli-buildx docker-cli-compose openssh-client-def
```
then, try turing VPN off and rebuild the container.
* If the error `[MQTT Agent Task] DNS_ReadReply returns -11` is appearing even
with VPN turned off, then try disabling DHCP in FreeRTOS TCP/IP stack:
* In the file,
`applications/<application_name>/configs/freertos_config/FreeRTOSIPConfig.h`,
set `ipconfigUSE_DHCP` to value `0`

### Windows machines

* If building the container fails with:
```
ERROR [3/5] RUN apk add --no-cache git-lfs nodejs python3 npm make g++
docker-cli docker-cli-buildx docker-cli-compose openssh-client-def
```
then, try turing VPN off and rebuild the container.
1 change: 1 addition & 0 deletions release_changes/202403251653.change
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix OOB findings

0 comments on commit a995430

Please sign in to comment.