Commit f2ba9097 authored by Guido Günther's avatar Guido Günther

Merge branch 'master' into 'master'

Adding location for various board setups and full imx6 instructions based on internal wiki

See merge request Librem5/!1
parents 80e73482 81a6cc09
.. _boards:
.. toctree::
.. _emcraft:
.. _imx6:
The current development board is the Boundarydevices `Nitrogen board <>`_ with i.MX6 Quad plus CPU. This page describes how to set it up for development.
Package contents
* 5V 4A DC power supply (100-230V AC in)
* a DC power cable: C13 (computer)-mains (USA version)
* main board
* antenna, attached to board (LSR TiWi-BLE 450-0064)
* double-serial cable, attached to board
* button battery, attached to board
* 4GB microSD card, attached to board
Additional hardware
Getting these will make life easier:
* USB <-> serial converter - ~15EUR. Reccommended: Digitus USB2.0. Not recommended: anything below 5EUR - 1 fried USB controller so far.
* microSD card <-> USB reader
* HDMI cable
* monitor with HDMI input (HDMI<->DVI adapter with DVI input to monitor works too)
* mains cable or adapter from US mains matching your socket
* Optional: USB keyboard and mouse
Board itself
`Hardware Manual <>`_
Most important interfaces:
* microSD (SDXC) slot
* HDMI 1.4a
* 3 serial ports
* 2 USB host ports
* Ethernet port
Create bootable microSD card
Using your microSD <-> USB reader, mount the microSD card and take note of the device (with ``lsblk`` or ``df``). Then unmount it. For this walkthrough, the device is /dev/sdd::
$ lsblk
sdd 8:48 1 3.7G 0 disk
├─sdd1 8:49 1 181M 0 part /media/user/f36d95a4-dbd2-4ddc-a4fd-ae6fa119bf6e
└─sdd2 8:50 1 2.6G 0 part /media/user/94942ee2-a338-48b3-a27a-9c295405ce4e
$ sudo umount /dev/sdd1
$ sudo umount /dev/sdd2
In some temp directory, download the latest image:
Unpack the image and dd the image to the device::
$ wget
$ xzcat imx6.img.xz | pv | sudo dd of=/dev/sdd bs=4M
Depending on your system, the dd can take a while so grab a cup of coffee and be patient.
Working with the iMX6 Nitrogen board
If this will be your first boot on the iMX6 board, then you will need a u-boot upgrade.
After the u-boot upgrade, your u-boot version should be: ``U-Boot 2017.07-28563-g04d7ed8078 (Dec 24 2017 - 20:46:50 +0100)``
If however you have already performed the u-boot upgrade in the past, then skip this section
Now that we have the bootable drive on the microSD card, remove it from your microSD<->USB reader and insert it into the development board.
Also connect:
* an ethernet cable
* the HDMI cable to your monitor
* your keyboard and mouse
* your DB9 serial <-> USB. Plug the USB end into your workstation/laptop. Before giving the board power, open a serial connection on your workstation/laptop: ``screen /dev/ttyUSB0 115200``. To quit your screen session at anytime: Ctrl + a, then :quit
* power cable to outlet
As soon as you give the board power, you start to see some output on your serial tty connection::
CPU: Freescale i.MX6QP rev1.0 at 792 MHz^M
Reset cause: POR^M
Board: nitrogen6_max^M
I2C: ready^M
DRAM: 3.8 GiB^M
SF: Detected sst25vf016b with page size 256 Bytes, erase size 4 KiB, total 2 MiB^M
Display: hdmi:1280x720M@60 (1280x720)^M
In: serial^M
Out: serial^M
Err: serial^M
Net: Micrel ksz9021 at 6^M
FEC [PRIME], usb_ether^M
Hit any key to stop autoboot: 3
If your u-boot has already been upgraded, then let the autoboot continue. The system will be booted and you should get a login prompt::
Debian GNU/Linux buster/sid pureos ttymxc1
pureos login:
The credentials are root/root and purism/purism.
u-boot upgrade
If you need the u-boot upgrade (first boot), then hit any key to stop autoboot now. If you missed your time window because you only have 3 short seconds, that's ok. There is a green button on your board to reset it (no need to restart your serial console session). Once you interrupt the countdown to autoboot, ``run upgradeu`` and wait for a couple of minutes::
Hit any key to stop autoboot: 0
=> run upgradeu
Once the upgrade has completed, power cycle the board and watch it boot to a login prompt.
If you have your monitor connected via HDMI to the board, you'll see that the desktop environment comes up by default. If the system puts the display to sleep, activate your keyboard (connected to the system) to wake up the display and click the green button to log back in.
6x_bootscript not found
If you have upgraded your u-boot already and still can't seem to boot the system, check to see if you get the following output logged to your serial connection:::
6x_bootscript not found
serial console at 115200, 8N1
details at
AHCI 0001.0300 32 slots 1 ports 3 Gbps 0x1 impl SATA mode
flags: ncq stag pm led clo only pmp pio slum part
No port device detected!
timeout irqstat=10000
timeout irqstat=10000
switch to partitions #0, OK
mmc1(part 0) is current device
expose MMC 1 over USB
UMS: LUN 0, dev 1, hwpart 0, sector 0x0, count 0x720000
Try removing the microSD card and reseating it. Press the green button on the board to reset it and try again.
In case you really messed up and the system won't boot anymore, follow the boundary devices guide to unbricking your system:
.. _imx8:
.. _mini-tutorials:
This page is a collection of some helpful commands to setup various applications and test their functionality within the dev boards. These tidbits are not specific to any one board but rather are generally usefull guides.
MC7455 Baseband Modem mPCIe Card
If you are testing the Sierra Wireless MC7455 with the Nit6QP_MAX then make sure you cover pin 22 with some adhesive film to prevent the modem from resetting over and over. It is okay to cover pin 20 as it is floating anyway. Pin 18 is GND and covering it is not prefered but _may_ be safe to do so.
Pin 22 is the one that is blacked out in this image:
`cover this pin <>`_
We may need to (unsure yet) cover the USB 3.0 pins as they are PCIe RX TX diff-pairs on the nit6 board:
`might want to cover these <>`_ (source:
Modem Firmware Upgrade
To upgrade the firmware stop modem manager, unzip `the firmware <>`_ and use QMI mode for the update::
$ unzip
$ systemctl stop ModemManager
$ qmi-firmware-update --update -d 1199:9071 --device-open-qmi SWI9X30C_02.24.05.06.cwe SWI9X30C_02.24.05.06_GENERIC_002.026_000.nvu
loading device information before the update...
setting firmware preference:
firmware version: ''
config version: '002.026_000'
carrier: 'GENERIC'
rebooting in download mode...
download mode detected
downloading cwe image: SWI9X30C_02.24.05.06.cwe (64.4 MB)...
finalizing download... (may take more than one minute, be patient)
successfully downloaded in 73.72s (874.0 kB/s)
downloading cwe image: SWI9X30C_02.24.05.06_GENERIC_002.026_000.nvu (3.9 kB)...
finalizing download... (may take more than one minute, be patient)
successfully downloaded in 0.06s (66.1 kB/s)
rebooting in normal mode...
normal mode detected
NOTE: in order to validate which is the firmware running in the
module, the program will wait for a complete boot; this process
may take some time and several retries.
waiting some time for the device to boot...
loading device information after the update (1/12)...
original firmware revision was:
SWI9X30C_02.08.02.00 r5428 CARMD-EV-FRMWR2 2016/01/06 20:38:53
original running firmware details:
Model: MC7455
Boot version: SWI9X30C_02.08.02.00
AMSS version: SWI9X30C_02.08.02.00
SKU ID: 1102476
Carrier ID: 1
Config version: 002.007_001
original firmware preference details:
image 'modem': unique id '002.007_001', build id ''
image 'pri': unique id '002.007_001', build id ''
new firmware revision is:
SWI9X30C_02.24.05.06 r7040 CARMD-EV-FRMWR2 2017/05/19 06:23:09
new running firmware details:
Model: MC7455
Boot version: SWI9X30C_02.24.05.06
AMSS version: SWI9X30C_02.24.05.06
SKU ID: 1102476
Carrier ID: 1
Config version: 002.026_000
new firmware preference details:
image 'modem': unique id '002.026_000', build id ''
image 'pri': unique id '002.026_000', build id ''
NOTE: this device supports stored image management
with qmicli operations:
NOTE: this device supports firmware preference management
with qmicli operations:
For more details see These devices can either be in MBIM or QMI mode, in QMI mode MBIM commands hand:
Data connections
Test basic connectivity::
# most basic check, works without sim card
mmcli -m0
# Needs a sim card inserted
mmcli -i 0 --pin=<yourpin>
mmcli -m 0 --enable
mmcli -m 0 --simple-connect=apn=internet
mmcli -m 0 --simple-disconnect
If this works use *nm-connection-editor* on Wayland (will be part of the next image) to create a NetworkManager connection named *test*. You can then bring the connection up and down using::
nmcli con up test
nmcli con down test
Location services
Location services are either exposed via AT commands ( or via QMI. Suppot for QMI LOC service is not yet supported in libqmi (while the older POS is):
Wireless Networking
If you have your ethernet cable plugged in, you should automatically get a DHCP address on eth0. Alternatively, you can bring up the wireless interface with a DHCP address using Network Manager::
$ nmtui
1. Select "Edit a Connection". Hit enter.
2. Arrow over to "Add". Hit enter.
3. Arrow down to "Wi-Fi". Hit enter.
4. Wifi settings:
- Change the name if you'd like
- Arrow down to SSID and enter your wifi network name.
- Change the "Security" from "<none>" to the correct wifi security type ("WPA & WPA2 Personal" is most common) and enter your wifi network password on the field below.
- Arrow down to "OK" and hit enter.
5. Now you are on the screen with the list of your network connections where you should now see your wifi connection listed. Arrow to "Back" and hit enter.
6. Arrow down to "Activate a Connection". Hit enter.
7. Select your wifi connection and then arrow over to "Activate" and hit enter. You should see a pop-up that says "Connecting" and when that pop-up goes away, your connection should be active. Arrow down to "Back" and hit enter.
8. Arrow down to "Quit" and hit enter.
9. Now, back at the command prompt `ip addr` should show that your wlan0 interface has a DHCP address and your packets should be able to reach the outside world.
purism@pureos:~$ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: can0: <NOARP,ECHO> mtu 16 qdisc noop state DOWN group default qlen 10
3: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
link/ether 00:19:b8:03:1c:ce brd ff:ff:ff:ff:ff:ff
4: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000
link/sit brd
5: wwan0: <POINTOPOINT,MULTICAST,NOARP> mtu 1500 qdisc noop state DOWN group default qlen 1000
6: wwan1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 0a:76:88:94:6b:e5 brd ff:ff:ff:ff:ff:ff
7: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 50:65:83:1b:16:70 brd ff:ff:ff:ff:ff:ff
inet brd scope global dynamic noprefixroute wlan0
valid_lft 3068649028sec preferred_lft 3068649028sec
inet6 2601:281:c601:6dff:1e66:701c:25cc:7221/64 scope global dynamic noprefixroute
valid_lft 3068649028sec preferred_lft 3068649028sec
inet6 fe80::7231:a831:5341:6968/64 scope link noprefixroute
valid_lft forever preferred_lft forever
purism@pureos:~$ ping
PING ( 56(84) bytes of data.
64 bytes from ( icmp_seq=1 ttl=46 time=154 ms
64 bytes from ( icmp_seq=2 ttl=46 time=165 ms
64 bytes from ( icmp_seq=3 ttl=46 time=161 ms
--- ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
rtt min/avg/max/mdev = 154.192/160.226/165.224/4.586 ms
......@@ -5,6 +5,7 @@ Librem 5 Docs
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment