Re: Help with some makefile hackery

2010-06-26 Thread perryh
Patrick Mahan  wrote:

> Maybe I should do this instead?
>
> src-kernel: src-kernel-tools
>   cd src; ./amd64-kernel.sh 2>&1 > build_amd64_kernel.log; \
>   tail -f build_amd64_kernel.log
>
> It is not too clear if the status is the last one in a compound
> command.

Someone already noted that this will not run tail until after the
build finishes; then you'll see the last 10 lines of the log and
make will stop until something (like kill) causes tail to exit.
Another problem arises from the order of the redirections:  only
the script's normal output will go to the logfile; errors will go
to make's standard output.

This should do more or less what I think you're trying for:

src-kernel: src-kernel-tools
touch src/build_amd64_kernel.log
tail -f src/build_amd64_kernel.log &
cd src; ./amd64-kernel.sh > build_amd64_kernel.log 2>&1

IOW start tail in the background, after ensuring that the logfile
exists so tail doesn't immediately exit with an error.  Note that
this does not solve the problem of somehow getting rid of the tail
process after the build finishes.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: using cupsd instead of base lpr [was Re: [HEADS UP] Kernel modules don't work properly in FreeBSD 8.1-RC1 (solved)]

2010-06-26 Thread perryh
Gary Jennejohn  wrote:

> IMO if you're going to make the binaries in base non-executable
> you might just as well delete them.

The chmod is reversible without having to recover the base binaries
from somewhere.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: PCI Express and drivers

2010-06-26 Thread Christopher Bowman
On Fri, Jun 25, 2010 at 8:18 PM, Daniel O'Connor wrote:

>
> On 26/06/2010, at 3:01, Christopher Bowman wrote:
> > I have a Xilinx PCI Express board that has an on board PCIe interface
> > macro.  I intend to have an address space with memory and another with my
> > devices control registers.  I wish to program this board under FreeBSD.
>  It
> > would seem to me that the way to do this would be to write a driver that
> > would allow me to map these two address spaces into a user process which
> > could then directly interact with the device.  In my case my board
> doesn't
> > really support multiple users, and it doesn't really seem to make sense
> to
> > me to put a lot of code in the kernel to create some sort of interface to
> > allow multiple processes to interact with my device via some sort of
> syscall
> > which would impose a lot of overhead in any case.  By mapping the address
> > ranges into a user process I can write user programs to drive the board
> > without having to recompile and reboot the kernel each time I make a
> change,
> > plus if I do something stupid and crash my user space process it
> shouldn't
> > bring down the whole kernel.  Am I thinking about this wrong?  Is there
> some
> > place I can go to read up on what I should be doing?  If I am thinking
> about
> > this correctly, then how does one map device memory into a user space
> > process?  How does one make sure that only one process has such a
> mapping?
>
> You could use mmap() I think,
>
> For a driver I maintain I did the following ->
>  /* Magic sauce stolen from src/sys/pci/xrpu.c via phk
>  * http://www.mail-archive.com/freebsd-hackers%40freebsd.org/msg11729.html
>  */
>  *paddr = rman_get_start(sc->g_membase.reshandle) + offset;
>
> g_membase is..
>struct resource *reshandle; /* Resource handle */
>bus_space_tag_t sc_st;  /* bus space tag */
>bus_space_handle_t  sc_sh;  /* bus space handle */
>
> PS what board are you using? :)
>
>
Daniel,
Cool, that looks like what I am looking for.  I'll go and read up on it,
thanks very much.  I am using the Xilinx SP605
http://www.xilinx.com/products/devkits/EK-S6-SP605-G.htm
perfect for playing with hardware for a frame buffer device or graphics
device.  It comes with a full license for the synthesis and PCIe IP for the
device on that board which is a great deal.
Christopher

--
> Daniel O'Connor software and network engineer
> for Genesis Software - http://www.gsoft.com.au
> "The nice thing about standards is that there
> are so many of them to choose from."
>  -- Andrew Tanenbaum
> GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C
>
>
>
>
>
>
>
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: PCI Express and drivers

2010-06-26 Thread Daniel O'Connor

On 26/06/2010, at 14:50, Christopher Bowman wrote:
>> PS what board are you using? :)
>> 
> Cool, that looks like what I am looking for.  I'll go and read up on it, 
> thanks very much.  I am using the Xilinx SP605 
> http://www.xilinx.com/products/devkits/EK-S6-SP605-G.htm
> perfect for playing with hardware for a frame buffer device or graphics 
> device.  It comes with a full license for the synthesis and PCIe IP for the 
> device on that board which is a great deal.

Ahh, it does look like a fun toy :)

--
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
  -- Andrew Tanenbaum
GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C






___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: amd64 kernel modules: mapping sections to addresses

2010-06-26 Thread Rui Paulo
On 25 Jun 2010, at 10:28, Andriy Gapon wrote:

> 
> Here's a patch that is supposed to do the right thing for dtrace.
> Perhaps I should have put the new code under __amd64__, but I decided to go 
> more
> "generic" and check for module's ELF type (ET_REL).
> 
> Reviews and testing are welcome!

I believe this is good to go.

Regards,
--
Rui Paulo


___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


[PATCH] Build error with buildworld and -j1 on a memory backed /usr/obj

2010-06-26 Thread Garrett Cooper
The build for r209530 failed with a clean workspace and a clean
/usr/obj/scratch. I was building with a memory-disk backed /usr/obj.
Here's the error:

===> usr.bin/ar (depend)
lex -t  /scratch/freebsd/current/usr.bin/ar/acplex.l > acplex.c
yacc -d /scratch/freebsd/current/usr.bin/ar/acpyacc.y
cp y.tab.c acpyacc.c
rm -f .depend
mkdep -f .depend -a-I. -I/scratch/freebsd/current/usr.bin/ar
/scratch/freebsd/current/usr.bin/ar/ar.c acplex.c acpyacc.c
/scratch/freebsd/current/usr.bin/ar/read.c
/scratch/freebsd/current/usr.bin/ar/util.c
/scratch/freebsd/current/usr.bin/ar/write.c
/scratch/freebsd/current/usr.bin/ar/ar.c:66:21: error: archive.h: No
such file or directory
/scratch/freebsd/current/usr.bin/ar/acpyacc.y:35:21: error: archive.h:
No such file or directory
/scratch/freebsd/current/usr.bin/ar/acpyacc.y:36:27: error:
archive_entry.h: No such file or directory
/scratch/freebsd/current/usr.bin/ar/read.c:33:21: error: archive.h: No
such file or directory
/scratch/freebsd/current/usr.bin/ar/read.c:34:27: error:
archive_entry.h: No such file or directory
/scratch/freebsd/current/usr.bin/ar/write.c:34:21: error: archive.h:
No such file or directory
/scratch/freebsd/current/usr.bin/ar/write.c:35:27: error:
archive_entry.h: No such file or directory
mkdep: compile failed
*** Error code 1

Stop in /scratch/freebsd/current/usr.bin/ar.
*** Error code 1

Stop in /scratch/freebsd/current/usr.bin.
*** Error code 1

Stop in /scratch/freebsd/current.
*** Error code 1

Stop in /scratch/freebsd/current.
*** Error code 1

Stop in /scratch/freebsd/current.

I think this is due to dependency issues with libarchive. I had
some changes in my p4 workspace to address the libarchive dependency
for libpkg (for work that's incoming in the next couple of months)
that Warner helped me out with, and once I applied the change things
worked. The patch is attached.

Thanks,
-Garrett

PS This might also resolve some other outstanding issues related to
build dependencies with libarchive, like with the ia64 lzma issue that
DES and a few other folks have been munging over for a while now.


fix-libarchive-dependencies.diff
Description: Binary data
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"

Re: [PATCH] Build error with buildworld and -j1 on a memory backed /usr/obj

2010-06-26 Thread Garrett Cooper
On Sat, Jun 26, 2010 at 2:14 PM, Garrett Cooper  wrote:
>    The build for r209530 failed with a clean workspace and a clean
> /usr/obj/scratch. I was building with a memory-disk backed /usr/obj.
> Here's the error:
>
> ===> usr.bin/ar (depend)
> lex -t  /scratch/freebsd/current/usr.bin/ar/acplex.l > acplex.c
> yacc -d /scratch/freebsd/current/usr.bin/ar/acpyacc.y
> cp y.tab.c acpyacc.c
> rm -f .depend
> mkdep -f .depend -a    -I. -I/scratch/freebsd/current/usr.bin/ar
> /scratch/freebsd/current/usr.bin/ar/ar.c acplex.c acpyacc.c
> /scratch/freebsd/current/usr.bin/ar/read.c
> /scratch/freebsd/current/usr.bin/ar/util.c
> /scratch/freebsd/current/usr.bin/ar/write.c
> /scratch/freebsd/current/usr.bin/ar/ar.c:66:21: error: archive.h: No
> such file or directory
> /scratch/freebsd/current/usr.bin/ar/acpyacc.y:35:21: error: archive.h:
> No such file or directory
> /scratch/freebsd/current/usr.bin/ar/acpyacc.y:36:27: error:
> archive_entry.h: No such file or directory
> /scratch/freebsd/current/usr.bin/ar/read.c:33:21: error: archive.h: No
> such file or directory
> /scratch/freebsd/current/usr.bin/ar/read.c:34:27: error:
> archive_entry.h: No such file or directory
> /scratch/freebsd/current/usr.bin/ar/write.c:34:21: error: archive.h:
> No such file or directory
> /scratch/freebsd/current/usr.bin/ar/write.c:35:27: error:
> archive_entry.h: No such file or directory
> mkdep: compile failed
> *** Error code 1
>
> Stop in /scratch/freebsd/current/usr.bin/ar.
> *** Error code 1
>
> Stop in /scratch/freebsd/current/usr.bin.
> *** Error code 1
>
> Stop in /scratch/freebsd/current.
> *** Error code 1
>
> Stop in /scratch/freebsd/current.
> *** Error code 1
>
> Stop in /scratch/freebsd/current.
>
>    I think this is due to dependency issues with libarchive. I had
> some changes in my p4 workspace to address the libarchive dependency
> for libpkg (for work that's incoming in the next couple of months)
> that Warner helped me out with, and once I applied the change things
> worked. The patch is attached.
>
> Thanks,
> -Garrett
>
> PS This might also resolve some other outstanding issues related to
> build dependencies with libarchive, like with the ia64 lzma issue that
> DES and a few other folks have been munging over for a while now.

Sorry. The old patch contained some noise from other changes I was
testing out earlier. This cleans it up.
Thanks,
-Garrett


fix-libarchive-dependencies.diff
Description: Binary data
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"

Re: [PATCH] Build error with buildworld and -j1 on a memory backed /usr/obj

2010-06-26 Thread M. Warner Losh
In message: 
Garrett Cooper  writes:
: The build for r209530 failed with a clean workspace and a clean
: /usr/obj/scratch. I was building with a memory-disk backed /usr/obj.
: Here's the error:
: 
: ===> usr.bin/ar (depend)
: lex -t  /scratch/freebsd/current/usr.bin/ar/acplex.l > acplex.c
: yacc -d /scratch/freebsd/current/usr.bin/ar/acpyacc.y
: cp y.tab.c acpyacc.c
: rm -f .depend
: mkdep -f .depend -a-I. -I/scratch/freebsd/current/usr.bin/ar
: /scratch/freebsd/current/usr.bin/ar/ar.c acplex.c acpyacc.c
: /scratch/freebsd/current/usr.bin/ar/read.c
: /scratch/freebsd/current/usr.bin/ar/util.c
: /scratch/freebsd/current/usr.bin/ar/write.c
: /scratch/freebsd/current/usr.bin/ar/ar.c:66:21: error: archive.h: No
: such file or directory
: /scratch/freebsd/current/usr.bin/ar/acpyacc.y:35:21: error: archive.h:
: No such file or directory
: /scratch/freebsd/current/usr.bin/ar/acpyacc.y:36:27: error:
: archive_entry.h: No such file or directory
: /scratch/freebsd/current/usr.bin/ar/read.c:33:21: error: archive.h: No
: such file or directory
: /scratch/freebsd/current/usr.bin/ar/read.c:34:27: error:
: archive_entry.h: No such file or directory
: /scratch/freebsd/current/usr.bin/ar/write.c:34:21: error: archive.h:
: No such file or directory
: /scratch/freebsd/current/usr.bin/ar/write.c:35:27: error:
: archive_entry.h: No such file or directory
: mkdep: compile failed
: *** Error code 1
: 
: Stop in /scratch/freebsd/current/usr.bin/ar.
: *** Error code 1
: 
: Stop in /scratch/freebsd/current/usr.bin.
: *** Error code 1
: 
: Stop in /scratch/freebsd/current.
: *** Error code 1
: 
: Stop in /scratch/freebsd/current.
: *** Error code 1
: 
: Stop in /scratch/freebsd/current.
: 
: I think this is due to dependency issues with libarchive. I had
: some changes in my p4 workspace to address the libarchive dependency
: for libpkg (for work that's incoming in the next couple of months)
: that Warner helped me out with, and once I applied the change things
: worked. The patch is attached.

This patch is contaminated with other patches.

Warner
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"