Deploying and running a redpesk image for the NXP S32G2 Vehicle Networking board
Based on quad Arm® Cortex®-A53 cores and triple, dual-core lockstep Arm Cortex-M7 cores, the S32G-VNP-RDB2 is used for a variety of typical automotive applications such as central gateway, secure key management… Depending on your needs, this is an interesting hardware for automotive purposes that’s why we support redpesk OS on this board.
Deploying a redpesk OS image on this kind of board consists of copying a disk image on an SDcard.
See the NXP specification for more details about S32G2 Processors designed for Vehicle Networking.
NOTE:
Only the S32G-VNP-RDB2 model is supported with the BSP yet.
NXP recommends using S32G-VNP-RDB3 for new designs, please contact us for latest information about this board.
Download images
See Download Images section.
Download our S32G2-VNP-RDB2 image from command line
Create a directory to download the image:
mkdir ~/redpeskimage
cd ~/redpeskimage
Then download the latest redpesk OS image with this command:
wget -r -nd -nc --no-parent --accept-regex='redpesk.*smack.*\.(bmap|xz|sha256)' --reject-regex '(image\.raw|ova|index)' 'https://download.redpesk.bzh/redpesk-lts/batz-2.0-update/images/smack/minimal/aarch64/s32g2/'
Control the image integrity
Before doing anything, please control the integrity of the downloaded redpesk image. Example:
sha256sum -c redpesk*.tar.xz.sha256
redpesk*aarch64*.tar.xz: OK
Copying the image on your SD card
Plug your SD card and find it (be sure it is unmounted)
Copy the correct device path using the command below. It should be a hotplug device.
lsblk -dli -o PATH,VENDOR,TYPE,HOTPLUG,MODEL
DEVICE_TO_COPY='/dev/<hotplug_device>' #in the example it is /dev/sdc
Example:
$ lsblk -dli -o PATH,VENDOR,TYPE,HOTPLUG,MODEL
PATH VENDOR TYPE HOTPLUG MODEL
/dev/sda ATA disk 0 WDC_WD10SPZX-08Z10
/dev/sdc TS-RDF5 disk 1 SD_Transcend #MYSDCARD
/dev/nvme0n1 disk 0 LITEON T11 512
DEVICE_TO_COPY=/dev/sdc
Or if only one device is hotpluggable on your computer:
# need jq
DEVICE_TO_COPY=$(lsblk -dlJ -o PATH,VENDOR,TYPE,HOTPLUG,MODEL | jq -r '.blockdevices[] | select(.hotplug == true).path')
echo $DEVICE_TO_COPY
Umount if needed
lsblk $DEVICE_TO_COPY
# need to umount each partition
sudo umount <part*>
Example:
$ lsblk /dev/sdc
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sdc 8:32 1 14.6G 0 disk
├─sdc1 8:33 1 501M 0 part /run/media/iotbzh/0409-3A02
├─sdc2 8:34 1 1G 0 part /run/media/iotbzh/cd3c87ec-1011-4832-aef3-6be0ed3d3748
└─sdc3 8:35 1 2.5G 0 part /run/media/iotbzh/4e508264-8ce2-447f-a829-e4c31ea20047
$ sudo umount /run/media/iotbzh/*
Flash SD card
Prerequisites: device is plugged in, found, unmounted
- Extract the image first
tar xJf redpesk*.tar.xz
- Flash it using
dd
sudo dd if="Redpesk-OS.img" of=$DEVICE_TO_COPY bs=4M status=progress
- Or using bmaptool
bmaptool copy "Redpesk-OS.img" $DEVICE_TO_COPY
TIPS: Once you are used to flash your image, you could do it much faster in one single command using
bmaptool
like this:bmaptool copy "https://download.redpesk.bzh/redpesk-lts/batz-2.0-update/images/smack/minimal/aarch64/s32g2/image.raw.tar.xz" $DEVICE_TO_COPY
This will download, control integrity and flash the latest redpesk OS image on your device.
Hardware DIP switch configuration
Integrated into the PCB, a DIP switch is generally present to allow you to choose between different boot mode.
For the NXP S32G2 Vehicle Networking, here is the following configuration:
Boot mode | Switch 3 | Switch 4 | Switch 5 | Switch 6 | Switch 7 | Switch 9 | Switch 10 |
---|---|---|---|---|---|---|---|
SD card | [1] OFF | [1-4] ON-ON-ON-ON [5-8] ON-ON-OFF-ON |
[1-4] ON-ON-ON-ON [5-8] ON-ON-ON-ON |
[1-4] ON-ON-ON-ON [5-8] ON-ON-ON-ON |
[1-4] ON-ON-ON-ON [5-8] ON-ON-ON-ON |
[1-2] ON-ON | [1-2] OFF-ON |
eMMC | [1] ON | [1-4] ON-ON-ON-ON [5-8] ON-OFF-OFF-ON |
[1-4] ON-ON-ON-ON [5-8] ON-ON-ON-ON |
[1-4] ON-ON-ON-ON [5-8] ON-ON-ON-ON |
[1-4] ON-ON-ON-ON [5-8] ON-ON-ON-ON |
[1-2] ON-ON | [1-2] OFF-ON |
Quad SPI | [1] ON | [1-4] ON-ON-ON-ON [5-8] ON-ON-ON-ON |
[1-4] ON-ON-ON-ON [5-8] ON-ON-ON-ON |
[1-4] ON-ON-ON-ON [5-8] ON-ON-ON-ON |
[1-4] ON-ON-ON-ON [5-8] ON-ON-ON-ON |
[1-2] ON-ON | [1-2] OFF-ON |
For more hardware information (like connections, button functions or led status), please refer to the NXP documentation.
Connect to the S32G2-VNP-RDB2 board
- Plug in the SD card into the board.
- Connect the USB-UART cable directly to the USB port called
UART0
.
-
By default, the board is configured to boot to the eMMC. You might need to change DIP switches for a SD card boot.
- Power on the board (NXP’s 12V power cable).
use
dmesg
to see the name of the USB plugged[ 7.567111] usb 1-2.1.2: pl2303 converter now attached to ttyUSB1
-
Use picocom (or minicom depending on your tools!).
sudo picocom -b 115200 /dev/ttyUSB1
NOTE: Default root password is
root
.
-
Getting the address of the board to be able to use a SSH connection
Connect an Ethernet cable between computer and the board (like on the
eth0
interface).#on board ip -c a
# on computer ssh root@<ip_board>
Installing a package
Your board is now ready to boot redpesk OS. You can install any packages and/or your own packages.
Please refer to section Application deployment for more details.