Tim Kientzle | 1 Dec 2008 01:22
Picon
Favicon

Re: How to build kernel module spread on subdirectories?

Nikola Knežević wrote:
> As I described in my initial mail, I have to use two makefiles. One is  
> the main Makefile, while the other has to be generated. In the  
> generated .mk, I add to the SRCS, and I create the .PATH target with  
> other (necessary) directories. Unfortunately, make depend doesn't work  
> as it should be.

> .MAKEFILEDEPS: elements.mk
> 
> .sinclude "elements.mk"
> .include <bsd.kmod.mk>
> --->8---
> 
> When I run make depend, it only includes SRCSs from BSDmakefile, not  
> those from elements.mk.

I would try adding a "beforedepend" requirement:

beforedepend: elements.mk

Look at /usr/share/mk/bsd.dep.mk, which has the 'make depend'
logic.  It supports optional "beforedepend" and "afterdepend"
targets.

Tim
_______________________________________________
freebsd-hackers <at> freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe <at> freebsd.org"

(Continue reading)

Alexej Sokolov | 1 Dec 2008 02:38

remapping kernel buffer in VMS of user process

Hello, 

I would like to remap some buffers allocated in kernel space to memory
space of certain process. 

For Example, in attach function of driver: 

static int
driver_attach {
	...
	struct vmspace *vms = some_thread->td_proc->p_vmspace;
	bufp = malloc (PAGE_SIZE, M_DEVBUF, M_NOWAIT);

	/* 	How to create in vms of some_thread->td_proc remapping of buffer 
		pointed  (in kernel) by bufp ? 
		some_thread should access the buffer using its virtual user 
		addresses  and driver should access the same data using its kernel 
		virtual addresses (bufp) 
	*/

	...

}
--

-- 
Alexej Sokolov <bsd.quest <at> googlemail.com>
_______________________________________________
freebsd-hackers <at> freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe <at> freebsd.org"

(Continue reading)

Eitan Adler | 1 Dec 2008 03:22
Picon

Re: keeping track of local modifications


Tim Kientzle wrote:
> Eitan Adler wrote:
 > There are thousands of such; could you narrow it down
> a little bit?  Are you interested in kernel hacking?
> Device support?  Core libraries?  Networking?  Utilities?
> Porting?
Utilities mostly for now.
> 
> * Search the source code for "TODO" or "XXX" to find
>   comments about things that could use cleaning or
>   improvement.  As a bonus, these usually comment things
>   that someone thinks should be done, so you might have
>   a little easier job selling your solution.
*slaps self for not thinking of this*
Thanks for reminding me of this.  I'm now working on
 * TODO: Make this better, so that "./a//b/./c/" == "a/b/c"
part of src/usr.bin/tar/util.c
I found a copy of abspath() in usr.sbin/pkg_install/info/perform.c
This is the exact function needed to fix the TODO.

Where should I move the function to so that they could share it?  Should
 I just copy the function (for some reason I doubt it)?
realpath(3) is in sys/param.h and stdlib.h
Should I move the function there?

> * Search the web for "FreeBSD GSoC" or "FreeBSD Summer of Code"
>   to find ideas that are intended to be 3-month projects
>   targeted at student-level developers.
<snip>
(Continue reading)

Gonzalo Nemmi | 1 Dec 2008 03:38
Picon

Re: keeping track of local modifications

On Sunday 30 November 2008 5:26:07 pm Tim Kientzle wrote:
> Eitan Adler wrote:
> > As an aside can anyone point me to a relatively easy bug/feature that I
> > can work on as a beginner C coder?
>
> There are thousands of such; could you narrow it down
> a little bit?  Are you interested in kernel hacking?
> Device support?  Core libraries?  Networking?  Utilities?
> Porting?
>
> There are a couple of idea pages floating around and
> many discussions in public mailing lists, blogs, and other
> places:
>
> * Search the source code for "TODO" or "XXX" to find
>    comments about things that could use cleaning or
>    improvement.  As a bonus, these usually comment things
>    that someone thinks should be done, so you might have
>    a little easier job selling your solution.
>
> * Search the web for "FreeBSD GSoC" or "FreeBSD Summer of Code"
>    to find ideas that are intended to be 3-month projects
>    targeted at student-level developers.  You'll find links
>    both to past projects (a fair number of which are still
>    not yet entirely completed; maybe you could help?) and
>    web pages and mailing list discussions about possible
>    future projects.
>
> * Search the web for "Junior Kernel Hacker" for other
>    ideas that people have come up with over the years.
(Continue reading)

Steve Watt | 1 Dec 2008 05:20

tcsh loses the foreground process group?

(Please don't cc: me on replies, I can usually keep up with -hackers.)

I've run into this about 5 or 6 times recently, and it seems to have
survived the last couple of world updates.

I'm running 6-STABLE (6.4-PRE as of 24 Nov right now), tcsh 6.15.00, which
shows

  tcsh 6.15.00 (Astron) 2007-03-03 (i386-intel-FreeBSD) options wide,nls,dl,al,kan,sm,rh,color,filec

as $version.

The symptom is that when I do a long-ish running task inside a `` expansion
that I then ^C, nobody gets the foreground process group...  I never get
a prompt back after the ^C, and ^T gets me

  load: 0.27 no foreground process group

Sending SIGCHLD and/or SIGCONT to the tcsh doesn't seem to make any
difference at all.

The tcsh is sitting in "pause" WCHAN, which seems sensible.  A truss
on tcsh reveals (oddly enough) that it's sitting in sigsuspend().
Sending it signals makes it loop through a wait4() call and go back into
sigsuspend().

It happens running either as root (from sudo) or as a regular user.  It
happens under xterm, under ssh sessions, and on a direct console login.

One portable reproduction:
(Continue reading)

Tim Kientzle | 1 Dec 2008 07:19
Picon
Favicon

Re: keeping track of local modifications

>>* Search the source code for "TODO" or "XXX" to find
>>  comments ...
> 
> *slaps self for not thinking of this*
> Thanks for reminding me of this.  I'm now working on
>  * TODO: Make this better, so that "./a//b/./c/" == "a/b/c"
> part of src/usr.bin/tar/util.c
> I found a copy of abspath() in usr.sbin/pkg_install/info/perform.c
> This is the exact function needed to fix the TODO.
> 
> Where should I move the function to so that they could share it?  Should
>  I just copy the function (for some reason I doubt it)?
> realpath(3) is in sys/param.h and stdlib.h
> Should I move the function there?

Ah.  You picked one of mine.  <evil grin>

I'll follow up with you off-list.  ;-)

Tim
_______________________________________________
freebsd-hackers <at> freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe <at> freebsd.org"

perryh | 1 Dec 2008 07:07

Re: keeping track of local modifications

Tim Kientzle <kientzle <at> freebsd.org> wrote:

> ... most of us are volunteers who enjoy using and working on
> FreeBSD in our (often quite limited) spare time ...  If I only
> have a couple of hours a week, I'd usually rather spend it coding
> ...

Sounds familiar :)

Getting back to the OP's original question, and in light of the
limited time that many of us have available, I was wondering which of
the readily-available VCS would impose the least overhead on someone
who has very little experience with any open source VCS (and thus is
going to have to learn *something* new).  After looking at the pages
recommended by others in this thread, I wonder if there are other
possibilities which one should consider.

* http://wiki.freebsd.org/SubversionPrimer

  I got the impression that SVN is quite resource-hungry, both in
  disk space and in bandwidth, and has an extremely steep learning
  curve.  While a committer clearly has to deal with SVN, I was left
  wondering if it really had much to offer the more casual hacker,
  esp. one who is not already familiar with it.  In particular, given
  that one will likely have already installed /usr/src/... from the
  distribution, I was put off by the apparent need to download
  another entire instance.

* http://wiki.freebsd.org/LocalMercurial

(Continue reading)

Tim Kientzle | 1 Dec 2008 08:07
Picon
Favicon

Re: keeping track of local modifications

perryh <at> pluto.rain.com wrote:
> Tim Kientzle <kientzle <at> freebsd.org> wrote:
> 
>>... most of us are volunteers who enjoy using and working on
>>FreeBSD in our (often quite limited) spare time ...  If I only
>>have a couple of hours a week, I'd usually rather spend it coding
>>...
> 
> Sounds familiar :)
> 
> Getting back to the OP's original question, and in light of the
> limited time that many of us have available, I was wondering which of
> the readily-available VCS would impose the least overhead on someone
> who has very little experience with any open source VCS (and thus is
> going to have to learn *something* new).

No matter what, I would plan on devoting at least
a long weekend to learning a new VCS and getting
a local mirror set up.  In terms of learning new
skills, I don't think you'll go far wrong with any
of SVN, Hg, or git.

For my part, I actually like SVN quite a lot.  In
part because it's close enough to CVS (which is in
turn close to RCS) for folks familiar with that model to
transition pretty easily.

I've never used Mercurial or Git, so can't say
anything for sure about those.  It sounds like
it's a little trickier to set up a local SVN mirror
(Continue reading)

Max Laier | 1 Dec 2008 08:30

Re: keeping track of local modifications

On Monday 01 December 2008 07:07:00 perryh <at> pluto.rain.com wrote:
> Tim Kientzle <kientzle <at> freebsd.org> wrote:
> > ... most of us are volunteers who enjoy using and working on
> > FreeBSD in our (often quite limited) spare time ...  If I only
> > have a couple of hours a week, I'd usually rather spend it coding
> > ...
>
> Sounds familiar :)
>
> Getting back to the OP's original question, and in light of the
> limited time that many of us have available, I was wondering which of
> the readily-available VCS would impose the least overhead on someone
> who has very little experience with any open source VCS (and thus is
> going to have to learn *something* new).  After looking at the pages
> recommended by others in this thread, I wonder if there are other
> possibilities which one should consider.
>
> * http://wiki.freebsd.org/SubversionPrimer
>
>   I got the impression that SVN is quite resource-hungry, both in
>   disk space and in bandwidth, and has an extremely steep learning
>   curve.  While a committer clearly has to deal with SVN, I was left
>   wondering if it really had much to offer the more casual hacker,
>   esp. one who is not already familiar with it.  In particular, given
>   that one will likely have already installed /usr/src/... from the
>   distribution, I was put off by the apparent need to download
>   another entire instance.
>
> * http://wiki.freebsd.org/LocalMercurial
>
(Continue reading)

Won De Erick | 1 Dec 2008 09:00
Picon
Favicon

Watchdog for Boser (HS-7001)

Hello,

I was trying the assembly language program that is specified in the following document (p24) to set, reset
the built-in watchdog timer for the Boser Box.

http://www.boser.com.tw/manual/HS-7001v1.1.pdf

I then installed nasm in FreeBSD 6.2, and added the following lines at the beginning.

section .text
  global _start

  _start:

I did assemble, link (ld) and got no error. But when I run, I got the following error:

# ./watchdog.out
Bus error (core dumped)

I noticed that the port addresses used are similar with the following used by Super Micro Computer. I don't
know if these are standards or not. I suspect that the boards are using same controller chips from Intel.
I've been googling the web for more documentations on these but I could hardly find one.

http://www.stinkfoot.org/wdt.txt

How should I make this program works?

Thanks,

Won
(Continue reading)


Gmane