amx-mst701/scripts/on_target/build.sh

11 lines
370 B
Bash
Raw Permalink Normal View History

2024-12-18 13:52:47 +01:00
#!/bin/bash
set -e
CC=arm-amx-linux-gnueabihf-
${CC}gcc -nostdlib -nostartfiles -ffreestanding -T boot.ld -Os -o bootrom.elf main.c
#riscv64-elf-objdump -D bootrom.elf
${CC}objcopy -O binary bootrom.elf bootrom.bin
r2 -A -c 'pdf @ sym._start' -q bootrom.elf
mkimage -A arm -O linux -T kernel -C none -a 0x80000000 -e 0x80000000 -n "Linux kernel" -d bootrom.bin uImage