"Read only text-areas in kernel" message while debugging Linux"

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

"Read only text-areas in kernel" message while debugging Linux"

Jump to solution
1,394 Views
carljones
Contributor III

Hello,

We are following an instruction from the "Use CodeWarrior for ARMv8 to Debug U-boot..." document by yipingwang‌ to load and debug a Linux kernel onto an LS1088A RDB. However, we encounter the message shown below

Read_only_text.png

and seemed like CodeWarrior could no longer control the RDB thus, we could not debug the kernel.

Any insights on how to go about this?

Thanks!

0 Kudos
1 Solution
1,136 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please make sure that you use vmlinux(imported into CodeWarrior) and Kernel itb image(loaded on the target board) from the same build.

Please rebuild Linux Kernel with debug option enabled, in Kernel source code, please execute "make ARCH=arm64 menuconfig" with the option "Compile the Kernel with debug info" enabled.

Please configure the debug panel in the launch configuration as described in the section "3. Debug Linux Kernel by Attaching Running U-boot" in Use CodeWarrior for ARMv8 to Debug U-boot and Linux Kernel and Bring up Bare Boards .


Have a great day,
TIC

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
7 Replies
1,136 Views
addiyi
NXP Employee
NXP Employee

Please take a look at Chapter 8.3 from targeting Manual available under \Freescale\CW4NET_v2018.01\CW_ARMv8\ARMv8\Help\PDF\

Adrian

0 Kudos
1,136 Views
addiyi
NXP Employee
NXP Employee

The message is just an info message, you can skip it.

Adrian

0 Kudos
1,136 Views
carljones
Contributor III

Thanks for the reply, Adrian. However, CodeWarrior seemed to have lost control of the target afterwards (can no longer suspend, resume).  On the Linux terminal console (we are using putty), the program seemed to be stuck in "Starting kernel..." and will only proceed once we terminate the connection from CodeWarrior. Any insights would be helpful.

Thanks in advance!

0 Kudos
1,136 Views
addiyi
NXP Employee
NXP Employee

Could you try to start linux without CW attached. After linux is at prompt attache with CW and go to Debugger Console and run the following command:

mmu -el 1 -t 0xffff000008080000 

Also in uboot provide the output for print kernel_addr_r 

Adrian

0 Kudos
1,136 Views
carljones
Contributor III

Hello Adrian,

Here's the info from my setup...

Uboot_kernel_addr2.png

I followed the process of loading Linux as described in the doc by Yiping Wang (with modification applied to ls1088ardb).

1. While at u-boot prompt, connect  CW Linux executable project to ls1088ardb target.

2. After CW connected, click "Suspend", and enter "break _text" in gdb console then "Resume"

3. At u-boot prompt, load Linux image and boot.

What happens afterwards is that the breakpoint is never hit. Console is stuck at "Starting kernel..." and CW "Suspend" and "Terminate" buttons have no effect. 

See screenshot below for the requested info.

Kernel_debug_info.png

Once I clicked on "Disconnect" button, Linux boot up resumes (as seen in the console).

Here's the screenshot when I re-connected to CW and re-input the mmu query.

Kernel_debug_info3.png

And a notification message before that...

Kernel_debug_info2.png

I freshly built the linux kernel and uboot firmware so I suppose the .itb file I loaded in the target and the vmlinux executable I loaded in CW is from the same kernel source :smileyhappy:

Thanks much!

0 Kudos
1,137 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please make sure that you use vmlinux(imported into CodeWarrior) and Kernel itb image(loaded on the target board) from the same build.

Please rebuild Linux Kernel with debug option enabled, in Kernel source code, please execute "make ARCH=arm64 menuconfig" with the option "Compile the Kernel with debug info" enabled.

Please configure the debug panel in the launch configuration as described in the section "3. Debug Linux Kernel by Attaching Running U-boot" in Use CodeWarrior for ARMv8 to Debug U-boot and Linux Kernel and Bring up Bare Boards .


Have a great day,
TIC

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
1,136 Views
carljones
Contributor III

Thank you, Wang. This has been resolved several months ago.

(We were actually using flex-builder to take care of the build, "flex-builder clean" did it. Manually removing previous itb, bin, other compiled codes, etc. before issuing new flex-builder build command does it too.)

0 Kudos