4

I am confused between the u-boot.bin and uImage.bin. I guess uImage.bin is nothing but the compressed version of u-boot.bin and it size should be less than u-boot.bin. But in my build environment what I found is u-boot.bin size is lesser than uImage.bin.

Could anybody let me know what is difference between u-boot.bin and uImage.bin??

ilya1725
  • 4,496
  • 7
  • 43
  • 68
Amit Singh Tomar
  • 8,380
  • 27
  • 120
  • 199
  • Are you sure uImage.bin isn't actually a Linux kernel and root filesystem image packed together, which uboot would in turn load? – Chris Stratton Sep 17 '13 at 18:22
  • You mean to say U-boot is a bootloader which will load kernel+file-system image that is nothing but uImage?? – Amit Singh Tomar Sep 17 '13 at 19:01
  • u-boot is definitely a bootloader. uImage *sounds* to me *more* like a kernel + filesystem image than a different packaging of u-boot, but I can't say that it definitely is *for your particular example*. How big is each? – Chris Stratton Sep 17 '13 at 19:28
  • I don't have the exact size right now but can say uImage.img is bigger than u-boot.img,I guess uboot.bin is ubootloader image and uImage is image which comes from “raw” ELF image. – Amit Singh Tomar Sep 17 '13 at 19:36
  • No. uImage should be a compressed file, or else it is misnamed If it's bigger, then that points to it being a compressed version of something else - such as Linux. And that would fit with the traditional usage of naming on uboot/linux systems. – Chris Stratton Sep 17 '13 at 19:51
  • Yes Chris, "I guess uboot.bin is ubootloader image and uImage is image which comes from “raw” ELF image" ,What I meant was after compression of “raw” ELF image we get the uImage – Amit Singh Tomar Sep 18 '13 at 07:33

2 Answers2

18

uboot.bin is the bootloader, i.e. uboot, uImage.bin is the kernel image

Usually, in embedded systems the NAND flash is partitioned in four parts:

  1. A partition for the bootloader (here goes uboot.bin)
  2. A small partition where uboot saves its environment variables
  3. A partition for the kernel (here goes uImage.bin)
  4. A partition for the rootfs
Ottavio Campana
  • 4,088
  • 5
  • 31
  • 58
  • And on OMAP-based systems there's a another: A partition for the fist-stage bootloader that loads the main bootloader (e.g. uBoot). – marko Sep 18 '13 at 00:02
  • 1
    X-loader is a small first stage boot loader derived from the u-boot base code to be loaded into the internal static ram by the OMAP ROM code. Because the internal static ram is very small (64k-32k), x-loader is stripped down to the essentials and is used to initialize memory and enough of the peripheral devices to access and load the second stage loader (u-boot) into main memory. – Gautham Kantharaju Sep 18 '13 at 04:02
  • Thanks Ottavio for your answer,I would like to know how uboot.bin picks the uImage.bin .Is there any standard procedure.Could you let me know any good docs for the same? – Amit Singh Tomar Sep 18 '13 at 07:35
  • This is hardware dependent. Usually what you can do with uboot, you copy the kernel from the NAND to ram and then you just into is. To have an idea, you che check this http://processors.wiki.ti.com/index.php/Booting_Linux_kernel_using_U-Boot#NAND_Flash_.28jffs2_image_as_rootfs.29 , but I repeat, it's a bit depending on your hardware – Ottavio Campana Sep 18 '13 at 16:14
  • Environment variables can be there in the same partition as the kernel, no need of separate partition. Also on some platform there will not be any partition for uboot E.g i.MX. – Jagdish Dec 17 '15 at 07:11
0

uboot.bin is the binary file of U-boot bootloader.
uImage is a small kernel image with modified header for Uboot enabling U-boot to load this kernel image

New to Rails
  • 2,824
  • 5
  • 27
  • 43