1
0
Fork 0
forked from len0rd/rockbox
foxbox/firmware
Solomon Peachy 4ad041e17a disk: Always try to mount the first partition on a disk.
We've received multiple reports from users of 6th gen iPods where we
fail to find any mountable partition.  A user was able to supply an MBR
dump, which showed that the "type" listed for parition 0 was set to 0x00
(ie "unused"), leading us to (correctly) completely ignore that entry.
However, it looks like the stock firmware ignores the type and
unconditionally uses the first entry even if it's nominally "invalid"

So, to deal with this, always try to mount partition 0 if it is not one
of the two "extended partition table" types.  If that speculative mount
succeeds, we now treat it as type 0x0c (Fat32 w/LBA) internally.

Note that this will not allow the partition to be mountable over USB, as
the MBR is still incorrect, leading the host OS to ignore the partition.
Further complicating things, the stock Apple firmware always constructs
a fake MBR to hand to the host!

To prevent user confusion with these devices, we may consider faking the
MBR too; alternatively we could correct the MBR and write it back to
disk, perhaps via a debug menu option.

Change-Id: I1e9392d20401eb94ecc6d70263fb0e45392a9bd4
2025-08-31 19:31:20 -04:00
..
asm arm: add ARMv7-M version of ARMv6 mixer code 2025-04-18 10:57:45 -04:00
common disk: Always try to mount the first partition on a disk. 2025-08-31 19:31:20 -04:00
drivers SD: Move sd_parse_csd() into common sdmmc code 2025-08-22 14:48:28 -04:00
export rgnano: Proper keylock support 2025-08-30 17:20:31 -04:00
include limits: define PATH_MAX in only one place. 2025-08-25 10:10:38 -04:00
kernel misc: Properly annotate some intentional case fallthroughs 2025-04-22 20:54:37 -04:00
libc isdigit replace with a slightly faster and shorter conditional 2025-02-02 13:57:58 -05:00
target rgnano: Voltage and current measure support 2025-08-23 13:44:25 -04:00
usbstack storage: rename MAX_LOG_SECTOR_SIZE to MAX_VIRT_SECTOR_SIZE 2024-11-09 16:32:40 -05:00
arabjoin.c
arabjoin.h Revert "internals: Support characters beyond the first unicode plane (WIP)" 2025-08-20 16:09:49 -04:00
ata_idle_notify.c misc: Clean up a large pile of -Wexpansion-to-defined warnings 2025-04-21 21:04:05 -04:00
backlight-sw-fading.c For backlights that have a wide control, support skipping steps. 2020-10-02 02:45:43 +00:00
backlight.c [Bugfix] call lcd_awake() unconditioanlly on shutdown for devices with HAVE_LCD_SLEEP 2025-01-05 10:59:46 -05:00
bidi.c Revert "internals: Support characters beyond the first unicode plane (WIP)" 2025-08-20 16:09:49 -04:00
buflib_malloc.c buflib_malloc: fixed signed/unsigned comparison 2023-01-16 16:57:23 +00:00
buflib_mempool.c buflib: Add pinned get/put data functions 2023-01-15 11:06:27 +00:00
chunk_alloc.c [BugFix] chunk_alloc pass NULL to buflib_shrink 2023-03-09 20:15:38 -05:00
COPYING
core_alloc.c buflib: Add CONFIG_BUFLIB_BACKEND for selecting a buflib backend 2023-01-15 10:04:13 +00:00
debug.c [1/4] Remove SH support and all archos targets 2020-07-24 21:20:13 +00:00
eeprom_settings.c
enc_base.c
events.c events.c clean-up 2022-12-30 07:23:29 -05:00
firmware.make build: Various LTO fixes 2024-11-24 08:43:23 -05:00
font.c Revert "internals: Support characters beyond the first unicode plane (WIP)" 2025-08-20 16:09:49 -04:00
font_cache.c Revert "internals: Support characters beyond the first unicode plane (WIP)" 2025-08-20 16:09:49 -04:00
general.c replace strlcpy with strmemccpy 2022-11-14 23:56:16 -05:00
hangul.c Revert "internals: Support characters beyond the first unicode plane (WIP)" 2025-08-20 16:09:49 -04:00
linuxboot.c buflib_shrink use NULL to signal start isn't changing 2023-01-13 09:50:29 -05:00
load_code.c Fix various reds. Some includes needed fixup. 2014-03-03 19:10:48 +01:00
logf.c logf: Fix an incorrect fix in 835d0c737a 2021-08-15 09:03:16 -04:00
lru.c
panic.c arm: add initial ARM Cortex-M support 2025-04-18 13:19:42 -04:00
pcm.c Rework auto playback frequency switch 2023-10-28 15:11:07 -04:00
pcm_mixer.c pcm_mixer: Fix an idle frame calculation bug introduced in 2e708c48c5 2020-10-24 02:00:50 +00:00
pcm_sampr.c pcm: Missed a file for the 192/176K playback. 2020-09-30 22:03:34 -04:00
pcm_sw_volume.c move PCM_NATIVE_BITDEPTH definiton into global config code 2021-08-07 11:18:19 -04:00
powermgmt.c misc: Clean up a large pile of -Wexpansion-to-defined warnings 2025-04-21 21:04:05 -04:00
profile.c
README
rolo.c ROLO: Ensure messages are not covering each other, change punctuation 2025-07-24 14:13:07 -04:00
rom.lds h300: add support for ROM image generation 2020-10-26 01:37:42 +00:00
screendump.c Fix path buffer overflow in screendump 2021-08-06 15:46:53 +00:00
scroll_engine.c misc: Fix two more -Wunused-const-variable warnings 2025-04-29 20:56:19 -04:00
sdmmc.c SD: Move sd_parse_csd() into common sdmmc code 2025-08-22 14:48:28 -04:00
sound.c Remove NVRAM infavor of a separate cfg file 2025-01-21 00:04:32 -05:00
SOURCES rgnano: Instant play support and proper system brightness/volume handling 2025-08-06 20:21:02 -04:00
storage.c ata: Rework how flushing, sleeping, and power off interacts 2024-10-31 12:51:54 -04:00
system.c Add ability to dump cpu boost log to disk, include thread names 2021-09-30 21:13:22 -04:00
timer.c Fix timer Agptek Rocker (other hosted players) 2019-10-17 21:19:00 +02:00
tuner.c [1/4] Remove SH support and all archos targets 2020-07-24 21:20:13 +00:00
usb.c IAP: First steps towards true multiport state 2025-08-20 07:56:43 -04:00

See docs/README