forked from Digilent/linux-digilent
-
Notifications
You must be signed in to change notification settings - Fork 1
/
convert_vmlinux.sh
executable file
·19 lines (14 loc) · 1.02 KB
/
convert_vmlinux.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh
if [ "$1" == "cpu1" ] ; then
echo "Creating vmlinux1.bin for CPU1 at 66MB (0x4200000) start address"
${CROSS_COMPILE:-arm-none-linux-gnueabi-}objcopy -R .note.gnu.build-id -R .comment -R .ARM.attributes --change-addresses -0xBBE00000 vmlinux vmlinux1.elf
${CROSS_COMPILE:-arm-none-linux-gnueabi-}objcopy --gap-fill=0xFF -O binary vmlinux1.elf vmlinux1.bin
elif [ "$1" == "cpu0amp" ] ; then
echo "Creating vmlinux.bin for CPU0 at 0x400000 start address"
${CROSS_COMPILE:-arm-none-linux-gnueabi-}objcopy -R .note.gnu.build-id -R .comment -R .ARM.attributes --change-addresses -0xBC000000 vmlinux vmlinux.elf
${CROSS_COMPILE:-arm-none-linux-gnueabi-}objcopy --gap-fill=0xFF -O binary vmlinux.elf vmlinux.bin
else
echo "Creating vmlinux.bin for CPU0 at 0 start address"
${CROSS_COMPILE:-arm-none-linux-gnueabi-}objcopy -R .note.gnu.build-id -R .comment -R .ARM.attributes --change-addresses -0xC0000000 vmlinux vmlinux.elf
${CROSS_COMPILE:-arm-none-linux-gnueabi-}objcopy --gap-fill=0xFF -O binary vmlinux.elf vmlinux.bin
fi