RoadTest: NXP Layerscape® LS1046A Freeway Board
Evaluation Type: Development Boards & Tools
Did you receive all parts the manufacturer stated would be included in the package?: True
What other parts do you consider comparable to this product?: Raspberry Pi 4
What were the biggest problems encountered?: Limited support materials.
Personal Cloud on NXP Layerscape® LS1046A Freeway Board
First of all, I'd like to thank NXP for providing this roadtest kit and element14 for organizing this roadtest.In general, this kit is a very cost effective tool for evaluating the powerful LS1046A microprocessor. Although NXP's flexbuild build system fully supports this board, it's totally different situation for common open source build systems such as Yocto, Buildroot, OpenWRT/LEDE, etc. NXP provides good support for its LS1046A Reference Design Board(LS1046ARDB) on those build systems but unfortunately not for this Freeway Board. Thus, I think this kit may be good choice for professional developers for certain applications but it won't be the easiest kit to use for makers and hobbyists. For makers who'd like to create a customized Linux system for their applications, I would definitely recommend Raspberry Pi 4 rather than this roadtest board. There's another inconvenience with this kit: the USB/Serial connection is not ready until the board is powered up. That means you will miss the very first console messages such as U-Boot messages. It's not a show stopper but it does make life a little bit inconvenient. To capture the U-Boot messages, you may need to reboot the board by either issuing reboot/shutdown command from Linux terminal (preferable) or push the reset button on the board.
NXP provides a high quality demo software for this kit as presented by a few roadtesters in their reviews such as crisdeodates's NXP Layerscape® LS1046A Freeway Board - Review and Attila Tőkés's NXP Layerscape® LS1046A Freeway Board - Review. In my review, I am not going to repeat what they have presented. Instead, I'd like to demo how I set up a personal cloud server on this kit using customized Linux OS and Docker container.
My original plan was to customize and build an OpenWRT on this kit, but after doing some research, I noticed there's no OpenWRT support for this kit yet (it has support for LS1046A Reference Design Board - LS1046ARDB). In general, the community support for this kit is very limited. Thus I had to change my plan and used what I could find. I ended up using NXP's flexbuild. This is the only build system I can find for this kit.
To help build your own Linux OS for this kit, NXP provides a document titled Layerscape FRWY-LS1046A BSP User Guide (see the reference link at the end of this review). I am using Ubuntu 18.04 as my host system for building the OS for this kit. Here's the steps:
First, you need to download the flexbuild build system from this link. Please note that you have to register a free MY NXP account at www.nxp.com first before you can download from the above link. The file you need to download is flexbuild_ls1046afrwy_bsp0.1.tgz. After the file is downloaded, you need to unzip and set up flexbuild environment using the following commands:
$ tar xvzf flexbuild_ls1046afrwy_bsp0.1.tgz
$ cd flexbuild
$ source setup.env
We need to download the kernel modules and app components so we can merge them into a compressed rootfs. First, download the packages using the following commands.
Next,we generate Ubuntu arm64 userland using this command:
$ flex-builder -i mkrfs -r ubuntu -a arm64
Decompress the app components and kernel modules using the following commands:
$ tar xvzf app_components_LS_arm64.tgz -C build/apps
$ sudo tar xvzf lib_modules_LS_arm64_4.14.83.tgz -C build/rfs/rootfs_ubuntu_bionic_LS_arm64/lib/modules
Finally we merge the above parts to a rootfs and compress it using commands:
$ flex-builder -i merge-component -a arm64
$ flex-builder -i compressrfs -a arm64
The outcoming root file system is named rootfs_ubuntu_bionic_LS_arm64.tgz that is located under build/images folder.
First, we need to download two more packages - the firmware for this kit and a boot partition using the following commands:
Next, we create a SD card with the rootfs created in the last step and the above downloaded packages using the following command:
$ flex-installer -b bootpartition_LS_arm64_lts_4,14.tgz -r build/images/rootfs_ubuntu_bionic_LS_arm64.tgz -f firmware_ls1046afrwy_uboot_sdboot.img -d /dev/mmcblk0
Unplug the mciro SD card from your host computer and plug it into the slot located at the rear panel of the box. Connect USB cable from the micro USB port on the front panel of the box to your host computer's USB port. Last plug the AC/DC power adapter's barrel connector to the rear panel of the box to power up the kit.
We need to configure the board through the USB/UART port (e.g., /dev/ttyUSB0). I used minicom command to connect to the UART port. For the first time, you need to run minicom as super user using the following command:
$ sudo minicom -D /dev/ttyUSB0
If you don't want to always run minicom as super user, you may want to add your user name to dialout group using the following command:
$ sudo usermod -a -G dialout your_username
Now, you can type the following command to start minicom:
$ minicom -D /dev/ttyUSB0
The serial configuration parameters are:
Both the login user name and password are root.
As for configuration, we need to bring up Ethernet port 1 and configure IP address, default gateway and DNS server. The following commands will do the job.
$ ifconfig fm1-mac5 up
$ sudo ip addr add 192.168.1.234/24 dev fm1-mac5
$ sudo ip route add default via 192.168.1.1
$ sed -i 's/127.0.0.1/126.96.36.199/g' /etc/resolv.conf
We will run Nextcloud in docker container so we need to get a docker image for Nextcloud. As shown in the following screenshot, we can type the following command to get the docker image.
docker pull nextcloud
Type the following command to start Nextcloud in docker container.
docker run -d -p 8080:80 nextcloud
In your browser, type https://your_nextcloud_server_ip_address:8080 (my server ip address is 192.168.1.234). First, it will ask you to create an admin account.
It takes a few minutes to finish the setup for the admin account.
Once the setup is done, you can create a normal user and login as normal user.
The first page after login, you will see the following page. At the top left of the browser body, it shows a series of icons from left to right: Nextcloud icon, Files, Photos, Activity, Contacts and Calendar. Under each icon, you can do some operations. For example, under Files tab, you can create a new folder or new text document. You can also upload or download files.
Under Photos tab, you can preview or slide view all photos under the Photos folder as shown below.
Under Activity tab, it shows the history of all your operations such as upload, download or delete files, etc.
Under Mail tab, you can view your emails. Obviously, you have to setup your email accounts first.
Under Contacts tab, you can add contact information or import it from Virtual Contact File (VCF/Vcard).
Under Calendar tab, you can create a new calendar, add an event to a calendar or import a calendar, etc.
In addition to the web client interface to Nextcloud server, there are also client software available on Desktop and Apps (both iOS and Android).
For example, the following screenshots are captured from my iPhone App - Nextcloud client.
The next 3 screenshots show how easily you can upload photos to your personal cloud service on your iPhone.
Thanks for the good review!
Just letting you know, there's a new Linux image available to download. This has Google TPU demos included. If you purchase a Google TPU (either USB or m.2), you could make it do inferencing much quicker!