Commit 4fd42e6f authored by David Boddie's avatar David Boddie

Add finishing touches to the guide

parent bc752619
......@@ -12,6 +12,7 @@ how to perform routine tasks.
HowTo/Bluetooth_Connections
HowTo/Data_Connections
HowTo/Location_Services
HowTo/Rebuilding_the_Kernel
HowTo/Simple_Input_Output
HowTo/SSH_Access
HowTo/USB_Access
......
......@@ -6,15 +6,17 @@ separately from the process of building a new image in its entirety. It also
covers the process of installing the kernel and other binaries on the board.
The building step can be performed without any modifications to the board.
.. contents::
Preparations
------------
While it is possible to replace an existing kernel with a new one, you may find
it useful to attach a :ref:`USB to serial adapter <imx8_devkit_usb_to_serial_adapter_>`_
it useful to attach a :ref:`USB to serial adapter <imx8_devkit_usb_to_serial_adapter>`
to the board so that can interact with the bootloader and select a different
kernel to run. This makes it possible to install new kernels alongside the
original one and fall back to the original one if the new ones fail to work.
.. contents::
:local:
Installing the Toolchain
------------------------
......@@ -32,7 +34,7 @@ It should now be possible to cross-compile the kernel for the development board.
Building the Kernel
-------------------
Clone the `linux-emcraft`_ repository and enter the working directory::
Clone the `linux-emcraft repository`_ and enter the working directory::
git clone https://source.puri.sm/Librem5/linux-emcraft.git
cd linux-emcraft
......@@ -41,28 +43,41 @@ For simplicity, we create a directory to hold the modules that will be built::
mkdir _modules
Compile the kernel
Compile the kernel, optionally using ``ccache`` if installed::
# With ccache:
CROSS_COMPILE='ccache aarch64-linux-gnu-' \
INSTALL_MOD_STRIP=1 INSTALL_MOD_PATH=_modules \
make ARCH=arm64 librem5-evk_defconfig all modules_install
CROSS_COMPILE='ccache aarch64-linux-gnu-'
# Without ccache:
CROSS_COMPILE=aarch64-linux-gnu- \
INSTALL_MOD_STRIP=1 INSTALL_MOD_PATH=_modules \
make ARCH=arm64 librem5-evk_defconfig all modules_install
Installing the Kernel
---------------------
Connect the development board to a network and find its address.
Copy the kernel, device tree binary and modules to the board, replacing
``pureos`` with the IP address of the development board and ``$KERNEL_VERSION``
with the version of the kernel that was built::
Copy the kernel and device tree binary to the board, replacing ``pureos`` with
the IP address of the development board and ``$KERNEL_VERSION`` with the
version of the kernel that was built::
scp arch/arm64/boot/Image root@pureos:/boot/boot2/
scp arch/arm64/boot/dts/freescale/librem5-evk.dtb root@pureos:/boot/boot2/dtbs/
Remove the ``source`` and ``build`` symlinks from the modules directory and
copy the directory for the corresponding kernel version to the correct location
on the board::
rm _modules/lib/modules/$KERNEL_VERSION/source
rm _modules/lib/modules/$KERNEL_VERSION/build
scp -r _modules/lib/modules/$KERNEL_VERSION root@pureos:/lib/modules/
scp -r _modules/lib/modules/$KERNEL_VERSION root@pureos:/lib/modules/
The board should now be ready to reboot into the new kernel.
Booting into U-Boot
-------------------
......@@ -80,3 +95,14 @@ Press Return and enter the following commands at the U-Boot prompt::
setenv bootdir boot2/
boot
The new kernel should be loaded and run.
To boot into the old kernel, reboot and let it autoboot. This should work as
long as the old kernel image, device tree binary and modules are still
installed.
If you need to restore the system to use a working kernel and bootloader,
follow the instructions in :ref:`imx8_devkit_flashing_emmc`.
.. include:: /links.txt
......@@ -151,6 +151,8 @@ It should be possible to log in using ``purism`` as the user name and
$ ssh purism@192.168.42.202
.. _imx8_devkit_flashing_emmc:
Flashing eMMC
-------------
......
......@@ -45,6 +45,7 @@
.. _libhandy documentation : http://honk.sigxcpu.org/projects/libhandy/doc/
.. _libhandy website : https://source.puri.sm/Librem5/libhandy
.. _`Librem 5 developer documentation repository`: https://source.puri.sm/Librem5/developer.puri.sm
.. _`linux-emcraft repository`: https://source.puri.sm/Librem5/linux-emcraft/
.. _`linux-emcraft issue 2`: https://source.puri.sm/Librem5/linux-emcraft/issues/2
.. _`Meson`: https://mesonbuild.com/
.. _`Nightly GNOME Apps`: https://wiki.gnome.org/Apps/Nightly
......
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