added more scripts for enabling debug messages in HV services
[linux_hv_scripts.git] / enable_um_dbg.sh
blob034117a7e40ce82b0c0f26838673a179e12c7b95
1 #!/bin/bash
2 # /********************************************************
3 # Copyright (C) 2011 graf_chokolo <grafchokolo@googlemail.com>
4 # This is free software. You may redistribute copies of it
5 # under the terms of
6 # the GNU General Public License 2
7 # <http://www.gnu.org/licenses/gpl2.html>.
8 # There is NO WARRANTY, to the extent permitted by law.
10 # This script contains comments on how to use lv1_peek and lv1_poke in GameOS to achieve the same effect
11 # Please use it at your own discretion.
12 # credit goes to a.user (a.user@bk.ru)
14 # It also contains comments on how to disable the patch
15 # This script has been tested on 3.55 Kmeaw CFW
16 # ******************************************************/
18 perl -e 'printf "\x00\x00\x00\x03"' | dd of=/dev/ps3ram seek=$((0x0075b1e8)) bs=1 count=4
20 #This second patch is commented out because of the comments in the end
21 #perl -e 'printf "\x00\x00\x00\x01"' | dd of=/dev/ps3ram seek=$((0x0075b1ec)) bs=1 count=4
22 #This is equivalent to one statement
23 #perl -e 'printf "\x00\x00\x00\x03\x00\x00\x00\x01"' | dd of=/dev/ps3ram seek=$((0x0075b1e8)) bs=1 count=8
25 #How to disable?
26 #perl -e 'printf "\x00\x00\x00\x00"' | dd of=/dev/ps3ram seek=$((0x0075b1e8)) bs=1 count=4
28 #To display to result
29 #dd if=/dev/ps3ram skip=$((0x0075b1e8)) bs=1 count=8 | hexdump -C
31 #comments
32 #This was the result prior to apply the patch
33 #dd if=/dev/ps3ram skip=$((0x0075b1e8)) bs=1 count=8 | hexdump -C
34 #8+0 records in
35 #8+0 records out
36 #00000000 00 00 00 00 00 00 00 01 |........|
37 #00000008
38 #8 bytes (8 B) copied, 0.000229226 s, 34.9 kB/s
39 #Notice there is 1 in the end already
40 #So I propose only first statement is necessary:
41 #perl -e 'printf "\x00\x00\x00\x03"' | dd of=/dev/ps3ram seek=$((0x0075b1e8)) bs=1 count=4
42 #val = lv1_peek(0x0075b1e8);
43 #lv1_poke(0x0075b1e8, ((val & 0xFFFFFFFF) | 0x0000000300000000UUL));
44 #End of comments