Configuring U-Boot

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Configuring U-Boot

Configuring U-Boot

LTIB Creating Uimage Uboot

U-boot expects uImage format for the kernel image.

In order to LTIB generate a uImage file:

$ export SYSCFG_KTARG=uImage $ ./ltib -p kernel 

Setup in U-Boot the kernel bootargs:

u-boot> setenv bootargs noinitrd console=ttymxc0,115200 init=/linuxrc root=/dev/nfs nfsroot=10.29.244.27:/tftpboot/rootfs ip=dhcp 

Change 10.29.244.27 to your host IP.

The procedure above is needed when default bootloader used by ltib was redboot.

In some ltib releases (before 2010) default bootloader is u-boot. In this case, ltib will create uImage by default

Configuration file for fw_(printenv/saveenv) utility

# Configuration file for fw_(printenv/saveenv) utility.

# Up to two entries are valid, in this case the redundant

# environment sector is assumed present.

# Notice, that the "Number of sectors" is ignored on NOR.

             

# MTD device name Device offset Env. size Flash sector size Number of sectors

#/dev/mtd1 0x0000 0x4000 0x4000

#/dev/mtd2 0x0000 0x4000 0x4000


# NAND example

/dev/mtd0 0x80000 0x40000 0x20000 2

Add new i.MX5x board on LTIB

After porting u-boot to your i.MX5x board you might want add it on LTIB menu, "Choose your board for u-boot" section. For this, edit ltib/config/platform/imx/main.lkc to add your board:

Enter board on menu:

comment "Choose your board for u-boot"

choice

prompt "board"

default BOARD_MX51_BBG

depends on PLATFORM = "imx51"

help

This menu will let you choose the board you use.

...

+ config BOARD_MX53_MYBOARD

+ bool "mx53_myboard"

...

endchoice

Add the "mx53_myboard_config" that matches your board configuration on the u-boot Makefile to PKG_U_BOOT_CONFIG_TYPE:

config PKG_U_BOOT_CONFIG_TYPE

  string

  ...

+ default "mx53_myboard_config" if ( PLATFORM = "imx51" && BOARD_MX53_MYBOARD && !PKG_KERNEL_UPDATER )

  ...

Labels (3)
%3CLINGO-SUB%20id%3D%22lingo-sub-1107546%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EConfiguring%20U-Boot%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1107546%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3C%2FP%3E%3CUL%3E%3CLI%20style%3D%22list-style-type%3Adisc%3B%20margin-left%3A0px%3B%20margin-bottom%3A1px%3B%22%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fi-MX-Processors-Knowledge-Base%2FConfiguring-U-Boot%2Fta-p%2F1107546%23toc-hId-380698447%22%20target%3D%22_blank%22%3ELTIB%20Creating%20Uimage%20Uboot%3C%2FA%3E%3C%2FLI%3E%3CLI%20style%3D%22list-style-type%3Adisc%3B%20margin-left%3A0px%3B%20margin-bottom%3A1px%3B%22%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fi-MX-Processors-Knowledge-Base%2FConfiguring-U-Boot%2Fta-p%2F1107546%23toc-hId--1426756016%22%20target%3D%22_blank%22%3EConfiguration%20file%20for%20fw_(printenv%2Fsaveenv)%20utility%3C%2FA%3E%3C%2FLI%3E%3CLI%20style%3D%22list-style-type%3Adisc%3B%20margin-left%3A0px%3B%20margin-bottom%3A1px%3B%22%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fi-MX-Processors-Knowledge-Base%2FConfiguring-U-Boot%2Fta-p%2F1107546%23toc-hId-1060756817%22%20target%3D%22_blank%22%3EAdd%20new%20i.MX5x%20board%20on%20LTIB%3C%2FA%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%3E%3C%2FP%3E%3CH1%20id%3D%22toc-hId-380698447%22%20id%3D%22toc-hId-380698447%22%20id%3D%22toc-hId-1297664553%22%3ELTIB%20Creating%20Uimage%20Uboot%3C%2FH1%3E%3CP%3E%3C%2FP%3E%3CDIV%3E%3CP%3EU-boot%20expects%20uImage%20format%20for%20the%20kernel%20image.%3C%2FP%3E%3CP%3EIn%20order%20to%20LTIB%20generate%20a%20uImage%20file%3A%3C%2FP%3E%3CPRE%20class%3D%22jive-pre%22%3E%24%20export%20SYSCFG_KTARG%3DuImage%20%24%20.%2Fltib%20-p%20kernel%20%3C%2FPRE%3E%3CP%3ESetup%20in%20U-Boot%20the%20kernel%20bootargs%3A%3C%2FP%3E%3CPRE%20class%3D%22jive-pre%22%3Eu-boot%26gt%3B%20setenv%20bootargs%20noinitrd%20console%3Dttymxc0%2C115200%20init%3D%2Flinuxrc%20root%3D%2Fdev%2Fnfs%20nfsroot%3D10.29.244.27%3A%2Ftftpboot%2Frootfs%20ip%3Ddhcp%20%3C%2FPRE%3E%3CP%3EChange%2010.29.244.27%20to%20your%20host%20IP.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CDIV%20style%3D%22background-color%3A%20%23eeeeff%3B%20padding-left%3A%2030px%3B%20width%3A%2070%25%3B%20margin-left%3A%2020%25%3B%22%3E%3CP%3EThe%20procedure%20above%20is%20needed%20when%20default%20bootloader%20used%20by%20ltib%20was%20redboot.%3C%2FP%3E%3CP%3EIn%20some%20ltib%20releases%20(before%202010)%20default%20bootloader%20is%20u-boot.%20In%20this%20case%2C%20ltib%20will%20create%20uImage%20by%20default%3C%2FP%3E%3C%2FDIV%3E%3CP%3E%3C%2FP%3E%3CH1%20id%3D%22toc-hId--1426756016%22%20id%3D%22toc-hId--1426756016%22%20id%3D%22toc-hId--509789910%22%3EConfiguration%20file%20for%20fw_(printenv%2Fsaveenv)%20utility%3C%2FH1%3E%3CP%3E%3C%2FP%3E%3CBLOCKQUOTE%20class%3D%22jive-quote%22%3E%3CP%3E%23%20Configuration%20file%20for%20fw_(printenv%2Fsaveenv)%20utility.%3C%2FP%3E%3CP%3E%23%20Up%20to%20two%20entries%20are%20valid%2C%20in%20this%20case%20the%20redundant%3C%2FP%3E%3CP%3E%23%20environment%20sector%20is%20assumed%20present.%3C%2FP%3E%3CP%3E%23%20Notice%2C%20that%20the%20%22Number%20of%20sectors%22%20is%20ignored%20on%20NOR.%3C%2FP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CBR%20%2F%3E%3CP%3E%23%20MTD%20device%20name%20Device%20offset%20Env.%20size%20Flash%20sector%20size%20Number%20of%20sectors%3C%2FP%3E%3CP%3E%23%2Fdev%2Fmtd1%200x0000%200x4000%200x4000%3C%2FP%3E%3CP%3E%23%2Fdev%2Fmtd2%200x0000%200x4000%200x4000%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%23%20NAND%20example%3C%2FP%3E%3CP%3E%2Fdev%2Fmtd0%200x80000%200x40000%200x20000%202%3C%2FP%3E%3C%2FBLOCKQUOTE%3E%3C%2FDIV%3E%3CP%3E%3C%2FP%3E%3CH1%20id%3D%22toc-hId-1060756817%22%20id%3D%22toc-hId-1060756817%22%20id%3D%22toc-hId-1977722923%22%3EAdd%20new%20i.MX5x%20board%20on%20LTIB%3C%2FH1%3E%3CP%3E%3C%2FP%3E%3CP%3EAfter%20porting%20u-boot%20to%20your%20i.MX5x%20board%20you%20might%20want%20add%20it%20on%20LTIB%20menu%2C%20%22Choose%20your%20board%20for%20u-boot%22%20section.%20For%20this%2C%20edit%20%3CSTRONG%3Eltib%2Fconfig%2Fplatform%2Fimx%2Fmain.lkc%3C%2FSTRONG%3E%20to%20add%20your%20board%3A%3C%2FP%3E%3CP%3EEnter%20board%20on%20menu%3A%3C%2FP%3E%3CBLOCKQUOTE%20class%3D%22jive-quote%22%3E%3CP%3Ecomment%20%22Choose%20your%20board%20for%20u-boot%22%3C%2FP%3E%3CP%3Echoice%3C%2FP%3E%3CP%3Eprompt%20%22board%22%3C%2FP%3E%3CP%3Edefault%20BOARD_MX51_BBG%3C%2FP%3E%3CP%3Edepends%20on%20PLATFORM%20%3D%20%22imx51%22%3C%2FP%3E%3CP%3Ehelp%3C%2FP%3E%3CP%3EThis%20menu%20will%20let%20you%20choose%20the%20board%20you%20use.%3C%2FP%3E%3CP%3E...%3C%2FP%3E%3CP%3E%2B%20config%20BOARD_MX53_MYBOARD%3C%2FP%3E%3CP%3E%2B%20bool%20%22mx53_myboard%22%3C%2FP%3E%3CP%3E...%3C%2FP%3E%3CP%3Eendchoice%3C%2FP%3E%3C%2FBLOCKQUOTE%3E%3CP%3EAdd%20the%20%22mx53_myboard_config%22%20that%20matches%20your%20board%20configuration%20on%20the%20u-boot%20Makefile%20to%20PKG_U_BOOT_CONFIG_TYPE%3A%3C%2FP%3E%3CBLOCKQUOTE%20class%3D%22jive-quote%22%3E%3CP%3Econfig%20PKG_U_BOOT_CONFIG_TYPE%3C%2FP%3E%3CP%3E%26nbsp%3B%20string%3C%2FP%3E%3CP%3E%26nbsp%3B%20...%3C%2FP%3E%3CP%3E%2B%20default%20%22mx53_myboard_config%22%20if%20(%20PLATFORM%20%3D%20%22imx51%22%20%26amp%3B%26amp%3B%20BOARD_MX53_MYBOARD%20%26amp%3B%26amp%3B%20!PKG_KERNEL_UPDATER%20)%3C%2FP%3E%3CP%3E%26nbsp%3B%20...%3C%2FP%3E%3C%2FBLOCKQUOTE%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1107546%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3Ei.MX50%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Ei.MX51%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Ei.MX53%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
No ratings
Version history
Last update:
‎09-10-2020 02:03 AM
Updated by: