aboutsummaryrefslogtreecommitdiffstats
path: root/DEPLOY.md
blob: 7fc48159d65824a699214d74e006f9c40639c604 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# 3. Deploying an image to the target

After building an image ([BUILD.md](BUILD.md)), we can deploy it to the
target using a USB Flash Drive or a CD/DVD. The built images can be
found in the `<build-dir>/tmp/deploy/images/<machine-name>` directory to
which we will refer to as the **"Image Deploy Directory"** in this doc.

---
##### Note
Change the `<machine-name>` and `<image-name>` placeholders in the
following instructions according to the selected BSP and the image 
built in "Section 2 - Setting up and starting a build" ([BUILD.md](BUILD.md)).

---

Change directory to the Image Deploy Directory:
```sh
cd tmp/deploy/images/<machine-name>
```

This directory contains `.wic` and `.iso` images for USB and CD/DVD
respectively. Follow the instructions below to make a bootable
USB Flash Drive or a CD/DVD by writing/burning the image to it:

### 3.1a. Deploy using a USB Flash Drive

We can use **bmaptool** (from *bmap-tools* package) or **dd** to write
the `<image-name>-<machine-name>.wic` image located in the
Image Deploy Directory to a USB Flash Drive:

##### Using bmaptool *(recommended)*
```sh
sudo bmaptool copy <image-name>-<machine-name>.wic /dev/<dev-node>
```

##### Using dd
```sh
sudo dd if=<image-name>-<machine-name>.wic of=/dev/<dev-node> status=progress
```

###### where `<dev-node>` is to be replaced with the device node of the USB Flash Drive.
###### (e.g. `sda`, `sdb` or `sdc` etc.)

### 3.1b. Deploy using a CD/DVD

You may use any CD/DVD burning tool to burn the
`<image-name>-<machine-name>.iso` image located in the
Image Deploy Directory onto a writable CD/DVD.

### 3.2. Booting the target

Insert the bootable USB or CD/DVD (created in above steps) into the
target machine and power ON the machine.

---
##### Note

You may need to press `Esc` key right after pressing the power ON
button to enter the BIOS setup and set the boot device priority/order
to boot from the inserted USB or CD/DVD.

---

The grub boot menu should appear at this point where you will see
options to `boot` or `install` this image:

* Select the `boot` option to boot up the target machine.

* Select the `install` option to install the image onto the target
machine's hard drive. Follow the instructions there to complete the
installation process, and reboot the machine and boot from the
hard drive you selected during the installation process.

You will be presented with a console (serial or graphical) or a
graphical user interface depending on the image and the target machine.

---
#### What's next

You can also customize the image ([CUSTOMIZE.md](CUSTOMIZE.md)) by
enabling/disabling certain configurable features in the `local.conf`.
Make sure to re-build the image ([BUILD.md](BUILD.md)) before deploying
the customized build.