Skip to content

Herrera-Dev/hardware_boot_selection_switch

 
 

Repository files navigation

Hardware Boot Selection Switch Using WAVESHARE RP2040 ZERO

Inspired by Hackaday.io project: https://hackaday.io/project/179539-hardware-boot-selection-switch
Check Steps in Hackster.io: https://www.hackster.io/Madrajib/hardware-boot-select-switch-using-pico-a3e3d5

Switch_OS

make the project

$ git clone this project
$ cd HARDWARE_BOOT_SELECTION_SWITCH

$ mkdir build
$ cd build
$ cmake -DPICO_BOARD=waveshare_rp2040_zero ..
$ make

Now Copy the build/pico_msd.uf2 file to rp2040 zero

POSSIBLE PROBLEM WITH RP2040 ZERO:

TEMPORARY SOLUTION:

In Ubuntu edit the grub file:

$ sudo vim /etc/grub.d/40_custom

search --no-floppy --fs-uuid --set hdswitch 0000-1234
if [ "${hdswitch}" ] ; then
  source ($hdswitch)/switch.cfg

  if [ "${os_hw_switch}" == 0 ] ; then
    # Boot Linux
    set default="0"
    set timeout=0
  elif [ "${os_hw_switch}" == 1 ] ; then
    # Boot Windows
    set default="1"
    set timeout=0
  elif [ "${os_hw_switch}" == 2 ] ; then
    # Boot Otro
    set default="2"
    set timeout=0    
  else
    # Fallback to default
    set default="${GRUB_DEFAULT}"
  fi

else
  set default="${GRUB_DEFAULT}"
fi

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Makefile 71.8%
  • CMake 18.1%
  • C 5.1%
  • C++ 4.8%
  • Other 0.2%