Skip to contentSkip to conversation

How to modify u-boot in Root File System rootfs.ext2.gz.u-boot ?

DISCUSSION Jack lemon 3 participants 9 messages Nov 16, 2013 – Nov 19, 2013

lore
Share & tools
lore

Jack lemon

author
#0 lore raw

Hi everybody,

I worked with P1022DS-PB and then designed my custom board according to its documents. For sd card I adjust u-boot to 115200 baud rate and compile it with ELDK independently. However in Nor-flash we haven't u-boot.bin independently. For Nor-Flash I need to adjust baud rate in .ext2.gz.u-boot image, because for Nor-Flash only kernel,rootfs,dtb files are needed. How can I modify u-boot in fsl-image-minimal-p1022ds.ext2.gz.u-boot for adjusting baud rate to 115200?

#2 lore raw
In reply to Jack lemon
Quoted 9 lines · Jack lemon

Hi everybody,

I worked with P1022DS-PB and then designed my custom board according to its documents. For sd card I adjust u-boot to 115200 baud rate and compile it with ELDK independently. However in Nor-flash we haven't u-boot.bin independently. For Nor-Flash I need to adjust baud rate in .ext2.gz.u-boot image, because for Nor-Flash only kernel,rootfs,dtb files are needed. How can I modify u-boot in fsl-image-minimal-p1022ds.ext2.gz.u-boot for adjusting baud rate to 115200?

Is it not enough to add SERIAL_CONSOLE = "115200 ttyS0" (or which serial you use as console) to your machine conf ?

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected]
=====================================================================
author
#3 lore raw
Quoted 6 lines · Stefano Babic

Is it not enough to add SERIAL_CONSOLE = "115200 ttyS0" (or which serial you use as console) to your machine conf ?

Best regards,
Stefano Babic

Thank you Stefano for your reply.
Does it not any need to edit u-boot source code? just adding SERIAL_CONSOLE = "115200 ttyS0" to local.conf?

#4 lore raw
Quoted 6 lines · Jack Lemon
Quoted 3 lines · Stefano Babic

Is it not enough to add SERIAL_CONSOLE = "115200 ttyS0" (or which serial you use as console) to your machine conf ?

Quoted 7 lines
Quoted 3 lines

Best regards,
Stefano Babic

Thank you Stefano for your reply.
Does it not any need to edit u-boot source code? just adding SERIAL_CONSOLE = "115200 ttyS0" to local.conf?

You asked to change your rootfs (initrd, I presume) fsl-image-minimal-p1022ds.ext2.gz.u-boot, and setting SERIAL_CONSOLE adjusts the parameters for inittab.

If you want to change u-boot as well (but this is outside fsl-image-minimal-*) and you do not want to compile it outside Yocto, you have to put the patch you already have in your bsp directory and adjust your u-boot receipe.

Best regards
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected]
=====================================================================
author
#5 lore raw
Quoted 20 lines · Stefano Babic
Quoted 6 lines · Jack Lemon
Quoted 3 lines · Stefano Babic <sbabic <at> ...> writes:

Is it not enough to add SERIAL_CONSOLE = "115200 ttyS0" (or which serial you use as console) to your machine conf ?

Quoted 7 lines
Quoted 3 lines

Best regards,
Stefano Babic

Thank you Stefano for your reply.
Does it not any need to edit u-boot source code? just adding SERIAL_CONSOLE = "115200 ttyS0" to local.conf?

You asked to change your rootfs (initrd, I presume) fsl-image-minimal-p1022ds.ext2.gz.u-boot, and setting SERIAL_CONSOLE adjusts the parameters for inittab.

Quoted 8 lines

If you want to change u-boot as well (but this is outside fsl-image-minimal-*) and you do not want to compile it outside Yocto, you have to put the patch you already have in your bsp directory and adjust your u-boot receipe.

Best regards
Stefano Babic

For Nor-Flash we have only three files(kernel,rootfs,dtb). Where is u-boot? I think it is inside the fsl-image-minimal-p1022ds.ext2.gz.u-boot rootfs file. Is it true?

So, for modifying u-boot to adujst serial boaudrate, I understand that I can add SERIAL_CONSOLE = "115200 ttyS0" to my local.conf according to your reply and it doesnt need to modify u-boot source code.

Am I in the right place?

#6 lore raw

Hi Jack,

Quoted 3 lines · Jack

For Nor-Flash we have only three files(kernel,rootfs,dtb). Where is u-boot? I think it is inside the fsl-image-minimal-p1022ds.ext2.gz.u-boot rootfs file. Is it true?

I do not think so, but you are the best to answer this question: unzip the file and check inside.

However, even if it contains a u-boot.bin or whatever is your u-boot file, you have to extract it to write the bootloader at the right address.

In most cases, you will see a separate image for u-boot in tmp/deploy/images diurectory.

Quoted 2 lines

So, for modifying u-boot to adujst serial boaudrate,

No. To modify the serial console under linux.

Quoted 2 lines

I understand that I can
add SERIAL_CONSOLE = "115200 ttyS0" to my local.conf according to your reply

See Robert reply. SERIAL_CONSOLE is deprecated, uses SERIAL_CONSOLES instead.

Quoted 3 lines

and it doesnt need to modify u-boot source code.

Am I in the right place?

Mmmhh..there is something missing. Usually you have a separate file for u-boot. Of course, if u-boot is part of the filesystem, you cannot use for a first installation because u-boot must be copied at a specific address.

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected]
=====================================================================
author
#7 lore raw

Thanks a lot for your answers Stefano,

I put the patch in my bsp directory and adjust my u-boot receipe.

Quoted 30 lines · Stefano Babic

Hi Jack,

Quoted 1 line · Jack

For Nor-Flash we have only three files(kernel,rootfs,dtb). Where is

u-boot?

Quoted 2 lines

I think it is inside the fsl-image-minimal-p1022ds.ext2.gz.u-boot rootfs file. Is it true?

I do not think so, but you are the best to answer this question: unzip the file and check inside.

However, even if it contains a u-boot.bin or whatever is your u-boot file, you have to extract it to write the bootloader at the right address.

In most cases, you will see a separate image for u-boot in tmp/deploy/images diurectory.

Quoted 2 lines

So, for modifying u-boot to adujst serial boaudrate,

No. To modify the serial console under linux.

Quoted 2 lines

I understand that I can
add SERIAL_CONSOLE = "115200 ttyS0" to my local.conf according to your

reply

See Robert reply. SERIAL_CONSOLE is deprecated, uses SERIAL_CONSOLES instead.

Quoted 9 lines
Quoted 3 lines

and it doesnt need to modify u-boot source code.

Am I in the right place?

Mmmhh..there is something missing. Usually you have a separate file for u-boot. Of course, if u-boot is part of the filesystem, you cannot use for a first installation because u-boot must be copied at a specific address.

Best regards,

Quoted 9 lines

Stefano Babic

--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected]
=====================================================================

#8 lore raw
In reply to Jack Lemon
Quoted 6 lines · Jack Lemon
Quoted 3 lines · Stefano Babic

Is it not enough to add SERIAL_CONSOLE = "115200 ttyS0" (or which serial you use as console) to your machine conf ?

Quoted 7 lines
Quoted 3 lines

Best regards,
Stefano Babic

Thank you Stefano for your reply.
Does it not any need to edit u-boot source code? just adding SERIAL_CONSOLE = "115200 ttyS0" to local.conf?

the current documentation states that SERIAL_CONSOLE has been
deprecated in favour of the newer SERIAL_CONSOLES:

http://www.yoctoproject.org/docs/latest/ref-manual/ref-manual.html#var-SERIAL_CONSOLE

rday

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================