StarGate01 opened a new pull request, #2858:
URL: https://github.com/apache/mynewt-core/pull/2858

   This PR introduces three new **optional** configuration parameters: 
`SPIFLASH_IGNORE_MANUFACTURER`, `SPIFLASH_IGNORE_MEMORY_TYPE`, and 
`SPIFLASH_IGNORE_MEMORY_CAPACITY`. (Default: `0`).
   
   These parameters selectively disable the whitelist checks of the SPI Flash 
JEDEC IDs.
   
   ### Rationale
   
   I am currently [porting the InfiniTime 
OS](https://github.com/InfiniTimeOrg/InfiniTime/pull/1050) (written for the 
[PineTime smartwatch](https://www.pine64.org/pinetime/)) to a popular Chinese 
smartwatch series called "P8". `mynewt-core` is used for the bootloader.
   
   These P8 watches come in a whole zoo of variants, each being compatible with 
the firmware but containing sometimes a bit different chips due to the silicon 
shortage and general chip availability on the global market. This is usually no 
problem to handle.
   
   However, the SPI driver of `mynewt-core` enforces a strict whitelist on the 
reported SPI Flash JEDEC ID. I see how this is useful in normal applications 
where the hardware configuration is known in detail and compatibility has to be 
ensured, however this leads to my bootloader refusing to work on prior unknown 
/ new smartwatch variants, bricking them.
   
   In the past, others and I have added definitions for SPI IDs (e.g. #2798 , 
#2582 ), but I can't keep up with all the models and I don't want to brick any 
more watches due to a purely whitelisting (not technical) issue. 
   
   I am open to suggestions, I think these optional configuration parameters 
would be quite useful to have.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to