Skip to content

Commit e292417

Browse files
Merge pull request #454 from vanmaegima/main
Portenta X8: Foundries.io review
2 parents dcc823f + 3d8bdb4 commit e292417

File tree

6 files changed

+48
-48
lines changed

6 files changed

+48
-48
lines changed

content/hardware/04.pro/boards/portenta-x8/tutorials/custom-container/content.md

+10-12
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ TEST_CMD="python3 --help"
5555
```
5656

5757
### Docker-compose.yml
58-
This file defines the app name through the factory, permissions and settings for the involved containers. The argument in the image tag will make it so our image file builds locally.
58+
This file defines the app name through the Factory, permissions and settings for the involved containers. The argument in the image tag will make it so our image file builds locally.
5959

6060
```python
6161
version: '3.6'
@@ -122,9 +122,9 @@ if __name__ == '__main__':
122122

123123
## Uploading the Container Folder
124124

125-
First, you have to have set up your board to a factory, as shown in the [Portenta X8 Out of the Box tutorial](https://docs.arduino.cc/tutorials/portenta-x8/out-of-the-box).
125+
First, you have to have set up your board to a Factory, as shown in the [Portenta X8 Out of the Box tutorial](https://docs.arduino.cc/tutorials/portenta-x8/out-of-the-box).
126126

127-
Once this is done, we will push our folder to a repository within the factory. Lets place our folder "x8-custom-test" inside the "containers.git" repository. You can find this repository inside your factory page, if you click on "Source". And then on "container.git", the url of this page will be used in the next command.
127+
Once this is done, we will push our folder to a repository within the Factory. Lets place our folder "x8-custom-test" inside the "containers.git" repository. You can find this repository inside your Factory page, if you click on "Source". And then on "container.git", the url of this page will be used in the next command.
128128

129129
![Source on Foundries.io Factory page](assets/custom-factory-page.png)
130130

@@ -138,19 +138,17 @@ In order to pull or push repositories you have to generate an API key. This can
138138

139139
![Token section in user settings](assets/token-page.png)
140140

141-
Use the following command in a Linux shell, like ADB which the previously mentioned tutorial showed how to set up. To get the repository on your board, replace the "YOUR_FACTORY" with the name of your factory. The "-m" tag selects the manifest file within the repository. If no manifest name is selected, the default is "default.xml". And the "-b" tag specifies a revision. Running this command will get the container repository, where we will put our folder.
141+
Use the following command in a Linux shell, like ADB which the previously mentioned tutorial showed how to set up. To get the repository on your board, replace "YOUR_FACTORY" with the name of your Factory. The "-b" parameter specifies a branch to checkout after cloning the repository. Running this command will get the container repository, where we will put our folder.
142142

143-
```python
144-
repo init -u https://source.foundries.io/factories/YOUR_FACTORY/containers.git -m arduino.xml -b devel
143+
```
144+
git clone https://source.foundries.io/factories/YOUR_FACTORY/containers.git -b devel
145145
```
146146

147-
We can also run ```repo sync``` to get the latest version of the repository. Put the "x8-custom-test" folder in the repository. If you push the commit to "container.git" a new target will automatically build on your Foundries.io Factory page.
148-
149-
***NOTE: The "repo sync" will at some point pause. This is because it is waiting for a username and password but the prompt will be hidden. Enter the username and password to move on.***
147+
Put the "x8-custom-test" folder in the repository. If you push the commit to "containers.git" a new target will automatically build on your FoundriesFactory, you can inspect it in the "Targets" page.
150148

151149
### Building and Running the Container
152150

153-
After uploading the folder to the repository. Navigate into the "x8-custom-test" folder, that should be located on your board now. This allows us to build our container with a simple command. Using ```docker build``` with a ```--tag``` will let us give the container a tag so we can easily keep track of what version of the build this is.
151+
After the build is finished, it can take up to 10 minutes for your device to OTA update to this new version. You can inspect it via the "Devices" tab of your FoundriesFactory. After your device takes the update, navigate into the "x8-custom-test" folder, that should be located on your board now. This allows us to build our container with a simple command. Using ```docker build``` with a ```--tag``` will let us give the container a tag so we can easily keep track of what version of the build this is.
154152

155153
```python
156154
docker build --tag "x8-custom-test:latest" .
@@ -184,7 +182,7 @@ docker-compose stop
184182

185183
## Conclusion
186184

187-
This tutorial went through what goes into a container, how the folder should be built and what files it should contain. It then explained what each files purpose is and what they should contain for this example. Then we went through how this relates back to the factory, and how Foundries.io makes the whole process easier for us. We then showed how to build the container and run it on the Portenta X8. Lastly, we showed a useful testing feature with docker-compose. Which lets us test our container with a faster process.
185+
This tutorial went through what goes into a container, how the folder should be built and what files it should contain. It then explained what each files purpose is and what they should contain for this example. Then we went through how this relates back to the Factory, and how Foundries.io makes the whole process easier for us. We then showed how to build the container and run it on the Portenta X8. Lastly, we showed a useful testing feature with docker-compose. Which lets us test our container with a faster process.
188186

189187
### Next Steps
190188

@@ -196,4 +194,4 @@ To get a better understanding of how to manage containers with Docker, take a lo
196194
Here are some errors that might occur in the process of this tutorial:
197195

198196
- Make sure you have followed our other tutorials that shows how to set up the [Portenta X8 out of the box](https://docs.arduino.cc/tutorials/portenta-x8/out-of-the-box)
199-
- If you are having issues with the adb shell, don't forget to try and use `sudo` and `su`
197+
- If you are having issues with the adb shell, don't forget to try and use `sudo` and `su`

content/hardware/04.pro/boards/portenta-x8/tutorials/display-output-webgl/content.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ The Arduino Portenta X8's processor **NXP® i.MX 8M Mini Processor** can be used
4040

4141
There are two ways to get the container, either through `foundriesFactories` or downloading the container from [portenta-containers repository](https://github.com/arduino/portenta-containers)
4242

43-
**With Foundries:**
43+
**With Foundries.io:**
4444

4545
If you use [Foundries.io](https://www.foundries.io) you can switch the current `target` of your device to `x-kiosk-imx8-webgl` by switching the app from a terminal on your computer:
4646

@@ -176,7 +176,7 @@ To save the changes press the **ESC** key and type `:wq` this will write and qui
176176

177177
## Conclusion
178178

179-
In this tutorial we went through how to connect the board and display something on a screen. Using a container from foundriesFactories or by downloading it and uploading it to your Portenta X8. Lastly, we showed how to edit the video output by editing the container.
179+
In this tutorial we went through how to connect the board and display something on a screen. Using a container from FoundriesFactories or by downloading it and uploading it to your Portenta X8. Lastly, we showed how to edit the video output by editing the container.
180180

181181
### Next Steps
182182

content/hardware/04.pro/boards/portenta-x8/tutorials/image-flashing/content.md

+5-6
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,9 @@ Required files following this structure:
4444

4545
```
4646
Root folder
47-
├── imx-boot
4847
├── imx-boot-portenta-x8
49-
├── lmp-partner-arduino-image-portenta-x8.wic.gz **(Unzipped)**
50-
├── mfgtool-files-portenta-x8.tar **(Unzipped)**
48+
├── lmp-partner-arduino-image-portenta-x8.wic.gz **(Compressed)**
49+
├── mfgtool-files-portenta-x8.tar.gz **(Compressed)**
5150
├── sit-portenta-x8.bin
5251
└── u-boot-portenta-x8.itb
5352
```
@@ -58,7 +57,7 @@ To get those files:
5857

5958
Go to the `lmp-manifest` [GitHub repository](https://github.com/arduino/lmp-manifest) and open the [releases](https://github.com/arduino/lmp-manifest/releases) section, there you will find a compressed `.tar.gz` with all the required files.
6059

61-
#### Through Foundries
60+
#### Through Foundries.io
6261

6362
Open your FoundriesFactory®.
6463

@@ -76,7 +75,7 @@ On the "Runs" section open those collapsed labels, and download the files listed
7675

7776
![Foundries.io target runs section](assets/foundries-factories-target-runs.png)
7877

79-
After downloading them, make sure you put them in a folder following the structure shown.
78+
After downloading them, make sure you put them in a folder following the structure shown and extract the compressed files.
8079

8180
### Set the Portenta X8 to Flashing Mode
8281

@@ -102,7 +101,7 @@ Switch back the DIP switches to OFF position.
102101

103102
Unplug and then plug in the Portenta X8 to your computer.
104103

105-
***After flashing you will need to wait 10 secs, until the Portenta X8 blue LED starts blinking, this means the boot was successful***
104+
***After booting you will need to wait 10 secs, until the Portenta X8 blue LED starts blinking, this means the boot was successful***
106105

107106
## Troubleshooting
108107

content/hardware/04.pro/boards/portenta-x8/tutorials/out-of-the-box/content.md

+23-20
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ software:
3030

3131
## Connecting to the Board
3232

33-
Once the Portenta X8 is plugged in via USB, you can open your browser and go to http://192.168.7.1 if you use Windows and Linux or http://192.168.8.1 on MacOS. This web page is hosted on the Portenta X8, from this dashboard you will be able to:
33+
Once the Portenta X8 is plugged in via USB, you can open your browser and go to http://192.168.7.1 if you use Windows and Linux or http://192.168.8.1 on MacOS. It can take up to 15 seconds for the board to boot up and make the page available. This web page is hosted on the Portenta X8, from this dashboard you will be able to:
3434

3535
![Board set up page](assets/x8-oob-main.png)
3636

3737
* [Configure Wi-Fi](#connecting-to-your-wi-fi)
38-
* [Add your device to a factory (OTA)](#add-a-new-device-to-your-factory)
38+
* [Add your device to a FoundriesFactory (OTA)](#add-a-new-device-to-your-factory)
3939
* Board details
4040
* Shell (alpine python)
4141

@@ -59,36 +59,36 @@ Once it is connected, you should see the Wi-Fi status bullet in the bottom left
5959

6060
***You can change your network by clicking on the button again and repeat the above steps***
6161

62-
## Connect to a Factory
62+
## Connect to a FoundriesFactory
6363

64-
### Register the Factory on Foundries.io
64+
### Register the FoundriesFactory on Foundries.io
6565

6666
***The integration with Foundries.io requires the Arduino Pro Cloud Subscription, contact us at [Arduino Pro Inquiries](https://www.arduino.cc/pro/contact-us), or learn more on the [Arduino Pro Page](https://www.arduino.cc/pro/hardware/product/portenta-x8#pro-cloud)***
67-
Go to [https://create.arduino.cc](https://create.arduino.cc) and click on portenta-X8 board manager, you will get prompted to set a new `Factory` name if you didn't have one before. You will not be able to be change the name later, so use one that you can remember and write easily.
67+
Go to [https://create.arduino.cc](https://create.arduino.cc) and click on Portenta X8 Board Manager, you will get prompted to set a new `Factory` name if you didn't have one before. You will not be able to be change the name later, so use one that you can remember and write easily.
6868

6969
![Arduino Cloud integration](assets/cloud-main.png)
7070

71-
It will redirect you to the Foundries.io factory registration page.
71+
It will redirect you to the FoundriesFactory registration page.
7272

7373
![Foundries Factory creation](assets/foundries-create-factory.png)
7474

75-
Then you can go to [https://app.foundries.io/factories](https://app.foundries.io/factories) and it will show the factory you just created.
75+
Then you can go to [https://app.foundries.io/factories](https://app.foundries.io/factories) and it will show the Factory you just created.
7676

7777
![Foundries Factories](assets/foundries-factories.png)
7878

79-
After you have created your Foundries.io factory you need to go back to the Portenta-X8 web dashboard to add a new device into your new factory.
79+
After you have created your FoundriesFactory you need to go back to the Portenta-X8 web dashboard to add a new device into your new Factory.
8080

8181
### Add A New Device To Your Factory
8282

8383
Click the "Register Factory name" button.
8484

85-
![Register factory button](assets/x8-oob-main-factory.png)
85+
![Register Factory button](assets/x8-oob-main-factory.png)
8686

8787
![Factory connection](assets/x8-oob-factory-name.png)
8888

8989
The next panel gives you a code that you need to copy.
9090

91-
![Device factory token](assets/x8-oob-factory-register.png)
91+
![Device Factory token](assets/x8-oob-factory-register.png)
9292

9393
Click on the "Complete registration" button on the Portenta X8 dashboard
9494

@@ -100,29 +100,29 @@ Confirm the addition of the new device by pressing "Connect"
100100

101101
![Foundries device confirmation](assets/foundries-activation-prompt.png)
102102

103-
Finally you will see a confirmation which means that your device now is attached to the new factory.
103+
Finally you will see a confirmation which means that your device now is attached to the new Factory.
104104

105-
![Dashboard with a factory attached](assets/foundries-activation-success.png)
105+
![Dashboard with a Factory attached](assets/foundries-activation-success.png)
106106

107-
Once it is completed, the factory button on the Portenta X8 dashboard will turn green.
107+
Once it is completed, the Factory button on the Portenta X8 dashboard will turn green.
108108

109109
![Successful connection](assets/x8-oob-factory-success.png)
110110

111-
#### Check Your Factory
111+
#### Check Your FoundriesFactory
112112

113113
Have a look to your factories by going to [Foundries.io factories page](https://app.foundries.io/factories)
114114

115115
![Foundries.io factories page](assets/foundries-factories.png)
116116

117-
Select the factory that you want to check and it will open its dashboard.
117+
Select the Factory that you want to check and it will open its dashboard.
118118

119119
![Foundries.io Factory dashboard](assets/foundries-factory-dashboard.png)
120120

121121
#### Check Your Device
122122

123-
You can check if your device is fully connected to your factory by going to the "devices" tab.
123+
You can check if your device is fully connected to your Factory by going to the "devices" tab.
124124

125-
![Foundries.io factory devices page](assets/foundries-factory-devices.png)
125+
![Foundries.io Factory devices page](assets/foundries-factory-devices.png)
126126

127127
Then choose the device you want to check by clicking on its box and it will open its page.
128128

@@ -170,18 +170,21 @@ To check your manager connection status, use this command:
170170

171171
`nmcli de`
172172

173-
### Register Device to the Factory
173+
### Register Device to the FoundriesFactory
174174

175175
Make sure the name is not already being used in your Factory.
176176

177177
`lmp-device-register -n <newDeviceName>`
178178

179-
**Not recommended:** In case you cannot register the new device, you can erase the current device info by removing `/var/sota/sql.db`
179+
**Not recommended:** In case you cannot register the new device, you can erase the current device info by stopping the OTA services and removing `/var/sota/sql.db`. After these commands, you can register the device again.
180180

181+
`sudo systemctl stop aktualizr-lite`
182+
`sudo systemctl stop fioconfig.path`
183+
`sudo systemctl stop fioconfig.service`
181184
`sudo rm /var/sota/sql.db`
182185

183186
### Inspecting Real Time Tasks
184187

185188
Run: `journalctl -f` to see what's going on on the device
186189

187-
![Real time tasks on CLI](assets/command-journalctl.png)
190+
![Real time tasks on CLI](assets/command-journalctl.png)

0 commit comments

Comments
 (0)