Skip to content

Instantly share code, notes, and snippets.

@zhuowei
Created December 19, 2018 06:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zhuowei/f3ede9e293e43ee40bb303bfe216e175 to your computer and use it in GitHub Desktop.
Save zhuowei/f3ede9e293e43ee40bb303bfe216e175 to your computer and use it in GitHub Desktop.
diff --cc init/main.c
index ee147103ba1b,ee147103ba1b..8b2da032f1f9
--- a/init/main.c
+++ b/init/main.c
@@@ -600,6 -600,6 +600,12 @@@ asmlinkage __visible void __init start_
/* trace_printk can be enabled here */
early_trace_init();
++ // Zhuowei: reboot now please; I don't want you to set my precious phone on fire
++ // borrowed from msm-poweroff
++ int* pshold = ioremap(0xC264000, 4);
++ *pshold = 0; // reboot
++ while (1) {}
++
/*
* Set up the scheduler prior starting any interrupts (such as the
* timer interrupt). Full topology setup happens at smp_init()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment