Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some docs improvements for a mac #56

Draft
wants to merge 4 commits into
base: develop
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions firmware/usbarmory/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -371,13 +371,23 @@ repository.
Run `make usbarmory-mark-two_config` to use the default USB Armory
configuration.

You will also the arm7 toolchain from the Linux packagemer or [ARM](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads).


Then run `make`, as shown below, to build U-Boot:

Linux
``` console
$ # NOTE this depends on arm-none-eabi-gcc and other C build tools
$ ARCH=arm CROSS_COMPILE=arm-none-eabi- make
```

On Mac, you need to work around two things.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also consider writing a small Dockerfile for building U-Boot as well?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another option is extracting the u-boot image from a pre-compiled Debian image. I'm checking if that works right now; if it works I'll send a PR to this branch to document that as a simpler alternative.


1. You need to make the compiler and linker aware of OpenSSL. These [instructions](https://medium.com/@timmykko/using-openssl-library-with-macos-sierra-7807cfd47892) worked.

2. Need to work around MacOS variant of `sed`. [This](https://gist.github.com/andre3k1/e3a1a7133fded5de5a9ee99c87c6fa0d) is one option.

This should result in a `u-boot-dtb.imx` file, which contains the built U-Boot
binary.

Expand Down Expand Up @@ -452,11 +462,21 @@ also means that you can keep a partition table in those first 1024 bytes (e.g.
MBR). You can partition the uSD before running the `dd` command -- ensure any
partition you create doesn't collide with the image you are about to flash.

Linux

``` console
$ sudo dd if=blinky.bin of=/dev/sda bs=512 seek=2 conv=fsync
$ sync
```

MacOS

``` console
$ sudo dd if=blinky.bin of=/dev/rdisk2 bs=512 seek=2 conv=sync
$ sync
```


Now terminate the USB Mass Store Device emulation by pressing Ctrl-C in the
`minicom` terminal / u-boot console. You can now disconnect the Armory.

Expand Down