-
Notifications
You must be signed in to change notification settings - Fork 299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
uuu FB: flash -raw2sparse never works efficiently #361
Comments
CHUNK_TYPE_FILL just reduce the USB transfer time, but increase eMMC write time. Some eMMC don't like small block write. The function CHUNK_TYPE_FILL is equal to CHUNCK_TYPE_RAW except small data transfer by USB. I remember img2simg also don't check real spare area to create DON'T CARE CHUCK . The data write to EMMC should be equal to img2simg. You can use uuu crc cmd to check which block is wrong. |
There is no wrong block. "Wrong" (unefficient) is how uuu transfers data in chunks. Using img2simg or patched Tested with image file size 3GB where 180MB is only used. I know that tools cannot guess where is real sparse area - it is only stream of bytes and assuming that block of zeros is DON'T CARE is a big risk. My plan is to write tool which us using wic's bitmap file to create DON'T CARE areas. This should reduce flashing time a lot - but this is not related to this issue. |
I see. Only Performance problem. It is really update to how much data used. if only few continue zero block, emmc write will be very slow. May be we can do some trade off. Previous I tried use lz4 compress before usb transfer, then use unlz4 at board level. but most case can't get preformance gain. |
Yes It is performance problem. But after using commented out code: Line 119 in 24fd043
tool works as designed (FILL blocks used). Can you check if this line can be restored (what side effects for other use cases) ? Or add parameter to enable same data detection ? In meantime I've created own tool based on Android's img2simg where generated XML .bitmap file is used (using libxml2 library). With this new tool I can create Android's sparse file with DON'T CARE blocks so only really used date are transferred and flashed. Can consider adding .bitmap support to this tool ? |
raw2sparse is useless. Something is wrong with sparse area detection. With every data transfer to u-boot's fastboot (
m_sparse_limit
default 16M or modified 67M - doesn't matter) it sends raw data chunks - which is correct, but for area full of zeroes it still usingraw data
data blocks together withdon't care
blocks:I checked source file history and it was never implemented to detect sparse areas: 3900f69#diff-8347bca33dd95d8a1ac9905272e36e835b7d415348519dd6e25d4c4d98238989R155
After restoring commented line:
mfgtools/libuuu/sparse.cpp
Line 119 in 24fd043
it generates lots of chunks in one transfer block. System boots correctly, so it solves problem for me. But I'm not expert in this tool area, so please check how to correctly add real raw2sparse file support.
The same image file, converted with
img2simg
and flashed with the sameuuu
works perfectly. Few block of data, and huge block of sparse data (which requires USB timeout increase)The text was updated successfully, but these errors were encountered: