2022-02-24 00:05:23 +00:00
|
|
|
IMAGES := ${RISCV}/buildroot/output/images
|
|
|
|
DIS := ${IMAGES}/disassembly
|
|
|
|
|
2022-02-20 09:08:38 +00:00
|
|
|
all:
|
|
|
|
make disassemble
|
|
|
|
make generate
|
|
|
|
|
|
|
|
generate:
|
|
|
|
# generating device tree binary
|
|
|
|
dtc -I dts -O dtb ../devicetree/wally-virt.dts > ${RISCV}/buildroot/output/images/wally-virt.dtb
|
|
|
|
|
|
|
|
disassemble:
|
2022-02-24 00:05:23 +00:00
|
|
|
mkdir -p ${DIS}
|
2022-02-24 04:49:04 +00:00
|
|
|
# disassemblies
|
|
|
|
make -j ${DIS}/fw_jump.objdump ${DIS}/vmlinux.objdump ${DIS}/busybox.objdump
|
2022-02-20 09:08:38 +00:00
|
|
|
# filesystem
|
2022-02-24 04:49:04 +00:00
|
|
|
make ${DIS}/rootfs/bin/busybox
|
|
|
|
# mkdir -p ${DIS}/rootfs
|
|
|
|
# -cd ${DIS}/rootfs; cpio -id --nonmatching 'dev/console' < ../../rootfs.cpio
|
2022-02-24 00:05:23 +00:00
|
|
|
|
|
|
|
${DIS}/fw_jump.objdump: ${IMAGES}/fw_jump.elf
|
2022-02-24 04:49:04 +00:00
|
|
|
riscv64-unknown-elf-objdump -D ${IMAGES}/fw_jump.elf >> ${DIS}/fw_jump.objdump
|
|
|
|
|
2022-02-24 00:05:23 +00:00
|
|
|
${DIS}/vmlinux.objdump: ${IMAGES}/vmlinux
|
2022-02-24 04:49:04 +00:00
|
|
|
riscv64-unknown-elf-objdump -D ${IMAGES}/vmlinux >> ${DIS}/vmlinux.objdump
|
|
|
|
|
|
|
|
${DIS}/busybox.objdump: ${DIS}/rootfs/bin/busybox
|
|
|
|
riscv64-unknown-elf-objdump -D ${DIS}/rootfs/bin/busybox >> ${DIS}/busybox.objdump
|
|
|
|
|
|
|
|
${DIS}/rootfs/bin/busybox:
|
|
|
|
mkdir -p ${DIS}/rootfs
|
|
|
|
-cd ${DIS}/rootfs; cpio -id --nonmatching 'dev/console' < ../../rootfs.cpio
|
|
|
|
|
2022-02-20 09:08:38 +00:00
|
|
|
|
|
|
|
clean:
|
2022-02-24 00:05:23 +00:00
|
|
|
rm -f ${IMAGES}/wally-virt.dtb
|
|
|
|
rm -rf ${DIS}
|