11 lines
370 B
Bash
11 lines
370 B
Bash
|
#!/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
|