2022-04-25 14:36:59 +00:00
|
|
|
BUILDROOT := ${RISCV}/buildroot
|
|
|
|
IMAGES := ${BUILDROOT}/output/images
|
2022-02-24 00:05:23 +00:00
|
|
|
DIS := ${IMAGES}/disassembly
|
|
|
|
|
2022-02-20 09:08:38 +00:00
|
|
|
all:
|
|
|
|
make disassemble
|
|
|
|
make generate
|
|
|
|
|
|
|
|
generate:
|
|
|
|
# generating device tree binary
|
2022-04-22 03:42:02 +00:00
|
|
|
dtc -I dts -O dtb ../devicetree/wally-virt.dts > ${IMAGES}/wally-virt.dtb
|
2022-02-20 09:08:38 +00:00
|
|
|
|
|
|
|
disassemble:
|
2022-02-24 00:05:23 +00:00
|
|
|
mkdir -p ${DIS}
|
2022-02-24 04:49:04 +00:00
|
|
|
# disassemblies
|
2022-03-06 03:02:07 +00:00
|
|
|
make -j ${DIS}/fw_jump.objdump ${DIS}/vmlinux.objdump ${DIS}/busybox.objdump ${DIS}/vmlinux.objdump.addr
|
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-04-01 16:49:13 +00:00
|
|
|
riscv64-unknown-elf-objdump -S ${IMAGES}/fw_jump.elf >> ${DIS}/fw_jump.objdump
|
2022-02-24 04:49:04 +00:00
|
|
|
|
2022-04-25 14:36:59 +00:00
|
|
|
${IMAGES}/vmlinux: ${BUILDROOT}/output/build/linux-5.10.7/vmlinux
|
|
|
|
cp ${BUILDROOT}/output/build/linux-5.10.7/vmlinux ${IMAGES}/vmlinux
|
|
|
|
|
2022-02-24 00:05:23 +00:00
|
|
|
${DIS}/vmlinux.objdump: ${IMAGES}/vmlinux
|
2022-04-01 16:49:13 +00:00
|
|
|
riscv64-unknown-elf-objdump -S ${IMAGES}/vmlinux >> ${DIS}/vmlinux.objdump
|
2022-02-24 04:49:04 +00:00
|
|
|
|
2022-03-06 03:02:07 +00:00
|
|
|
${DIS}/vmlinux.objdump.addr: ${DIS}/vmlinux.objdump
|
|
|
|
-cd ${DIS}; extractFunctionRadix.sh vmlinux.objdump
|
|
|
|
|
2022-02-24 04:49:04 +00:00
|
|
|
${DIS}/busybox.objdump: ${DIS}/rootfs/bin/busybox
|
2022-04-06 23:06:49 +00:00
|
|
|
riscv64-unknown-elf-objdump -S ${DIS}/rootfs/bin/busybox >> ${DIS}/busybox.objdump
|
2022-02-24 04:49:04 +00:00
|
|
|
|
|
|
|
${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}
|