README.md 2.22 KB
Newer Older
1 2
Image Builder
=============
Pedro Vicente's avatar
Pedro Vicente committed
3

4
This is the image builder for the Librem5 and related boards:
Pedro Vicente's avatar
Pedro Vicente committed
5

6 7
* *devkit*: The [Librem 5 Devkit][0]
* *ec-som*: Emcraft's [i.MX 8M SOM Starter Kit][1]
8 9 10
* *imx8*: [NXPs IMX8M Evaluation Kit][2]
* *imx6*: The Bounday Devices [Nit6QP_MAX][3]
* *qemu-x86_64*: The [QEMU Image][4]
Pedro Vicente's avatar
Pedro Vicente committed
11

12
It supports various distributions (PureOS *laboratory* and *purple*, Debian
13 14
*buster*).  Additionally it can add our on commit built CI packages to get
the latest versions of the Librem 5 related sofware.
Pedro Vicente's avatar
Pedro Vicente committed
15

16
Furthermore it can incorporate different kernel versions:
Pedro Vicente's avatar
Pedro Vicente committed
17

18 19 20 21
* *latest*: Fetch the most recently built kernel
* *ci*: deprecated, don't use
* *unstable*: Pre release kernels (that got some testing)
* *stable*: Released kernels (none of them exist yet)
22

23
So to build an image with all the latest software you'd use:
24

25
    ./build-image -T latest -b devkit -d buster+ci
26

27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
# Build u-boot

The build_uboot.sh script can build u-boots for a number of targets

* *devkit-recovery*: This is to boot the [Librem 5 Devkit][0] via SDP
* *devkit*: The [Librem 5 Devkit][0]
* *ec-som*: Emcraft's [i.MX 8M SOM Starter Kit][1]
* *imx8*: [NXPs IMX8M Evaluation Kit][2]
* *imx6*: The Bounday Devices [Nit6QP_MAX][3]

From the build directory invoke build_uboot.sh

    cd build 
    ./build_uboot.sh -b devkit

42
# Creating a bootable SD card
43

44 45 46
This is only relevant for SD card booting on e.g. the Nitrogen or NXP
boards:

47
The SD card must be larger than 3G. Replace <x> with the SD card device.
48

Guido Günther's avatar
Guido Günther committed
49 50
    sudo dd if=imx6.img of=/dev/sd<x> bs=4M

Guido Günther's avatar
Guido Günther committed
51 52
or a bit more verbose and using the compressed image

53
    bin/write-image of=/dev/sd<x>
Guido Günther's avatar
Guido Günther committed
54

55
Note: All data on the SD card will be overwritten.
Guido Günther's avatar
Guido Günther committed
56

Guido Günther's avatar
Guido Günther committed
57
# Running the tests
Guido Günther's avatar
Guido Günther committed
58 59 60 61 62 63 64

You can run tests against an installed board using

    sudo apt -y install ruby-serverspec
    cd tests
    TARGET_HOST=<your_board_ip> rake spec:nitrogen6

65 66 67 68
[0]: https://developer.puri.sm/Librem5/Hardware_Reference.html#librem-5-devkit
[1]: https://www.emcraft.com/products/868
[2]: https://www.nxp.com/support/developer-resources/run-time-software/i.mx-developer-resources/evaluation-kit-for-the-i.mx-8m-applications-processor:MCIMX8M-EVK
[3]: https://boundarydevices.com/product/nitrogen6max/
69
[4]: https://developer.puri.sm/Librem5/Development_Environment/Boards/qemu.html#qemu