Commit 535613c0 authored by David Boddie's avatar David Boddie

Move less common tasks into the troubleshooting section

parent b4e04c15
......@@ -5,7 +5,8 @@ Troubleshooting
This page provides information for developers who need to investigate a problem
with a development kit and want to diagnose it. It contains some useful
starting points for investigation.
starting points for investigation and instructions for performing tasks that
may be needed to help with testing.
.. contents::
......@@ -44,8 +45,9 @@ Each voltage is measured against ground (green circle in above image).
3. Plug in the SOM.
Attach USB to Serial Adapter
----------------------------
Attaching a USB to Serial Adapter
---------------------------------
.. _attach-usb-to-serial-adapter-1:
......@@ -77,6 +79,7 @@ Attach USB to Serial Adapter
PIN 1 is the one closest to the volume button while PIN 6 is the one
closest to the power button.
Booting via nfsroot
-------------------
......@@ -98,6 +101,7 @@ you can e.g. create via Debian's deboostrap.
For that to work the **BOOT MODE** switch needs to be set to **eMMC**
(instead of **USB**).
Installing a Minimal Linux on the eMMC
--------------------------------------
......@@ -117,3 +121,105 @@ still pulling kernel and device tree via tftp though:
::
setenv emmcboot "setenv bootargs ${args_common} debug root=/dev/mmcblk0p2; dhcp ${loadaddr} Image-librem5-devkit; dhcp ${fdt_addr} librem5-devkit.dtb; booti ${loadaddr} - ${fdt_addr}"
Flashing u-boot
---------------
From u-boot using tftp
~~~~~~~~~~~~~~~~~~~~~~
You must have a tftp server setup for this:
::
setenv ipaddr <tftp server ip>
setenv serverip <target ip addr>
tftp 0x43000000 u-boot-devkit-recovery.imx
mmc write 0x43000000 0x42 0x800
From the kernel command line
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Download the u-boot binary ``u-boot-devkit-recovery.imx``:
::
dd if=u-boot-devkit-recovery.imx of=/dev/mmcblk0 bs=1024 seek=33
Reflashing the RS9116
---------------------
By default no rsi\ :sub:`\*` modules get loaded. The modules without
firmware are in
"/lib/modules/<kernel:sub:`ver`>/drivers/net/wireless/rsi" . The
create\ :sub:`initramfs` script above adds the rsi firmware and reflash
modules in "/usr/src".
There is a convenience script "flash:sub:`rsi`.sh" that wiil perform the
necessary steps. What the script does is it backs up the rsi modules in
/lib/modules, copies the firmware into lib firmware and the modprobes
the rsi flashing modules. It replaces the original modules when it's
done.
Run the script on the target to reflash.::
root@pureos-test:~# flash_rsi.sh
Creating a Test initramfs
-------------------------
Download the latest image and kernel
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Download the latest kernel and RS9116 out of tree modules.::
./scripts/fetch_latest.sh -k
Extract the kernel
~~~~~~~~~~~~~~~~~~
The kernel needs to be extracted from the deb for the SDP boot.::
./scripts/extract_kernel.sh
Build the test filesystem tarball
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This will create a minimal debian rootfs tarball to be used to create an
initramfs. If you need additional packages you can add them to the
packages variable in the script.::
./scripts/create_tarball.sh
Create the initramfs
~~~~~~~~~~~~~~~~~~~~
This will take the tarball created above and customize it to be able to
flash the RS9116 module and also adds some test scripts.::
./scripts/create_initramfs.sh -t build/test_rootfs.tgz -o files/test_initramfs.img
You can include a locally generated kernel, modules and devicetree as
well.::
./scripts/create_initramfs.sh -t build/test_rootfs.tgz -o files/test_initramfs.img -i <path to kernel>
Boot the initramfs
~~~~~~~~~~~~~~~~~~
The initramfs can be booted on a board with an empty eMMC for testing
and RS9116 flashing. Ensure the boot mode switch is switched to USB
boot. Run the command below and then plug in the USB C port of the
devkit.::
sudo uuu uuu_scripts/test_librem5.lst
RS9116 normal operation
~~~~~~~~~~~~~~~~~~~~~~~
To use the RS9116 without flashing just load the modules by hand.::
root@pureos-test:~# modprobe rsi_sdio
......@@ -169,27 +169,6 @@ You can also just boot to u-boot without flashing anything:
sudo uuu uuu_scripts/u-boot_librem5-devkit.lst
From u-boot using tftp
~~~~~~~~~~~~~~~~~~~~~~
You must have a tftp server setup for this:
::
setenv ipaddr <tftp server ip>
setenv serverip <target ip addr>
tftp 0x43000000 u-boot-devkit-recovery.imx
mmc write 0x43000000 0x42 0x800
From the kernel command line
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Download the u-boot binary ``u-boot-devkit-recovery.imx``:
::
dd if=u-boot-devkit-recovery.imx of=/dev/mmcblk0 bs=1024 seek=33
Flash eMMC
----------
......@@ -207,81 +186,6 @@ switch in the USB position.
sudo uuu uuu_scripts/flash_librem5-devkit.lst
Create test initramfs
---------------------
Download the latest image and kernel
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Download the latest kernel and RS9116 out of tree modules.::
./scripts/fetch_latest.sh -k
Extract the kernel
~~~~~~~~~~~~~~~~~~
The kernel needs to be extracted from the deb for the SDP boot.::
./scripts/extract_kernel.sh
Build the test filesystem tarball
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This will create a minimal debian rootfs tarball to be used to create an
initramfs. If you need additional packages you can add them to the
packages variable in the script.::
./scripts/create_tarball.sh
Create the initramfs
~~~~~~~~~~~~~~~~~~~~
This will take the tarball created above and customize it to be able to
flash the RS9116 module and also adds some test scripts.::
./scripts/create_initramfs.sh -t build/test_rootfs.tgz -o files/test_initramfs.img
You can include a locally generated kernel, modules and devicetree as
well.::
./scripts/create_initramfs.sh -t build/test_rootfs.tgz -o files/test_initramfs.img -i <path to kernel>
Boot the initramfs
~~~~~~~~~~~~~~~~~~
The initramfs can be booted on a board with an empty eMMC for testing
and RS9116 flashing. Ensure the boot mode switch is switched to USB
boot. Run the command below and then plug in the USB C port of the
devkit.::
sudo uuu uuu_scripts/test_librem5.lst
Reflash the RS9116
~~~~~~~~~~~~~~~~~~
By default no rsi\ :sub:`\*` modules get loaded. The modules without
firmware are in
"/lib/modules/<kernel:sub:`ver`>/drivers/net/wireless/rsi" . The
create\ :sub:`initramfs` script above adds the rsi firmware and reflash
modules in "/usr/src".
There is a convenience script "flash:sub:`rsi`.sh" that wiil perform the
necessary steps. What the script does is it backs up the rsi modules in
/lib/modules, copies the firmware into lib firmware and the modprobes
the rsi flashing modules. It replaces the original modules when it's
done.
Run the script on the target to reflash.::
root@pureos-test:~# flash_rsi.sh
RS9116 normal operation
~~~~~~~~~~~~~~~~~~~~~~~
To use the RS9116 without flashing just load the modules by hand.::
root@pureos-test:~# modprobe rsi_sdio
Hardware Components
-------------------
......
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