ipod5g/6g: support DEFAULT_VIRT_SECTOR_SIZE

This way if there's no valid partition/filesystem we still report the
"correct" sector size out via USB.

Update the ipod5g/6g bootloaders so they do the right thing too.

Change-Id: I0d93ae7e6664f1591d8edf1c0252c586e329cd4b
This commit is contained in:
Solomon Peachy 2024-11-09 16:43:11 -05:00
parent 1516c48a37
commit c8e1da8e90
4 changed files with 35 additions and 16 deletions

View file

@ -194,6 +194,9 @@
/* define this if the device has larger sectors when accessed via USB */
#define MAX_VIRT_SECTOR_SIZE 4096
/* If we have no valid paritions, advertise this as our sector size */
#define DEFAULT_VIRT_SECTOR_SIZE 4096
/* This is the minimum access size for the device, even if it's larger than the logical sector size */
#define MAX_PHYS_SECTOR_SIZE 4096

View file

@ -214,9 +214,11 @@
#define HAVE_HARDWARE_CLICK
/* define this if the device has larger sectors when accessed via USB */
/* (only relevant in disk.c, fat.c now always supports large virtual sectors) */
#define MAX_VIRT_SECTOR_SIZE 2048
/* If we have no valid paritions, advertise this as our sector size */
#define DEFAULT_VIRT_SECTOR_SIZE 2048
/* define this if the hard drive uses large physical sectors (ATA-7 feature) */
/* and doesn't handle them in the drive firmware */
#define MAX_PHYS_SECTOR_SIZE 1024