RPM Community Forums

Mailing List Message of <rpm-devel>

RE: reference implementation

From: Hatle, Mark <mark.hatle@windriver.com>
Date: Mon 04 Jun 2007 - 22:46:18 CEST
Message-ID: <EBFDFFB87BB22F4AB1B801A86BB41BC70B83CD@ala-mail02.corp.ad.wrs.com>
(apologies in advance for wonderful email formatting.. outlook strikes again...)

On Jun 4, 2007, at 3:22 PM, Hatle, Mark wrote:

>> QEMU, can't emulate EABI and/or NPTL on ARM.. (or couldn't last I  
>> looked...)
>>
>Are EABI and/or NPTL needed for *building*? Sure they are needed
>for installing on the target.

NPTL is probably a no.  But EABI is a yes.  You can't mix OABI and EABI binaries.  All of the embedded ARM development has moved to EABI binaries.  (As an aside, the purpose of EABI is to allow for a fixed calling convention so that regardless of the optimizations embedded in the binaries, they will still work with each other..  no problems w/ hard vs soft float vs "vfp" float.. etc.  OABI had to "change" everytime someone changed the floating point or register sets available to an app!)

>> So you end up having to boot into an ARM environment in QEMU for it  
>> to work.  (This is why I keep saying QEMU isn't a reasonable  
>> environment for cross scriptlets..  replacing w/ lua or some other  
>> mechanism is the only reasonable way I can see to do this.)

Well, the other component is that the QEMU environment should match the environment installed onto the target.  So again, NPTL probably not a huge issue.. but EABI is a big deal.

>> At MV we used to run the scriptlets in the host context during an  
>> install.. here at WR, we just disable the scriptlets and have some  
>> external things do many of those actions.  (We'd obviously like to  
>> get rid of the external "things", and replace w/ internal Lua!)
>>
>
> The main issue for cross-arch installs is that /bin/sh may not be  
> functional if the target file system includes binaries from two arches.

Correct.

> That's not true if the install is into a qemu sysimage, one should
> have a functional /bin/sh. OTOH, one does have the clunkiness
> of a qemu sysimage to drag around, which is likely why you'ld like
> lua scriptlets instead.

That assumes QEMU can run the binaries in the image.  I see that useful for many cases, but not every case.  (QEMU is improving every day.  It's now capable of emulating a few 64-bit environments... even those are full system environments and not simple application emulation.)

> Which brings the next question:
>     Is EABI and NPTL necessary for install scriptlets?
> Most install scriptlets I've seen do very little, but I'm always amazed
> at what people try to accomplish with rpm scriptlets. E.g. I have
> grub installs wired into triggers @work. Clever, but "Oh my gawd!".

Same here..  user/group add/remove... shell setup and initscript setup cover probably 75+% of the script usages.  I figure that another 20% cover misc file manipulations..  the last 5% cover the case where they want to actually run an executable to "do something".  Always got to be a better way to do that (or don't do that if necessary).

--Mark
Received on Mon Jun 4 22:46:21 2007
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.