BusyBox Bug and Patch Tracking
BusyBox
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0001156 [buildroot] Architecture Specific feature N/A 01-11-07 16:11 02-12-07 05:33
Reporter kendallc View Status public  
Assigned To buildroot
Priority normal Resolution open  
Status assigned   Product Version 0.9.27
Summary 0001156: coldfire (no mmu) support
Description Here is a patch to add the ability for Buildroot to target the Coldfire processor, which lacks an MMU and FPU.
Additional Information The patch is pretty beefy because although uClibc supports mmu-less builds, it appears buildroot does not. However, I think the patch is as clean as possible.

I use the attached patch, along with the attached buildroot and busybox configs, to build for the Freescale MCF5272 (Coldfire, no MMU, no FPU) with the uClinux kernel, and the Freescale MPC5200 (PowerPC 603e core, MMU, FPU) with Denx's linuxppc kernel. I made no changes for powerpc support, I include comments on powerpc only to show that the patch shouldn't break things on mmu-full systems.

What works on the host for powerpc and coldfire targets:

binutils 2.16.1
elf2flt
gcc 3.3.6 (powerpc target)
gcc 3.4.6 (coldfire target)
gdb 6.5

What works on powerpc and coldfire targets:

gdbserver 6.5
uClibc 0.9.28
Busybox 1.2.2.1 (with the attached config)
  including most core utils, login utils, a shell (msh), telnetd, vi, and others
zlib
boa
portmap
mtd-utils

Notable things that do not work on the coldfire:

Busybox init, inetd
Netkit inetd, telnetd

Init and inetd require significant changes due to the lack of 'fork()' in uClinux. I use uClinux's init (uClinux-dist/user/init) and inetd (uClinux-dist/user/inetd), which I build outside of buildroot. I haven't added them to buildroot in this patch; however, you can run your system with what's here by booting directly into busybox's shell. Also keep in mind, no 'fork()' means no 'daemon()', so you'll have to manually background daemon processes.

For the coldfire on uClinux, I use elf2flt to create BFLT executables. The attached buildroot config file sets the proper flags for coldfire/BFLT for packages in the buildroot tree. To do this outside of buildroot, you can set the following compiler and linker flags:

CFLAGS=-m52000 -msep-data
LDFLAGS=-m52000 -msep-data -Wl,-elf2flt -Wl,-move-rodata

If you could, take a look at the patch and see what you think. I imagine other users of busybox would appreciate an mmu-less build. If you'd like to integrate the patch, I'm happy to help.

P.S. I also meant to attach the buildroot and busybox configs, but I'm not sure how to attach multiple files. I guess I'll try to add them to the bug after this post.
Attached Files  buildroot.patch [^] (58,466 bytes) 01-11-07 16:11
 buildroot_coldfire.config [^] (10,708 bytes) 01-11-07 16:12
 buildroot_powerpc.config [^] (10,573 bytes) 01-11-07 16:12
 busybox.config [^] (16,819 bytes) 01-11-07 16:13
 buildroot-only.patch [^] (16,340 bytes) 02-01-07 14:52

- Relationships

- Notes
(0001984)
kendallc
01-11-07 16:18

'-m52000' should be '-m5200', sorry. Also, you might be able to use '-m5206e' or '-m5307' to better support you coldfire version. I use '-m5206e' for the MCF5272.
 
(0002029)
kendallc
01-22-07 10:23

Buildroot changes quickly, and I frequently need to update this patch to get it to apply. If anyone pursues integrating any of the changes in this patch, post a note here and I'll post an updated patch.
 
(0002063)
vapier
01-27-07 21:28

most of your patches are directed to the wrong places

fix individual projects, dont dump into buildroot

for example:
split your uClibc fixes out and e-mail the uClibc list
split your elf2flt fixes out and e-mail the uClinux list
split out your mtd fixes and e-mail the mtd list
etc...
 
(0002064)
kendallc
01-28-07 13:16

i'll split out the buildroot makefile patches from the upstream project patches, and i'll do what I can to get the upstream patches to their repective projects; however, most of them might not get back upstream for the following reasons.

elf2flt: no patch, only patched the buildroot makefile

mtd-utils: does not appear to be maintained for linux 2.4
portmap: maintainership is unclear, but we'll see
boa: it's a patch i took from uclinux, they should probably get it to boa

busybox: i'll try
uclibc: patched against release 0.9.28 because i needed to start with a stable base to get everything else working

the buildroot patches are not really tied to the upstream patches except in the case of uclibc. i noticed and took advantage of a rule in the buildroot makefile that handles patches for released uclibc versions. i'll look into the latest uclibc code, but any changes would obviously not go into release 0.9.28.

so, i'll break out the buildroot patch. let me know if you have any suggestions on what to do about patching released uclibc versions.
 
(0002084)
kendallc
02-01-07 15:18

i just attached a much leaner patch for the buildroot makefiles only.

some of the changes are to propagate LDFLAGS so that you can link BFLT binaries with elf2flt. there is a fix to the elf2flt makefile to for cleaning and rebuilding. there are changes to zlib to build it statically. these changes will be needed for most mmu-less builds.

the rest of the changes are for the coldfire/nommu support itself. they add a menu option for the coldfire, some associated vars like BR2_ARCH_HAS_NO_MMU, and some changes to the gcc and uclibc makefiles. they also pass CFLAGS for mmu-less builds to packages like busybox if necessary.
 

- Issue History
Date Modified Username Field Change
01-11-07 16:11 kendallc New Issue
01-11-07 16:11 kendallc Status new => assigned
01-11-07 16:11 kendallc Assigned To  => uClibc
01-11-07 16:11 kendallc File Added: buildroot.patch
01-11-07 16:12 kendallc File Added: buildroot_coldfire.config
01-11-07 16:12 kendallc File Added: buildroot_powerpc.config
01-11-07 16:13 kendallc File Added: busybox.config
01-11-07 16:18 kendallc Note Added: 0001984
01-22-07 10:23 kendallc Note Added: 0002029
01-27-07 21:28 vapier Note Added: 0002063
01-28-07 13:16 kendallc Note Added: 0002064
02-01-07 14:52 kendallc File Added: buildroot-only.patch
02-01-07 15:18 kendallc Note Added: 0002084
02-12-07 05:33 vapier Assigned To uClibc => buildroot


Copyright © 2000 - 2006 Mantis Group
Powered by Mantis Bugtracker