linux - Why using a uImage instead of a zImage -


i'am trying learn difference between zimage , uimage.

in understanding uimage got running mkimage on image , result adds u-boot wrapper (i don't know contains exactly) contains header plus load address , entry point , maybe "extra informations" don't know.

in other hand zimage compressed image, doesn't contain load address , entry point(what think, correct me if i'am wrong) u-boot can load using bootz.

  • in case why using uimage instead of zimage?

  • i'am curious learn formats of zimage , uimage please suggest references ?

in understanding uimage got running mkimage on image

your understanding partly correct.
uimage can contain type of file, , not restricted linux image file. in fact not (uncompressed) image file (since not conventional make option).

in other hand zimage compressed image, doesn't contain load address , entry point(what think, correct me if i'am [sic] wrong)

you're incorrect, zimage contain kernel's load address , entry point. load address needed in order decompress kernel image proper ram address. kernel's entry point needed execute after has been decompressed.
when building image , zimage arm, makefiles use

zreladdr == virt_to_phys(page_offset + text_offset) 

which should translate start of physical memory + 0x8000.

the zimage (i.e. self-extraction program) pic, position independent code. zimage can loaded anywhere in ram, , executed @ first address, i.e. entry point load address.

in case why using uimage instead of zimage?

for older versions of u-boot, there no choice since bootz command may not have been available linux kernels.
nowadays may subjective choice.

note there has been resentment in linux kernel community towards support of u-boot in kernel. iow if people had way, impression not able build uimage mainline source.

i'am [sic] curious learn formats of zimage , uimage please suggest references ?

the layout of zimage given linker specification.
arm see arch/arm/boot/compressed/vmlinux.lds.s.
note _magic_start contains meaningless load address. mentioned in section 5 of vincent sanders' booting arm linux

the zimage has magic number , useful information near beginning.  table 2. useful fields in zimage head code offset zimage  value       description     0x24        0x016f2818      magic number used identify arm linux zimage     0x28        start address   address zimage starts @     0x2c        end address     address zimage ends @  start , end offsets can used determine length of compressed image (size = end - start).    ...   start address 0 zimage code position independent. 

note arm booting requirements have been superseded russel king's documentation/arm/booting

the layout of uimage u-boot header plus image file, whatever may be.

(hopefully nothing wrote contradicts tom rini wrote.)


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -