Created
August 29, 2022 11:14
-
-
Save lupyuen/7e828ea476d12cffa5e535a215723908 to your computer and use it in GitHub Desktop.
Build NuttX for PinePhone. See https://lupyuen.github.io/articles/uboot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Build NuttX for PinePhone | |
# TODO: Update PATH | |
export PATH="$PATH:/Applications/ArmGNUToolchain/11.3.rel1/aarch64-none-elf/bin" | |
set -e # Exit when any command fails | |
set -x # Echo commands | |
## Show the version of GCC | |
aarch64-none-elf-gcc -v | |
## Build the firmware | |
make -j | |
## Show the size | |
aarch64-none-elf-size nuttx | |
## Dump the disassembly to nuttx.S | |
aarch64-none-elf-objdump \ | |
-t -S --demangle --line-numbers --wide \ | |
nuttx \ | |
>nuttx.S \ | |
2>&1 | |
## Compress the NuttX Image | |
cp nuttx.bin Image | |
rm -f Image.gz | |
gzip Image | |
## Copy to microSD | |
cp Image.gz "/Volumes/NO NAME" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment