Re: Architectures with strict alignment?
On Sat, Dec 08, 2007 at 03:43:30AM +0100, Ivan Voras wrote: Which of the architectures FreeBSD supports (if any) have strict memory alignment requirements? (in the sense that accessing a 32-bit integer not aligned on a 32-bit address results in a hardware trap/exception). I do know that older PPCs (PowerPC603) have a requirement on aligning of floats. IIRC the e.g. Linux the kernel hooks an exception handler that makes it transparent for apps (at the cost of some performance), and NetBSD does not I never ran FreeBSD on PPC, so I wouldn't know that one. ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: hello world but not in 32bit x86 but in amd64 for amd64 platform
Could you inform me if there exist somewhere such a program cfr the 32bit hello world example in Chapter 11 x86 Assembly Language Programming FreeBSD Developers' Handbook The procedure should be the same no matter what architecture you are using. Just use AMD64 assembly... You can also generate an assembly hello-world program yourself: $ cat EOF test.c int main(void) { write(1, Hello world\n, 12); return 0; } EOF $ gcc -S test.c $ cat test.s This doesn't lead you to the minimal program, simply because it is still linked to gcc. It should be static, and with no standard libs. However afaik this is not possible with the current CSU. I patched the CSU of (iirc -CURRENT somewhere close before 5.2) for the FPC x86_64 port (which isn't fully completed for time reasons) I just changed that adapted CSU to a hello world program and retested it on our only freebsd/x86_64 machine (which runs 6.0, probably compat_5 installed) and it works. The program patched to hello world is at: http://www.stack.nl/~marcov/prt0.as which is adapted from http://www.freepascal.org/cgi-bin/viewcvs.cgi/trunk/rtl/freebsd/x86_64/prt0.as?view=markup to assemble the first program: as prt0.as -o prt0.o and link with ld prt0.o -o helloworld ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
ARG_MAX increase
I saw ARG_MAX was increased in 6.0. Recently I noticed that the lang/fpc-devel port currently hits the old limit in certain (though rare) cases), and this is annoying. (some testing revealed that half the increase of 6.0 to 131k params is also ok) Any chance ARG_MAX will be upped in -STABLE too? ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: USB developer please look at cdce driver -- (Was: Driver for Yopy PDA)
On Tue, Nov 23, 2004 at 11:09:59AM +0100, Marco van de Voort wrote: I'm also in need for a cdce device. I had the below URL running with 5.2 (and some currents from mid-summer), but it fails to compile with 5.3 http://www.gank.org/freebsd/cdce.tar.gz When did you pull down that tarball? I updated the driver at that location a few days ago to make it compile on 5.3 (though I haven't tested it with a real device yet). Thanks to Dave Smith for pointing out to me last week that it wasn't working. I tested it in RC1 times. Thanks for fixing! ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: USB developer please look at cdce driver -- (Was: Driver for Yopy PDA)
[ cdce device, amongst others for zaurus] not even a nibble from [EMAIL PROTECTED] thinking that hackers@ might be a more appropriate venue. i know that everything is hectic now with 5.3, so perhaps when the dust settles a bit... I'm also in need for a cdce device. I had the below URL running with 5.2 (and some currents from mid-summer), but it fails to compile with 5.3 http://www.gank.org/freebsd/cdce.tar.gz - Begin forwarded message: Date: Mon, 18 Oct 2004 16:14:49 -0400 From: epilogue [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: Raphael Langerhorst [EMAIL PROTECTED] Subject: USB developer please look at cdce driver -- (Was: Driver for Yopy PDA) hello again, i just noticed this driver turn up in the openbsd code. i'm suspecting that it might resolve pc-pda connectivity issues for some users. man: http://www.openbsd.org/cgi-bin/man.cgi?query=cdcesektion=4 cvsweb: http://www.openbsd.org/cgi-bin/cvsweb/src/sys/dev/usb/if_cdce.c http://www.openbsd.org/cgi-bin/cvsweb/src/sys/dev/usb/if_cdcereg.h would really appreciate it if a committer glanced at the code. (...and, if meritorious, eventually ported this piece over) hopefully, this will scratch someone's itch. in the meantime, knoppix it is.=] many thanks, epi -- On Wed, 18 Aug 2004 09:05:16 +0200 Raphael Langerhorst [EMAIL PROTECTED] wrote: Hi, I'm also still very interested in this driver, so far I haven't received any response. I hope someone takes care that it is included in FreeBSD 5. Raphael PS: I'm not registered to the freebsd-questions list, please cc me on reply. On Wednesday 18 August 2004 04:04, you wrote: hello all, i recently received a yopy 3500 pda (yopy.com and yopydeveloper.org) and have been trying very much in vain to get it to speak 'ethernet over usb' with my fbsd 4.10 install. the only promising *bsd related threads i have been able to locate were: http://lists.freebsd.org/mailman/htdig/freebsd-hardware/2004-June/001703.ht ml http://lists.freebsd.org/mailman/htdig/freebsd-hardware/2003-August/000429. html i am hoping to learn whether: a) the 5.x driver mentioned in these messages is on its way into the source tree (i did not come across any if_saue entries in cvsweb.cgi/src/sys/dev/usb) ? b) i can help test a version designed for 4.x ? my yopy awaits your command =] hopefully someone will get back to me regarding these questions. in the meantime, linux already has driver support for the yopy, so i'm going to give knoppix a try. thanks for reading, epi p.s. comms/birda appears to be another option for connecting to the machine, but i haven't yet made any headway with that tool set. -- G System, the evolving universe - http://www.g-system.at ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
x86-64 syscall ABI conventions
To start with the FPC port for x86-64, I've objdumped an empty C prg on an x86-64, and read the abi document on x86-64.org, but don't understand the move rcx,r10 before each syscall. Why is this done? What is exactly saved? If it is a save, where is it restored from r10? E.g. 00402094 __sys_sigaction: 402094: 48 c7 c0 a0 01 00 00mov$0x1a0,%rax 40209b: 49 89 camov%rcx,%r10- This one 40209e: 0f 05 syscall 4020a0: 72 01 jb 4020a3 __sys_sigaction+0xf 4020a2: c3 retq I did notice that the x86-64 linux abi mentions rcx as being destroyed by the kernel. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Discussion on the future of floppies in 5.x and 6.x
I also don't think it's the issue that needs to be dealt with - distribution is much, much, MUCH bigger an issue than shall we get rid of floppies? I sent this to the list before, but it got ignored, so I'll send it again, where Jordan points out we have bigger issues to deal with when discussing the floppy disk problem whilst discussing libh:- (http://rtp1.slowblink.com/~libh/sysinstall2/improvements.html): As I mentioned in Section 2.3, one of the more annoying problems with FreeBSD's current distribution format is the dividing line between distributions and packages. There should really only be one type of distribution format and, of course, it should be the package (There Can Be Only One). Achieving this means we're first going to have to grapple with several problems, however: First, eliminating the distribution format means either teaching the package tools how to deal with a split archive format (they currently do not) or divorcing ourselves forever from floppies as a distribution medium. This is an issue which would seem an easy one to decide but invariably becomes Highly Religious(tm) every time it's brought up. In some dark corner of the world, there always seems to be somebody still installing FreeBSD via floppies and even some of the fortune 500 folks can cite FreeBSD success stories where they resurrected some old 386 box (with only a floppy drive and no networking/CD/...) and turned it into the star of the office/saved the company/etc etc. That's not to say we can't still bite that particular bullet, just that it's not a decision which will go down easily with everyone and should be well thought-out. And I have to say, I agree. If abondoning floppies is part of some well-thought-out and well-planned package management strategy, I'm all for it. Otherwise, let sleeping dogs lie? It isn't as far as I can understand from that link. JKH is talking about doing floppy only install (some old 386 box (with only a floppy drive and no networking/CD/...) and turned it into the star of the office/saved the company/etc etc...) not loading an installation kernel and /stand from floppy and then transfer to network/cd later. This because when then base/packages need to fit on floppy. This isn't necessary for the current two-flop, then CD install which is discussed now. P.s. for the record, I prefer Slackware's approach to floppy booting. Multiple cut down bootsets (SCSI, NET etc) with the ability to simply extract extra kernel modules from CD to a floppy (on a separate machine) and load them from floppy while still in the initial system ramdisk (before mounting CD). The loading/mounting etc must be done by hand, no extra new functionality required. Maybe the basic idea should be to forget the equivalence of floppy and cd boot, and deliver a set of kernel modules on CD, and a few basic boot/root floppies, and for the rest let users create their own custom driver discs, and do some extra work to keep their floppy boot running. That ends the one boot/root for all idea, but is maybe more flexible, ( didn't have to make something with custom kernel to install my Proliant 1500, but only select the right kernel disc and copy some extra kernel moduless to an empty flop) and at the same time decrease release engineering on the floppies. I think this is a good compromise: Keep floppy option open, but shift some burden to the users. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
ABI Compliance FreeBSD syscalls
Are FreeBSD syscalls (on x86) x86 ABI compliant? IOW do they save the required registers (IIRC ebx,esi,edi) ? I tried to derive it from the sources, but my gcc pragmaese is not on a high enough level for that. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Kylix in FreeBSD
Hmm, and to the list :) Rod Person + Terry Lamber wrote: On Thursday 06 November 2003 09:09 am, It was written: If you futs with getting Kylix to run under FreeBSD, don't forget the special glibc requirements that some versions of Kylix have. Maybe you should probably simply replace the entire /compat userland with the userland of a distro that Kylix supprorts _with_ kylix extra patches installed? RP: Have you tried this? No, I only needed the commandline compiler at the time. It is also only a suggestion for something to look into. I don't have Kylix anymore (it was my employers) Since Kylix came out I have tried to get it to run on FreeBSD and various Linux distros. A few days ago I got kylix to run on SuSE 8.2 (from the kylix newsgroups this seems to be the best distro for it). NetBSDs Linux emulation is based on SuSE, isn't it? But, I found no postings related to Kylix on NetBSD. My next wondering is would NetBSD Linux emu run under FreeBSD and would this run kylix? No idea. Since all new developement in Kylix is apparently officially stalled, now would be a good time to do the porting work, since it's no longer a moving target... Not me, IMHO the fpc (+lazarus) port is more important atm. It generates much simpler apps, but it is native on every 4.x and 5.x with gtk12, and connects to the free dbs without much fuzz :-) Moreover it is not dead. Kylix is dead. Probably both because Borland got in bed with Microsoft because of .NET, and because it was no commercial success. Kylix is a bastard child compared to Delphi, but not _that_ bad, and being the only similar tool in the market should have made up for that. Productivity is apparantly not appreciated under Linux yet, or the demand for small/medium custom client-server apps on linux is still too low. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Kylix in FreeBSD
* jasaorp [EMAIL PROTECTED] [031031 04:59]: Somebody uses Kylix in FreeBSD? What is the performance? The IDE doesn't run under FreeBSD. I worked on it a bit over this summer when the most recent Kylix came out, and it appears to rely on too many Linux-isms. The command-line tools work just fine, and produce binaries that are on par with the ones you get from Linux. If I remember from my testing, the compiler produces Linux-style ELF binaries. Getting the Kylix IDE to function on FreeBSD has been one of the ongoing hair-pulling tasks I undertake every few months. The installer alone is a pain in the ass, since it performs compatibility checks in such Linux-centric ways as hard-coding /bin/bash into the shell scripts, and searching for shared libraries by name from hard-coded paths. (GTK especially gives the installer fits because FreeBSD's gtk library has a -x11 at the end of the name.) But once you work around those issues with some creative symlinking and script editing, the console tools install fairly painlessly. For some projects, using lang/fpc (get a newer version from the website, the 1.9beta supports nearly the entire D6 language set) and lazarus (lazarus.freepascal.org) as RAD might be of some use. It is native and open source. See also the next more elaborate message. Your mileage may vary depending on your skills and requirements, but it is definitely worth a look. If you futs with getting Kylix to run under FreeBSD, don't forget the special glibc requirements that some versions of Kylix have. Maybe you should probably simply replace the entire /compat userland with the userland of a distro that Kylix supprorts _with_ kylix extra patches installed? ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Kylix in FreeBSD
I do not know about the C++ part of Kylix, but about the Delphi part, maybe it could be replaced with FreePascal (http://www.freepascal.org/). There are even some projects that try to produce an IDE similar to Delphi (http://www.freepascal.org/links.html). Has anyone gived a try to FreePascal? I maintain it, the FPC on *BSD ports I mean. (but I'm not the FreeBSD ports tree entry maintainer). I just uploaded the first public beta from the future 2.0.x branch to the FTP FPC site last night. Bindings for several database types included. The GUI RAD project (Lazarus.freepascal.org) is gtk1.2 based and works with FreeBSD, however the conversion of lazarus to the future 2.0.x branch was only done a few days ago, so it might be wise to wait a month till the next version, or obtain a snapshot when lazarus is stabilized. (there is some minor problem in the pipe handling that connects the RAD to the compiler and debugger, which was fixed in the old branch, but not yet in the new one,) The new branch supports near the entire Delphi language set in principle (and is threadsafe), the one major exception I know of are dispinterfaces. Installation of the commandline compiler is very easy. Download the .tar, run sh install.sh, and answer yes on everything. (which will install most into /usr/local/lib/fpc, throw a few bins in /usr/local/bin, and some manpages and docs where it hopefully should be). Compiling and installing the RAD is somewhat more involved, but that is mainly because it is a moving target. Should be doable for a freebsd-hacker ( :-) ) People interested in FPC on *BSD can always contact me. P.s.1 German speakers: an article about installing lazarus + working (1.0.x) snapshots was published in the most recent FreeX (the one from oct 1th) http://www.cul.de/freex.html P.s.2 Matthew West added a compat_4 flag to the lang/fpc port. I would like to know what the reason for this is. (iow what do I have to change to make it FreeBSD native?) P.s.3 The new branch is multi architecture, though due to the preparing and debugging of the 1.9beta, all non-x86 archs (ARM,PPC,Sparc V8) are broken. However I did run Delphi code on NetBSD/macppc before it broke! ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Assembly Syscall Question
When making a system call to the kernel why is it necessary to push the syscall value onto the stack when you don't call another function? You have to push anything the size of an address. Because the call return pushes the return adress on the stack. The 1st and 3rd both push 4 bytes, so they work. _why_ this is needed is probably because the routine that does the int 80h can also check and process the int 80h returnvalue and errorcode, and people wanted to avoid duplication of that code, at least that is my guess :-) ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
ld: memory exhausted
I'm trying to link a lang/fpc program, and ld bombs out with ld: Memory exhausted when it reaches my physical memory limit. Worse, it bombed when only one third of the .a's were loaded. I tried to link with the most optimal deadcode elimination, by simply creating a smartlinkable compilation unit per symbol and it seems that ld needs about 100-120x the binary size in memory, which is a bit steep. (so binary =1 MB, ld uses about 100-150 MB) The binary I'm trying to generate is about 8 MB. (lazarus.freepascal.org, a port recently requested on -ports that I'm looking into) Does some binutils wizard know how to put a break on this behaviour, (e.g. by custom building binutils, it's no problem if that slows down ld) ? ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Error in keyboard(4) manpage, off by one
The keyboard(4) manpage is a bit vague about the numbering convention for thefunction keys (that generate multi byte escape) SETFKEY ioctl and in the keymap structure. The problem is that the C-level routines (SETFKEY, GETFKEY macro's, indices in the KEYMAP structure) are 0 based. (first function key is 0, last is 95), while the kbdcontrol unit numbers them 1..96. The manpage seems to imply that the numbering is 1..96 for both the C programming interface as the kbdcontrol utility. kbdcontrol seems to deal with this ok. To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Opinion asked: unicode encoding
Hi. The fpc core team is currently working on unicode support for Free Pascal, a pascal compiler that runs on FreeBSD/i386, and I would like to ask your opinion about what encoding to choose for the default multibyte string type. (Delphi's WideString), choices are UTF- 8 , -16 or UCS4. Not only because you might have an opinion on what is going to be the dominant encoding over time on FreeBSD (and *nix in general), but also because our core members are mainly in countries which are covered by cp850, and therefore have relatively little experience with multibyte characters and their pitfalls. Actually all three encodings and conversions will be implemented, but only one will get full support (with all string operations available), for the other two encodings, the compiler will insert automatic conversions for the routines not overloaded for the less important encodings. Any opinions? To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
good book or other source about socket programming
I'm searching for a good book (or site/tutorial) about Unix socket programming, preferably FreeBSD specific. Any hints? Marco van de Voort ([EMAIL PROTECTED] or [EMAIL PROTECTED]) To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: FreeBSD Linux emulation / arla 0.34.6
I have discovered a rather interesting bug with this combination, and was wondering if anyone could point me in the right direction to help me track it down. The problem is that linux binaries which call getdirents on an afs directory do not report the last directory entry: Hmm. Could it be getdirentries itself, or some oddity that is not documented, but worked around in libc? I also have some getdirentries (FreeBSD version, patched together I directly admit) based code that sometimes doesn't seem to be able to find certain directories. Marco van de Voort ([EMAIL PROTECTED] or [EMAIL PROTECTED]) To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
direct ports access from userland.
As mentioned often before ( :-) ) I'm porting a compiler. Currently, I'm working on the last bits, and one of the things left is the possibility to do port-access as root from userland under Linux. Does FreeBSD have any possibility to this? Marco van de Voort ([EMAIL PROTECTED] or [EMAIL PROTECTED]) To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
console.h mouse.h
If you know little (or even larger ones) programs that could demonstrate console.h (consio,kbio,fbio) and/or mouse.h could you mail/reply here? I already found aumix. (I'm writing a small article. I found out a lot myself and via the manpages, but some things don't work (and a working duplicate would help to track the problem in the translated headers), and for some functions I haven't been able to find much. Thanks in advance! To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: FreeBSD vs Linux, Solaris, and NT
Mr Kamps comments are also "Well documented". I would think that EVERYONE on this list would be offended by his insinuation that anyone that uses FreeBSD and doesnt contribute source to FreeBSD is stealing. Where is that outcry on that ridiculous idea? If you are offended by people using your code then you should get out of the free source business. (haha, " business ", now thats a metaphor!) Not really, it is *open* source. Not free source :-) Free software, (to use), but not free source. There are other ways to contribute than to contribute source. Sure. You can work on docs, website, packaging etc. How many advertising dollars has Mr Kamp spent promoting the use of FreeBSD? Afaik, anybody can spend any amount of advertising dollars he wants. Thousands of users use FreeBSD enhanced with our "contributions". We spend tens of thousands of dollars advertising them, indirectly advertising FreeBSD in the process. Sure. And without FreeBSD, your "contributions" are worthless, so you already got your share. People buy products because they think that they are worth the price. The fact that so many people are willing to pay for the enhancements we provide is prima facia evidence of our contribution. Sure, but at the moment it enters the system, we are supposed to support, test and let it evoluate with the system. How to do that without source? Im sorry so few of you understand. You are being much to simplistic. It is easy to put it in the ports-tree, but after that the QA (which you think so high of) of FreeBSD as whole decreases. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: FreeBSD vs Linux, Solaris, and NT
Afaik, anybody can spend any amount of advertising dollars he wants. Again, you miss the point. Spending dollars advertising is arguably a more valuable contribution than altering a few line of code or submitting a driver for some obscure card. Well, I don't think so. Good quality and many drivers are very important for an OS. (think about e.g. win95 vs NT) Where money is, there are 3rd party vendors. Wave a networking budget, and ten jump in your neck. Thousands of users use FreeBSD enhanced with our "contributions". We spend tens of thousands of dollars advertising them, indirectly advertising FreeBSD in the process. Sure. And without FreeBSD, your "contributions" are worthless, so you already got your share. That makes no sense. How can you "contribute" to something that doesnt exist? You mean it is a Schrodingers cat problem? :-) It is a simple dependancy thought experiment: A depends on B. There is only 50% chance that B exists, and you can't determine if B exists exactly. What is the status of A ... The existence of FreeBSD is a necessary condition to make a contribution to it. Yes, but without it existance this would be academical. People buy products because they think that they are worth the price. The fact that so many people are willing to pay for the enhancements we provide is prima facia evidence of our contribution. Sure, but at the moment it enters the system, we are supposed to support, test and let it evoluate with the system. How to do that without source? Wrong again. WE support it. Then YOU distribute it. Windows has the driver for the intel ethernet card on their CD, but they dont support it. At least TRY to grasp some concepts here, you might learn something. That is why you have to click sixteen licenses to install something. Not worth the hassle IMHO. Im trying to give analogies that even you can understand, but its very difficult :-) Stop being so childish. Yes, you can do it perfect, but than you have a reviewing board that does QA for packages, and allow some to be distributed and some not. FreeBSD can't afford that, and it would be undemocratic, unclear anyway So that is why the policy is no binary distribution parts, probably. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
RE: FreeBSD vs. Linux, Solaris, and NT
I ran into people at NASA who use Python because (beside being a good language) it isn't GPL. Pure paranoia. You don't have to share the code that is written IN Python. Only modifications TO python (if it were GPL) For legal and security reason they cannot share changes to code they make, so anything GPL is unusable. So are programs that run on Linux required to be open source? I need to know. You may only shared link to GPL'ed packages, and the rest is up to you. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: FreeBSD vs Linux, Solaris, and NT
[Charset iso-8859-1 unsupported, filtering to ASCII...] Trouble is there is no consistency in the rulings. United States Code Title 17 Chapter 12 Section 1201 Subsection (f) My basic interpretation of this is, if you legally own a copy of the software (firmware is software), you can legally reverse engineer the software for the purpose of achiving interoperability. Therefore, if you own a piece of hardware, and you have no driver for the hardware, or the driver provided is not acceptable, you have the right to reverse engineer the firmware in order to write your own driver, thereby achiving interoperability. Exactly the same in Europe, only the sharing parts are new for me. The difference seems to be: The problem is that in the US, it is legal to override this with the licensing conditions. In Europe this right is inalienable. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Text console programming on a low level.
I've ported a Linux app, but am still having some problems with a fullscreen textmode editor to work with FreeBSD consoles. (I already use NCurses, but I don't think I'm doing it right) The problems are many: - Codepages. Is there anyway to force cp437, for linedrawing? (or even better on the phys console, work in 512 character font mode, saving the original font) The fact that Midnight Commander doesn't use all linedrawing chars is worrying :-) - Keyboard. mainly the extended keys. (alt, ctrl, F-keys) - Mouse support (console, xterm) Of course I want it to work on as many consoles as possible, but for now standard telnet between PCs (FreeBSD and Linux standard clients + some win32 clients like putty and dtelnet) The win32 clients are already working quite right, and I can even get the Linux and FreeBSD clients to work (by killing off some code for the linux console) However the physical (the default one from FreeBSD 4.2 btw, I assume it is syscons) console hardly does anything. When I set the terminal to one of the vtxxx terminals I can get some life out of it, but cons25 totally messes up. Are there some ((Free)BSD specific) docs about this? Or other "really" fullscreen textconsole programs (so with extended keys, mouse and codepage support) as examples? I already went through Ncurses docs, but those are more generic in nature. Marco van de Voort ([EMAIL PROTECTED] or [EMAIL PROTECTED]) To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Free Pascal compiler version 1.0.2 beta for FreeBSD is officially out !
Hello, It is with great pleasure that the Free Pascal Development Team announces that Version 1.0.2 beta for FreeBSD 4.x + of the Free Pascal compiler has been officially released. This is a first beta version, commandline only, and not all packages are checked for FreeBSD compability. If you have FreeBSD available, try to test to compile your sources with FreeBSD, so we can lift this beta status soon. The Free Pascal Compiler/FreeBSD features: - A Turbo Pascal and Delphi compatible compiler for the Intel processor family, with some extensions to the Pascal and Object Pascal dialects, such as operator overloading. - An OS independent Run-Time Library, equivalent to the Turbo Pascal and Delphi Run-Time Libraries, not dependent on external libraries. - An API allowing for OS-Independent screen, keyboard and mouse management. (we need a lot of fixes and help here!) - Many units, interfacing to various API's: gtk, xforms, zlib, ncurses, sockets, X, mysql, postgresql, Interbase, paszlib, opengl, libgdb. - A Free Component Library, containing many base classes from the Delphi VCL. - More than 800 pages of documentation in Adobe PDF format, featuring + User's guide + Programmer's guide + Reference guide + reference guide for all units in the Run-Time Library + More than 440 complete example programs. (Other formats include plain text, HTML and PostScript) - Full sources to compiler, RTL, docs, packages. The distribution is available from ftp://ftp.freepascal.org in directory /pub/fpc/dist/freebsd-1.0.2 and below and from FTP mirrors. Marco, speaking for the whole Free Pascal Development Team Marco van de Voort ([EMAIL PROTECTED] or [EMAIL PROTECTED]) To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
ncurses+ full screen apps
Is it possible to capture alt-x keys on the console? Prefer a ncurses solution, but a FreeBSD specific, or even a RAW freebsd console one will do. Marco van de Voort ([EMAIL PROTECTED] or [EMAIL PROTECTED]) To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
misc freebsd-internal questions.
(for the development of the Free Pascal compiler port): - Is there a way to easily check FreeBSD version (3.x or 4.x+, because of the different syscallnrs for signal functions) on syscall level? - Can I use the assembler instruction ENTER ? E.g. Linux doesn't allow it, because it would complicate the stack overflow handler? To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: misc freebsd-internal questions.
If it is for a compile-time check, there's a __FreeBSD_version define in sys/param.h (the kern.osreldate sysctl returns exactly this). If it is a configure- or run-time thing, use the sysctl as Maxime suggested. No, it is runtime detection, and maybe it needs to be a very early one, therefore I requested the detection via syscall. (contrary to e.g. running uname or so). Compile time using C headers is totally impossible, since the compiler can't read C headers ;-) The sysctl call is not in the man pages, which had confused me. After Maxime's hint I started searching again, convinced that something called sysctl had to exist on syscall level (in uname and libc sources/headers), and found it The runtime checks would keep both versions binary compatible as it seems. Even weirder is that if I generate binaries on Linux, using our FreeBSD runtime library, the generated binaries run perfectly on FreeBSD (no, no linux compat :-). No crosslinker needed, and the ELF object file writer also works fine (eliminating AS) Well, I hope to implement this tomorrow, and create the port files next week. Thanks to the hackers list for all support! The ENTER part is interesting (since it is slightly tighter and on some processors faster), but not needed directly. Marco van de Voort ([EMAIL PROTECTED] or [EMAIL PROTECTED]) To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
ENTER allowed?
On Linux, use of the Enter is not allowed because of the internals of stack page fault handlers. Is this also the case on FreeBSD (3.x + )? Marco van de Voort ([EMAIL PROTECTED] or [EMAIL PROTECTED]) To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
pthread
What does this line (from clone.s linuxpthread port) do? jmp PIC_PLT(HIDENAME(cerror)) Marco van de Voort ([EMAIL PROTECTED] or [EMAIL PROTECTED]) To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: file creation times ?
I know very little of filesystems, but I know that NTFS is extensible (and supports several file strains). So probably that is not a limitation of NTFS, but of the NT implementation of it. E.g. Mac stuff is stored in an extra strain, extra attributes can be stored in the MFS etc etc. One could write a *nix NTFS driver that supported NFS metadata. Whoops, that should be MFT (Master File Table) not MFS. Probably got confused by all those MFS messages :-) And btw there is afaik also no reason why a new NTFS driver couldn't be developped for NT (that supported NFS metadata). NTFS support is according to the docs a separate module. (but that is the theory, not practice) Marco van de Voort ([EMAIL PROTECTED] or [EMAIL PROTECTED]) To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: getdirentries() and /proc
The man page for getdirentries() says: int getdirentries(int fd, char *buf, int nbytes, long *basep) "The nbytes argument must be greater than or equal to the block size associated with the file, see stat(2). Some filesys- tems may not support these functions with buffers smaller than this size." So ... what are we supposed to use for this? For special filesystems like /proc, is any old value that is sufficiently large enough to hold a few struct dirent's considered to be OK? Should I not use 'getdirentries()', and opt instead for 'opendir()' and 'readdir()'? Any advice is appreciated. I also had this problem (when I created a readdir equivalent for a port of a non-libc using compiler). I checked libc, and libc always seems to use 1024 bytes (constant called DIRBLKSIZ) for nbytes. But I didn't try to search /proc yet. Also keep in mind that using getdirentries you could get duplicate entries (libc readdir sorts and removes duplicates first). I however don't know if this is just because of hardlinks (which most people don't use afaik) or also for regular filehandling. Marco van de Voort ([EMAIL PROTECTED] or [EMAIL PROTECTED]) To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: file creation times ?
That's not justification for putting a creation time into the UFS. Different filesystems store different information - depending on what the FS developers saw as important. You could just as easily point out the deficiencies of NTFS based on it's inability to support all the metadata in NFS. I know very little of filesystems, but I know that NTFS is extensible (and supports several file strains). So probably that is not a limitation of NTFS, but of the NT implementation of it. E.g. Mac stuff is stored in an extra strain, extra attributes can be stored in the MFS etc etc. One could write a *nix NTFS driver that supported NFS metadata. Marco van de Voort ([EMAIL PROTECTED] or [EMAIL PROTECTED]) To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
APJ Article
As a die-hard assembly language programmer, I was very pleased when recently someone posted a link to his Hello, World assembly language code here. I did that as a die-hard pascal programmer: -) This is one of those things every non C programmer runs into. I played with his code a bit, then wrote a very simple filter in assembly language. I then converted it to an article on System Calls in FreeBSD, and submitted it to Assembly Programming Journal, which is a bi-monthly on-line magazine. If anyone is interested, the text of the article (includes the code for the filter) is at http://www.whizkidtech.net/syscall.txt I pose a question in it (where can an assembly language program find its command line): If anyone knows the answer, I'd love to hear it! Locate directory csu (I believe it is in /usr/src/lib/csu), and compile crt0.c with -S and -O3 or so. (which simplifies the assembler) (I believe this won't work with a recent compiler, I had to do it on a system with a 2.7.x compiler) You will find something like the following code in it like this: (The U_SYSLINUX labels are Free Pascal variables that are loaded, I had to 'fix' crt0 for that) movl %edx,%edx #NO_APP leal 8(%ebp),%edi movl %edi,U_SYSLINUX_ARGV mov -4(%edi),%eax movl %eax,U_SYSLINUX_ARGC movl 4(%ebp),%ebx leal 12(%ebp,%ebx,4),%esi movl %esi,U_SYSLINUX_ENVP movl %esi,environ testl %ebx,%ebx jle .L2 movl 8(%ebp),%eax testl %eax,%eax je .L2 movl %eax,__progname cmpb $0,(%eax) je .L2 Well, argv, argc, the enviroment, what more can you want :-) Anyway, the generated assembler source will also reveal how to parse that structure. You can also rip out all libc initialisation code (or I can sent you my version, in which you only have to comment those U_SYSLINUX lines) if you don't link to libc. Marco van de Voort ([EMAIL PROTECTED]) http://www.stack.nl/~marcov/xtdlib.htm Marco van de Voort ([EMAIL PROTECTED]) http://www.stack.nl/~marcov/xtdlib.htm To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: solicit hardware and/or testers for newbusified drivers
el: 3Com 3C501 ethernet card. I can remember the Linux ethernet howto seriously discouraging using this card. It seems to be quite faulty. Marco van de Voort ([EMAIL PROTECTED]) http://www.stack.nl/~marcov/xtdlib.htm To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
fp statusword in sigcontext
I want a signalhandler, which splits out sigfpe to the different copro signals. I found a linux example, which is based on the statusword field of the sigcontext structure passed to the signalhandler set Problem is that the linux sigcontext has a field for the floatingpoint statusword, while the BSD sigcontext (machine/signal.h) has only two arrays of int's: (FPU part struct sigcontext * XXX FPU state is 27 * 4 bytes h/w, 1 * 4 bytes s/w (probably not * needed here), or that + 16 * 4 bytes for emulators (probably all * needed here). The "spare" bytes are mostly not spare. */ int sc_fpregs[28]; /* machine state (FPU): */ int sc_spare[17]; }; Does somebody know how to distille the FP statusword from this struct? Marco van de Voort ([EMAIL PROTECTED]) http://www.stack.nl/~marcov/xtdlib.htm To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Multithreaded server performance
Linux runs into problems at less than 4000 threads because of a limit on the total number of processes, even if the thread stack size is decreased. 16xxx if you use a 2.3.99pre-x kernel? At least I thought that that was being mentioned as one of the major new things in 2.4.x kernels. Marco van de Voort ([EMAIL PROTECTED]) http://www.stack.nl/~marcov/xtdlib.htm To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Clone in userland
I have a Linux library based on the Clone() call which I want to port to native FreeBSD. I checked the linux emulation, and it seems to do some internal kernel stuff. Is this possible to emulate in userland? p2 = pfind(p-p_retval[0]); /* MvdV: check rfork's return value, and if clone, then load process info? */ if (p2 == 0) return ESRCH; p2-p_sigparent = exit_signal; p2-p_md.md_regs-tf_esp = (unsigned int)args-stack; Marco van de Voort ([EMAIL PROTECTED]) http://www.stack.nl/~marcov/xtdlib.htm To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
ktrace, syscalls and filehandles.
OS: FreeBSD 4.0 I have a ported pascal compiler that doesn't work yet. I use ktrace (great tool btw) to find the problem, mainly because the differences between the linux and FreeBSD version are only in about 50 syscall calling routines. Now the program terminates with the following sequence, which makes me wonder. - A fstat (handle,buffer)with handle = 0x4 and buffer the right value. returns 0. (success). I checked, and the file does exist. - then a lseek on the same handle (0x4, so not overwritten by a dangling pointer ), returns -1 (I forgot the errno, but ktrace says bad filedescriptor) How can this happen? There is no call to close(or any other syscall) inbetween, and I guess that the actual data for filedescriptor 4 is in some protected space, which I can't have mutilated? (p.s. Keep in mind I can't GDB yet, the plain GDB v4.18 don't seem to work on 4.0. and I need them for an OBJPAS patch. The problems have to do with solib.c ) Marco van de Voort ([EMAIL PROTECTED]) http://www.stack.nl/~marcov/xtdlib.htm To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Syscall 198 __syscall, why??????? New port
OS: FreeBSD 4.0 I have a ported pascal compiler that doesn't work yet. It does now work now, except for some minor details, and haven't worked on libc linking yet. Am already subscribing to ports :-) I use ktrace (great tool btw) to find the problem, mainly because the differences between the linux and FreeBSD version are only in about 50 syscall calling routines. Now the program terminates with the following sequence, which makes me wonder. - A fstat (handle,buffer)with handle = 0x4 and buffer the right value. returns 0. (success). I checked, and the file does exist. - then a lseek on the same handle (0x4, so not overwritten by a dangling pointer ), returns -1 (I forgot the errno, but ktrace says bad filedescriptor) I replaced lseek with the asm code of an objdumped libc program, and found that libc calls lseek via syscall 198 (___syscall), and NOT 199. (lseek self) This probably has to do with lseek returning 64-bits values, but I don't see the exact humour here. Can somebody explain this to me? (specially because I had to code a specific assembler function for lseek this way, instead of using my generic interface routines, which increases asm%) Marco van de Voort ([EMAIL PROTECTED]) http://www.stack.nl/~marcov/xtdlib.htm To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
xfree 4.0 xvidtune
Last weekend I dl'ed the Xfree4.0 distribution (for FreeBSD) from Xfree86.org. xvidtune gpf's on my machine (but seems to work when xf86Setup calls it) Anyone has a similar experience? To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Unicode on FreeBSD
I'm sorry that I maybe missed part of the thread, but what parts that should get UNICODE support are we thinking of? Marco van de Voort ([EMAIL PROTECTED]) http://www.stack.nl/~marcov/xtdlib.htm To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: fork test
Well, after very short time, both boxes responded to console switchings and things like that, but trying to run something like "ps", "w", "uptime" put machine quite on hold (about 2 minutes). The thing is that Linux finished runnig commands about 3 times faster than FreeBSD. What the heck does that suppose to mean?! I thought FreeBSD whould kick linux butt? FreeBSD spawned many more processes than Linux before it started being unable to fork and was thus running many more live copies of the program? You haven't really given/collected enough information to decide. Linux 2.2.x still supports only 1024 processes I believe. Rumour goes that 2.4 supports 16384 processes, so poster should try a 2.3.99prex kernel. P.s. this is one of the weirdest benchmarks I have ever seen :-) Marco van de Voort ([EMAIL PROTECTED]) http://www.stack.nl/~marcov/xtdlib.htm To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: GDB 5
The reason is that the patches against 4.18 you guys use were never assigned to the FSF. Or so, that's the reason i was given when i asked the head maintainer. I'm not here to get into any fights. I just maintain C++ support for GDB, and use FreeBSD as my secondary platform, and my main gdb testing platform (Since BeOS is my first platform). Not necesarily. The FPC team did send OBJPAS patches against 4.18 to the GDB team, and they just "forgot" them. When we resubmitted, the freeze was already a fact. Marco van de Voort ([EMAIL PROTECTED]) http://www.stack.nl/~marcov/xtdlib.htm To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Is FreeBSD dead? Well, not in theory...
http://home.wxs.nl/~asmodai/newbus-draft.txt comes to mind. And when that is finished the manpages will follow. That's also why I am wasting my time slowly documenting the FreeBSD internals in my spare time. "slowly" is the key word here. Real products are documented before they are in commercial use. Plus by the time you're done they will be outdated...another common problem. Why are you arguing this point? Is there anyone that believes that Linux and FreeBSD are well documented? Please. The books are out of date before they hit the stores. This is completly pointless. The user side of the FreeBSD is very well documented. The kernel internals has more poor documentation. But if someone want or need to contribute kernel side code, he is expected to be clueful enough to understand kernel sources _and_ ideolgy. In fact, it is doesn't require too much time. When you're jump in to truck, it is not too hard to track related source code changes and keep your code synched up. Sorry, but that is nonsense. It just limits developpers that don't daily work on the kernel. I don't agree. Users might have to patch to get their own systems running, and moderate docs will help. Specially in find the right source, and eliminating possibilities of what to look into. Also developpers that go outside their normal territory, can use the docs. I managed to patch the linux kernel once without even knowing C, so knowledge of the kernel internals is not necesssary to make a patch which works. Since a patch always has to pass through experts hands before being committed, I also see no dangers to users working on the kernel, specially not for own use. (it was trivial though, the order of the ports for the soundblaster mixer is different on some clones) Marco van de Voort ([EMAIL PROTECTED]) http://www.stack.nl/~marcov/xtdlib.htm To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: inner workings of the C compiler
to try things out i create a static binary and coerce it to use my C library instead of the system's one. this is how i compile my program: cc -g -DYP -DFreeBSD -Wall -pedantic -ansi -c -I../../libc/include nss-test.c cc -g -nostdlib -static -L../../libc -o nss-test nss-test.o \ ../../csu/i386-elf/crt1.o ../../csu/i386-elf/crti.o -lc I'm no expert, but I tried something like this a few weeks back(to totally link without libc), and I was wondering, aren't you missing crtbegin and crtend ? YES! that took care of the double calling of the first function of the first file... I still get the bus error at the end of my program in the atexit() call. this is because _fini is invalid. do you know the exact order in which I should link the objects? prt1 first,and crtbegin ownmodule crtend I believe, I added the others to the end, and that worked. (But I didn't link libc or any other lib) So crt1 crtbegin myobject crtend crti crtn. P.s. Could you sent me a minimal C program linking to libc, and the commandline to compile it with -nostdlib ? I could throw all these experiences with non standard linking in a little tex doc. ( --nostdlib with and without libc, pure assembler instead of c (no gcc), some small chapter about syscall conventions etc) Marco van de Voort ([EMAIL PROTECTED]) http://www.stack.nl/~marcov/xtdlib.htm To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Is FreeBSD dead ?
Then, what are the benefits for both parties ? For the FreeBSD project : - many more supported platforms (Sparc, PowerPC, Arm ?) Merced? . definately. I'm not sure if that is a good thing if it is pursued by the core team, at least not for impopular or older targets. Access to the developer pool ? Sure, and with that accesss to internal maillists (if they exist), cc's of bugreports etc. Very important point I think. Generating quality feedback is always a problem, and now the FreeBSD developpers will provide their own quality feedback, AND distille the high quality feedback from the large volume of feedback from news and email. Marco van de Voort ([EMAIL PROTECTED]) http://www.stack.nl/~marcov/xtdlib.htm To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: inner workings of the C compiler
to try things out i create a static binary and coerce it to use my C library instead of the system's one. this is how i compile my program: cc -g -DYP -DFreeBSD -Wall -pedantic -ansi -c -I../../libc/include nss-test.c cc -g -nostdlib -static -L../../libc -o nss-test nss-test.o \ ../../csu/i386-elf/crt1.o ../../csu/i386-elf/crti.o -lc I'm no expert, but I tried something like this a few weeks back(to totally link without libc), and I was wondering, aren't you missing crtbegin and crtend ? Marco van de Voort ([EMAIL PROTECTED]) http://www.stack.nl/~marcov/xtdlib.htm To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Can't write to stdout in assembly
From what I understand, the following should print "Hello, world." on stdout. I stole the code from the Linux HOWTO, but I think it should work on FreeBSD as well. Instead, the call to write returns 9 (EBADF). I disassembled FreeBSD programs (create a small C prog, compile, and use objdump), and it looks more like this: (I haven't tested this yet, but it is definitely stack based, not register based, the part which I haven't tested is if the placing the int $0x80 behind a call is required) pusl $len pushl $Msg pushl $1 mov $4,%eax call _basicsyscall addl $12,%esp . . . _basicsyscall: int $0x80 ret As a related question, can anyone point me to the source for the int 0x80 handler? I've looked all over but can't find it. On the libc side? It is very fragmented in several files using a lot of macro code. If you wish I can look up the names for you (I did this some weeks ago) I never searched for the kernel side. (the actual 0x80 handler) Marco van de Voort ([EMAIL PROTECTED]) http://www.stack.nl/~marcov/xtdlib.htm To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: yamaha japan relationships anyone?
Marco van de Voort wrote: [cut] [cut again] If I have the drivers and disassemble them "real-time" directly from the files (dlls, etc) and view the 'source' on the screen what is the difference between this and viewing the 'source' on the printer? and how can you recognise the exact source when it is assembler and everything is so similar. And what about reading the hex dump :). What is 'a copy'? And what abot 'I don't know, it just worked. Really! cat /dev/random ~/drivers.tgz' :) Anyway, how can one proof you've done something illegal? Can't remember having said anything about how to practically implement it, just said that it is illegal (as told to me by a Dutch Law professor when we had copyright problems with partially reverse engineered Turbo Vision code) Marco van de Voort ([EMAIL PROTECTED]) http://www.stack.nl/~marcov/xtdlib.htm To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: yamaha japan relationships anyone?
I've heard nothing about that. Was this done in relation to the whole controversy about the DVD decrypt software? No, it was wrt to Playstation, Nintendo, Sega or something like that. M... I thinking it was probably wrt to SEGA, because there was also a trademark dispute related to a small string. :-) An american company tried to get a license to distribute games for the game console, but the japanese company only licensed under the terms "We'll hold exclusive distribution rights to all games you produce", which was deemed unacceptable. So, the company went ahead and did a straight clean-room reverse engineering. They were later sued for the following (roughly): * Trademark violation. Later versions of the console required the string with it's trademarked name to be located at a certain point in the game's memory; this string was then displayed for a couple of seconds on the string. * Copyright violation. The company used a some hardware to sniff the object code, then disassembled and produced printouts of it. They lost on a lower instance, but have just won on a higher instance under the merit of "fair use", since they had no legal alternative to obtain the specifications to the console (other than engaging in a contract deemed unacceptable). Unfortunately, the link with the ruling did not have the complete ruling for some reason. I don't know how the trademark thing was ruled. Afaik, this story is illegal in Europe too. You may reverse engineer to create a substitute, but you may not distribute, let alone sell it (as a gamecreator will probably do) This could be the case for reverse engineering drivers too. So probably drivers which contain information collected with reverse engineering may not be distributed, and are for personal use of the one that did the reverse-engineering (r-e) only. Afaik the only way to circumvent this is, (and this is a wild guess, I'm not a lawyer) is if the r-e is done within an organisation. (e.g. GNU), and all users donate a penny to GNU to become a member. And members may use the driver. Marco van de Voort ([EMAIL PROTECTED]) http://www.stack.nl/~marcov/xtdlib.htm To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: 64bit OS?
Which leads to my potentially ignorant question: Where is FreeBSD w/regards to running on the Itanium (or other 64bit chips)? Waiting for somebody at Intel to give us either hardware or simulator time. Without either of those things, "working on" Itanium support is a pretty pointless exercise. Just a thought: One could use the released 64-bit Itanium gcc, create a i386-itanium crosscompiler, and start preparing some stuff? Marco van de Voort ([EMAIL PROTECTED]) http://www.stack.nl/~marcov/xtdlib.htm To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: how to compile without libc (so not static)
grep exit *.o in /usr/lib doesn't find me that label. What am I missing? Try this instead: nm /usr/lib/libc.a | grep exit I'm aware of that! That is libc which I'm trying to avoid here! (see man gcc, search for -nostdlib) I was referering to excuting gcc with -nostdlib with a simple c file and startup code(search for a csu directory in /usr/src) So gcc should support NOT linking to libc. So either - the (ELF) initcode (crt1.x) is not implemented well - the gcc (at least the FreeBSD version if it is modified) is buggy, and doesn't select e.g. a correct crt1.o without the call to exit/atexit, or with other patched code. (which is unlikely since I can't find any other files). which was the point. I was trying to make. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: how to compile without libc (so not static)
I suspect that "gcc" isn't the standard FreeBSD C compiler in your case. Try "which gcc" and find out. It works fine for me on both -stable and -current with "cc": It is an older one indeed. blake$ cc -v -nostdlib hello.c Using builtin specs. gcc version 2.95.2 19991024 (release) /usr/libexec/cpp -lang-c -v -D__GNUC__=2 -D__GNUC_MINOR__=95 -Di386 -Dunix -D__FreeBSD__=4 -D__FreeBSD_cc_version=44 -D__i386__ -D__unix__ -D__FreeBSD__=4 -D__FreeBSD_cc_version=44 -D__i386 -D__unix -Acpu(i386) -Amachine(i386) -Asystem(unix) -Asystem(FreeBSD) -Acpu(i386) - Amachine(i386) -Di386 -D__i386 -D__i386__ -D__ELF__ hello.c /tmp/cciRD216.i GNU CPP version 2.95.2 19991024 (release) (i386 FreeBSD/ELF) #include "..." search starts here: #include ... search starts here: /usr/include /usr/include End of search list. The following default directories have been omitted from the search path: /usr/include/g++ End of omitted list. /usr/libexec/cc1 /tmp/cciRD216.i -quiet -dumpbase hello.c -version -o /tmp/ccbyU216.s GNU C version 2.95.2 19991024 (release) (i386-unknown-freebsd) compiled by GNU C version 2.95.2 19991024 (release). /usr/libexec/elf/as -v -o /tmp/ccWvs216.o /tmp/ccbyU216.s GNU assembler version 2.9.1 (i386-unknown-freebsdelf), using BFD version 2.9.1 /usr/libexec/elf/ld -m elf_i386 -dynamic-linker /usr/libexec/ld-elf.so.1 -L/usr/libexec/elf -L/usr/libexec -L/usr/lib /tmp/ccWvs216.o /usr/libexec/elf/ld: warning: cannot find entry symbol _start; defaulting to 08048074 /tmp/ccWvs216.o: In function `main': /tmp/ccWvs216.o(.text+0xf): undefined reference to `printf' Still doesn't work though with the newer one :-) (try some arithmetic to see if that works. Marco van de Voort ([EMAIL PROTECTED]) http://www.stack.nl/~marcov/xtdlib.htm To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: how to compile without libc (so not static)
According to Marco van de Voort: gcc -nostdlib empty.c /usr/lib/crti.o /usr/lib/crt0.o -o empty You mean crt1.o instead of crt0.o here right? crt0.o is the a.out version... Yup, my fault. grep exit *.o nm(1) is your Dear FriendĀ® here. Grep and gcc -S also :-) Anyway I manually patched the .s sources, and now I can compile an empty gcc program. Never knew that that was so hard! gcc -nostdlib crt1.o crtbegin.o empty.c crtend.o -o empty was the final commandline I think. I manually patched crt1 to remove the libc init and the (two!) atexit calls. Marco van de Voort ([EMAIL PROTECTED]) http://www.stack.nl/~marcov/xtdlib.htm To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Spontaneous reboot
I know this is not meant as a bug reporting list, but since I'm on it for other purposes, I thought I could sent it in anyway. I trashed a FreeBSD (probably 3.4, I get the exact version mailed next week) by creating a bash script that contained ping xxx.yyy.zzz.vvv line 15 times, and executing the script in the background several times (more like 10) from the commandline with script (we were trying to slow down my roommates win98 laptop from the FreeBSD dorm firewall machine, over internal dorm network only). Needless to say the roommate wasn't impressed when the FreeBSD machine rebooted, and the win98 machine only slowed down minimally :-) The machine was a p133 with 32 MB, and I started the script as user not as root. I can access the machine for simple tests or configuration data if that is necessary. Since it was the firewall, so we didn't try to replicate the experiment To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
elf
How can I disassemble ELF programs? I need to create my own startup code for FPC programs. (copying some variables before pascal code startup) To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
how to compile without libc (so not static)
I finished the syscalls, so now I moved on the initialisation code. To test that I try to create an empty binary, which doesn't link to libc: I've put in an hour effort, and wrote the following C file: int main (void) { return 0; } gcc -nostdlib empty.c /usr/lib/crti.o /usr/lib/crt0.o -o empty results in: /usr/lib/crt1.o: In function `_start': /usr/lib/crt1.o(.text+0x4f): undefined reference to `atexit' /usr/lib/crt1.o(.text+0x5c): undefined reference to `atexit' /usr/lib/crt1.o(.text+0x6f): undefined reference to `exit' with a grep exit *.o in /usr/lib doesn't find me that label. What am I missing? To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: porting linux app. Syscalls
what confuses me is that you don't support bootstrapping from the system C compiler. How do you propose to do that with an all pascal source? Marco van de Voort ([EMAIL PROTECTED]) http://www.stack.nl/~marcov/xtdlib.htm To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: porting linux app. Syscalls
see: http://www.freebsd.org/cgi/man.cgi you can view linux syscalls from the slackware docs. Thank you that seems to be a good lead to start with. The problem was that I couldn't find any documentation :_) Marco van de Voort ([EMAIL PROTECTED]) http://www.stack.nl/~marcov/xtdlib.htm To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: porting linux app. Syscalls
The modula-3 port is about the same size as yours, and it bootstraps, but (like you said) it does it from C. Actually, the standard Modula-3 bootstraps contain assembly-language sources generated by a cross-compiler, not C. Actually that is the first plan too for fpc. This because the port of the required libraries and stubs probably will be ready earlier than the actual compiler support (adding of a target in the compiler source), specially because we want to redo the linux definitions to some unix-general and create linux and freebsd as special cases. Marco van de Voort ([EMAIL PROTECTED]) http://www.stack.nl/~marcov/xtdlib.htm To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
porting linux app. Syscalls
I'm new to the list (and to BSD development in general), and I'm developper of the FreePascal project (www.freepascal.org) which is a bootstrapping compiler, completely written in Pascal. Currently I started preparations for a port of the linux version to FreeBSD. FreePascal (FPC) doesn't default link to libc for some reasons, and therefore directly calls syscalls, about 60 of them. I started translating the syscalls this week (peeking at the linux "emulator" code), and now I arrived at the "getdents" and readdir calls. (I want to create a native port, the emulator already runs fine) These are supported by the emulator, but actually are emulated (they don't simply change parameters and do a FBSD syscall) However when I looked into sys/syscall.h, I found out that the getdents call seems to exist? So I have a few questions:-) 1. Is there documentation for the syscalls other than the code? I know there are some manpages, but these seem to be outdated (e.g. the named getdents call) 2. Can I use the getdents call to emulate the linux getdents? I use the base functionality, not all details have to be fully the same, just the principle. And why does the emulator not use this call? 3. If I can't use the call, the emulator code seems to call VOP_ functions. Can I access these functions from the application? --- not related to the other 3 4. In the rare event that I get it finished this week; The ports howto doesn't seems to apply to bootstrapping stuff. (It assumes the apps are gcc based or created by a gcc compiled app (like perl). Where does such an app fit into the BSD project? - several megs of Pascal source (entire project + sideprojects + texdocs is 25 MB source) - gmake makefiles. - binary required to start the compile(either native FBSD or linux) . (compiling the bsd version with the linux compiler is also possible I think, if a linux binary can create an ordinary FBSD binary) Marco van de Voort ([EMAIL PROTECTED]) http://www.stack.nl/~marcov/xtdlib.htm To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message