Skip to content

Commit 577e0dd

Browse files
authored
Do not use sudo for running OS's scripts/enter.sh (#2747)
1 parent bdcb14f commit 577e0dd

File tree

1 file changed

+10
-15
lines changed

1 file changed

+10
-15
lines changed

docs/operating-system/getting-started.md

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,14 @@ The script `scripts/enter.sh` builds the build container image and starts a cont
4848
HAOS uses a configuration file for each supported target. To build for a specific target (board), the configuration file needs to be passed to `make`. The configuration files are stored in `buildroot-external/configs/`. Note that the ending `_defconfig` will be appended automatically and *must not* be passed to `make`. E.g. to build the Raspberry Pi 4 64-bit configuration `buildroot-external/configs/rpi4_64_defconfig` use the following command:
4949

5050
```
51-
$ sudo scripts/enter.sh make rpi4_64
52-
Sending build context to Docker daemon 159.7kB
53-
Step 1/8 : FROM debian:bullseye
54-
---> a178460bae57
55-
[...]
56-
Successfully built 11d679ac51be
57-
Successfully tagged hassos:local
58-
[...]
51+
$ scripts/enter.sh make rpi4_64
52+
[sudo] password for whoever:
53+
[+] Building 32.5s (10/10) FINISHED [...]
54+
=== Using rpi4_64_defconfig ===
5955
/usr/bin/make -C /build/buildroot O=/build/output BR2_EXTERNAL=/build/buildroot-external "rpi4_64_defconfig"
6056
[...]
57+
=== Building rpi4_64 ===
58+
[...]
6159
```
6260

6361
This invokes make using the `Makefile` in the root of the source repository inside the container. This makefile in turn invokes Buildroot's makefile.
@@ -82,20 +80,17 @@ To build for multiple targets in a single source directory, separate output dire
8280

8381

8482
```shell
85-
sudo scripts/enter.sh make O=output_rpi4_64 rpi4_64
83+
scripts/enter.sh make O=output_rpi4_64 rpi4_64
8684
```
8785

8886
### Use the build container interactively
8987

9088
If no argument to `scripts/enter.sh` is passed, a shell will be presented.
9189

9290
```bash
93-
$ sudo scripts/enter.sh
94-
Sending build context to Docker daemon 159.7kB
95-
Step 1/8 : FROM debian:bullseye
96-
---> a178460bae57
91+
$ scripts/enter.sh
9792
[...]
98-
builder@c6dfb4cd4036:/build$
93+
builder@d3d7577663c9:/build$
9994
```
10095

10196
From this shell, the same build above could be started using `make O=output_rpi4_64 rpi4_64`.
@@ -119,7 +114,7 @@ The target OVA (Open Virtual Appliance) contains images for various virtual mach
119114
Since HAOS requires UEFI support, this is slightly more tricky than with "classic"(/legacy) MBR-based images. On a *Debian* host install the [ovmf package](https://packages.debian.org/stable/ovmf) which provides the "UEFI firmware for 64-bit x86 virtual machines". That package will install a **TianoCore**-derived QEMU UEFI image at `/usr/share/OVMF/OVMF_CODE.fd`, which can be used with QEMU to boot the generated QCOW2 image.
120115

121116
```bash
122-
$ sudo scripts/enter.sh make O=output_ova ova
117+
$ scripts/enter.sh make O=output_ova ova
123118
[...]
124119
$ unxz release/haos_ova-7.0.dev20211003.qcow2.xz
125120
$ qemu-system-x86_64 -enable-kvm -name haos -smp 2 -m 1G -drive file=release/haos_ova-7.0.dev20211003.qcow2,index=0,media=disk,if=virtio,format=qcow2 -drive file=/usr/share/ovmf/x64/OVMF_CODE.fd,if=pflash,format=raw,readonly=on

0 commit comments

Comments
 (0)