Positive experience with the librem5 and some minor feedback

and one more question ^^

once jumpdrive is booted, can i then also install it to the emmc? without overwriting my os with disk encryption?

And once that is installed do i still need UUU or can i just plug in and use a volume up/down or some key combi to connect the phone through usb? Like with tow-boot?

Technically it can be booted from the eMMC, but there’s no easy how-to for that. You would have to write a short u-boot script that would, say, check for a button being pressed and then boot Jumpdrive instead of the regular kernel. Then you wouldn’t have to use uuu at all. But at this point, it’s a 100% DIY thing :wink:

Thanks! Maybe that will be my DIY summer project then.

Some pointers:

  1. You can put parts of u-boot boot scripts in /etc/flash-kernel/preboot.d/. flash-kernel will assemble them into a single boot.scr executed at boot.
  2. Command gpio input can be used to read the state of GPIO (buttons, HKS…). For example, gpio input GPIO1_16 reads the state of Vol+ button. For GPIO numbers of other things, consult the schematics and arch/arm64/boot/dts/freescale/imx8mq-pinfunc.h in kernel sources (or imx8mq manual).
  3. You can also control LEDs this way for some user feedback. gpio set GPIO1_13 turns the blue LED on, for example.
  4. Keep in mind that both Vol+ and Vol- buttons are already used for things, so you may have to experiment with adding some time windows for button to be pressed etc.

Putting it all together, a script like this:

if gpio input GPIO1_16; then
  setenv bootargs "${bootargs} button"
  gpio set GPIO1_13
fi

should make the blue LED shine and string “button” to be appended to kernel’s command line if you hold Vol+ button while this script is being executed. Don’t press it before the green LED shines though, as otherwise you will enter the flash mode!

And remember - if you mess the script up, your phone will become unbootable until you fix it up. For example, with Jumpdrive :wink:

(it’s also much easier to play with the bootloader if you have a serial console hooked up - although it’s not strictly required as long as you can deal with debugging things blindly ;))

1 Like

Ok got it to work with my debian:

  1. install uuu (sudo install uuu)
  2. download jumpdrive for librem:
  1. unpack and open a terminal in the unpacked directory
  2. put your librem5 into flash mode. just volume+up didn’t work for me for some reason so i had to fall back to:

-Ensure that the phone is switched off.

  • Turn all Hardware-Kill-Switches off
  • Remove battery
  • Hold volume-up (keep it press through the next steps)
  • Insert the USB-c cable: (red light blinks, no green light)
  • Reinsert the battery: (red light is constantly on, the script will continue)
  • Release volume-up
  1. you should see jumpdrive now on your librem5 screen
  2. use the ./boot-purism-librem5.sh from the previously opened terminal or just use sudo uuu purism-librem5.lst directly
  3. your debian or other linux distro should prompt for your drive encryption key (unlocking the phones drive)
  4. go to town with disks ^^

It always works, provided that you actually manage to turn the phone on (which can trip many people off because of no visible feedback on the phone). You can practice it by having the phone connected to a PC via USB with sudo dmesg --follow displayed there, to see when it shows up and when it disappears as you turn the phone on and off :wink:

ok, i’ll try again next time i run a backup!