All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Getting Buildroot-created binaries to work with the Intel (TI) Puma 5 ARM-based CPU?
@ 2022-02-04 16:55 Dan Jackson
  2022-02-06 11:49 ` Arnout Vandecappelle
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Jackson @ 2022-02-04 16:55 UTC (permalink / raw)
  To: buildroot

Hello everyone,

I am new to Buildroot, so I hope you will forgive me if I make any obvious mistakes or omissions in my email.

I hope this mailing list is the correct place to post my query, normally I would ask on forums or in Github issues, but Buildroot seems not to have a forum and its Github explicitly says not to post queries in the issues there.

I have been experimenting with an old router, which uses an Intel Puma 5 ARM-based CPU (it's my understanding that Intel bought this design from Texas Instruments).

At the moment I am not looking to replace the whole operating system, initially I would just like to build some binaries (such as dropbear for example) to make the exploration process easier.

The original software on the device was built with an ancient version of Buildroot - a config file can be seen in the /etc folder - and many of the options specified no longer exist in current Buildroot versions or relate to proprietary software components for which source code is not available.

There are two other Puma 5 toolchains I have come across on the Internet, and both of these are also based on old Buildroot versions, but also patch these with a number of things, such as compiler command line switches and options file tweaks.

Unfortunately, the older Buildroot versions do not seem to function properly on modern Linux installations.

So, I was wondering what would need to be done to enable creation of Puma 5 compatible binaries using the current stable version of Buildroot?

Links to the two toolchains I mentioned:
https://github.com/bmaia/cross-utils/tree/master/armeb/puma5_toolchain (uses Buildroot 2009.02)
https://sourceforge.net/projects/dg3270.arris/files/DG3270_9.1.103FB/ (uses Buildroot 2013.08.1)

Thanks,
Dan Jackson.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Buildroot] Getting Buildroot-created binaries to work with the Intel (TI) Puma 5 ARM-based CPU?
  2022-02-04 16:55 [Buildroot] Getting Buildroot-created binaries to work with the Intel (TI) Puma 5 ARM-based CPU? Dan Jackson
@ 2022-02-06 11:49 ` Arnout Vandecappelle
  2022-02-06 13:55   ` Dan Jackson
  0 siblings, 1 reply; 4+ messages in thread
From: Arnout Vandecappelle @ 2022-02-06 11:49 UTC (permalink / raw)
  To: Dan Jackson, buildroot



On 04/02/2022 17:55, Dan Jackson wrote:
> Hello everyone,
> 
> I am new to Buildroot, so I hope you will forgive me if I make any obvious mistakes or omissions in my email.
> 
> I hope this mailing list is the correct place to post my query, normally I would ask on forums or in Github issues, but Buildroot seems not to have a forum and its Github explicitly says not to post queries in the issues there.
> 
> I have been experimenting with an old router, which uses an Intel Puma 5 ARM-based CPU (it's my understanding that Intel bought this design from Texas Instruments).

  ... And last year they sold that division to MaxLinear, so it's no longer 
Intel, actually :-)


> At the moment I am not looking to replace the whole operating system, initially I would just like to build some binaries (such as dropbear for example) to make the exploration process easier.

  This may not work out so well, it's often easier to just build an entire 
system. The kernel can be tricky though (since it's probably not running an 
upstream kernel, and it may be hard to find the vendor kernel). But building a 
complete userspace is definitely a feasible option. Though it may be tricky to 
be able to boot that userspace and still go back in case it fails. What could 
work is to build a chroot environment to do some experiments.


> The original software on the device was built with an ancient version of Buildroot - a config file can be seen in the /etc folder - and many of the options specified no longer exist in current Buildroot versions or relate to proprietary software components for which source code is not available.

  It's way more likely that it's actually built with OpenWrt (they sometimes 
call their build system "buildroot" even though there's not much of a relation 
between the two projects). Not that that will help you much, because the 
considerations are still the same.

  Theoretically, you can demand from whoever gave/sold you the device to give 
you the sources for both the kernel and for OpenWrt or Buildroot. In practice, 
that is probably going to be a bit tricky to achieve. Still, it may help to 
point a request to the router vendor.


  Luckily...

> There are two other Puma 5 toolchains I have come across on the Internet, and both of these are also based on old Buildroot versions, but also patch these with a number of things, such as compiler command line switches and options file tweaks.

  It's very unlikely that you need any particular options to build userspace - 
you may need them to build a userspace that is compatible with what is already 
installed on the system, but not to build a complete userspace.

  The only issue then is to find out which architecture options you need to enable.

> 
> Unfortunately, the older Buildroot versions do not seem to function properly on modern Linux installations.
> 
> So, I was wondering what would need to be done to enable creation of Puma 5 compatible binaries using the current stable version of Buildroot?
> 
> Links to the two toolchains I mentioned:
> https://github.com/bmaia/cross-utils/tree/master/armeb/puma5_toolchain (uses Buildroot 2009.02)

  This one uses

BR2_armeb=y
BR2_arm1176jz_s=y
BR2_ARM_EABI=y

It's not clear if there's an FPU, so use soft float.

  That should be enough to build a toolchain and userspace with current Buildroot.


  Regards,
  Arnout

> https://sourceforge.net/projects/dg3270.arris/files/DG3270_9.1.103FB/ (uses Buildroot 2013.08.1)
> 
> Thanks,
> Dan Jackson.
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Buildroot] Getting Buildroot-created binaries to work with the Intel (TI) Puma 5 ARM-based CPU?
  2022-02-06 11:49 ` Arnout Vandecappelle
@ 2022-02-06 13:55   ` Dan Jackson
  2022-02-08 19:50     ` Arnout Vandecappelle
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Jackson @ 2022-02-06 13:55 UTC (permalink / raw)
  To: Arnout Vandecappelle, buildroot



> -----Original Message-----
> From: Arnout Vandecappelle <arnout@mind.be>
> Sent: 06 February 2022 11:50
> To: Dan Jackson <dan@thejacksons.uk>; buildroot@buildroot.org
> Subject: Re: [Buildroot] Getting Buildroot-created binaries to work with the
> Intel (TI) Puma 5 ARM-based CPU?
> 

[...snip...]

> >
> > Links to the two toolchains I mentioned:
> > https://github.com/bmaia/cross-
> utils/tree/master/armeb/puma5_toolchain (uses Buildroot 2009.02)
> 
>   This one uses
> 
> BR2_armeb=y
> BR2_arm1176jz_s=y
> BR2_ARM_EABI=y
> 
> It's not clear if there's an FPU, so use soft float.

From /proc/cpuinfo on the target device I can see:

	Features        : swp half thumb fastmult edsp java

It's my understanding this line would include "vfp" if there was an FPU, so I don't believe there is one.

> 
>   That should be enough to build a toolchain and userspace with current
> Buildroot.

I tried creating a fresh Buildroot using the current stable version 2021.11 and only the above options.

I then tried transferring the files from the generated rootfs.tar to a directory /var/tmp/test on the device (the reason for this is that / is a read-only file system, so /bin, /lib, /usr are not writable, but /var is a read-write file system).

I then attempted to execute it in the following manner (accounting for the fact that Buildroot builds dynamically linked executables by default):

	/var/tmp/test/lib/ld-uClibc-1.0.39.so --library-path /var/tmp/test/lib /var/tmp/test/bin/busybox

(this method was suggested in the section LD_LIBRARY_PATH on this page: https://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html)

However this did not work and in fact produced a "Segmentation fault" error.

Have I made some kind of obvious error or mistake?

Thanks,
Dan Jackson.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Buildroot] Getting Buildroot-created binaries to work with the Intel (TI) Puma 5 ARM-based CPU?
  2022-02-06 13:55   ` Dan Jackson
@ 2022-02-08 19:50     ` Arnout Vandecappelle
  0 siblings, 0 replies; 4+ messages in thread
From: Arnout Vandecappelle @ 2022-02-08 19:50 UTC (permalink / raw)
  To: Dan Jackson, buildroot



On 06/02/2022 14:55, Dan Jackson wrote:
> 
> 
>> -----Original Message-----
>> From: Arnout Vandecappelle <arnout@mind.be>
>> Sent: 06 February 2022 11:50
>> To: Dan Jackson <dan@thejacksons.uk>; buildroot@buildroot.org
>> Subject: Re: [Buildroot] Getting Buildroot-created binaries to work with the
>> Intel (TI) Puma 5 ARM-based CPU?
>>
> 
> [...snip...]
> 
>>>
>>> Links to the two toolchains I mentioned:
>>> https://github.com/bmaia/cross-
>> utils/tree/master/armeb/puma5_toolchain (uses Buildroot 2009.02)
>>
>>    This one uses
>>
>> BR2_armeb=y
>> BR2_arm1176jz_s=y
>> BR2_ARM_EABI=y
>>
>> It's not clear if there's an FPU, so use soft float.
> 
>  From /proc/cpuinfo on the target device I can see:
> 
> 	Features        : swp half thumb fastmult edsp java
> 
> It's my understanding this line would include "vfp" if there was an FPU, so I don't believe there is one.
> 
>>
>>    That should be enough to build a toolchain and userspace with current
>> Buildroot.
> 
> I tried creating a fresh Buildroot using the current stable version 2021.11 and only the above options.
> 
> I then tried transferring the files from the generated rootfs.tar to a directory /var/tmp/test on the device (the reason for this is that / is a read-only file system, so /bin, /lib, /usr are not writable, but /var is a read-write file system).
> 
> I then attempted to execute it in the following manner (accounting for the fact that Buildroot builds dynamically linked executables by default):
> 
> 	/var/tmp/test/lib/ld-uClibc-1.0.39.so --library-path /var/tmp/test/lib /var/tmp/test/bin/busybox
> 
> (this method was suggested in the section LD_LIBRARY_PATH on this page: https://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html)

  I generally find it easier to chroot, but OK. (To do anything more than the 
simplest thing, you'll have to bind-mount a bunch of directories of course: 
/proc, /sys, and whatever directories you want to share with the rest of the 
system).


> However this did not work and in fact produced a "Segmentation fault" error.

  Segmentation fault is not what you'd expect if some arch-related setting is 
wrong - it would be SIGILL or SIGFPE or something like that.

  You could try building with BR2_STATIC_LIBS=y, then you don't have to worry 
about shared libraries.

  Oh hang on, I forgot: you need to make sure that the kernel headers version is 
set to the same version as the running kernel. With glibc there is some backward 
compatibility for older kernels, but uClibc needs to be identical.

  Regards,
  Arnout


> 
> Have I made some kind of obvious error or mistake?
> 
> Thanks,
> Dan Jackson.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-02-08 19:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-04 16:55 [Buildroot] Getting Buildroot-created binaries to work with the Intel (TI) Puma 5 ARM-based CPU? Dan Jackson
2022-02-06 11:49 ` Arnout Vandecappelle
2022-02-06 13:55   ` Dan Jackson
2022-02-08 19:50     ` Arnout Vandecappelle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.