Skip to content

jonlamb-gh/pine-a64-rust-workspace

Repository files navigation

Pine A64 Rust Workspace

Crates

Building

rustc 1.46.0-nightly (346aec9b0 2020-07-11)

rustup target add aarch64-unknown-none

cargo build --release

Copy elf to binary:

cargo objcopy -- -O binary target/aarch64-unknown-none/release/<img> /dest/<img>.bin
cargo objcopy --release -- -O binary /dest/<img>.bin

U-boot

TODO - track u-boot.cfg here

CONFIG_CMD_CACHE=y
CONFIG_ENV_FAT_DEVICE_AND_PART="0:auto"

ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make pine64-lts_defconfig
ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make
dd if=u-boot-sunxi-with-spl.bin of=/dev/sda bs=1k seek=8
U-Boot SPL 2020.10-rc1-00148-g719f42190d-dirty (Aug 01 2020 - 07:59:39 -0700)
...

U-Boot 2020.10-rc1-00148-g719f42190d-dirty (Aug 01 2020 - 08:04:33 -0700) Allwinner Technology
...

Environment:

setenv imgname img.bin

setenv loadaddr 0x42000000

# Make sure the caches are off for now
setenv bootimg 'tftp ${loadaddr} ${serverip}:${imgname}; dcache flush; dcache off; go ${loadaddr}'

Links

...

Stuff for the PinePhone BSP crate

  • PinePhone debug UART is UART0, PB8/PB9