# Generic x86\_64

**URL:** <https://hub.mender.io/t/generic-x86-64/1232>\
**Category:** Buildroot\
**Created:** [November 11, 2019, 10:19pm UTC](https://hub.mender.io/t/generic-x86-64/1232 "2019-11-11T22:19:26Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![aduskett](https://avatars.discourse-cdn.com/v4/letter/a/7ab992/32.png) [@aduskett](https://hub.mender.io/u/aduskett)\
**Post date:** [November 11, 2019, 10:19pm UTC](https://hub.mender.io/t/generic-x86-64/1232/1 "2019-11-11T22:19:27Z")

</div>

The official [Mender documentation](https://docs.mender.io/) explains how Mender works. This is simply a board-specific complement to the official documentation.

# Changelog

- December 18th 2023:

- March 2nd, 2020:

# Board description

Generic X86\_64 demonstration

# Test results

The Buildroot Project releases in the table below have been tested by the Mender community. Please update it if you have tested this integration on other releases.

| Buildroot | Build | Runtime |
| --- | --- | --- |
| 2019.08.2 | :test_works: | :test_works: |
| 2019.11.1 | :test_works: | :test_works: |
| 2020.02.x | :test_works: | :test_works: |
| 2023.02.x | :test_works: | :test_works: |
| 2023.11 | :test_works: | :test_works: |

**Build** Means that the Buildroot build using this Mender integration completes without errors and outputs images.  
**Runtime** Means that Mender has been verified to work on the board. For U-Boot-based boards, the [integration checklist](https://docs.mender.io/devices/yocto-project/bootloader-support/u-boot/integration-checklistt?target=_blank) has been verified.

# Getting started

## Prerequisites

- A supported Linux distribution and dependencies installed on your workstation/laptop as described in the [Buildroot Manual](https://buildroot.org/downloads/manual/manual.html#requirement)
  - NOTE. Instructions depend on which Buildroot version you intend to use.

## Configuring the build

### Setup Buildroot environment

Download the Buildroot version you want from [here](https://buildroot.org/download.html)

Change directory to `buildroot`:

```auto
cd buildroot

```

## Configure build environment

Configure Buildroot:

```auto
make mender_x86_64_efi_defconfig

```

### Configure Mender server URL (optional)

This section is not required for a successful build but images that are generated by default are only suitable for usage with the Mender client in [Standalone deployments](https://docs.mender.io/architecture/standalone-deployments?target=_blank), due to lack of server configuration.

You can edit the `board/mender/x86_64/overlay/etc/mender/mender.conf` file to provide your Mender server configuration, ensuring the generated images and Mender Artifacts are connecting to the Mender server that you are using.

Build for Hosted Mender:

```auto
ServerURL = "https://hosted.mender.io"
TenantToken = "<copy token here>"

```

Build for Mender demo server:

```auto
ServerURL = "192.168.0.100"

```

### Building the image

You can now proceed with building an image:

```auto
make

```

### Using the build output

After a successful build, the images and build artifacts are placed in `buildroot/output/images`

The disk image sdcard.sdimg is used to provision the device storage for devices without Mender running already. Please proceed to [the official documentation on provisioning a new device](https://docs.mender.io/artifacts/provisioning-a-new-device?target=_blank) for steps to do this.

On the other hand, if you already have Mender running on your device and want to deploy a rootfs update using this build, you should use the [Mender Artifact](https://docs.mender.io/architecture/mender-artifacts?target=_blank) files, which have `.mender` suffix. You can either deploy this Artifact in managed mode with the Mender server (upload it under Releases in the server UI) or by using the Mender client only in [Standalone deployments](https://docs.mender.io/architecture/standalone-deployments?target=_blank).

### Created a mender artifact

The mender artifact is automatically created in `output/images/buildroot-x86_64-1.0.mender`

```auto

### Emulation in qemu
========================

Run the emulation with:

qemu-system-x86_64 \
    -M pc \
    -bios </path/to/OVMF_CODE.fd> \
    -drive file=output/images/disk.img,if=virtio,format=raw \
    -net nic,model=virtio \
    -net user

Note that </path/to/OVMF.fd> needs to point to a valid x86_64 UEFI
firmware image for qemu. It may be provided by your distribution as an
edk2 or OVMF package, in a path such as /usr/share/edk2/ovmf/OVMF_CODE.fd.

Optional arguments:
 - -enable-kvm to speed up qemu. This requires a loaded kvm module on the host
    system.
 - Add -smp N to emulate an SMP system with N CPUs.

The login prompt will appear in the serial window.
Tested with QEMU 8.1.92 on Fedora 39
```

---

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [November 14, 2019, 4:48pm UTC](https://hub.mender.io/t/generic-x86-64/1232/2 "2019-11-14T16:48:31Z")

</div>

> [@aduskett](#):
>
> x86\_6

Not sure why but I don’t have edit access here. It looks like the command to clone the buildroot-mender-configs repo chopped of the last character in the branch name.

---

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [November 14, 2019, 4:50pm UTC](https://hub.mender.io/t/generic-x86-64/1232/3 "2019-11-14T16:50:19Z")

</div>

Also, the instructions for configuring the Mender server are not correct; they seem to be assuming Yocto.

---

<div class="post-metadata">

**Author:** ![mirzak](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mirzak/32/2056_2.png) [@mirzak](https://hub.mender.io/u/mirzak)\
**Post date:** [November 14, 2019, 5:26pm UTC](https://hub.mender.io/t/generic-x86-64/1232/4 "2019-11-14T17:26:38Z")

</div>

It was not posted as a `wiki`, updated. Should be able to edit now

Edit: It was not @aduskett fault, and was a setting missing in this category to make posts “wiki” by default

---

<div class="post-metadata">

**Author:** ![aduskett](https://avatars.discourse-cdn.com/v4/letter/a/7ab992/32.png) [@aduskett](https://hub.mender.io/u/aduskett)\
**Post date:** [December 15, 2019, 8:33pm UTC](https://hub.mender.io/t/generic-x86-64/1232/5 "2019-12-15T20:33:47Z")

</div>

Thanks for the feedback! I fixed both issues.

---

<div class="post-metadata">

**Author:** ![aduskett](https://avatars.discourse-cdn.com/v4/letter/a/7ab992/32.png) [@aduskett](https://hub.mender.io/u/aduskett)\
**Post date:** [March 2, 2020, 4:03pm UTC](https://hub.mender.io/t/generic-x86-64/1232/6 "2020-03-02T16:03:45Z")

</div>

All;

I updated the x86\_64 branch to work with Buildroot 2019.11.1 and 2020.02 and added a changelog at the top of the OP.

---

<div class="post-metadata">

**Author:** ![penielsen](https://avatars.discourse-cdn.com/v4/letter/p/a9adbd/32.png) [@penielsen](https://hub.mender.io/u/penielsen)\
**Post date:** [October 15, 2020, 12:33pm UTC](https://hub.mender.io/t/generic-x86-64/1232/7 "2020-10-15T12:33:00Z")

</div>

Hi,

I’ve just tried to follow the guide using “2020.02” but ‘make’ exits with an error when compiling like below. The same apply for “2019.11.1” but with a different error (Kernel headers expected 5.3.x but got 5.5.x). Is that something anyone has seen before?

Regards Peter

/home/mint/buildroot/output/host/bin/x86\_64-buildroot-linux-uclibc-gcc -D\_LARGEFILE\_SOURCE -D\_LARGEFILE64\_SOURCE -D\_FILE\_OFFSET\_BITS=64 -Os -ansi -fomit-frame-pointer -fstack-protector-strong -W -Wall -Wunreachable-code -Wformat -Werror=format-security -D\_FORTIFY\_SOURCE=2 -D\_XOPEN\_SOURCE -D\_GNU\_SOURCE -DVERSION="" -c -o consoles.o consoles.c  
/home/mint/buildroot/output/host/lib/gcc/x86\_64-buildroot-linux-uclibc/8.3.0/…/…/…/…/x86\_64-buildroot-linux-uclibc/bin/ld: cannot find -lssp\_nonshared  
/home/mint/buildroot/output/host/lib/gcc/x86\_64-buildroot-linux-uclibc/8.3.0/…/…/…/…/x86\_64-buildroot-linux-uclibc/bin/ld: cannot find -lssp  
collect2: error: ld returned 1 exit status  
: recipe for target ‘killall5’ failed  
make[1]: \*\*\* [killall5] Error 1  
make[1]: \*\*\* Waiting for unfinished jobs…  
make[1]: Leaving directory ‘/home/mint/buildroot/output/build/sysvinit-2.96/src’  
package/pkg-generic.mk:266: recipe for target ‘/home/mint/buildroot/output/build/sysvinit-2.96/.stamp\_built’ failed  
make: \*\*\* [/home/mint/buildroot/output/build/sysvinit-2.96/.stamp\_built] Error 2

---

<div class="post-metadata">

**Author:** ![aduskett](https://avatars.discourse-cdn.com/v4/letter/a/7ab992/32.png) [@aduskett](https://hub.mender.io/u/aduskett)\
**Post date:** [December 18, 2023, 9:16pm UTC](https://hub.mender.io/t/generic-x86-64/1232/8 "2023-12-18T21:16:40Z")

</div>

This is extremely old but I feel obligated to reply (partially to bump this thread as well)  
mender\_x86\_64\_efi\_defconfig is now included in mainline buildroot and should work out of the box.

I have a pending patch set to bump all the mender packages to their latest versions as well!

---

<div class="post-metadata">

**Author:** ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)\
**Post date:** [December 22, 2023, 8:07am UTC](https://hub.mender.io/t/generic-x86-64/1232/9 "2023-12-22T08:07:11Z")

</div>

Thanks a lot @aduskett! Blunt question, care to drop a link to the revision after merge here so we have a defined state for further reference?

Greetz,  
Josef
