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

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

Guido Gunther's avatar
Guido Gunther committed
6
7
* *devkit*: The [Librem 5 Devkit][0]
* *ec-som*: Emcraft's [i.MX 8M SOM Starter Kit][1]
louib's avatar
louib committed
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

louib's avatar
louib committed
12
It supports various distributions (PureOS *laboratory* and *purple*, Debian
Guido Gunther's avatar
Guido Gunther committed
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

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

Guido Gunther's avatar
Guido Gunther committed
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

Guido Gunther's avatar
Guido Gunther committed
23
So to build an image with all the latest software you'd use:
24

Guido Gunther's avatar
Guido Gunther committed
25
    ./build-image -T latest -b devkit -d buster+ci
26

Guido Gunther's avatar
Guido Gunther committed
27
28
29
30
or just issue

    make

31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# 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

46
# Creating a bootable SD card
47

Guido Gunther's avatar
Guido Gunther committed
48
49
50
This is only relevant for SD card booting on e.g. the Nitrogen or NXP
boards:

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

Guido Gunther's avatar
Guido Gunther committed
53
54
    sudo dd if=imx6.img of=/dev/sd<x> bs=4M

Guido Gunther's avatar
Guido Gunther committed
55
56
or a bit more verbose and using the compressed image

57
    bin/write-image of=/dev/sd<x>
Guido Gunther's avatar
Guido Gunther committed
58

59
Note: All data on the SD card will be overwritten.
Guido Gunther's avatar
Guido Gunther committed
60

Guido Gunther's avatar
Guido Gunther committed
61
# Running the tests
Guido Gunther's avatar
Guido Gunther committed
62
63
64
65
66
67
68

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

Guido Gunther's avatar
Guido Gunther committed
69
70
71
72
[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/
louib's avatar
louib committed
73
[4]: https://developer.puri.sm/Librem5/Development_Environment/Boards/qemu.html#qemu