I managed to boot the image from an NVMe. Here is the diff
diff --git a/mkqnximage/rpi5/rpi/snippets/boot_files.99.type_rpi5 b/mkqnximage/rpi5/rpi/snippets/boot_files.99.type_rpi5
index 7599e23..0b7db06 100644
--- a/mkqnximage/rpi5/rpi/snippets/boot_files.99.type_rpi5
+++ b/mkqnximage/rpi5/rpi/snippets/boot_files.99.type_rpi5
@@ -55,6 +55,15 @@ cmdline=startup.txt
enable_uart=1
kernel=qnx_sdp.ifs
kernel_address=0x8000000
+
+dtparam=pciex1
+dtparam=nvme
+dtparam=pciex1_gen=3
+
+
}
qnx_sdp.ifs=output/ifs.bin
diff --git a/mkqnximage/rpi5/rpi/snippets/definitions.type_rpi5 b/mkqnximage/rpi5/rpi/snippets/definitions.type_rpi5
index 4805d78..2c71e75 100644
--- a/mkqnximage/rpi5/rpi/snippets/definitions.type_rpi5
+++ b/mkqnximage/rpi5/rpi/snippets/definitions.type_rpi5
@@ -7,11 +7,11 @@
# Start kernel with watchdog? Requires "wdtkick -W0x24:0x5A028E4C -W0x1c:0x5A000020"
# to be executed shortly after slog2 is started
-# #define __STARTUP__ startup-bcm2712-rpi5 -u reg -a -W 5000
+# #define __STARTUP__ startup-bcm2712-rpi5 -u reg -a -W 5000
-# SD/MMC driver related
-#define __DEVB_NAME__ devb-sdmmc-bcm2712
-#define __DEVB_OPTS__ sdio addr=0x1000fff000,irq=305 disk name=hd
+# NVMe driver related
+#define __DEVB_NAME__ devb-nvme
+#define __DEVB_OPTS__ disk name=hd
# Debug console serial driver
#define __DEVC_NAME__ devc-serpl011-rpi5
diff --git a/targets/rpi5/rules.mk b/targets/rpi5/rules.mk
index 5de2571..7d7185f 100644
--- a/targets/rpi5/rules.mk
+++ b/targets/rpi5/rules.mk
@@ -13,6 +13,8 @@ $(BUILD)/built_bsp: $(BUILD)/bsp
/bin/bash -c "set -a && source $(STAGE_QNX_SDP)/qnxsdp-env.sh && make -C$(BUILD)/bsp/src hinstall install"
rm -f $(BUILD)/bsp/prebuilt/aarch64le/sbin/devb-sdmmc-bcm2712
cp $(BUILD)/bsp/install/aarch64le/sbin/devb-sdmmc-bcm2712 $(BUILD)/bsp/prebuilt/aarch64le/sbin/devb-sdmmc-bcm2712
+ rm -f $(BUILD)/bsp/prebuilt/aarch64le/sbin/devb-nvme
+ cp $(BUILD)/../../qnx800/target/qnx/aarch64le/sbin/devb-nvme $(BUILD)/bsp/prebuilt/aarch64le/sbin/devb-nvme
rm -f $(BUILD)/bsp/prebuilt/aarch64le/bin/msix-rp1
cp $(BUILD)/bsp/src/hardware/support/bcm2712/msix-rp1/aarch64/le/msix-rp1 $(BUILD)/bsp/prebuilt/aarch64le/bin/msix-rp1
/bin/bash -c "set -a && source $(STAGE_QNX_SDP)/qnxsdp-env.sh && make -C$(BUILD)/bsp all install"
diff --git a/targets/rpi5/snippets/ifs_files.custom b/targets/rpi5/snippets/ifs_files.custom
index bb4ea10..c60f6d3 100644
--- a/targets/rpi5/snippets/ifs_files.custom
+++ b/targets/rpi5/snippets/ifs_files.custom
@@ -3,6 +3,8 @@ msix-rp1=bin/msix-rp1
wdtkick=bin/wdtkick
devc-serpl011-rpi5=sbin/devc-serpl011-rpi5
devb-sdmmc-bcm2712=sbin/devb-sdmmc-bcm2712
+devb-nvme=sbin/devb-nvme
toybox=usr/bin/toybox
sbin/getty
The NVMe is still enumerated as hd0 though. I tried fixing it with the following patch, but it did not work. Could not find any other entries to change from hd to nvme in the tree. Do you have ideas how to fix this?
diff --git a/mkqnximage/cti/rpi5-mount_fs.sh.diff b/mkqnximage/cti/rpi5-mount_fs.sh.diff
index ef2dab6..4cd913e 100644
--- a/mkqnximage/cti/rpi5-mount_fs.sh.diff
+++ b/mkqnximage/cti/rpi5-mount_fs.sh.diff
@@ -11,28 +11,28 @@ index 19edaf0..7783ba9 100644
exit 0
fi
-@@ -36,32 +36,32 @@ if [ -e /dev/hd0t185 ]; then
+@@ -36,32 +36,32 @@ if [ -e /dev/nvme0t185 ]; then
# container and then the file system contained within
- mount -t qtd -o key=/proc/boot/qtd_public_key.pem /dev/hd0t185 /dev/hd0t185-fs
- if check_magic /dev/hd0t185-fs 8192 "\0042\0021\0031\0150"; then
-- mount -t qnx6 -o noatime /dev/hd0t185-fs /system
-+ mount -t qnx6 -o noatime /dev/hd0t185-fs /usr
- elif check_magic /dev/hd0t185-fs 0 "\0377\0272\0377\0261"; then
-- mount -t qcfs /dev/hd0t185-fs /system
-+ mount -t qcfs /dev/hd0t185-fs /usr
+ mount -t qtd -o key=/proc/boot/qtd_public_key.pem /dev/nvme0t185 /dev/nvme0t185-fs
+ if check_magic /dev/nvme0t185-fs 8192 "\0042\0021\0031\0150"; then
+- mount -t qnx6 -o noatime /dev/nvme0t185-fs /system
++ mount -t qnx6 -o noatime /dev/nvme0t185-fs /usr
+ elif check_magic /dev/nvme0t185-fs 0 "\0377\0272\0377\0261"; then
+- mount -t qcfs /dev/nvme0t185-fs /system
++ mount -t qcfs /dev/nvme0t185-fs /usr
else
echo "Don't recognise the filesystem"
fi
rm -f /dev/shmem/fs-magic*
- elif [ -e /dev/hd0t186 ]; then
-- qtsafefsd -o key=/proc/boot/qtsafefs_public_key.pem /dev/hd0t186 /system
-+ qtsafefsd -o key=/proc/boot/qtsafefs_public_key.pem /dev/hd0t186 /usr
- elif [ -e /dev/hd0t181 ]; then
-- mount -t qcfs /dev/hd0t181 /system
-+ mount -t qcfs /dev/hd0t181 /usr
+ elif [ -e /dev/nvme0t186 ]; then
+- qtsafefsd -o key=/proc/boot/qtsafefs_public_key.pem /dev/nvme0t186 /system
++ qtsafefsd -o key=/proc/boot/qtsafefs_public_key.pem /dev/nvme0t186 /usr
+ elif [ -e /dev/nvme0t181 ]; then
+- mount -t qcfs /dev/nvme0t181 /system
++ mount -t qcfs /dev/nvme0t181 /usr
else # QNX6
-- mount -t qnx6 -o noatime /dev/hd0t178 /system 2>/dev/null
-+ mount -t qnx6 -o noatime /dev/hd0t178 /usr 2>/dev/null
+- mount -t qnx6 -o noatime /dev/nvme0t178 /system 2>/dev/null
++ mount -t qnx6 -o noatime /dev/nvme0t178 /usr 2>/dev/null
# We've mounted the system file system opportunistically. If it appears that
# it was in need of expansion, unmount, expand and remount.
- if [ ! -e /system/etc/build.date -o -e /system/needs_expansion ]; then
@@ -40,10 +40,10 @@ index 19edaf0..7783ba9 100644
+ if [ ! -e /usr/etc/build.date -o -e /usr/needs_expansion ]; then
+ umount /usr 2>/dev/null
expandfs.sh
-- mount -t qnx6 -o noatime /dev/hd0t178 /system 2>/dev/null
+- mount -t qnx6 -o noatime /dev/nvme0t178 /system 2>/dev/null
- rm -f /system/needs_expansion
- touch /system/etc/build.date
-+ mount -t qnx6 -o noatime /dev/hd0t178 /usr 2>/dev/null
++ mount -t qnx6 -o noatime /dev/nvme0t178 /usr 2>/dev/null
+ rm -f /usr/needs_expansion
+ touch /usr/etc/build.date
FS_EXPANDED=1
diff --git a/mkqnximage/cti/slm.cfg.diff b/mkqnximage/cti/slm.cfg.diff
index 29673e1..107d1bd 100644
--- a/mkqnximage/cti/slm.cfg.diff
+++ b/mkqnximage/cti/slm.cfg.diff
@@ -1,21 +1,32 @@
---- ../../build/qemu/output/build/slm.cfg.orig 2025-08-31 20:37:41.481159095 -0400
+---- a/../../build/rpi5/output/build/slm.cfg.orig
++++ b/../../build/rpi5/output/build/slm.cfg
+@@ -26,7 +26,7 @@
+ <SLM:depend>pci-server-patchup</SLM:depend>
+ <SLM:command>devb-nvme</SLM:command>
+ <SLM:args>cam cam user=20:20 blk cache=64M,auto=partition,vnode=2000,ncache=2000,commit=low disk name=nvme</SLM:args>
+- <SLM:waitfor wait="pathname">/dev/hd0</SLM:waitfor>
++ <SLM:waitfor wait="pathname">/dev/nvme0</SLM:waitfor>
+
+ </SLM:component>
+
+-- ../../build/qemu/output/build/slm.cfg.orig 2025-08-31 20:37:41.481159095 -0400
+++ ../../build/qemu/output/build/slm.cfg 2025-08-31 21:10:32.024728298 -0400
@@ -97,10 +97,8 @@
</SLM:component>
-
+
<SLM:component name="ssh">
- <SLM:depend>network-init</SLM:depend>
- <SLM:command launch="pathname">/system/bin/sshd</SLM:command>
- <SLM:args>-f /system/etc/ssh/sshd_config -D</SLM:args>
--
+-
+ <SLM:depend>pam</SLM:depend>
+ <SLM:command launch="pathname">/usr/etc/startup/startup_ssh.sh</SLM:command>
</SLM:component>
-
+
<SLM:component name="qconn">
@@ -110,8 +108,8 @@
</SLM:component>
-
+
<SLM:component name="console">
- <SLM:depend>devc</SLM:depend>
- <SLM:command launch="session">/proc/boot/ksh</SLM:command>
@@ -23,9 +34,9 @@
+ <SLM:command launch="session">/system/libexec/qnx/tty-login.sh</SLM:command>
<SLM:args>-l</SLM:args>
<SLM:tty>/dev/ser1</SLM:tty>
-
+
@@ -126,7 +124,7 @@
-
+
<SLM:component name="post_start">
<SLM:depend state="stateless">root-fs</SLM:depend>
- <SLM:depend state="stateless">ssh</SLM:depend>
diff --git a/mkqnximage/rpi5/rpi/snippets/definitions.type_rpi5 b/mkqnximage/rpi5/rpi/snippets/definitions.type_rpi5
index 2c71e75..971641d 100644
--- a/mkqnximage/rpi5/rpi/snippets/definitions.type_rpi5
+++ b/mkqnximage/rpi5/rpi/snippets/definitions.type_rpi5
@@ -11,7 +11,7 @@
# NVMe driver related
#define __DEVB_NAME__ devb-nvme
-#define __DEVB_OPTS__ disk name=hd
+#define __DEVB_OPTS__ disk name=nvme
# Debug console serial driver
#define __DEVC_NAME__ devc-serpl011-rpi5
diff --git a/mkqnximage/rpi5/rpi/snippets/secpolgen.type_rpi5 b/mkqnximage/rpi5/rpi/snippets/secpolgen.type_rpi5
index 232d447..5bf9699 100644
--- a/mkqnximage/rpi5/rpi/snippets/secpolgen.type_rpi5
+++ b/mkqnximage/rpi5/rpi/snippets/secpolgen.type_rpi5
@@ -1,4 +1,4 @@
-mount -t dos /dev/hd0t12 /boot
+mount -t dos /dev/nvme0t12 /boot
if [ -e /boot/onboot ]; then
echo Running onboot script
ksh /boot/onboot