:: Re: [Dng] Wana give a try to vdev
Top Page
Delete this message
Reply to this message
Author: Didier Kryn
Date:  
To: dng@lists.dyne.org
Subject: Re: [Dng] Wana give a try to vdev


Le 31/03/2015 20:56, Jude Nelson a écrit :
> Hi Didier,
>
> Thank you for offering! I haven't tried statically linking vdev or
> its helper programs yet, but I don't see why it wouldn't work. You'll
> need to tweak the vdevd and vdevd helper program makefiles (in
> vdevd/Makefile and vdevd/helpers/LINUX/Makefile, respectively) to add
> the -static directive to gcc. All of the helper programs only need
> libc. vdevd needs libvdev (which can be built with make -C libvdev),
> but libvdev only needs libc.
>
> Let me know how it goes? I'll add it to the tutorial I just sent out
> if it works :)
>
> Thanks,
> Jude
>
> On Tue, Mar 31, 2015 at 12:18 PM, Didier Kryn <kryn@???
> <mailto:kryn@in2p3.fr>>wrote:
>
>     Dear Jude,

>
>         I would like to try your vdev. I plan to use a diskless
>     embeded powerpc I have available for devel. I prefer that to using
>     quemu and I want to keep my laptop functional h24.

>
>         I would do it in an OS built from scratch with only 3
>     components: kernel version 2.6.29, busybox and vdev. Therefore I
>     would like to compile vdev and link it statically from the source.
>     Does it seem feasible?

>
>         Didier

>
>     _______________________________________________
>     Dng mailing list
>     Dng@??? <mailto:Dng@lists.dyne.org>
>     https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng

>
>

     Hello Jude.


     Here is a brief summary of what I did up to now. The goal was to 
install a minimal rootfs in flash memory of an embeded Powerpc 
(MVME3100) to use as a sandbox.


     1) I compiled a kernel with the following boot parameters:
         console=ttyS0,9600 root=/dev/mtdblock1 rootfstype=jffs2


     2) The filesystem contains busybox-1.20.2 statically linked with 
musl, which I had done a while ago.


     3) vdevd:


     I first tried to compile vdev natively on Debian Wheezy, but could 
not link it statically as I wanted. This is actually a classical problem 
with glibc everytime network functions are used. Actually the offending 
functions are getpwnam_r() and the like. I guess this is related with 
NIS compatibility built in the glibc.


     I decided to link against musl libc. To save time I just downloaded 
a ready-made image of sabotage-linux for powerpc and compiled vdev in a 
sabotage chroot.


     I have now my minimal OS working. init is a little script doing the 
necessary mounts, including /dev on tmpfs and creating a few device 
files (console, ttyS0, null, zero). The script starts an interactive 
session and I could try to run vdevd by hand:


/ # vdevd /dev
00487:268746168: [          vdev.c:0425] vdev_init: ERROR: 
vdev_config_load('(null)') rc = -14
00487:268746168: [          main.c:0042] main: ERROR: vdev_init rc = -14
/ #


     AFIU, I am only missing a config file... :-)


     Didier