data storage  
  X1016 - PCIe3.1 to 4 M.2 NVMe shield  
     
 
  Home       Be Our Distributor      Custom Products      OEM/ODM      What We Do      Contact  
     
 
    Software Tutorials   hardware    Software  
     
 
 

This tutorial assumes you've already set up a Raspberry Pi with Raspberry Pi OS with desktop (Release date: July 4th 2024
System: 64-bit, bookworm)
. For help installing the Debian-based OS on your Pi, check out the docs on Raspberrypi.org.

   
  1.0 To check the kernel version, execute the following command:
 
   pi@raspberrypi ~ $ uname -a
 
 
   
  1.1 Enabling PCIe interface
  First, enable the external PCIe port on the Raspberry Pi 5. Edit /boot/firmware/config.txt and add the following at the bottom:
 
   pi@raspberrypi ~ $ sudo nano /boot/firmware/config.txt
 
# Enable the PCIe external connector
dtparam=pciex1



# Optionally, You can force it to Gen 3.0 (8GT/sec)
dtparam=pciex1_gen=3

WARNING
The Raspberry Pi 5 is not certified for Gen 3.0 speeds, and connections to PCIe devices at these speeds may be unstable.
  Save and exit. In nano, you do that by hitting CTRL + X, answering Y and hitting Enter when prompted.
   
  1.2 If powering via the on-board DC jack, edit the EEPROM configuration
 
   pi@raspberrypi ~ $ sudo rpi-eeprom-config -e
   
  Add PSU_MAX_CURRENT=5000 at the end of the file that reads like this:
 
   
  1.3 Reboot the Raspberry Pi
 
   pi@raspberrypi ~ $ sudo reboot
   
  1.4 Use the lspci command to display your PCIe devices
 
   pi@raspberrypi ~ $ sudo lspci
 

   
  2.0 Build the kernel and Apply patch
  2.1 To get the kernel source, you need Git. Begin by installing Git on your device, if you don’t already have it: 
 
   pi@raspberrypi ~ $ sudo apt install git
   
  2.2 Download the source code for the latest Raspberry Pi kernel: 
 
   pi@raspberrypi ~ $ git clone --depth=1 https://github.com/raspberrypi/linux
  This can take several minutes. 
   
  2.3 Install the build dependencies: 
 
   pi@raspberrypi ~ $ sudo apt install bc bison flex libssl-dev make
   
  2.4 Download the patch 
 
   pi@raspberrypi ~ $ wget https://suptronics.com/downloads/x1016.patch
   
  2.5 Move to the linux folder by entering:
 
   pi@raspberrypi ~ $ cd linux
   
  2.6 Apply the patch  
 
   pi@raspberrypi ~ /linux $ git apply /home/pi/x1016.patch
  If the x1016.patch is not download to /home/pi,  change the directory.
   
  2.7 Build configuration 
 
pi@raspberrypi ~ $ KERNEL=kernel_2712
pi@raspberrypi ~ $ make bcm2712_defconfig
   
  2.8 Build the kernel (64-bit). This step can take a long time, depending on your Raspberry Pi model. 
 
   pi@raspberrypi ~ /linux $ make -j6 Image.gz modules dtbs
   
  2.9 Install the kernel modules onto the boot media: 
 
   pi@raspberrypi ~ /linux $ sudo make -j6 modules_install
   
  2.10 Run the following commands to create a backup image of the current kernel, install the fresh kernel image, overlays, README, and unmount the partitions: 
 
   pi@raspberrypi ~ /linux $ sudo cp /boot/firmware/$KERNEL.img /boot/firmware/$KERNEL-backup.img
   pi@raspberrypi ~ /linux $ sudo cp arch/arm64/boot/Image.gz /boot/firmware/$KERNEL.img
   pi@raspberrypi ~ /linux $ sudo cp arch/arm64/boot/dts/broadcom/*.dtb /boot/firmware/
   pi@raspberrypi ~ /linux $ sudo cp arch/arm64/boot/dts/overlays/*.dtb* /boot/firmware/overlays/
   pi@raspberrypi ~ /linux $ sudo cp arch/arm64/boot/dts/overlays/README /boot/firmware/overlays/
   
  2.11 Finally, run the following command to reboot your Raspberry Pi and run your freshly-compiled kernel: 
 
   pi@raspberrypi ~ /linux $ sudo reboot
 
 
 
 
   
   
© 2024 SupTronics Technologies Limited, All Rights Reserved.