Create a bootable USB device (interactive method using VMware)
To boot QNX OS by UEFI mode, you need create and format a DOS partition on the boot media and copy the x86_64-ryzen-uefi.efi to the DOS filesystem as the specific UEFI boot file EFI/BOOT/BOOTX64.EFI.
- Create a bootable USB device. Typically, this mechanism needs to be done once. For more information, see
Create a bootable USB device using a virtual machine running QNX OS.
- Copy the QNX IFS image to the bootable USB device. For more information, see
Copy the QNX IFS image to the bootable USB device.
Create a bootable USB device using a virtual machine running QNX OS
To complete the steps, you can start a VMware machine running QNX OS in QNX Momentics IDE (referred to as simply VMware here). You can use the VMware to create a bootable USB device, such as a USB memory stick or USB storage key. The size of the storage should be at least 4 GB.
The steps for creating a bootable USB device using the interactive method using a VMware are as follows:
- Start the VMware in QNX Momentics IDE. For more information,
see the Creating a QNX virtual machine.
After you boot the VMware, you're running a QNX OS environment.
- Insert a USB device into an unused USB port on your host PC. Your VMware software should detect the USB drive, and prompt you to connect it either to your host computer or to the VMware. In the prompt, select Connect to QNX VMware.
- In the VMware, start the devb-umass driver. This driver supports ryzen USB mass storage devices,
such as USB memory sticks and hard drives. When you run the driver, you should see output on your VMWare that's similar to
the following:
# devb-umass cam pnp disk name=umass # Path=0 – QNX USB Storage target = 0 lun = 0 Direct Access(0) – Kingston DataTraveler G3 #For information about the devb-umass, see the QNX OS Utilities Reference.
- Run the following command to determine the drive number of the USB device.
Your USB drive is likely /dev/umass0. If the drive already has an existing filesystem partition on it, this partition will be represented as /dev/umass0tnn, where
nn
represents the type of partition (e.g. 11 or 12 is a DOS FAT32; 177, 178, or 179 is the QNX6 filesystem, etc.).Note:Don't worry if there's no partition there. Any existing partitions are deleted when the new partition is created in the next step.# ls /dev/umass* /dev/umass0 /dev/umass0t12 /dev/umass0t177 /dev/umass0t179 # - Run the following commands to delete any existing partitions on the USB drive:
CAUTION:The first command below deletes all partitions on your USB drive!
# fdisk /dev/umass0 delete -a # fdisk /dev/umass0 show _____OS_____ Start End ______Number______ Size Boot name type Cylinder Cylinder Cylinders Blocks 1. ------ --- -------- -------- ------- -------- ----- 2. ------ --- -------- -------- ------- -------- ----- 3. ------ --- -------- -------- ------- -------- ----- 4. ------ --- -------- -------- ------- -------- ----- # - Add a type 12 parition (1GB size) and Format it with a DOS filesystem, using the mkdosfs utility,
and create the EFI boot directory as follows:
Note:The type 12 partition is used for UEFI boot mode.
# fdisk /dev/umass0 add -t12 -c1002,2001 # mount -e /dev/umass0 # ls /dev/umass0* /dev/umass0 /dev/umass0t12 # # mkdosfs /dev/umass0t12 Format complete: FAT32 (4096-byte clusters), 1021984 kB available. # # fdisk /dev/umass0 show _____OS_____ Start End ______Number______ Size Boot name type Cylinder Cylinder Cylinders Blocks 1. FAT32 12 1002 2001 1000 2048000 1000 MB 2. ------ --- -------- -------- ------- -------- ----- 3. ------ --- -------- -------- ------- -------- ----- 4. ------ --- -------- -------- ------- -------- ----- # mount -t dos /dev/umass0t12 /dos # mkdir /dos/EFI # mkdir /dos/EFI/BOOT # - Optionally add a type 179 QNX partition (1GB size) on the USB drive for the persistent storage:
# fdisk /dev/umass0 add -t179 -c2002,3001 # mount -e /dev/umass0 # ls /dev/umass0* /dev/umass0 /dev/umass0t12 /dev/umass1t179 # # mkqnx6fs /dev/umass0t179 All files on /dev/umass1t179 will be lost! Confirm filesystem re-format (y) or (n): y Format fs-qnx6: 255996 blocks, 32000 inodes, 4 groups # # fdisk /dev/umass0 show _____OS_____ Start End ______Number______ Size Boot name type Cylinder Cylinder Cylinders Blocks 1. FAT32 12 1002 2001 1000 2048000 1000 MB 2. QNX6 179 2002 3001 1000 2048000 1000 MB 3. ------ --- -------- -------- ------- -------- ----- 4. ------ --- -------- -------- ------- -------- ----- #
You now have a bootable USB device for UEFI boot mode that you can transfer QNX IFS image to it.
Copy the QNX IFS image to the bootable USB device
After you've created a bootable USB device, you must transfer the QNX IFS image that you built using this BSP to the USB device:
- Remove and re-insert the USB device into a USB port on your Linux or Windows host that installed the QNX SDP 8.0
host environment and this BSP.
Warning:Ensure that the USB device is connected to the host machine instead of the virtual machine running QNX OS.
- For UEFI boot mode, copy the QNX IFS image (x86_64-ryzen-uefi.efi) from the
$BSP_ROOT_DIR/images/IPC-FP6 directory to the file BOOTX64.EFI
in /EFI/BOOT directory of the bootable USB device. For example, in Linux host, the command similar to
the following:
$ cp $BSP_ROOT_DIR/images/IPC-FP6/x86_64-ryzen-uefi.efi /media/qnx/0A0C-1805/EFI/BOOT/BOOTX64.EFINote:Change the /media/qnx/0A0C-1805/ directory in command above to match your USB device in your host.You now have a bootable USB device with QNX IFS image for UEFI boot mode. Your USB drive is ready to boot QNX OS on your x86_64 target.
