Building the Mender client for arm64

93 views
Skip to first unread message

Arnstein Kleven

unread,
Sep 19, 2017, 7:06:29 AM9/19/17
to Mender List mender.io
Just a heads up for anyone trying to build the Mender client for arm64:
When running "GOARCH=arm64 go build ." I got "no buildable Go source files in /home/arnstein/go/src/github.com/mendersoftware/mender/vendor/github.com/bmatsuo/lmdb-go/lmdb". With some help from the Mender team I was able to build the client for arm64 with the command:

CC=aarch64-linux-gnu-gcc CGO_ENABLED=1 GOARCH=arm64 go build .


Arnstein Kleven

unread,
Sep 19, 2017, 7:09:02 AM9/19/17
to Mender List mender.io
I should add that when you run this, it will give this error:

./ioctl.go:40: undefined: UBI_IOCVOLUP
./ioctl.go:121: undefined: BLKSSZGET
./ioctl.go:142: undefined: BLKGETSIZE64

By copying these variables from ioctl_64_bit.go into ioctl.go (or much better: properly importing this file into the project), it will work.

Kristian Amlie

unread,
Sep 19, 2017, 7:15:53 AM9/19/17
to men...@lists.mender.io, Arnstein Kleven
On 19/09/17 13:09, Arnstein Kleven wrote:
> I should add that when you run this, it will give this error:
>
> ./ioctl.go:40: undefined: UBI_IOCVOLUP
> ./ioctl.go:121: undefined: BLKSSZGET
> ./ioctl.go:142: undefined: BLKGETSIZE64
>
> By copying these variables from ioctl_64_bit.go into ioctl.go (or much
> better: properly importing this file into the project), it will work.

Does the attached patch work?

--
Kristian
enable_64_bit.patch

Arnstein Kleven

unread,
Sep 19, 2017, 7:19:58 AM9/19/17
to Mender List mender.io, arnstei...@gmail.com
Yes, after removing the constants that I added to ioctl.go and applying the patch I can confirm that this works.

Arnstein

Kristian Amlie

unread,
Sep 19, 2017, 7:21:03 AM9/19/17
to men...@lists.mender.io, Arnstein Kleven
On 19/09/17 13:19, Arnstein Kleven wrote:
> Yes, after removing the constants that I added to ioctl.go and applying
> the patch I can confirm that this works.

Cool, I'll make sure that gets submitted to the repo.

--
Kristian
Reply all
Reply to author
Forward
0 new messages