This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM62X-PET-CALC: AM62x

Part Number: AM62X-PET-CALC
Other Parts Discussed in Thread: SK-AM62B-P1

Tool/software:

Hi,

We now want to port the jailhouse running on custom hardware. But we are not so familiar with this set of software, so we buy the official board first.
The operation we have done is listed below.

1. Download the wic.xz image from official website and flash to the SD card. Make the target board boot from SD card.

The result is perfect. We can boot Linux and create two partitions easily.

2. Download the SDK : ti-processor-sdk-linux-am62xx-evm-09.02.01.10. Build up a develop Host via Ubuntu22.04. And then
      (1)Flash the files(tiboot3.bin , tispl.bin , u-boot.img)  located in <SDK_Path>/board-support/prebuilt-images/am62xx-evm-jailhouse into the SD Card boot partition.

      (2)Flash the rootfs from <SDK_Path>/filesystem/am62xx-evm-jailhouse/tisdk-jailhouse-image-am62xx-evm.tar.xz into the SD Card root partition.

The result is perfect. We can boot Linux and create two partitions easily.

 

Now we want to compile all the mentioned files by ourselves and preparing to port to our own hardwares.

1. Switch to top level directory of the SDK_Path;

2. #Host: make jailhouse_clean

3. #Host: make jailhouse

4. #Host: make jailhouse_install DESTDIR=<root partition of target>

5. #Host: make linux-extras

6. #Host: make linux-extras_install DESTDIR=<root partition of target>

7. #Host: make u-boot-extras

8. #Host: make u-boot-extras_install DESTDIR=<boot partition of target>

Now the SD card should hold all files needed to boot Linux & Jailhouse.
First, we can boot up the Linux successfully. But after we create a jailhouse cell, the root cell, which is running on CPU0, would crash immediately.

In order to find out the error, we overwrite tiboot3.bin tispl.bin u-boot.img by the files from prebuilt-image folder.

After that, Linux & Jailhouse can work smoothly.

 

Q1 : Whether we had make any misunderstanding about the commands?

Q2 : If we want to port jailhouse to our hardware, where is the start point? Could you give us some suggestions?

The OPN of the dev board is SK-AM62B-P1. The screenshotof crash is in the attachment. 

Please feel free to reply to this email if you have any questions.
Thank you,
Texas Instruments

  • Hi,

    Our Jailhouse expert if currently out of office and please expect delay in responses.

    Regards,
    Krunal

  • Hello, please take a look at this issue when you have time. I need to resolve it urgently.

  • Q1 : Whether we had make any misunderstanding about the commands?

    For use with Jailhouse a dedicated U-Boot branch needs to be used. The branch is part of the AM62x SDK v9.2 and can be found after SDK installation at:

    ti-processor-sdk-linux-am62xx-evm-09.02.01.10/board-support/u-boot-extras-jailhouse-2023.04+gitAUTOINC+68f2264747

    ...and also online at...

    https://git.ti.com/cgit/processor-sdk/u-boot/log/?h=ti-u-boot-2023.04-jailhouse

    7. #Host: make u-boot-extras

    8. #Host: make u-boot-extras_install DESTDIR=<boot partition of target>

    When you build using those steps the correct branch should have been used but let's confirm this.

    Can you provide the U-Boot log of your "failing" scenario? It should show U-Boot version/commit ID? It should include U-Boot Git commit ID 68f2264747. And it should be the same as when using the pre-build U-Boot binaries.

    Q2 : If we want to port jailhouse to our hardware, where is the start point? Could you give us some suggestions?

    There isn't really a porting guide that I'm aware of; what needs to be done depends on what you want to do on a system level. Usually making Jailhouse work is not so much hardware/board dependent, but more related to how you want to partition the SOC resources (peripherals, cores, memory) for your needs, and what inmate OS to use (Linux, Bare Metal, ,...). And those things are done by modifying device tree files (for memory/resources) as well as various Jailhouse configuration files (like https://github.com/siemens/jailhouse/blob/master/configs/arm64/k3-am625-sk.c). Usually the best is to inspect related files (such as the files in https://github.com/siemens/jailhouse/tree/master/configs/arm64) to see how other systems are setup, and model after those.

    Regards, Andreas