git clone https://github.com/mixtile-rockchip/genimage-tools.git
cd genimage-toolsBefore running the script, edit genimage.sh and replace server_ip in the URL variable with your own APK repository server address.
Example:
URL="http://server_ip/alpine/"Replace it with something like:
URL="http://your_server_ip/alpine/"Before generating images, replace the default key in tools/encrypted_key with the encryption key you already generated in the NAOS build guide.
Keep the image generator and the built system using the same encryption key.
Then update the key= value in tools/encrypted_key.
Example:
key=YOUR_EXISTING_HEX_KEY
- Ubuntu Linux x86_64 dependencies:
sudo apt install genext2fs qemu-user-static binfmt-support squashfs-tools f2fs-tools
- Ubuntu Linux x86_64 minimal dependency set:
sudo apt install genext2fs squashfs-tools f2fs-tools
-
Put APK packages to be installed into the
packagesdirectory. -
Add commands directly in the
commandsfile if you need to customize the image, such as editing files or enabling startup tasks.
If you are using the test APK, add the following commands:
chmod a+x /etc/init.d/start-firefox /usr/bin/start-firefox
rc-update add seatd
rc-update add udev
rc-update add start-firefox
Run sudo ./genimage.sh --help to view usage and supported image types.
adam@adam-lvm:~/work/genimage$ sudo ./genimage.sh --help
Usage: ./genimage.sh [OPTIONS] [UPDATE_TYPE]
Options:
-v, --version VERSION Set version (default: 0.0.1)
-b, --board BOARD Set board type (default: core3588e)
-u, --update UPDATE Set update type (default: image)
-h, --help Show this help message
For example: ./genimage.sh -b core3588e -u image -v 0.0.1
For example: ./genimage.sh --board core3588e --update image --version 0.0.1
Supported update types: image update
For example, to generate a core3588e image with version 0.0.1:
sudo ./genimage.sh -b core3588e -u image -v 0.0.1
This generates update.img in the current directory. It can also be used for upgrading, but that is not recommended because the misc partition in the full image contains the filesystem decryption key.
To generate a standard OTA update package instead:
sudo ./genimage.sh -b core3588e -u update -v 0.0.1
core3588e-nano # core3588e v1.1.0 core board + Jetson Orin Nano baseboard
core3588e-tx # core3588e v1.1.0 core board + Jetson TX baseboard
core3588e-v2-nano # core3588e v2.0.0 core board + Jetson Orin Nano baseboard