Small Steps on Arm Rpms

I’ve recently been working on automating the RPM package generation for ARM processors.  The script takes as input the SOURCE packages for the School Server at and grinds out binary RPMs  on the local Trimslice ARM processor.

To my amazement, after the usual false starts, I launched the script, and 50 minutes later 18 of the 21 source packages came popping out as armv7hl binaries, or noarch script RPMs at the other end.  I giggle a little to realize that the first time I tried to do it, with all the learning curve, and tool setup, the same process took over a week.

The packages that didn’t compile were kernel, linux-firmware, and syck, which seemed like a manageable outcome. The scripts to accomplish it all turned out to be pretty simple:

#script to process olpc soure rpms


mkdir -p $WORK_DIR
#if [1 -eq 1] ;then
    wget -r -l1 -nd -nH -o wget.log %s $SOURCE_URL

for name in `ls *.src.rpm | gawk 'FS = "-[0-9]" {print $1}'`
    mkdir -p $name
    mv $name* $name
    pushd $name
    rpm2cpio $name* | cpio -idm

#now compile all the stuff
rm -rf /home/gh/rpmbuild
/home/gh/bin/compilexs > compile.log

The output from the compile script is sent to a log file:

#script to compile packages
#filename: compilexs
#turn on line by line debug output
set -x



for name in `ls -1 -I".*"` 
    pushd $name
    echo "operating on $name"
    rpmbuild -ba $name.spec

About George Hunt

Retired electrical engineer and programmer, enthusiastic about OLPC as a vehicle for gathering together volunteerism, mine and so many others', for helping education in developing countries.
This entry was posted in Uncategorized. Bookmark the permalink.

One Response to Small Steps on Arm Rpms

  1. kevix says:

    good to see that things are working now. funny how the 2, 3 or 4th time it seems to work like magic. just part of the learning curve.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s