X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=scripts%2Fdecodecode;h=8fe71c29238179095adb3f884049991e77be91c6;hb=refs%2Fheads%2Fsandbox%2Fklewandowski%2Frpi5;hp=b28fd26865617193defb80b8051e794a77e2ccba;hpb=002c6ca75289a4ac4f6738213dd2d258704886e4;p=platform%2Fkernel%2Flinux-rpi.git diff --git a/scripts/decodecode b/scripts/decodecode index b28fd26..8fe71c2 100755 --- a/scripts/decodecode +++ b/scripts/decodecode @@ -93,6 +93,11 @@ disas() { ${CROSS_COMPILE}strip $t.o fi + if [ "$ARCH" = "riscv" ]; then + OBJDUMPFLAGS="-M no-aliases --section=.text -D" + ${CROSS_COMPILE}strip $t.o + fi + if [ $pc_sub -ne 0 ]; then if [ $PC ]; then adj_vma=$(( $PC - $pc_sub )) @@ -126,8 +131,13 @@ get_substr_opcode_bytes_num() do substr+="$opc" + opcode="$substr" + if [ "$ARCH" = "riscv" ]; then + opcode=$(echo $opcode | tr ' ' '\n' | tac | tr -d '\n') + fi + # return if opcode bytes do not match @opline anymore - if ! echo $opline | grep -q "$substr"; + if ! echo $opline | grep -q "$opcode"; then break fi