Note
This guide is only valid for webOS OSE with Yocto 3.1 (webOS OSE version: 2.14.0 ~ 2.18.0).
This guide is only valid for webOS OSE with Yocto 3.1 (webOS OSE version: 2.14.0 ~ 2.18.0).
This guide describes how to bring up an NVIDIA Jetson Nano board to run webOS OSE.
NVIDIA Jetson Nano Developer Kit and a power supply for the kit
A MicroSD card (8 GB or larger) and MicroSD card reader
A computer using Linux distribution
An Ethernet cable and internet connection
A USB to TTL serial cable
(Optional) Input devices such as a keyboard and a mouse
(Optional) HDMI-compatible monitor and cable
See also Build System Requirements and Host Machine Requirements.
Before you start to bring up a Jetson Nano board, you need to update the firmware of the board to the latest version.
For more information about getting started with Jetson Nano Developer Kit, check the official guide on the NVIDIA developer website.
Building a webOS OSE image for Jetson Nano is done in much the same way as building an image for Raspberry Pi. By modifying few steps to the existing guide, you can build the image for the Jetson Nano board.
You can clone the webOS OSE’s source code with the following command:
$ git clone https://github.com/webosose/build-webos.git
Then move into the build-webos
directory.
$ cd build-webos
Before you build webOS OSE, you need to install the required tools and libraries first. If you try to build without them, BitBake will fail a sanity check and tell you what’s missing, but not really how to get the missing pieces. On Ubuntu, you can force all of the missing pieces to be installed with the following command:
$ sudo scripts/prerequisites.sh
To build an image for Jetson Nano, add jetson-nano-devkit
to build-webos/weboslayer.py
. This will be used in the Configuring the Build section.
build-webos/weboslayer.py |
---|
|
meta-tegra
is a BSP (Board Support Packages) layer for the NVIDIA Jetson platforms. The BSP layer provides board specific information such as machine configuration files and recipes. If you want to learn more about BSP layer and Yocto project, see the official document.
To add the repository, add the following codes to build-webos/weboslayer.py
:
('meta-tegra', 30, 'https://github.com/OE4T/meta-tegra.git', 'branch=dunfell-l4t-r32.6.1', ''),
Make sure that you add the above code in ascending order. In the following example code, note the order of the number:
Example of build-webos/weboslayer.py |
---|
|
To configure the build for the target device and to fetch the sources, run the following command:
$ ./mcf -p A_HALF_NUMBER_OF_PHYSICAL_CPU_CORES -b A_HALF_NUMBER_OF_PHYSICAL_CPU_CORES jetson-nano-devkit
We highly recommend to use the value less than half of the number of physical CPU cores. If you specify a number higher than that, it might cause unexpected errors during the build. For more information about how to set the option values, see How to Find the Optimum Parallelism Values.
The mcf
command creates a file to initialize the build environment.
Before you build the source code, you need to modify Yocto configuration files.
First initialize the build environment:
$ source oe-init-build-env
Copy and paste the following codes at the end of build-webos/meta-webosose/meta-webos/conf/layer.conf
:
build-webos/meta-webosose/meta-webos/conf/layer.conf |
---|
|
In build-webos/meta-tegra/recipes-bsp/u-boot/u-boot-tegra_2020.04.bb
, add and remove commands as follows:
build-webos/meta-tegra/recipes-bsp/u-boot/u-boot-tegra_2020.04.bb |
---|
|
In meta-webosose/meta-webos/recipes-qt/qt6/qtbase_git.bbappend
, remove a line regarding to “eglfs-egldevice”.
meta-webosose/meta-webos/recipes-qt/qt6/qtbase_git.bbappend |
---|
|
Create an directory as follows:
mkdir -p build-webos/meta-tegra/recipes-qt/qt6
Move to the build-webos/meta-tegra
directory and cherry-pick the following two commits:
(build-webos/meta-tegra)$ git cherry-pick 47b14268ef9aaccf57604e1665612faa239c2223
(build-webos/meta-tegra)$ git cherry-pick f30f4cf1e9edc2eb47b76dfa07cd1be8947a98df
Cherry-picking generates files in build-webos/meta-tegra/external/qt5-layer/recipes-qt/qt5
. Move the files to the directory created in the step 2.
mv build-webos/meta-tegra/external/qt5-layer/recipes-qt/qt5/* build-webos/meta-tegra/recipes-qt/qt6
# Check the result
tree build-webos/meta-tegra/recipes-qt/qt6
build-webos/meta-tegra/recipes-qt/qt6
├── qtbase
│ ├── 0001-eglfs-Newer-Nvidia-libdrm-provide-device-instead-dri.patch
│ └── 0002-eglfs-add-a-default-framebuffer-to-NVIDIA-eglstreams.patch
└── qtbase_%.bbappend
1 directory, 3 files
Then remove the empty directory.
rm -rf build-webos/meta-tegra/external/qt5-layer
In build-webos/meta-tegra/recipes-qt/qt6/qtbase_%.bbappend
, add following two lines:
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
SRC_URI += "file://0001-eglfs-Newer-Nvidia-libdrm-provide-device-instead-dri.patch \
file://0002-eglfs-add-a-default-framebuffer-to-NVIDIA-eglstreams.patch \
"
PACKAGECONFIG:append:tegra = " kms"
+PACKAGECONFIG:append:tegra = " gbm eglfs-egldevice"
+DISTRO_FEATURES:remove = "ptest"
In build-webos/meta-tegra/recipes-qt/qt6
, create the following files:
qtdeclarative_%.bbappend
qtgraphicaleffects_%.bbappend
qtshadertools_%.bbappend
qtwayland_%.bbappend
touch build-webos/meta-tegra/recipes-qt/qt6/qt{declarative,graphicaleffects,shadertools,wayland}_%.bbappend
Add a line, DISTRO_FEATURES:remove = "ptest"
, to each file created in the step 6.
To start the build process, run the following command:
(build-webos)$ source ./oe-init-build-env
(build-webos)$ bitbake webos-image
If the build succeeds, you can find the built webOS OSE image at the BUILD/deploy/images/<TARGET DEVICE NAME>
directory. Move to the directory.
$ cd build-webos/BUILD/deploy/images/jetson-nano-devkit
Create an image for MicroSD card.
$ mkdir jetson-nano-image
$ tar -zxvf webos-image-jetson-nano-devkit.tegraflash.tar.gz -C ./jetson-nano-image
$ cd jetson-nano-image
$ ./dosdcard.sh
Insert your MicroSD card into your PC and flash the created image to your microSD card.
$ sudo umount /dev/sd<xN>
$ sudo dd if=./webos-image.sdcard of=/dev/sd<x> bs=10M
$ sync
$ sudo umount /dev/sd<xN>
sd<xN>
denotes the device name of the MicroSD card, where x
is a character and N
is a number suffix.dd
command, you must pass sd<x>
(x
is the same as the x
in the above) to the of
operand. sd<X>
indicates the mass storage device, not the partition.If the flashing succeeds, remove the MicroSD card from the PC and insert the card into your target device.
At this moment, if you turn on the target device, none of the peripheral devices (touch display, keyboard, and mouse) are work. To use the peripheral devices and other useful features, you need to set up extra configurations.
Since you cannot use keyboard on the target board yet, you have to establish a serial connection between the host machine and the target device.
Using the USB to TTL serial cable, connect the host machine and the target device.
Serial cable wiring in Jetson Nano board
Jetson Nano | Serial cable color |
---|---|
GND | Black |
UART TXD | White |
UART RXD | Green |
Then set up the serial connection by following the Set Up a Serial Terminal guide.
Once you set up a serial connection successfully, connect to the target device and modify the files specified in the subsequent sections.
Modify /etc/surface-manager.d/product.env
as follows:
/etc/surface-manager.d/product.env |
---|
|
QT_QPA_EGLFS_INTEGRATION
into eglfs_kms_egldevice
.WEBOS_COMPOSITOR_DISPLAY_CONFIG
. This change makes WEBOS_COMPOSITOR_DISPLAY_CONFIG
get its value from configd
.After modifying the /etc/surface-manager.d/product.env
file, you have to reboot Home Launcher and the target device.
$ root@jetson-nano-devkit:~# restart surface-manager
restart surface-manager
$ root@jetson-nano-devkit:~# restart bootd
restart bootd
You need to install necessary plugins for the touch display and the keyboard devices. Modify /usr/bin/surface-manager.sh
as follows:
/usr/bin/surface-manager.sh |
---|
|
After modifying the /usr/bin/surface-manager.sh
file, you have to reboot Home Launcher and the target device.
$ root@jetson-nano-devkit:~# restart surface-manager
restart surface-manager
$ root@jetson-nano-devkit:~# restart bootd
restart bootd
If you see the following screen on your monitor, you have successfully brought up your board on webOS OSE.
You can use webOS OSE on other NVIDIA machines. The following table shows the target device name for each NVIDIA machine.
NVIDIA Machine | Target Device Name | ||
---|---|---|---|
Jetson TX1 | jetson-tx1-devkit* | ||
Jetson TX2 | jetson-tx2-devkit | jetson-tx2-devkit-4gb* | |
Jetson Nano | jetson-nano-devkit | jetson-nano-devkit-emmc* | jetson-nano-2gb-devkit* |
Jetson AGX Xavier | jetson-agx-xavier-devkit | jetson-agx-xavier-devkit-8gb* |
* : This machine is not tested on webOS OSE.
Contents