Note: This project was written in July of 2023 with Flex-Installer version 1.14.2110 as the latest release, but should continue to be applicable to newer releases
What is Flex-Installer?- Flex-Installer allows a user to quickly deploy LLDP or LSDK images for various use cases such as deploying firmware images and formatting storage devices
- Flex-Installer is a bash script written and maintained by NXP
- Flex-Installer source code is provided on GitHub and is licensed under the BSD 3-Clause
Navitate to GitHub nxp-imx/meta-nxp-desktop
From there, navigate to the /scripts
directory
Make sure you are looking at the latest branch or tag.
These were the latest as of the time this article was written
- Branch:
lf-6.1.22-2.0.0-mickledore
- Tag:
rel_lf_6.1.22_2.0.0_ldp
You will see two files
- Documentation: Named
README-flex-installer.md
orREADME.md
- Bash script: Named
flex-installer_1.14.2110.lf
orflex-installer
There are 4 sources of documentation that I know of, and there may be more
1 The README-flex-installer.md
file on GitHub
2 The LLDP User Guide, HTML version
- Section Download and deploy Layerscape LDP images in Linux environment using flex-installer
- Section Deploying Layerscape LDP images to a board using flex-installer
3 The LLDP User Guide, PDF version
- Section 4.2 Download and deploy Layerscape LDP images in Linux environment using flex-installer
- Section 4.4 Deploying Layerscape LDP images to a board using flex-installer
- Section 4.6 Downloading a TinyDistro image to a Layerscape board using flex-installer
4 The LSDK User Guide, HTML version, Download and deploy LSDK images with flex-installer in Linux environment
How do I install the Flex-Installer?I will provide 2 methods for installing the Flex-Installer
- 1 The method offered by NXP in the GitHub scripts
README-flex-installer.md
- 2 The method that I recommend
NXP wants to install the script to /usr/bin
which is reserved for applications installed by a package manager. The correct location to install the script is /usr/local/bin.
I also want to be able to call Flex-Installer as root, and I have experienced a situation where root did not have access to /usr/local/bin
but did have access to /usr/local/sbin
; this is an unusual case but I like to fix possible issues in advance.
EXAMPLE $ git clone https://github.com/nxp-imx/meta-nxp-desktop.git \
-b lf-6.1.1-1.0.0-langdale && \
cp meta-nxp-desktop/scripts/flex-installer_1.14.2110.lf \
/usr/bin/flex-installer && \
sudo chmod a+x /usr/bin/flex-installer && \
flex-installer -v
Installing Flex-Installer using my preferred methodNote: I have included a bash script in this project that you can download. It will perform all of the below commands for you automatically
Note: In the instructions that follow, the "$" represents a Linux Bash shell prompt and signifies that you are to copy all of the text after the "$"
Copy the following text into your preferred editor and modify as needed, then paste into the command line
$ export Account="https://github.com/nxp-imx" && \
export Project="meta-nxp-desktop" && \
export Directory="scripts" && \
export Branch="lf-6.1.22-2.0.0-mickledore" && \
export Tag="rel_lf_6.1.22_2.0.0_ldp" && \
export GitName="flex-installer_1.14.2110.lf" && \
export BuildDir="${HOME}/Builds" && \
export FileName="flex-installer"
Move to the build directory
$ mkdir -p "$BuildDir" && cd "$BuildDir"
Delete previous cloned project, if it exists
$ rm -rf "${Project}"
Clone the project and move into it
$ git clone "${Account}/${Project}" -b "${Branch}" && \
cd "${Project}"
Check out the specified tag
$ git checkout "tags/${Tag}"
Remove old versions of UUU
$ sudo rm -f "/usr/local/sbin/${FileName}" && \
sudo rm -f "/usr/local/bin/${FileName}"
Install Flex-Builder for user access
$ sudo cp "${BuildDir}/${Project}/${Directory}/${GitName}" \
"/usr/local/bin/${FileName}"
Change permissions
$ sudo chmod a+x "/usr/local/bin/${FileName}"
Add symbolic link for root
$ sudo ln -s "/usr/local/bin/${FileName}" \
"/usr/local/sbin/${FileName}"
Test that the Flex-Installer is properly installed
$ flex-installer -v
The endPlease let me know in the comments if these instructions were useful for you.
If you run into any issues, please share what happened so I can update my instructions.
Comments
Please log in or sign up to comment.