Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Welcome to the Rockbox Technical Forums!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Hardware
| | |-+  SD card support in bootloader?
« previous next »
  • Print
Pages: [1] 2

Author Topic: SD card support in bootloader?  (Read 5194 times)

Offline johnb

  • Member
  • *
  • Posts: 215
SD card support in bootloader?
« on: April 22, 2016, 03:23:45 PM »
Hi Mihail,
I have seen your commit on the front page:
http://git.rockbox.org/?p=rockbox.git;a=commit;h=7cb1e5a AMS: enable SD card support in bootloader


I have two questions:
- As you have only changed device specific code, does that mean that the current bootloader is already capable of booting rockbox off the SDcard?
- Does this only work if the internal storage is not accessible (I had removed the .rockbox directory from the internal storage and installed the new build on SD, but it did not boot).

Overall I think this will be a very useful feature as I have one clip+ where I think the internal flash is dying ...

Thanks
johnb
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 9156
Re: SD card support in bootloader?
« Reply #1 on: April 22, 2016, 04:00:05 PM »
Those changes are in the bootloader, so you'll need to install an updated bootloader, which we haven't released yet.  Mihail can answer the other points, but I believe if your internal storage doesn't have a file system it should try to boot from the SD once the new bootloader is installed.
Logged

Offline Mihail Zenkov

  • Developer
  • Member
  • *
  • Posts: 374
Re: SD card support in bootloader?
« Reply #2 on: April 22, 2016, 04:01:40 PM »
Quote from: johnb on April 22, 2016, 03:23:45 PM
As you have only changed device specific code, does that mean that the current bootloader is already capable of booting rockbox off the SDcard?

No, you should update bootloader.

Quote from: johnb on April 22, 2016, 03:23:45 PM
Does this only work if the internal storage is not accessible (I had removed the .rockbox directory from the internal storage and installed the new build on SD, but it did not boot).

Yes. It work only if rockbox can't mount internal storage. It useful if internal storage corrupted (by software or hardware). I think it should good solution for partially bricked players - when bootloader still work (you can see rockbox logo at startup)  but cannot mount and boot from internal storage.

In near future I want add booting from sd card by default if it have .rockbox folder. It can be useful when internal storage can be mounted but FS broken. Also it can be useful if someone want update rockbox on player with broken usb.

Quote from: johnb on April 22, 2016, 03:23:45 PM
Overall I think this will be a very useful feature as I have one clip+ where I think the internal flash is dying ...

Yes, but you should update bootloader before your player bricked - player should to be able update firmware.

At this moment we don't provide new builds of bootloaders.

saratoga: Can you build and post links to this topic?
« Last Edit: April 22, 2016, 04:04:08 PM by Mihail Zenkov »
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 9156
Re: SD card support in bootloader?
« Reply #3 on: April 22, 2016, 04:25:28 PM »
http://web.mit.edu/mgg6/www/bootloader-clipzip.sansa
http://web.mit.edu/mgg6/www/bootloader-clipplus.sansa
http://web.mit.edu/mgg6/www/bootloader-clipv2.sansa
http://web.mit.edu/mgg6/www/bootloader-fuzev2.sansa

Use these with mkamsboot (available from the manual or wiki) and the original firmware file of your choice.  Note that I have not tested these, so beware. 
Logged

Offline Mihail Zenkov

  • Developer
  • Member
  • *
  • Posts: 374
Re: SD card support in bootloader?
« Reply #4 on: April 22, 2016, 04:32:43 PM »
Quote from: saratoga on April 22, 2016, 04:25:28 PM
Note that I have not tested these, so beware.

In any case it should be safe as we don't change dualboot code and loading to OF should work.

P.S. Charge your player and check disk for errors before update firmware.
Logged

Offline Mihail Zenkov

  • Developer
  • Member
  • *
  • Posts: 374
Re: SD card support in bootloader?
« Reply #5 on: April 22, 2016, 04:54:50 PM »
Mini how-to update bootloader:
1. place to one dir: OF (clpzV010121.bin), new (bootloader-clipzip.sansa) and mkamsboot.
2. open terminal in this dir and run: ./mkamsboot clpzV010121.bin bootloader-clipzip.sansa clpzV010121_new.bin
3. copy clpzV010121_new.bin to your player
4. reboot to OF
Logged

Offline johnb

  • Member
  • *
  • Posts: 215
Re: SD card support in bootloader?
« Reply #6 on: April 23, 2016, 07:00:42 AM »
I successfully installed the new bootloader on this clip+ I mentioned before.
While I faced dismounting issues in Win10 and drives disappearing when I was
- trying to copy over the latest rockbox build
- deleting the files/dirs created by the OF
which is familiar (that's why I said the internal storage is dying),
I ended in a situation where the clip+ actually booted from SD, recent_bookmarks file was created in the .rockbox dir on the SD and no internal storage was visible from the file browser.

In a nutshell: the new bootloader WORKED for me!

Thanks a lot!

P.S.: during those activities, an ATA error and a mount problem was reported on the clip. Chkdsk also had found problems. So I am not fully clear, whether it really is the flash or the controller which is flaky.
Logged

Offline Mihail Zenkov

  • Developer
  • Member
  • *
  • Posts: 374
Re: SD card support in bootloader?
« Reply #7 on: April 23, 2016, 09:39:24 AM »
johnb: Good report, I glad that changes works as expected and helpful. And yes - when rockbox boot from SD it will show only SD as internal storage was not mounted.
Logged

Offline shrizza

  • Member
  • *
  • Posts: 1
Re: SD card support in bootloader?
« Reply #8 on: January 02, 2017, 11:17:16 PM »
I have a Sansa Clip Zip that randomly (about 50% of the time) stops at boot on the "Boot 4.0" message. I suspected it was suffering from faulty NAND and thus decided to install this bootloader.

I'm pretty sure it was successfully installed since I am seeing a different message "Boot 7cb1e5a-160" as opposed to "Boot 4.0". Unfortunately, it is still randomly failing with the message "Loading firmware. Read failed" (there's a bit more to that message but it is cut off). Is my Clip Zip failing in some way this bootloader is not expecting?

For reference: both before and after the installation, when booting is successful it shows a "Boot 3.13" message before finally idling at the usual RB menu. When it is not successful it sometimes stops at a blank screen with the message "Plug USB cable".
Logged

Offline johnb

  • Member
  • *
  • Posts: 215
Re: SD card support in bootloader?
« Reply #9 on: January 03, 2017, 04:07:46 AM »
Do you have a copy of the .rockbox directory on the SD card?

Don't use the 3.13, but the current dev build and try again.
Logged

Offline Mihail Zenkov

  • Developer
  • Member
  • *
  • Posts: 374
Re: SD card support in bootloader?
« Reply #10 on: January 30, 2017, 05:04:05 PM »
Patch to boot rockbox from sd card by default: http://knk.square7.ch/rb/rockbox-boot_from_sd_card.patch
It have hardcoded path and should be reworked. But it enough to check first is we have rockbox on sd card and boot from it.

If you boot from sd card and your internal memory still mounted by rockbox, you should also apply this patch: http://knk.square7.ch/rb/rockbox-dont_mount_internal_drive.patch
So internal drive will be ignored and you can load all rockbox stuff (codecs/plugins/settings/etc) from sd card.
« Last Edit: January 30, 2017, 05:11:52 PM by Mihail Zenkov »
Logged

Offline asymsucon

  • Member
  • *
  • Posts: 102
Re: SD card support in bootloader?
« Reply #11 on: February 07, 2017, 12:10:10 AM »
My question probably got lost in another thread, but it's an important issue, so let me touch it again.
What is the procedure for loading alternative bootloader when one's clip has already defective (read-only) internal flash?
Holding down select during boot won't mount the damaged volume:

Code: [Select]
[  104.394323] hub 1-0:1.0: unable to enumerate USB device on port 2
[  105.700082] usb 1-2: new high-speed USB device number 5 using ehci_hcd
[  105.816926] usb 1-2: New USB device found, idVendor=0781, idProduct=74d1
[  105.816934] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  105.816941] usb 1-2: Product: Rockbox media player
[  105.816946] usb 1-2: Manufacturer: Rockbox.org
[  105.816951] usb 1-2: SerialNumber: 2A8C381030AEE202100000000
[  105.818804] input: Rockbox.org Rockbox media player as /devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/input/input9
[  105.819215] generic-usb 0003:0781:74D1.0003: input,hidraw2: USB HID v1.10 Keyboard [Rockbox.org Rockbox media player] on usb-0000:00:1d.7-2/input0
So what should one do in such case?
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 9156
Re: SD card support in bootloader?
« Reply #12 on: February 07, 2017, 01:03:29 AM »
You can't install a bootloader from inside rockbox anyway, you have to boot into the OF and patch it from there just like you did the first time you installed rockbox. 
Logged

Offline asymsucon

  • Member
  • *
  • Posts: 102
Re: SD card support in bootloader?
« Reply #13 on: February 07, 2017, 02:13:18 AM »
Fair enough, but it's not possible to boot into OF with corrupted internal flash (it freezes on Sansa logo). So what then?
Logged

Offline Mihail Zenkov

  • Developer
  • Member
  • *
  • Posts: 374
Re: SD card support in bootloader?
« Reply #14 on: February 07, 2017, 05:49:18 AM »
Quote from: asymsucon on February 07, 2017, 12:10:10 AM
What is the procedure for loading alternative bootloader when one's clip has already defective (read-only) internal flash?
Holding down select during boot won't mount the damaged volume:

It's don't look like read-only case. At read-only you should still able mount drive but all changes on it ignored.  Can you show what you have in dmesg if you connect after rockbox loading?

Quote from: asymsucon on February 07, 2017, 02:13:18 AM
Fair enough, but it's not possible to boot into OF with corrupted internal flash (it freezes on Sansa logo). So what then?

You should install bootloader before problems with internal flash. If you try install new bootloader on bad internal flash - you just brick device.

In your case: if rockbox still loading and you can see sd card - you can load new rockbox from sd card by hands.
Extract "rockbox.zip" to sd card. Enter to ".rockbox" dir and copy "rockbox.sansa" to root dir. Then boot rockbox and select Files > rockbox on sd card.
Logged

  • Print
Pages: [1] 2
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Hardware
| | |-+  SD card support in bootloader?
 

  • SMF 2.0.19 | SMF © 2021, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.105 seconds with 22 queries.