Changes

Jump to navigation Jump to search

NASPi CM4-M2

1,808 bytes removed, 15:32, 21 July 2023
===Power management & safe shutdown script installation===
Refer to [[XScript]]
 
==Preconfigure Device for CM4==
 
If you attempt to boot now you will not have working USB ports, ssh, or any wireless configuration.
 
We can preconfigure your CM4 device by plugging mico sd via sd reader into a windows computer / Pi. You should see the “boot” volume where we can preconfigure our CM4 to be working right from the start.
 
===Enable USB Ports===
 
When mounted in the IO board the USB ports will not function without making a change to config.txt and adding an overlay.
 
Add the following line to config.txt:
dtoverlay=dwc2,dr_mode=host
After adding this line the two USB ports (as well as the “External USB” header) will function the next time the CM4 boots.
 
===Enable SSH===
 
It's very useful to have SSH enabled when working with the Compute Module 4. It is enabled simply by creating an empty file named:
 
ssh
 
in the root folder of the “boot” volume (the top-most folder of the drive where start4x.elf, fixup.dat and those files are located)
 
Now when the Pi starts up SSH will automatically be enabled!
 
===Preconfigure WiFi / Wireless===
 
You can also preconfigure the Compute Module 4 (and any Pi) by creating wpa-supplicant.conf at the base of the “boot” volume like we did with “ssh” file.
 
Create a new file named wpa-supplicant.conf that contains the following:
<pre>
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
country=US
update_config=1
 
network={
ssid="YourNetwork"
psk="YourPassword"
}
</pre>
When this file is created in the base of the “boot” volume it will automatically be applied to the Pi upon the next startup. Make sure to adjust your country=US line to your own country as this can impact what channels and functionality are available from your WiFi card!
 
Then you can insert your micro sd card into the device & power on it.
===How to installing the Operating System (CM4 without eMMC)?===

Navigation menu