This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to load Linux kernel image onto ARM Cortex-A9 target using DSTREAM debugger?

Hello,

        I have a custom ARM Cortex-A9 board. My aim is to load the kernel image onto the target via ARM DSTREAM. I have u-boot loaded into SNOR memory. The u-boot is running fine. After I get the u-boot prompt I am connecting to the target via ARM DSTREAM. Then I press pause button and enter the command add-symbol-file "<path>\vmlinux". After executing this command I get the message as "Cannot determine target state".

I want to know whether I am following the correct steps for the above described problem. Please let me know if changes are required and also suggest some pointers if required.

Parents
  • Hi amitm,

    There is a really good article on ARM Connected Community written by a colleague - Porting Linux made easy with DS-5 - by following these instructions you can pretty much resolve the issue.

    The key here is that the "vmlinux" image is a very large, virtual-addressed image (i.e. it has been linked to run after the page tables are set up from kernel address space). You probably don't want to load this to the target, but you are right to load the symbols from it. What you should probably be loading is the "Image" or "zImage" file to your target using the restore command. These are stripped, bootable versions of vmlinux ready-to-run

    The zImage contains extra startup code which will decompress and also perform some smart relocation of the kernel at startup time. The 'Image' code will assume it has been placed at a very specific physical address (start of ram + 0x8000) in most cases, something that the zImage entry code will do for you. That specific address is usually and helpfully stored in the $loadaddr variable defined by U-Boot, so you can look there.

    Ta,

    Matt

Reply
  • Hi amitm,

    There is a really good article on ARM Connected Community written by a colleague - Porting Linux made easy with DS-5 - by following these instructions you can pretty much resolve the issue.

    The key here is that the "vmlinux" image is a very large, virtual-addressed image (i.e. it has been linked to run after the page tables are set up from kernel address space). You probably don't want to load this to the target, but you are right to load the symbols from it. What you should probably be loading is the "Image" or "zImage" file to your target using the restore command. These are stripped, bootable versions of vmlinux ready-to-run

    The zImage contains extra startup code which will decompress and also perform some smart relocation of the kernel at startup time. The 'Image' code will assume it has been placed at a very specific physical address (start of ram + 0x8000) in most cases, something that the zImage entry code will do for you. That specific address is usually and helpfully stored in the $loadaddr variable defined by U-Boot, so you can look there.

    Ta,

    Matt

Children
No data