Microblaze - latest source

Michal Simek monstr at monstr.eu
Wed Jul 30 14:33:42 UTC 2008


On Wed, Jul 30, 2008 at 02:46:04PM +0200, Michal Simek wrote:
> >Hi everybody,
> >
> >I have some question about Microblaze support in uClibc.
> >I look at Config.in and there is set BROKEN flags next to Microblaze
> label.
> >Can someone explain me what does it mean? What is broken?
>
> $ svn log -r12209 extra/Configs/Config.in
> ------------------------------------------------------------------------
> r12209 | vapier | 2005-11-11 04:06:13 +0100 (Fri, 11 Nov 2005) | 1 line
>
> mark all broken arches as such so people know not to expect too much
> ------------------------------------------------------------------------


Yes I found this commit but I want to be sure.

>
> Sounds like it's not actively maintained. Patches are welcome..

:-) OK

>
> >
> >Microblaze community use 0.9.27 version and I would like to upgrade to
> >latest version and fix all bugs which are in Microblaze part.
> >
> >and next question I have is about supporting *nat syscalls (openat,
> mknodat
> >and others). Do you have any plan to add it? I do some changes on ancient
> >0.9.27 version and I do some test with it. I think uClibc should support
> >them.
> >
> >And then I look at kernel source and compare it with libc declaration. I
> >think that parameters should be the same.
> >For example on mknod call. And others. Please correct me if I am wrong.
> >
> >static __inline__ _syscall3(int, __syscall_mknod, const char *, path,
> >        __kernel_mode_t, mode, __kernel_dev_t, dev);
> >
> >static __inline__ _syscall3(int, __syscall_mknod, const char *, path,
> >        __kernel_mode_t, mode, unsigned, dev);
>
> Please look at the current version of sysdeps/linux/common/mknod.c for
> details.
>

[monstr at seznam uClibc-svn]$ svn log -l 1
------------------------------------------------------------------------
r22977 | carmelo | 2008-07-29 11:40:59 +0200 (Tue, 29 Jul 2008) | 1 line

Remove .depend when doing distclean
------------------------------------------------------------------------

I hope I am on latest source code:
uClibc
static __inline__ _syscall3(int, __syscall_mknod, const char *, path,
        __kernel_mode_t, mode, __kernel_dev_t, dev);

linux-kernel
asmlinkage long sys_mknodat(int dfd, const char __user *filename, int mode,
                unsigned dev)

I think that this two syscalls don't match.

What is necessary to do for adding *nat function?
For example I wrote this part of code and add them to mknod.c for using
mknodat syscall instead of simple mknod but this function is not called. Is
it necessary to write reference to somewhere? (I found something in
sys/stat.h)


#ifdef __NR_mknodat
#define AT_FDCWD        -100    /* Special value used to indicate
                                           openat should use the current
                                           working directory. */
#define __NR___syscall_mknodat __NR_mknodat
static inline _syscall4(int, __syscall_mknodat, int, dfd, const char *,
path,
        __kernel_mode_t, mode, unsigned int, dev);

#ifdef __NR_mknod
#error Please undef __NR_mknod from unistd.h
#endif
#else
#define __NR___syscall_mknod __NR_mknod
static inline _syscall3(int, __syscall_mknod, const char *, path,
        __kernel_mode_t, mode, unsigned int, dev);
#endif

int mknod(const char *path, mode_t mode, dev_t dev)
{
    /* We must convert the dev_t value to a __kernel_dev_t */
    //__kernel_dev_t k_dev;
    unsigned int k_dev;

    k_dev = ((major(dev) & 0xff) << 8) | (minor(dev) & 0xff);
#ifdef __NR_mknodat
    return __syscall_mknodat(AT_FDCWD, path, mode, k_dev);
#else
    return __syscall_mknod(path, mode, k_dev);
#endif
}


Thanks,
Michal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.busybox.net/pipermail/uclibc/attachments/20080730/683c24e1/attachment-0002.htm 


More information about the uClibc mailing list