Maybe the question is a little bit weird, but I do need to solve it.
I have two boot loaders, say bootA and bootB. Each of them can be ran in the flash rom on my walnut board. I need to put these two boot loader into one file and load this file to the flash rom (I have a very special reason for doing this. This would be a long story and irrelavant to the topic so I just skip talking about it). Now what I want to do is, using bootA to boot up the board and then jump to bootB before loading the linux image. The bootA provides a jump capibility so I can indicate the address of the bootB and start to execute bootB from the given address. The bootB is the one used to load linux image.
For me it seems simply concatenating two boot loaders should work (please correct me if I am wrong). e.g. the commond in DOS: copy bootA+bootB bootTogether
bootTogether is the file I would put to the flash. My question is, is there anyway to indicate the offset of the bootB within the bootTogether? For example, if bootA is 100kb and bootB is 300kb. How to align the bootB in the bootTogether so the offset of the bootB is
512kb? What's the command to realize it in linux?Thanks! Frank