[U-Boot] x86: u-boot.bin differs in u-boot.rom

Hi Bin, Hi Simon,
I'm currently trying to only update the u-boot.bin part in the SPI NOR chip instead of updating the complete ROM (8MiB). Updating u-boot.bin (same as u-boot-dtb.bin) at 0x70.0000 results in a non booting board though. I've checked a bit and found that the U-Boot image in u-boot.rom at this offset differs from the original u-boot.bin file. Here a diff:
uboot.test (u-boot.rom at offset 0x70.0000) 0000 2D50: 54 2D F0 FF 50 4C F7 FF 00 98 01 00 00 00 F0 FF T-..PL.. ........ u-boot.bin 0000 2D50: 54 2D F0 FF 00 00 00 00 00 00 00 00 00 00 F0 FF T-...... ........ Do you know why this is the case? I would have expected no differ
Thanks, Stefan

Hi Stefan,
On Thu, Oct 6, 2016 at 4:31 PM, Stefan Roese sr@denx.de wrote:
Hi Bin, Hi Simon,
I'm currently trying to only update the u-boot.bin part in the SPI NOR chip instead of updating the complete ROM (8MiB). Updating u-boot.bin (same as u-boot-dtb.bin) at 0x70.0000 results in a non booting board though. I've checked a bit and found that the U-Boot image in u-boot.rom at this offset differs from the original u-boot.bin file. Here a diff:
uboot.test (u-boot.rom at offset 0x70.0000) 0000 2D50: 54 2D F0 FF 50 4C F7 FF 00 98 01 00 00 00 F0 FF T-..PL.. ........ u-boot.bin 0000 2D50: 54 2D F0 FF 00 00 00 00 00 00 00 00 00 00 F0 FF T-...... ........ Do you know why this is the case? I would have expected no differ
See arch/x86/lib/fsp/fsp_car.S: _dt_ucode_base_size. The 8 bytes is filled in by tools/ifdtool.c: write_ucode().
For a partial update, my solution is to change CONFIG_ROM_SIZE to 1MB, and remove CONFIG_HAVE_INTEL_ME. For a related commit, see
commit 91fc5bf652c1e959373cd21df4809a74d31e75fe Author: Bin Meng bmeng.cn@gmail.com Date: Wed May 11 07:44:55 2016 -0700
x86: minnowmax: Adjust U-Boot environment address in SPI flash
Currently U-Boot environment address is at offset 0x7fe00 of a 8MB SPI flash. When creating a partial u-boot.rom image without flash descriptor and ME firmware, U-Boot actually occupies the last 1MB of the flash, and reprograming U-Boot causes previous environment settings get lost which is not convenient during testing.
Adjust the environment address to 0x6ef000 instead (before the MRC cache data region in the flash).
Regards, Bin
participants (2)
-
Bin Meng
-
Stefan Roese