[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: BusyBox on FreeBSD and Hurd



On Mon, May 31, 2010 at 12:35:33PM +0200, Jérémie Koenig wrote:
> Hi all,

Hi,

> My proposal[1] to port Debian-Installer to Hurd as a "Google Summer of
> Code" project has been accepted. As one of the first steps I have been
> working on porting BusyBox.
> 
> I would like to suggest that we come up with a common set of changes
> for both FreeBSD and Hurd support and submit them upstream. With this
> in mind, I have been working against the upstream git repository, and
> have tried to incorporate both the previous Hurd patch[2] from Samuel
> Thibault and the Debian/kFreeBSD ones[3].
> 
> My changes are published on github[4]. I have backported them onto
> BusyBox 1.15.3 and successfully built a debian package including them
> on Hurd and Linux.
> 
> Could you have a look and tell me what you think? In particular I have
> not been able to test my code on kFreeBSD yet, so any kind of report
> would be great.

First of all, thanks a lot for also looking at the kFreeBSD patches.
busybox is the main remaining part to have full d-i support on
GNU/kFreeBSD and I haven't been able to spend time on it.

I have tried to build busybox, and I had to patch three parts of the
code (the hackish way) to get it building. I haven't tried the result
extensively, but it seems to work. I'll try to fix the build issues
cleanly over the week-end.


> [1] http://wiki.debian.org/SummerOfCode2010/HurdDebianInstaller/JeremieKoenig
> [2] http://people.debian.org/~sthibault/hurd-i386/
> [3] http://svn.debian.org/viewsvn/d-i/people/slackydeb/kfreebsd/busybox/1.14/debian/
> [4] http://github.com/jeremie-koenig/busybox-osports
> 
> Quick start
> -----------
> 
> $ git clone git://github.com/jeremie-koenig/busybox-osports.git
> $ cd busybox-osports
> $ make allyesconfig

Note that it seems to enable NOMMU=y, which we probably don't want.

> $ vi .config # disable PLATFORM_LINUX, STATIC and WERROR
> $ make
> 
> or, alternatively,
> 
> $ git clone git://github.com/jeremie-koenig/busybox-osports.git
> $ cd busybox-osports
> $ git checkout osports-debian
> $ fakeroot debian/rules binary
> 
> Summary
> -------
> 
> I list my changes below. The related kFreeBSD patches are shown within
> square brackets. I took the approach of defining a new configuration
> option (PLATFORM_LINUX) that the Linux-specific applets can depend on.
> This way only a minimal amount of configuration overriding has to take
> place for Hurd and FreeBSD in the debian package.
> 
> Some patches have been already included upstream:
> 
> fbedacf Hurd compat fixes. Mostly dealing with absent PATH_MAX
> [libbb.xconnect.diff]
> 3d0e779 libbb: locate PAGE_SIZE on Hurd
> 1d448cf provide safe_gethostname() for non-linux systems
> [libbb.safe_gethostname.diff]
> 
> The rest is in the 'osports' branch in the github repository:
> 
> 9a47e16 update scripts/kconfig/*_shipped
> 81f0baa readlink: use xmalloc_realpath()
> 92fbcd8 mark Linux-specific configuration options
> 7a23db4 init,loginutils: termios portability fixes
> fa5c73c init,halt: portability improvements [init.init.diff]
> 250e48a init: make the initial $TERM value configurable
> b5065d9 libbb.h: add device names for Hurd and FreeBSD [include.libbb.diff]
> 3b6b59b mkdir: fix -p on FreeBSD [libbb.make_directory.diff]
> 7317803 klogd: support /dev/klog in addition to klogctl() [klogd.diff]
> 8749e88 libbb: conditionalize AF_* usage in error reporting
> 19efa4d stty: fix undefined IDX_* on missing termios constants
> c835163 cttyhack: serial console detection is Linux-specific
> [shell.cttyhack.diff]
>         /!\ The serial console detection is just dropped
> 73a49cc bootchartd: mounting tmpfs is Linux-specific

Note that GNU/kFreeBSD also has a tmpfs.

> fd2a956 tcpsvd,udpsvd: conditionalize usage of SO_ORIGINAL_DST
> 2f6b52d vlock: disable linux console calls on other systems
> 
> Stuff I will be working on soon:
> 
> * mount/umount
>     FreeBSD: [mount_with_hack_to_help_umount.diff] [util-linux.umount.diff]
>     Hurd: issue a 'settrans' command
> * swapon/swapoff:
>     FreeBSD: [util-linux.swaponoff.diff]
>     Hurd: to be investigated
> 
> Branches
> --------
> 
> * osports: the main branch, based on upstream's 'master' branch;
> * osports-1.15.3: the same changes, rebased onto BusyBox 1.15.3;
> * osports-debian: a preliminary debian package including them.
>   (we still need to somehow set INIT_TERMINAL_TYPE)
> 

Cheers,
Aurelien


-- 
Aurelien Jarno	                        GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net


Reply to: