Cross-Compilers for ARM
by Manas Saksena
Now that we have a substantial chunk of the packages built for ARM,
I think it would be interesting to see if we can build a cross-compiler
that is aligned with the native toolchain. And, at this stage, we dont
need to worry about bootstrapping gcc since we already have a glibc
available.
I think it would be useful to bundle a cross-compiler/debugger toolchain
with the release even if all the other packages are built natively. As
much of the development tends to be with the kernel and the
applications, the cross-compiler is virtually a necessity for those.
Is anyone interested in working on that?
Manas
15 years, 10 months
FW: [Celinux-dev] CELF Embedded Developer BOF at OLS
by Manas Saksena
FYI.
Regards,
Manas
> ---------- Forwarded message ----------
> From: Tim Bird <tim.bird(a)am.sony.com>
> Date: Jul 30, 2007 5:18 AM
> Subject: [Celinux-dev] CELF Embedded Developer BOF at OLS
> To: CE Linux Developers List <celinux-dev(a)tree.celinuxforum.org>,
> MEMBERS(a)list.celinuxforum.org
>
>
> CELF will be hosting an Embedded Developer Bird's of a Feather
> session at the Ottawa Linux Symposium today. This BOF will showcase
> some of the work that CELF has funded or is interested in.
>
> There will be interesting mini-talks, demos, and open discussion.
>
> The BOF is open to the public. You do not need to be a registered
> attendee of OLS to attend. Feel free to come and discuss your own
> embedded project.
>
> There will be prizes, including a complete embedded development
> system donated by Buffalo!!
>
> Here is the agenda:
>
> * Pagemap patches - Matt Mackall
> Discussion and demo of pagemap patches and tools for showing accurate
> memory measurements for Linux systems. This is a really cool new set
> of features in the Linux kernel to allow developers to get a much
> better understanding of how memory is used on their systems. This
> talk was one of the highlights of the Embedded Linux Conference, held
> last April.
>
> * Size and bootup time reduction techniques - Michael Opdenacker
> Michael has collected information from the CELF web site, and
> presents various methods of reducing system size and bootup time.
>
> * Realtime testing for embedded platforms - Tim Bird Tim has
> collected information from several RT-preempt test efforts by CELF
> members in the last year. He will describe RT testing techniques and
> issues, as well as some results.
>
> * Fedora on ARM project - Manas Saksena Manas will describe the
> Fedora on ARM project, which is just getting started. This could be
> a very interesting new distribution for embedded systems.
>
> * Low-cost Arm-based development system - Tatsuo Inagaki Tatsuo,
> representing Buffalo corporation, will describe and demo a low-cost
> ARM development system, based on their NAS product running embedded
> Linux.
> * Lightning talks, demos, and open discussion!
>
> Place: Westin Hotel Ottawa, adjacent to the Congress Centre
> Room: Confederation Ballroom III, on the Fourth Floor
> Date: Friday, June 29
> Time: 7:00 pm to 9:00 pm (19h00 - 21h00)
>
> Address: 11 Colonel By Drive
> Walking Directions: From the Congress Centre, take the skywalk on
> the 3rd floor (right next to the OLS registration area) to the hotel,
> and proceed to the 4th floor.
>
> If you are in the Ottawa area (whether you are attending OLS or not),
> please come and join us!
>
> If you are a CELF member, please help us announce and promote this at
> OLS. Satoru Ueda and Tim Bird (me) have flyers to hand out.
> Please help us distribute these, and talk to the embedded developers
> we know at OLS, to let them know about this event.
>
> Thanks! I'm looking forward to seeing you at the BOF!
> -- Tim
>
> =============================
> Tim Bird
> Architecture Group Chair, CE Linux Forum Senior Staff Engineer, Sony
> Electronics =============================
>
>
> _______________________________________________
> Celinux-dev mailing list
> Celinux-dev(a)tree.celinuxforum.org
> http://tree.celinuxforum.org/mailman/listinfo/celinux-dev
15 years, 11 months
status of patches for rawhide
by Lennert Buytenhek
I went through most of our FC6 patches, and for each of them, checked
whether they would still be needed in rawhide, re-based them, and
submitted them to the upstream project (for non-packaging related
patches) and/or to RH bugzilla.
All RH BZs have been linked to the ARM tracker bug, which is here:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=245418
The following patches are no longer needed for current rawhide:
NetworkManager-0.6.4-5.fc6
apr-1.2.7-10
cdrtools-2.01-10
compat-db-4.2.52-5.1
kdesdk-3.5.6-0.1.fc6
libdrm-2.3.0-1.fc6
libgcrypt-1.2.3-1
liboil-0.3.8-2.1
mesa-6.5.1-9.fc6
w3m-0.5.1-15.fc6
xorg-x11-drivers-7.1-3
xorg-x11-drv-acecad-1.1.0-2.1
xorg-x11-drv-aiptek-1.0.1-2
xorg-x11-drv-ati-6.6.3-1.fc6
xorg-x11-drv-calcomp-1.1.0-1.1
xorg-x11-drv-cirrus-1.1.0-2.fc6
xorg-x11-drv-citron-2.2.0-1.1
xorg-x11-drv-digitaledge-1.1.0-1.1
xorg-x11-drv-dmc-1.1.0-2
xorg-x11-drv-dummy-0.2.0-2.1
xorg-x11-drv-dynapro-1.1.0-2
xorg-x11-drv-elo2300-1.1.0-1.1
xorg-x11-drv-elographics-1.1.0-1.1
xorg-x11-drv-evdev-1.1.2-2.1
xorg-x11-drv-fbdev-0.3.0-2
xorg-x11-drv-fpit-1.1.0-1.1
xorg-x11-drv-glint-1.1.1-4.1
xorg-x11-drv-hyperpen-1.1.0-2
xorg-x11-drv-jamstudio-1.1.0-1.1
xorg-x11-drv-joystick-1.1.0-1.1
xorg-x11-drv-keyboard-1.1.0-2.1
xorg-x11-drv-magellan-1.1.0-1.1
xorg-x11-drv-magictouch-1.0.0.5-2.1
xorg-x11-drv-mga-1.4.5-2.fc6
xorg-x11-drv-microtouch-1.1.0-1.1
xorg-x11-drv-mouse-1.2.1-1.fc6
xorg-x11-drv-mutouch-1.1.0-2
xorg-x11-drv-nv-1.2.0-4.fc6
xorg-x11-drv-palmax-1.1.0-1.1
xorg-x11-drv-penmount-1.1.0-2.1
xorg-x11-drv-spaceorb-1.1.0-1.1
xorg-x11-drv-summa-1.1.0-1.1
xorg-x11-drv-tdfx-1.3.0-2.fc6
xorg-x11-drv-tseng-1.1.0-3.1
xorg-x11-drv-ur98-1.1.0-1.1
xorg-x11-drv-vesa-1.2.1-4
xorg-x11-drv-vga-4.1.0-2.1
xorg-x11-drv-void-1.1.0-3.1
xorg-x11-drv-voodoo-1.1.0-3.1
xorg-x11-proto-devel-7.1-9.fc6
These patches were rebased, submitted to bugzilla, and merged:
redhat-rpm-config-8.0.45-9.fc6 #243523
These patches were merged without bugzilla entry:
anaconda-11.1.1.3-1 applied
xorg-x11-server-1.1.1-47.8.fc6 applied
yum-3.0.6-1.fc6 applied
These patches were rebased, submitted to bugzilla, and have not
yet been merged:
SDL-1.2.11-1.fc6 #245411
attr-2.4.32-1.1 #245415
authd-1.4.3-9 #245436
binutils-2.17.50.0.6-2.fc6 #243516
db4-4.3.29-9.fc6 #245416
gmp-4.1.4-9.fc6 #245456
g-wrap-1.9.6-7.1 #245461
openssl-0.9.8b-8.3.fc6 #245417
pcmciautils-014-5 #245441
pm-utils-0.19-3 #245463
smartmontools-5.37-1.1.fc6 #245442
star-1.5a75-1 #245465
subversion-1.4.3-2.fc6 #245467
These patches have been rebased and submitted upstream (or had
previously been submitted upstream), applied upstream, and will
be automatically picked up when the corresponding Fedora package
will be rebased to a newer upstream version:
e2fsprogs-1.39-7.fc6 http://thunk.org/hg/e2fsprogs/?rev/d22a0a6fcd7e
ekiga-2.0.5-3.fc6 http://mail.gnome.org/archives/ekiga-devel-list/2007-June/msg00024.html
rpm-4.4.2-33.fc6 https://lists.dulug.duke.edu/pipermail/rpm-maint/2007-June/000400.html
These patches have been submitted upstream but are not merged yet:
util-linux-2.13-0.46.fc6
These patches disable java/mono bindings (as we don't have gcj nor
mono at this time.) I'm not sure what to do with them.
avahi-0.6.16-4.fc6 disable mono bindings
gettext-0.14.6-4.fc6 disable java bindings
subversion-1.4.3-2.fc6 disable java build
vnc-4.1.2-9.fc6 disable .jar build
These patches fix real issues, and have been submitted to their
respective upstream projects, but as they don't fix all the issues
that we see on the ARM platform, I haven't BZ'ed them yet:
firefox-1.5.0.10-5.fc6 firefox still goes into 100% CPU loop
nspr-4.6.6-0.6.0.fc6 https://bugzilla.mozilla.org/show_bug.cgi?id=385583
There's about a dozen patches left that I'm hoping to be able to
get rid of in the next couple of days.
15 years, 11 months
Welcome to the Fedora-ARM mailing list
by Manas Saksena
Hi and Welcome,
As you can guess, this project is to support Fedora on ARM architecture
and platforms. This email is a short-introduction to the project. You
can find more information at:
http://fedoraproject.org/wiki/ARM
Let me first introduce myself. I worry about Embedded Linux,
open-source,
and other related things at Marvell Semiconductors. As some of you know,
we make ARM based processors and system-on-chip solutions, that
increasingly run Linux. This project is initiated/sponsored by Marvell,
but it is intended to be a fully open project under the Fedora umbrella.
The project started when Lennert and I discussed this a few months back.
As many of you know, Lennert has been developing unofficial Fedora ports
for ARM for a while --- a real long while! We started towards an effort
of integrating his ports into the official Fedora project.
A few weeks back, we started talking to Chris Blizzard and some of the
RedHat/Fedora folks, and those discussions resulted in moving towards
an effort to create ARM port as a secondary architecture within the
Fedora project. If all goes well, we would like to have an F8 release
for ARM. And, with that in mind, we have been porting/building the
F8-devel packages, as well as merging any of the diffs for the packages
back into the Fedora CVS.
At this stage, the primary goal of the project is to do a high-quality
release of F8 for ARM. The development effort is being led by Lennert,
and he will be the technical lead. I will continue to provide guidance
and support and help in direction of the project especially during the
initial stages as we try to ramp up.
Thats a long enough introduction. If you know of someone who may be
interested in Linux on ARM, please invite them over.
Regards,
Manas Saksena
15 years, 11 months
[patch,rfc] assorted changes for arm
by Lennert Buytenhek
(please CC on replies, not on rpm-maint@)
Hi,
Attached is a diff against rpm 4.4.2 that updates the arm arch
support in rpm somewhat. In particular, it adds more ARM sub-archs,
and adds some bits to deal properly with the new ARM ABI (EABI).
Various patches along these lines have existed in the past few
years, this particular one is what the (unofficial) Fedora ARM effort
uses. Comments welcome!
thanks,
Lennert
Index: rpm-4.4.2/Makefile.am
===================================================================
--- rpm-4.4.2.orig/Makefile.am
+++ rpm-4.4.2/Makefile.am
@@ -165,6 +165,12 @@ install-data-local:
$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/athlon ;;\
alpha*) $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/alpha ;\
$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/alphaev6 ;;\
+ arm*) $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/armv3l ;\
+ $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/armv4l ;\
+ $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/armv4tl ;\
+ $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/armv5tel ;\
+ $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/armv5tejl ;\
+ $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/armv6l ;;\
sparc*) $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/sparc ;\
$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/sparcv8 ;\
$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/sparcv9 ;\
Index: rpm-4.4.2/Makefile.in
===================================================================
--- rpm-4.4.2.orig/Makefile.in
+++ rpm-4.4.2/Makefile.in
@@ -1224,6 +1224,12 @@ install-data-local:
$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/athlon ;;\
alpha*) $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/alpha ;\
$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/alphaev6 ;;\
+ arm*) $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/armv3l ;\
+ $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/armv4l ;\
+ $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/armv4tl ;\
+ $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/armv5tel ;\
+ $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/armv5tejl ;\
+ $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/armv6l ;;\
sparc*) $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/sparc ;\
$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/sparcv8 ;\
$(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/sparcv9 ;\
Index: rpm-4.4.2/config.guess
===================================================================
--- rpm-4.4.2.orig/config.guess
+++ rpm-4.4.2/config.guess
@@ -809,7 +809,14 @@ EOF
echo ${UNAME_MACHINE}-pc-minix
exit 0 ;;
arm*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ eval $set_cc_for_build
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep __ARM_EABI__ >/dev/null
+ then
+ echo ${UNAME_MACHINE}-${VENDOR:-unknown}-linux-gnu
+ else
+ echo ${UNAME_MACHINE}-${VENDOR:-unknown}-linux-gnueabi
+ fi
exit 0 ;;
cris:Linux:*:*)
echo cris-axis-linux-gnu
Index: rpm-4.4.2/configure.ac
===================================================================
--- rpm-4.4.2.orig/configure.ac
+++ rpm-4.4.2/configure.ac
@@ -1206,6 +1206,9 @@ fi
if echo "$build_os" | grep '.*-gnulibc1' > /dev/null ; then
build_os=`echo "${build_os}" | sed 's/-gnulibc1$//'`
fi
+if echo "$build_os" | grep '.*-gnueabi' > /dev/null ; then
+ build_os=`echo "${build_os}" | sed 's/-gnueabi$//'`
+fi
if echo "$build_os" | grep '.*-gnu' > /dev/null ; then
build_os=`echo "${build_os}" | sed 's/-gnu$//'`
fi
@@ -1277,10 +1280,7 @@ s390x*) RPMCANONCOLOR=3; RPMCANONARCH=s
s390*) RPMCANONCOLOR=0; RPMCANONARCH=s390 ;;
powerpc64*|ppc64*) RPMCANONCOLOR=3; RPMCANONARCH=ppc64 ;;
powerpc*|ppc*) RPMCANONCOLOR=0; RPMCANONARCH=ppc ;;
-armv3l*) RPMCANONCOLOR=0; RPMCANONARCH=armv3l ;;
-armv4l*) RPMCANONCOLOR=0; RPMCANONARCH=armv4l ;;
-armv4b*) RPMCANONCOLOR=0; RPMCANONARCH=armv4b ;;
-arm*) RPMCANONCOLOR=0; RPMCANONARCH="${build_cpu}" ;;
+arm*) RPMCANONCOLOR=0; RPMCANONARCH=arm ;;
mipsel*) RPMCANONCOLOR=0; RPMCANONARCH=mipsel ;;
mips*) RPMCANONCOLOR=0; RPMCANONARCH=mips ;;
m68k*) RPMCANONCOLOR=0; RPMCANONARCH=m68k ;;
Index: rpm-4.4.2/installplatform
===================================================================
--- rpm-4.4.2.orig/installplatform
+++ rpm-4.4.2/installplatform
@@ -21,7 +21,7 @@ E_O_F
RPM="./rpm --rcfile $TEMPRC"
-canonarch_sed='s_i.86_i386_;s_pentium[34]_i386_;s_athlon_i386_;s_sparc[^-]*_sparc_;s_alpha[^-]*_alpha_;s_\(powerpc\|ppc\)[^-]*_ppc_'
+canonarch_sed='s_i.86_i386_;s_pentium[34]_i386_;s_athlon_i386_;s_sparc[^-]*_sparc_;s_alpha[^-]*_alpha_;s_arm[^-]*_arm_;s_\(powerpc\|ppc\)[^-]*_ppc_'
arch="`$RPM --eval '%{_arch}'|sed -e "$canonarch_sed"`"
VENDOR="`$RPM --eval '%{_vendor}'`"
OS="`$RPM --eval '%{_os}'`"
@@ -32,6 +32,7 @@ target="`$RPM --eval '%{_target}'|sed -e
case "$arch" in
i[3456]86|pentium[34]|athlon) SUBSTS='s_i386_i386_ s_i386_i486_ s_i386_i586_ s_i386_i686_ s_i386_pentium3_ s_i386_pentium4_ s_i386_athlon_' ;;
alpha*) SUBSTS='s_alpha_alpha_ s_alpha_alphaev5_ s_alpha_alphaev56_ s_alpha_alphapca56_ s_alpha_alphaev6_ s_alpha_alphaev67_' ;;
+ arm*) SUBSTS='s_arm_armv3l_ s_arm_arm4l_ s_arm_armv4tl_ s_arm_armv5tel_ s_arm_armv5tejl_ s_arm_armv6l_' ;;
sparc*) SUBSTS='s_sparc\(64\|v9\)_sparc_ s_sparc64_sparcv9_;s_sparc\([^v]\|$\)_sparcv9\1_ s_sparcv9_sparc64_;s_sparc\([^6]\|$\)_sparc64\1_' ;;
powerpc*|ppc*) SUBSTS='s_ppc64_ppc_ s_ppc\([^6ip]\|$\)_ppc64\1_ s_ppc\([^6ip]\|$\)_ppciseries_ s_ppc\([^6ip]\|$\)_ppcpseries_ s_ppc\([^6ip]\|$\)_ppc64iseries_ s_ppc\([^6ip]\|$\)_ppc64pseries_' ;;
s390*) SUBSTS='s_s390x_s390_ s_s390\([^x]\|$\)_s390x\1_' ;;
Index: rpm-4.4.2/lib/rpmts.c
===================================================================
--- rpm-4.4.2.orig/lib/rpmts.c
+++ rpm-4.4.2/lib/rpmts.c
@@ -236,7 +236,7 @@ static int isArch(const char * arch)
"m68k",
"rs6000",
"ia64",
- "armv3l", "armv4b", "armv4l",
+ "armv3l", "armv4b", "armv4l", "armv4tl", "armv5tel", "armv5tejl", "armv6l",
"s390", "i370", "s390x",
"sh", "xtensa",
"noarch",
Index: rpm-4.4.2/macros.in
===================================================================
--- rpm-4.4.2.orig/macros.in
+++ rpm-4.4.2/macros.in
@@ -1260,6 +1260,10 @@ done \
#
%ix86 i386 i486 i586 i686 pentium3 pentium4 athlon
+#------------------------------------------------------------------------------
+# arch macro for all supported ARM processors
+%arm armv3l armv4b armv4l armv4tl armv5tel armv5tejl armv6l
+
#------------------------------------------------------------------------
# Use in %install to generate locale specific file lists. For example,
#
Index: rpm-4.4.2/rpm.spec.in
===================================================================
--- rpm-4.4.2.orig/rpm.spec.in
+++ rpm-4.4.2/rpm.spec.in
@@ -331,8 +331,8 @@ exit 0
%ifarch s390 s390x
%attr(-, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/s390*
%endif
-%ifarch armv3l armv4l
-%attr(-, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/armv[34][lb]*
+%ifarch %{arm}
+%attr(-, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/arm*
%endif
%ifarch mips mipsel
%attr(-, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/mips*
Index: rpm-4.4.2/rpmrc.in
===================================================================
--- rpm-4.4.2.orig/rpmrc.in
+++ rpm-4.4.2/rpmrc.in
@@ -58,9 +58,13 @@ optflags: hppa2.0 -O2 -g -mpa-risc-1-0
optflags: mips -O2 -g
optflags: mipsel -O2 -g
-optflags: armv3l -O2 -g -fsigned-char -fomit-frame-pointer -march=armv3
-optflags: armv4b -O2 -g -fsigned-char -fomit-frame-pointer -march=armv4
-optflags: armv4l -O2 -g -fsigned-char -fomit-frame-pointer -march=armv4
+optflags: armv3l -O2 -g -march=armv3
+optflags: armv4b -O2 -g -march=armv4
+optflags: armv4l -O2 -g -march=armv4
+optflags: armv4tl -O2 -g -march=armv4t
+optflags: armv5tel -O2 -g -march=armv5te
+optflags: armv5tejl -O2 -g -march=armv5te
+optflags: armv6l -O2 -g -march=armv6
optflags: atarist -O2 -g -fomit-frame-pointer
optflags: atariste -O2 -g -fomit-frame-pointer
@@ -124,6 +128,9 @@ arch_canon: mipsel: mipsel 11
arch_canon: armv3l: armv3l 12
arch_canon: armv4b: armv4b 12
arch_canon: armv4l: armv4l 12
+arch_canon: armv5tel: armv5tel 12
+arch_canon: armv5tejl: armv5tejl 12
+arch_canon: armv6l: armv6l 12
arch_canon: m68kmint: m68kmint 13
arch_canon: atarist: m68kmint 13
@@ -218,6 +225,14 @@ buildarchtranslate: ppcpseries: ppc
buildarchtranslate: ppc64iseries: ppc64
buildarchtranslate: ppc64pseries: ppc64
+buildarchtranslate: armv3l: armv3l
+buildarchtranslate: armv4b: armv4b
+buildarchtranslate: armv4l: armv4l
+buildarchtranslate: armv4tl: armv4tl
+buildarchtranslate: armv5tel: armv5tel
+buildarchtranslate: armv5tejl: armv4tejl
+buildarchtranslate: armv6l: armv6l
+
buildarchtranslate: atarist: m68kmint
buildarchtranslate: atariste: m68kmint
buildarchtranslate: ataritt: m68kmint
@@ -291,6 +306,10 @@ arch_compat: hppa1.0: parisc
arch_compat: parisc: noarch
arch_compat: armv4b: noarch
+arch_compat: armv6l: armv5tejl
+arch_compat: armv5tejl: armv5tel
+arch_compat: armv5tel: armv4tl
+arch_compat: armv4tl: armv4l
arch_compat: armv4l: armv3l
arch_compat: armv3l: noarch
@@ -381,9 +400,13 @@ buildarch_compat: ppc64iseries: ppc64
buildarch_compat: mips: noarch
buildarch_compat: mipsel: noarch
-buildarch_compat: armv3l: noarch
buildarch_compat: armv4b: noarch
-buildarch_compat: armv4l: noarch
+buildarch_compat: armv6l: armv5tejl
+buildarch_compat: armv5tejl: armv5tel
+buildarch_compat: armv5tel: armv4tl
+buildarch_compat: armv4tl: armv4l
+buildarch_compat: armv4l: armv3l
+buildarch_compat: armv3l: noarch
buildarch_compat: hppa2.0: hppa1.2
buildarch_compat: hppa1.2: hppa1.1
15 years, 11 months
proposed rpm 4.4.2 diffs for ARM
by Lennert Buytenhek
(not subscribed to rpm-list@, please CC on replies)
Hi all,
Attached are two patches for rpm 4.4.2 (one against the package
itself, one against its spec file) which slightly extend rpm's arm
support, on which I would love to get some feedback, as I'm not
entirely sure whether I Did The Right Thing in every place.
Any comments? Should these patches be discussed on the 'upstream'
(i.e. @rpm.org) rpm mailing lists instead?
If they look OK, can they make it into F8? (Please don't apply
this version as-is yet, though..)
Thanks in advance for your time.
thanks,
Lennert
=== rpm-4.4.2-arm.diff
> Index: rpm-4.4.2/Makefile.am
> ===================================================================
> --- rpm-4.4.2.orig/Makefile.am
> +++ rpm-4.4.2/Makefile.am
> @@ -165,6 +165,12 @@ install-data-local:
> $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/athlon ;;\
> alpha*) $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/alpha ;\
> $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/alphaev6 ;;\
> + arm*) $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/armv3l ;\
> + $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/armv4l ;\
> + $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/armv4tl ;\
> + $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/armv5tel ;\
> + $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/armv5tejl ;\
> + $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/armv6l ;;\
Add creation of RPMS dirs for the various ARM sub-archs. This seems
pretty straightforward.
> Index: rpm-4.4.2/config.guess
> ===================================================================
> --- rpm-4.4.2.orig/config.guess
> +++ rpm-4.4.2/config.guess
> @@ -809,7 +809,14 @@ EOF
> echo ${UNAME_MACHINE}-pc-minix
> exit 0 ;;
> arm*:Linux:*:*)
> - echo ${UNAME_MACHINE}-unknown-linux-gnu
> + eval $set_cc_for_build
> + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
> + | grep __ARM_EABI__ >/dev/null
> + then
> + echo ${UNAME_MACHINE}-${VENDOR:-unknown}-linux-gnu
> + else
> + echo ${UNAME_MACHINE}-${VENDOR:-unknown}-linux-gnueabi
> + fi
There are two different ABIs for ARM systems, the 'legacy' ABI
(old-ABI) and the newer-and-preferred ABI, EABI. EABI is selected
by configuring using a target triple ending in *-gnueabi (this is a
slightly odd convention, but it's an upstream-imposed convention,
and followed by binutils, gcc, glibc, etc.) There isn't an easier
way of detecting EABI than to check whether gcc defines
__ARM_EABI__, as far as I know.
> Index: rpm-4.4.2/configure.ac
> ===================================================================
> --- rpm-4.4.2.orig/configure.ac
> +++ rpm-4.4.2/configure.ac
> @@ -1206,6 +1206,9 @@ fi
> if echo "$build_os" | grep '.*-gnulibc1' > /dev/null ; then
> build_os=`echo "${build_os}" | sed 's/-gnulibc1$//'`
> fi
> +if echo "$build_os" | grep '.*-gnueabi' > /dev/null ; then
> + build_os=`echo "${build_os}" | sed 's/-gnueabi$//'`
> +fi
> if echo "$build_os" | grep '.*-gnu' > /dev/null ; then
> build_os=`echo "${build_os}" | sed 's/-gnu$//'`
> fi
Strip -gnueabi off the target triple like we do with -gnulibc1 and
-gnu.
> @@ -1277,10 +1280,7 @@ s390x*) RPMCANONCOLOR=3; RPMCANONARCH=s
> s390*) RPMCANONCOLOR=0; RPMCANONARCH=s390 ;;
> powerpc64*|ppc64*) RPMCANONCOLOR=3; RPMCANONARCH=ppc64 ;;
> powerpc*|ppc*) RPMCANONCOLOR=0; RPMCANONARCH=ppc ;;
> -armv3l*) RPMCANONCOLOR=0; RPMCANONARCH=armv3l ;;
> -armv4l*) RPMCANONCOLOR=0; RPMCANONARCH=armv4l ;;
> -armv4b*) RPMCANONCOLOR=0; RPMCANONARCH=armv4b ;;
> -arm*) RPMCANONCOLOR=0; RPMCANONARCH="${build_cpu}" ;;
> +arm*) RPMCANONCOLOR=0; RPMCANONARCH=arm ;;
Make 'arm' the canon arch for all possible sub-archs.
> Index: rpm-4.4.2/installplatform
> ===================================================================
> --- rpm-4.4.2.orig/installplatform
> +++ rpm-4.4.2/installplatform
> @@ -21,17 +21,18 @@ E_O_F
>
> RPM="./rpm --rcfile $TEMPRC"
>
> -canonarch_sed='s_i.86_i386_;s_pentium[34]_i386_;s_athlon_i386_;s_sparc[^-]*_sparc_;s_alpha[^-]*_alpha_;s_\(powerpc\|ppc\)[^-]*_ppc_'
> +canonarch_sed='s_i.86_i386_;s_pentium[34]_i386_;s_athlon_i386_;s_sparc[^-]*_sparc_;s_alpha[^-]*_alpha_;s_arm[^-]*_arm_;s_\(powerpc\|ppc\)[^-]*_ppc_'
Idem.
> -target_platform="`$RPM --eval '%{?_gnu:%undefine _gnu}%{_target_platform}'|sed -e "$canonarch_sed"`"
> +target_platform="`$RPM --eval '%{?_gnu:%undefine _gnu}%{?_gnu:%undefine _gnu}%{_target_platform}'|sed -e "$canonarch_sed"`"
(Note that this isn't ARM-specific.) For some reason, it seems
necessary to undefine _gnu twice here to really undefine it. (Same
thing happens on my x86 boxes.) Not exactly sure what's happening
here.
> + arm*) SUBSTS='s_arm_armv3l_ s_arm_arm4l_ s_arm_armv4tl_ s_arm_armv5tel_ s_arm_armv5tejl_ s_arm_armv6l_' ;;
Create /u/s/r/RPMS/$foo dirs for all possible sub-archs.
> Index: rpm-4.4.2/lib/rpmts.c
> ===================================================================
> --- rpm-4.4.2.orig/lib/rpmts.c
> +++ rpm-4.4.2/lib/rpmts.c
> @@ -236,7 +236,7 @@ static int isArch(const char * arch)
> "m68k",
> "rs6000",
> "ia64",
> - "armv3l", "armv4b", "armv4l",
> + "armv3l", "armv4b", "armv4l", "armv4tl", "armv5tel", "armv5tejl", "armv6l",
Include all sub-archs.
> Index: rpm-4.4.2/macros.in
> ===================================================================
> --- rpm-4.4.2.orig/macros.in
> +++ rpm-4.4.2/macros.in
> @@ -1260,6 +1260,10 @@ done \
> #
> %ix86 i386 i486 i586 i686 pentium3 pentium4 athlon
>
> +#------------------------------------------------------------------------------
> +# arch macro for all supported ARM processors
> +%arm armv3l armv4b armv4l armv4tl armv5tel armv5tejl armv6l
Add %arm macro so that we can check whether we are building for an
ARM box by checking %ifarch %{arm}, to make it easier to add sub-archs
without having to patch every single spec file that has some ARM-
dependent logic in it.
> Index: rpm-4.4.2/rpm.spec.in
> ===================================================================
> --- rpm-4.4.2.orig/rpm.spec.in
> +++ rpm-4.4.2/rpm.spec.in
> @@ -331,8 +331,8 @@ exit 0
> %ifarch s390 s390x
> %attr(-, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/s390*
> %endif
> -%ifarch armv3l armv4l
> -%attr(-, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/armv[34][lb]*
> +%ifarch %{arm}
> +%attr(-, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/arm*
Check for ARM archs by checking against %{arm}, and just include
all arm* dirs in /u/l/rpm in the package.
> Index: rpm-4.4.2/rpmrc.in
> ===================================================================
> --- rpm-4.4.2.orig/rpmrc.in
> +++ rpm-4.4.2/rpmrc.in
> @@ -61,6 +61,10 @@ optflags: mipsel -O2 -g
> optflags: armv3l -O2 -g -fsigned-char -fomit-frame-pointer -march=armv3
> optflags: armv4b -O2 -g -fsigned-char -fomit-frame-pointer -march=armv4
> optflags: armv4l -O2 -g -fsigned-char -fomit-frame-pointer -march=armv4
> +optflags: armv4tl -O2 -g -march=armv4t
> +optflags: armv5tel -O2 -g -march=armv5te
> +optflags: armv5tejl -O2 -g -march=armv5te
> +optflags: armv6l -O2 -g -march=armv6
Add optflags for the newer ARM sub-archs.
I don't think we need -fsigned-char anymore, and maybe we should
remove it from the other sub-archs as well.
(chars are unsigned on ARM by default, and I think that doing
-fsigned-char by default was meant to work around buggy userland
software that assumes that chars are always signed. I don't think
this should be needed anymore.)
> @@ -124,6 +128,9 @@ arch_canon: mipsel: mipsel 11
> arch_canon: armv3l: armv3l 12
> arch_canon: armv4b: armv4b 12
> arch_canon: armv4l: armv4l 12
> +arch_canon: armv5tel: armv5tel 12
> +arch_canon: armv5tejl: armv5tejl 12
> +arch_canon: armv6l: armv6l 12
Add more sub-archs..
=== rpm-4.4.2-spec-arm.diff
> Index: SPECS/rpm.spec
> ===================================================================
> --- SPECS.orig/rpm.spec
> +++ SPECS/rpm.spec
> @@ -68,6 +68,7 @@ Patch41: rpm-4.4.2-cdiff.patch
> Patch42: rpm-4.4.2-docflags.patch
> Patch43: rpm-debugedit-incremental-fix.patch
> Patch44: rpm-4.4.2-prefer-elf32.patch
> +Patch45: rpm-4.4.2-arm.diff
> License: GPL
> Requires: patch > 2.5
> Prereq: shadow-utils
> @@ -214,6 +215,8 @@ shell-like rules.
> %patch42 -p1 -b .docflags
> %patch43 -p1 -b .debugcan2
> %patch44 -p1 -b .elfprefer
> +%patch45 -p1 -b .arm
Add ARM patch.
> +perl -pi -e "s/-gnu$/%{_gnu}/" macros.in
This is a hack to make sure that %{_gnu} ends up as -gnueabi on EABI
targets. Ideally this should perhaps be hacked into the macros.in ->
macros generation step itself. Ideas?
> # rebuild configure for ipv6
> autoconf
> @@ -410,8 +413,8 @@ exit 0
> %ifarch s390 s390x
> %attr(-, rpm, rpm) %{__prefix}/lib/rpm/s390*
> %endif
> -%ifarch armv3l armv4l
> -%attr(-, rpm, rpm) %{__prefix}/lib/rpm/armv[34][lb]*
> +%ifarch %{arm}
> +%attr(-, rpm, rpm) %{__prefix}/lib/rpm/arm*
Same modification as to rpm.spec.in -- check %{arm} instead of a
hardcoded list of sub-archs, and pick up all /u/l/rpm/arm* dirs.
Thanks!
15 years, 11 months