Skip to content

Instantly share code, notes, and snippets.

@samueldr

samueldr/.diff Secret

Last active January 13, 2021 20:11
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 samueldr/74c669b44a507c5b65dc95563365d281 to your computer and use it in GitHub Desktop.
Save samueldr/74c669b44a507c5b65dc95563365d281 to your computer and use it in GitHub Desktop.
diff --git a/boot/init/tasks/switch_root.rb b/boot/init/tasks/switch_root.rb
index fdff62f75c81..afd61f902d9e 100644
--- a/boot/init/tasks/switch_root.rb
+++ b/boot/init/tasks/switch_root.rb
@@ -191,7 +191,12 @@ class Tasks::SwitchRoot < SingletonTask
if will_kexec?
if Tasks.constants.include?(:SetupGadgetMode)
Progress.exec_with_message("Tearing down USB Gadget mode") do
- Tasks::SetupGadgetMode.instance.teardown()
+ begin
+ Tasks::SetupGadgetMode.instance.teardown()
+ rescue => e
+ $logger.fatal("Caught an error during teardown for kexec...")
+ $logger.fatal(e.inspect)
+ end
end
end
@kalbasit
Copy link

F, [1970-01-01T00:00:30.347088//14.4133 #1] FATAL -- : Caught an error during teardown for kexec...
F, [1970-01-01T00:00:30.347393//14.4136 #1] FATAL -- : No such device (Errno::ENODEV)
[    1.719985] ehci-platform 1c1a000.usb: can't setup: -110
[    1.792682] musb-sunxi 1c19000.usb: Invalid or missing 'dr_mode' property
[    1.825690] no UART detected at 0x1
[    1.830423] MTVAP IRQ 7 busy
[    2.777105] debugfs: File 'Playback' in directory 'dapm' already present!
[    2.783965] debugfs: File 'Capture' in directory 'dapm' already present!

It did boot though!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment