Jump to content

Boot custom u-boot from vendor u-boot ?


MOHAMMAD HADI

Recommended Posts

Hi,

I've compiled u-boot from source( I have the binary u-boot.bin.sd.bin file) now how can I boot this binary?  I don't want to erase the vendor u-boot on the emmc and replace it with this, I want a way to boot into this binary for testing without writing it to emmc. Is this possible?

 

My device is k2pro tv pro ( amlogic S905 SoC)

 

Regards

 

Link to comment
Share on other sites

14 hours ago, MOHAMMAD HADI said:

I've compiled u-boot from source( I have the binary u-boot.bin.sd.bin file) now how can I boot this binary?  I don't want to erase the vendor u-boot on the emmc and replace it with this, I want a way to boot into this binary for testing without writing it to emmc. Is this possible?

 

My device is k2pro tv pro ( amlogic S905 SoC)

Make a copy (dd) of the bootloader from eMMC to external media. Erase the first bytes on the eMMC. This will disable the use of bootloader from eMMC and the system will use bootloader from SD card. And you can start to check your bootloader version on the SD card. After checking, you can restore the regular boot loader, either by the DD command (from a previously made copy), or restore the firmware with the standard USB Buirn Tool. Running the bootloader from eMMC and then running another bootloader for tests is possible, but not the best solution. You will have to change the source code of your bootloader before checking,and after checking back again.

Link to comment
Share on other sites

On 9/11/2018 at 9:07 AM, balbes150 said:

Running the bootloader from eMMC and then running another bootloader for tests is possible, but not the best solution. You will have to change the source code of your bootloader before checking,and after checking back again. 

1

Can you elaborate on this ? do you mean I have to modify the vendor bootloader on the eMMC to be able to chainload the sd card bootloader ? what modification do I have to make?

 

Link to comment
Share on other sites

If you erase the bootloader in eMMC, the system will automatically start all bootloaders that it finds on the SD card or USB. This means that after experimenting with running different versions of your u-boot from SD card, you can safely restore a standard boot loader in the eMMC. Either start the system from the SD card and write the bootloader back to eMMC from the previously made copy, or run the standard procedure for writing the firmware from the USB Buirn Tool, which will also restore the bootloader to eMMC.

Link to comment
Share on other sites

4 hours ago, balbes150 said:

If you erase the bootloader in eMMC, the system will automatically start all bootloaders that it finds on the SD card or USB. This means that after experimenting with running different versions of your u-boot from SD card, you can safely restore a standard boot loader in the eMMC. Either start the system from the SD card and write the bootloader back to eMMC from the previously made copy, or run the standard procedure for writing the firmware from the USB Buirn Tool, which will also restore the bootloader to eMMC.

Yes I know that part but you said it's possible to load the custom bootloader from the eMMC bootloader

On 9/11/2018 at 9:07 AM, balbes150 said:

Running the bootloader from eMMC and then running another bootloader for tests is possible, but not the best solution. You will have to change the source code of your bootloader before checking,and after checking back again.

 

How ?

Link to comment
Share on other sites

21 hours ago, balbes150 said:

Use the "go" command and change the source of the u-boot address.

Nice!! I never knew about the "go" command.

but still, I can't boot for some reason, I just used "fatload" and then "go"

gxb_p20x#fatload mmc 0 ${loadaddr} bootloader.bin
reading bootloader.bin
4194304 bytes read in 334 ms (12 MiB/s)
gxb_p20x#go ${loadaddr}
## Starting application at 0x01080000 ...
"Synchronous Abort" handler, esr 0x02000000
ELR:     1080000
LR:      77edddf0
x0 : 0000000000000001 x1 : 0000000073eca148
x2 : 0000000073eca148 x3 : 0000000001080000
x4 : 0000000000000030 x5 : 0000000000000000
x6 : 00000000ffffffd0 x7 : 0000000000000004
x8 : 0000000000000031 x9 : 0000000000000000
x10: 000000000000000f x11: 0000000077f46798
x12: 0000000000000000 x13: 0000000000000000
x14: 0000000000000000 x15: 0000000000000000
x16: 0000000000000000 x17: 0000000000000000
x18: 0000000073ec3e28 x19: 0000000073eca148
x20: 0000000000000002 x21: 0000000001080000
x22: 0000000000000002 x23: 0000000077f73818
x24: 0000000000000000 x25: 0000000000000000
x26: 0000000000000000 x27: 0000000073eca1a0
x28: 0000000000000000 x29: 0000000073ec3930

Resetting CPU ...

should I load the binary to a specific address other than the ${loadaddr} ?if so whats the correct address?

 

Thanks

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines