Open 49handyman opened 2 years ago
I just used bootgen to dump hearders from it to compare.
**** Build date : May 25 2022-02:54:01
** Copyright 1986-2021 Xilinx, Inc. All Rights Reserved.
--------------------------------------------------------------------------------
BOOT HEADER
--------------------------------------------------------------------------------
boot_vectors (0x00) : 0xeafffffeeafffffeeafffffeeafffffeeafffffeeafffffeeafffffeeafffffe
width_detection (0x20) : 0xaa995566
image_id (0x24) : 0x584c4e58
encryption_keystore (0x28) : 0x00000000
header_version (0x2c) : 0x01010000
fsbl_sourceoffset (0x30) : 0x00001700
fsbl_length (0x34) : 0x0001c010
fsbl_load_address (0x38) : 0x00000000
fsbl_exec_address (0x3C) : 0x00000000
fsbl_total_length (0x40) : 0x0001c010
qspi_config-word (0x44) : 0x00000001
checksum (0x48) : 0xfc15c520
iht_offset (0x98) : 0x000008c0
pht_offset (0x9c) : 0x00000c80
--------------------------------------------------------------------------------
IMAGE HEADER TABLE
--------------------------------------------------------------------------------
version (0x00) : 0x01020000 total_images (0x04) : 0x00000003
pht_offset (0x08) : 0x00000c80 ih_offset (0x0c) : 0x00000900
hdr_ac_offset (0x10) : 0x00000000
--------------------------------------------------------------------------------
IMAGE HEADER (Zynq7007_miner_without_rsa.elf)
--------------------------------------------------------------------------------
next_ih(W) (0x00) : 0x00000250
next_pht(W) (0x04) : 0x00000320
total_partitions (0x08) : 0x00000000
total_partitions (0x0c) : 0x00000001
name (0x10) : Zynq7007_miner_without_rsa.elf
--------------------------------------------------------------------------------
IMAGE HEADER (Zynq7007_miner.bit)
--------------------------------------------------------------------------------
next_ih(W) (0x00) : 0x00000260
next_pht(W) (0x04) : 0x00000330
total_partitions (0x08) : 0x00000000
total_partitions (0x0c) : 0x00000001
name (0x10) : Zynq7007_miner.bit
--------------------------------------------------------------------------------
IMAGE HEADER (u-boot.elf)
--------------------------------------------------------------------------------
next_ih(W) (0x00) : 0x00000000
next_pht(W) (0x04) : 0x00000340
total_partitions (0x08) : 0x00000000
total_partitions (0x0c) : 0x00000001
name (0x10) : u-boot.elf
--------------------------------------------------------------------------------
PARTITION HEADER TABLE (Zynq7007_miner_without_rsa.elf.0)
--------------------------------------------------------------------------------
encrypted_length (0x00) : 0x00007004 unencrypted_length (0x04) : 0x00007004
total_length (0x08) : 0x00007004 load_addr (0x0c) : 0x00000000
exec_addr (0x10) : 0x00000000 partition_offset (0x14) : 0x000005c0
attributes (0x18) : 0x00000010 section_count (0x1C) : 0x00000001
checksum_offset (0x20) : 0x00000000 iht_offset (0x24) : 0x00000240
ac_offset (0x28) : 0x00000000 checksum (0x3c) : 0xfffea7e2
attribute list -
trustzone [non-secure] el [el-0]
exec_state [aarch-32] dest_device [none]
encryption [no] core [none]
--------------------------------------------------------------------------------
PARTITION HEADER TABLE (Zynq7007_miner.bit.0)
--------------------------------------------------------------------------------
encrypted_length (0x00) : 0x0007f2e8 unencrypted_length (0x04) : 0x0007f2e8
total_length (0x08) : 0x0007f2e8 load_addr (0x0c) : 0x00000000
exec_addr (0x10) : 0x00000000 partition_offset (0x14) : 0x000075d0
attributes (0x18) : 0x00000020 section_count (0x1C) : 0x00000001
checksum_offset (0x20) : 0x00000000 iht_offset (0x24) : 0x00000250
ac_offset (0x28) : 0x00000000 checksum (0x3c) : 0xffe7af06
attribute list -
trustzone [non-secure] el [el-0]
exec_state [el-0] dest_device [none]
encryption [no] core [none]
--------------------------------------------------------------------------------
PARTITION HEADER TABLE (u-boot.elf.0)
--------------------------------------------------------------------------------
encrypted_length (0x00) : 0x00020edf unencrypted_length (0x04) : 0x00020edf
total_length (0x08) : 0x00020edf load_addr (0x0c) : 0x04000000
exec_addr (0x10) : 0x04000000 partition_offset (0x14) : 0x000868c0
attributes (0x18) : 0x00000010 section_count (0x1C) : 0x00000001
checksum_offset (0x20) : 0x00000000 iht_offset (0x24) : 0x00000260
ac_offset (0x28) : 0x00000000 checksum (0x3c) : 0xf7f16831
attribute list -
trustzone [non-secure] el [el-0]
exec_state [aarch-32] dest_device [none]
encryption [no] core [none]
Unfortunately, unpacking does not recreate the original elfs, it only extracts raw data from the partitions that are already there in boot.bin.
I think that we should be able to generate elfs from scratch and just fill the sections with data from boot.bins - we do something very similar with bitstreams (it's possible to fake most of the sections and extract the actual bitstream data from boot.bin if you provide the requested part name) - however we don't have any bandwidth for this currently so I am afraid we won't be able to help - feel free to implement it and submit if you want to, that would be very appreciated.
your software compiles without errors.
Im trying to get working fsbl.elf out of it.
the Boot.bin I'm working with seems to extract with proper names but completely unrecognized files.
Could there me some modifications of this zynq arm boot. bin.
BOOT.zip