[U-Boot] ubispl: how to configure number of PEBs on the fly?

Markus Klotzbuecher Markus.Klotzbuecher at kistler.com
Mon Apr 8 09:42:06 UTC 2019


Dear All                                                                                                                                                                                  
                                                                                                                                                                                          
We are using ubispl to load u-boot from a UBI volume on a TI am335x                                                                                                                       
based board using the am335x_spl_bch driver. In the current ubispl                                                                                                                        
code (common/spl/spl_ubi.c, line 45), the number of PEBs is hardcoded                                                                                                                    
to CONFIG_SPL_UBI_MAX_PEBS.                                                                                                                                                               
                                                                                                                                                                                          
In order to support multiple hardware variants with different flash                                                                                                                       
sizes with one SPL, it would be nice to set this value on the                                                                                                                             
fly. However if I understand correctly, the SPL nand driver does                                                                                                                     
not autodetect such properties.                                                                                                                                                           
                                                                                                                                                                                          
Is there a practical way to determine this value in the SPL context?                                                                                                                      
Or should it be provided by board init code? What would be the                                                                                                                            
preferred way to handle this?                                                                                                                                                             
                                                                                                                                                                                          
Thanks in advance!                                                                                                                                                                        
                                                                                                                                                                                          
Markus

Markus Klotzbuecher
Embedded System Architect

-- 
Kistler Instrumente AG 
Eulachstrasse 22, 8408 Winterthur, Switzerland
Direct +41 52 224 17 54, Main Office +41 52 224 11 11
markus.klotzbuecher at kistler.com, www.kistler.com


More information about the U-Boot mailing list