ARM Linux和交叉工具链问题

发布于 2024-08-02 04:29:49 字数 1035 浏览 4 评论 0原文

我的手臂工具链可能有问题,但也许我做错了其他事情。我有中国制造的开发板qq2440,使用Samsung s3c2440 ARM9 uC。我使用带有本机 gcc(4.3.3) 的 Ubuntu x86 和交叉编译版本 arm-unknown-linux-uclibc-gcc (crosstool-NG-1.3.2) 4.3.2

我遵循了 http:// /blog.leshak.ru/english/pages/how-to-install-u-boot-linux-2629-rootfsjffs2-busybox-1132-into-nand-qq2440/ 并为该板使用了 Leshak 的内核补丁。问题是他的二进制文件工作得很好,而我的却不能...

我通过 RS232(串行端口)与我的板进行通信,并且我在目标 Linux 上配置了串行终端。我使用 Leshak 的 uboot 镜像。为了配置我的内核,我使用以下命令行:

qq2440> setenv bootargs 'noinitrd root=/dev/mtdblock2 rootfstype=jffs2 rw console=ttySAC0,115200'

对于目标,我使用 vanilla Linux 源版本 2.6.29,以及 Leshak 创建的补丁。老实说,我不相信 Linux 会正式支持它,因为它不是主流产品。

我的内核映像开始启动,但它可能会将带宽(或 CPU 频率)更改为某个非标准值(已经尝试了所有标准值)。我没有用点来指示将内核加载到内存中,而是只有垃圾。不幸的是,它可能无法完成启动过程,因为网络接口和文件系统都没有出现。所以我发现它在中间的某个地方发生了恐慌。

有什么想法我下一步应该做什么吗?

谢谢&问候,

克里斯

I have a problem probably with my arm toolchain but maybe there's something other that I do wrong. I have Chinese made dev board qq2440 using Samsung s3c2440 ARM9 uC. I'm using Ubuntu x86 with native gcc(4.3.3) and cross-compile version arm-unknown-linux-uclibc-gcc (crosstool-NG-1.3.2) 4.3.2

I followed tutorials from http://blog.leshak.ru/english/pages/how-to-install-u-boot-linux-2629-rootfsjffs2-busybox-1132-into-nand-qq2440/
and used Leshak's kernel patches for that board. Problem is that his binaries work perfectly and mine don't...

I communicate with my board over RS232 (serial port) and I have serial terminal configured on target Linux. I use Leshak's uboot image. To configure my kernel I use following command line:

qq2440> setenv bootargs 'noinitrd root=/dev/mtdblock2 rootfstype=jffs2 rw console=ttySAC0,115200'

For target I use vanilla Linux sources version 2.6.29, with patches created by Leshak. I don't honestly believe that this will ever be supported officially by Linux as it's not mainstream product.

My kernel image starts booting up, but it probably changes bandwidth (or CPU frequency) to some non standard value (tried all standard ones already). Instead of dots indicating loading kernel into memory I've got only trash instead. Unfortunately it doesn't probably finish the boot process as the network interface nor file system don't come up. So I figured out that it panics somewhere in the middle.

Any ideas what should I do next?

Thanks & regards,

Chris

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

指尖上得阳光 2024-08-09 04:29:49

这里可能会发生很多不同的事情。

听起来您正在谈论串行端口,并且一旦控制权从 uboot 传递到内核,它似乎就会产生垃圾。我的理解正确吗?

研究在内核命令行上指定串行控制台的波特率、奇偶校验等。

哦,还有 IIRC,ARM Linux 树中有一些“early_printk”东西,可以帮助您调试串行控制台问题。 (但我要警告你——自从我处理这个问题以来已经有几年了,所以我的记忆已经模糊了。)

仔细检查内存地址布局(所有不同设备的位置)是否与你的主板相匹配。 (我认为这可能不是问题,但为了完整性而想提及它。)

你说你有一个可以正常工作的二进制内核;将该内核的内核配置与您用于构建内核的配置进行比较。调查每一个差异,特别是 ARM 特有的差异。

您可能需要仔细检查工具链的字节顺序与董事会期望的字节顺序。 一些 ARM / XScale 处理器可以在软件中配置为大端或小端,因此可能值得仔细检查。

There are a lot of different things that could be going on here.

It sounds like you are talking about a serial port, and that it appears to be giving garbage once control is passed to the kernel from uboot. Am I understanding that correctly?

Look into specifying the baud rate, parity, etc. for the serial console on the kernel commandline.

Oh, and IIRC, there was some 'early_printk' thing in the ARM Linux tree that might help you debug serial console problems. (But I'll warn you -- it's been a couple years since I dealt with that so my memory is fuzzy.)

Double-check that the memory address layout (the locations of all the various devices) matches what your board has. (I think this is probably not the issue, but wanted to mention it for completeness.)

You say that you have a binary kernel that works correctly; compare the kernel config of that kernel to the config you are using for building your kernel. Investigate every difference, particularly any specific to ARM.

You may want to double-check the endianness of your toolchain vs what your board is expecting. Some of the ARM / XScale processors can be configured to big-endian or little-endian in software, so it might be worth double-checking.

孤寂小茶 2024-08-09 04:29:49
  1. 只需启用内核的调试版本[同时构建 uImage],以便您可以更清楚地了解场景[只是会使您的启动速度有些慢,因为所有 printk 都将被启用]。

  2. 您能否检查一下是否将正确的参数传递给 UART,即:串行端口名称,波特率等这将由板制造商三星提供

  3. WRT 网络而不是 DHCP 您是否可以为系统分配一个静态 IP 地址,因为 DHCP 过程可能仍然没有开启。

  4. 另外一个更好的选择是使用 NFS,但是,这取决于您的选择和应用程序的目的。要使用 NFS,您的网络应该是 UP 和 UP 的。运行并且您的文件系统应该被共享。

正如 retracile 已经指出的那样,“字节顺序”可能是一个值得研究的点!

您可以参考链接,它可能对您有帮助因为它是特定于 S3C2440

希望这会有所帮助。

-hjsblogger

  1. Just enable the debug build of the kernel[while building the uImage] so that you get a more clearer picture of the scenario [Just would make your boot up somewhat slow since all the printk's would be enabled].

  2. Can you check whether you are passing the correct parameters to the UART ie. Serial Port Name, it's baud rate etc This would be provided by the board manufacturer-Samsung

  3. WRT the network instead of DHCP can you just assign a static ip address to your system as it might be possible that the DHCP process is still not ON.

  4. Also a better option would be to use NFS but yeah, it depends on your choice and the purpose of your application. To use NFS, your network should be UP & running and your filesystem should be shared.

As retracile has already pointed out "Endianness" could be a point to look into !!!

You can refer this link which might help you out since it is specific to S3C2440

Hope this helps.

-hjsblogger

仙气飘飘 2024-08-09 04:29:49

当我从 picocom 省略 --send-cmd 时,我曾经遇到过类似的问题。这是我向 picocom 发出的命令,用于与 mini2440 进行串行 uBoot 通信。

picocom -b 115200 /dev/ttyS0 --send-cmd "sx -vv"

I had a similar problem at one point when I omitted --send-cmd from picocom. this is the command I issue to picocom for serial uBoot comms with the mini2440.

picocom -b 115200 /dev/ttyS0 --send-cmd "sx -vv"

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文