Slashdot Mirror


FreeBSD, Linux Kernel Source Cross Reference

An anonymous reader writes "Robert Watson of the FreeBSD Core Team has put up a FreeBSD and Linux kernel source cross reference based on the LXR software used for the Linux kernel cross reference. The stated purpose is to make it easier for FreeBSD users and developers to explore and understand the FreeBSD code, as well as to compare the FreeBSD approaches with abstractions and implementation in the Linux kernel. This should help with portability, compatibility, and architectural cleanliness. Robert has posted to the FreeBSD mailing lists indicating he'll be pushing source code for other *BSD systems and Darwin in the near future as well. Sounds like this may be a really useful site for FreeBSD developers, but also for all open source kernel developers (Linux and others)."

42 comments

  1. Also Darwin source by Anonymous Coward · · Score: 0

    Looks like since the announcement, Darwin source
    and DragonFly source have also gone online.
    Cool!

  2. Wow this is way over my head :) by zaqattack911 · · Score: 0

    I do some software devel, but I don't even get the meaning of this post :)

    1. Re:Wow this is way over my head :) by kwench · · Score: 1

      Ahh... I *think* I get the meaning... but I do not understand how to navigate this source tree...

      Well... and, of course, I wonder why my posts are always rejected, since they are more understandable than this freak thing.

      Must be the smell of the old chocolate cake behind my keyboard or something...

  3. Danger Will Robinson, Danger! by DShard · · Score: 2, Interesting

    isn't this dangerous for BSD developers when looking at GPL software to place less restrictions on there code which could arguably be derivative from Linux. I would think FSF would get their panties that much but I have read quite a bit from Stallman who seems to have an axe to grind with the GPL linux, let alone the closable BSD's.

    1. Re:Danger Will Robinson, Danger! by cant_get_a_good_nick · · Score: 1

      It's not cross referencing between Linux and FreeBSD source, it's just a cross reference within the software itself. Fr'instance, I have a driver, and it talks about some function in the DDK, you click on a link and it takes you there. Very confusing title I admit.

      Closable BSDs? Yes someone could make a fork of FreeBSD and close it, but the original FreeBSD source would still exist.

    2. Re:Danger Will Robinson, Danger! by Anonymous Coward · · Score: 0

      isn't this dangerous for BSD developers when looking at GPL software to place less restrictions on there code which could arguably be derivative from Linux.

      Bullshit. There have been a couple of occasions when Linux has cut and pasted BSD code without including the license text.

    3. Re:Danger Will Robinson, Danger! by Anonymous Coward · · Score: 0

      well, there was one documented case, an ide-raid driver's header file.

      interfaces (header files) can't be copyrighted, but it's still a shitty thing to do.

      of course, to be precise, it was a patch that never made it into the actual kernel, so saying "Linux has cut and pasted" is false. if it were true, SCO would have long ago posted a patch on their website (the ide-raid code wasn't even submitted to the mailing list) that includes bits of their code.

  4. Here's the deal by ciaran_o_riordan · · Score: 4, Informative

    > isn't this dangerous for BSD developers when looking at GPL software

    BSDers can look, and learn (or laugh). They just can't copy the code.

    > could arguably be derivative from Linux

    Copyright covers work of an author, not ideas. So as long as they only borrow ideas, they'll be fine.

    > I would think FSF would get their panties that much

    That's not much of a sentence, is it :)
    FSF own no FreeBSD-kernel code, and only own bits of Linux. I don't see any problems here.

    > read quite a bit from Stallman who seems to have an axe to grind with the GPL linux

    You're probably talking about proprietary binary-only modules being linked to Linux at runtime?
    Nothing to do with a cross-reference.

    > let alone the closable BSD's

    [Free|Net|Open]BSD is Free Software, but the freedom isn't protected by copyleft, so anyone can make a modified version and not contribute their modifications back to the original developers. This situation encourages companies *not* to contribute their code, because if they keep it proprietary, they have an advantage over the original developers.

    Ciaran O'Riordan

    1. Re:Here's the deal by Brandybuck · · Score: 4, Insightful

      This situation encourages companies *not* to contribute their code, because if they keep it proprietary, they have an advantage over the original developers.

      Though there may be no legal demands to open the code, there are many other pressures to do so. One big one is economic incentive to avoid closed forks. This was probably the biggest factor leading to the opening of Darwin.

      But a more subtle incentive, and one that the FSF completely ignores, is simply that it's the right thing to do. When you don't treat your users as potential thieves, but with respect, you tend to find that they will gladly open their derivative bits without you even asking. I've get patches to my own BSD licensed works, without asking for them. They spontaneously come in.

      The reason for this is community, not licensing. When you deliberately exclude people from your community, they of course will not participate in it. BSDi was always a part of the BSD community, and has always contributed huge chunks of *original* code to BSD projects. But the FSF never made NeXT feel welcome, so they had to hound and badger them into opening the ObjC frontend. Maybe if the GNU project hadn't been so isolationist, they wouldn't have had to ask in the first place.

      When you treat people like theives, you'll find that people are theives. When you treat them with respect, you'll find that most will behave quite respectably.

      --
      Don't blame me, I didn't vote for either of them!
    2. Re:Here's the deal by TilJ · · Score: 1

      > > This situation encourages companies *not* to contribute their code, because if they keep it proprietary, they have an advantage over the original developers.

      > Though there may be no legal demands to open the code, there are many other pressures to do so. One big one is economic incentive to avoid closed forks. This was probably the biggest factor leading to the opening of Darwin.

      Putting "closed forks" another way, there is a pratical pressure to contribute back: nobody wants to maintain their own patch set forever. It's a pain in the butt. If it can be incorporated into the main truck, volunteer maintainers ensure that your changes will be kept working. This is a big win, and a big incentive for companies to contribute.

      --
      "The purpose of argument is to change the nature of truth." -- Bene Gesserit Precept
    3. Re:Here's the deal by Piquan · · Score: 1

      But a more subtle incentive, and one that the FSF completely ignores, is simply that it's the right thing to do. When you don't treat your users as potential thieves, but with respect, you tend to find that they will gladly open their derivative bits without you even asking. I've get patches to my own BSD licensed works, without asking for them. They spontaneously come in.

      So have I. But nobody's going to get rich selling modifications of my code, so they have an economic incentive to contribute back.

      RMS specifically saw problems being caused by non-copylefted software. Let's look at the 4.2 BSD TCP/IP stack. It was chock full of bugs, and I mean scores of them. But it was copied into many Unixes as their TCP/IP stack, and made propritetary. Now, because of all these networking bugs, each vendor was fixing bugs in their own source tree, but not giving back their fixes. Each vendor had to fix their code on their own, causing loads of duplicated work, and somebody using stock 4.2 saw few-- if any-- of these fixes.

      SunOS 4 was based almost entirely on BSD, and Sun made many, many changes without contributing back. Why would they?

      Also, remember that the GPL isn't just about returning fixes to the community. It's also about giving users the freedom to copy code. RMS writes about this:

      The paradigmatic example of this problem is the X Window System. Developed at MIT, and released as free software with a permissive license, it was soon adopted by various computer companies. They added X to their proprietary Unix systems, in binary form only, and covered by the same nondisclosure agreement. These copies of X were no more free software than Unix was.

      The developers of the X Window System did not consider this a problem--they expected and intended this to happen. Their goal was not freedom, just "success", defined as "having many users." They did not care whether these users had freedom, only that they should be numerous.

      This lead to a paradoxical situation where two different ways of counting the amount of freedom gave different answers to the question, "Is this program free?" If you judged based on the freedom provided by the distribution terms of the MIT release, you would say that X was free software. But if you measured the freedom of the average user of X, you would have to say it was proprietary software. Most X users were running the proprietary versions that came with Unix systems, not the free version.

      You'll also note that X11R6.4 was originally released with a proprietary license; the X Consortium and the Open Group co-opted all the contributions-- stuff people thought was going to remain open-- and making them proprietary. It wasn't until several months later that they reversed that decision, and it seems like that was because they felt that development would stagnate under a closed-source model.

      When you treat people like theives, you'll find that people are theives. When you treat them with respect, you'll find that most will behave quite respectably.

      I agree. But I don't think that the GPL is treating people like thieves. If companies were doing the "right thing" in the first place, the GPL would have never been created.

    4. Re:Here's the deal by /dev/trash · · Score: 1, Insightful
      Copyright covers work of an author, not ideas. So as long as they only borrow ideas, they'll be fine.



      But how many ways can you code "hello world" in C?

    5. Re:Here's the deal by DShard · · Score: 1

      In theory all would see the benefit of share and share alike. It stops inefficiency, causing truelly the most innovative superior. Those who lose their innovation lose their lead and therefore their position.

      Now to reality. If I as a vendor spend money to fix problems in my public codebase and my competitors don't that is a competive edge. I have something that those people don't. Hell, I can always move back to the main tree when those things get fixed, but not until I exploit the difference to my gain. If I didn't it is a diservice to my shareholders.

      OTOH, the GPL forces everyone to gain the benefit to the greater good of the code. It is not about competitive advantage. It is not about IP. It is not about the money. It is only about the quality of the code.

      The implications embrace the free market and democracy. You can call it communist, but that is loaded. Utopian communism as proposed by Marx doesn't match what the GPL proposes. Communism as has been implemented in reality failed to be anything but totalitarian regimes. _I_ force you to do this. GPL says that _WE_ force you to do this if you agree. It is choice. You choose by improving or distributing. _NOT_ even by using.

    6. Re:Here's the deal by Anonymous Coward · · Score: 0

      The funny thing is, the GPL guarantees the code stays 'free,' so you don't *have* to stick with one implementation (Linus-tree Linux). In BSD-land, rather than relying on the license, you rely on sociology - convince people to use the free branches (Net, Free, Open, DBSD), rather than commercial forks, and you'll see bug-finding and patches returned to the free projects... but it *is* only as strong as the community around the project.

      So I guess I'm saying it's funny that the GNU world has cemented so heavily around a single project (Linux) now that they've gained the Freedom to create diversity, while BSD relies on strong, centralized projects to maintain its 'freeness' and yet produces more outright forks.

      Nothing's bad here; Linux's popularity means it gets most of the features of all BSDs and a lot more all crammed into one source tree... but I find the situation amusing somehow. There's *less* reason to fear forking Linux to take it in a novel direction, but somehow it doesn't happen. I think this points to Linus having one heck of a Reality Distortion Field; thank god he's using it for Good.

    7. Re:Here's the deal by Quill_28 · · Score: 1

      Here's the thing the businesses will not use GPL code in theirs, while they would use BSD.

      Using GPL code in your code is the death kneel, because RMS doesn't want your money he wants to ruin your software business.

      GPL wants to end all proprietary software, plain and simple.

      Slighty offtopic: And why don't these same GPL principles apply to music, architects, books, etc.

    8. Re:Here's the deal by Anonymous Coward · · Score: 0

      Using GPL code in your code is the death kneel, because RMS doesn't want your money he wants to ruin your software business.

      GPL wants to end all proprietary software, plain and simple.

      That's bullshit, the latter (end to all proprietary software) does not require the former (ruin your software business).

      Writing code, any code, even GPL code, is work. A lot of work. A lot of time, effort, attention. It's entirely reasonable for coders to demand money in exchange for this work. And you know what? I've done it myself. Nobody thought it strange. So I was paid, no questions asked. Like any other job.

      So you won't be able to indefinitely hold users at gunpoint to upgrade at a frequency of your choosing for no gain to them. Users are wising up more and more about that, and eliminating this inefficiency in the market. No use crying over spilled milk. But you'll always be able to trade work for money, because both will continue to have value for the other party.

      Doesn't seem like the ruination of all software business to me.

      And why don't these same GPL principles apply to music, architects, books, etc.

      Why do you suppose they don't? I've released written material under the GPL myself.

      Whether or not you'll frequently see it done is another matter. The difference lies in the nature of the works: code is mainly functional, music is mainly expressive. There is an incentive for the author to see code continuously improved over a long period of time. There is usually much less incentive to see that happen to music, for instance, or sculpture or books. A work of greatness is usually best left alone, it gains nothing by repeated "improvements" (*cough* Star Wars *cough*)

      .

      Where there is such an incentive (technical reference material, etc.), expect it to happen. In fact, it does right now: check out RMS's book on GCC internals, for one.

    9. Re:Here's the deal by Quill_28 · · Score: 1

      >That's bullshit, the latter (end to all proprietary software) does not require the former (ruin your software business).

      What's BS? the goals of the GPL(which is true) or that software comapnies can't make money?

      There will always be demand for softare certainily unique software. No smart company is going to pay lotsa cash to pay someone to write software and then let everyone else use it for free. That would just be foolish business. Rather they are going to use GPL but not enchance it or use BSD and not enchance it or write proprietary code.

    10. Re:Here's the deal by Crazy+Eight · · Score: 1
      One big one is economic incentive to avoid closed forks. This was probably the biggest factor leading to the opening of Darwin.

      How could Apple possibly lose money by keeping Darwin closed?

    11. Re:Here's the deal by Crazy+Eight · · Score: 1
      You don't know what you're talking about. Stallman may be rabid in his distaste for proprietary software, but that doesn't mean he wants you to go out of business. The GPL itself is simply a legal tool that protects a public development model from theft. It says nothing and can do nothing to propietary software houses who will always be free to sell closed software. Your disposition reminds me of what H.L. Mencken said of puritans: They know that someone somewhere is having fun.

      As far music, architecture and the rest go you have no point to make because...
      1) Software may have the same kind of beauty that Mathematics may have, and may be a vehicle of personal expression for gifted programmers, but it is not Art. No one need worry that the runway lights or air traffic control system will fail because Seurat didn't invite the public to add a few dots to Sunday in the Park. I'm not sure anything invites, allows, or could benefit as much from collaboration the way software can.
      2) Keep in mind that when Picasso remarked that good artists copy and great artists steal he was only half kidding. Every original in a given medium starts from scratch, works through the path blazed by those who came before, and then adds something new. Indeed, most arts have standard forms that everyone wants to make a mark in. Michelangelo's Pieta was (when he made it at least) a Pieta first, a Michelangelo second.

  5. Help with the SCO issue? by yetanothertechie · · Score: 1

    The consensus seems to be that BSD-derived systems don't have the potential intellectual property issues with which SCO is threating Linux. Whenever SCO finally shows any of the "infringing" Linux code, perhaps this tool could be used to check and see if any of it is actually in the BSD domain.

    --
    Facts are stubborn things.
    1. Re:Help with the SCO issue? by flyingfred0 · · Score: 1

      Here's where we need a cross-reference tool between SCO and Linux code.

      Of course if SCO develops it, then we'll have to pay a license fee to use it, and if the Linux side develops it, it must have been stolen from SCO.

  6. pistols at noon by ciaran_o_riordan · · Score: 4, Insightful

    Call me a cynic, but I get the feeling we won't agree today :)

    Of the Free Unices, GNU/Linux has the most commercial interest, the most users, and the most developers.

    This is fact. So any theoretical arguments about BSD creating a more productive atmosphere, are automatically incorrect. All that's left is to figure out why the GPL-based community has been more effective. I'll stake a guess it's because copyleft levels the playing field.

    > one that the FSF completely ignores, is simply
    > that it's the right thing to do

    The right thing to do is to give freedom to computer users. Permission to create software that doesn't pass on these freedoms is of no use for this goal. So the GPL trades this in return for securing freedom.

    Ciaran O'Riordan

    1. Re:pistols at noon by Brandybuck · · Score: 1

      Of the Free Unices, GNU/Linux has the most commercial interest, the most users, and the most developers.

      Which came first? It makes a difference. From my perspective, it's the popularity of Linux that attracted the commercial interest. There's more developers because they're more users, and more users because there are more developers.

      Is this because of the licensing? Some would say so, but you need to take into account that Linux gained its initial popularity with developers at precisely the same time BSD was in an SCO-like battle with USL. In other words, there's some evidence that Linux was in the right place at the right time.

      --
      Don't blame me, I didn't vote for either of them!
    2. Re:pistols at noon by DShard · · Score: 1

      While Linux may have been in the Right Place at the Right Time, it is the enabler of the GNU system(hehe). The GNU system (frequently shortened to just Linux) is a philosophical one which has gotten the mind share. BSD was around a _lot_ longer and never caught on fire like linux.

      I'm not saying that BSD is dead, dying or morally bankrupt. That's a religous war that I frankly could care less about. There _many_ systems based on parts of BSD out there. (NT, OSX, etc...)

      What can't be argued though is that BSD has never had the mind share that Linux does. I will wager that it never will because of the money being pored into Linux.

    3. Re:pistols at noon by cpeterso · · Score: 1


      but how well was GNU doing without Linux? It is Linux people want, not GNU.

    4. Re:pistols at noon by Brandybuck · · Score: 1

      Our histories are ever colored by our ideologies. Here's another way of looking at it, through my own colored lenses...

      At precisely the time that cheap 32 bit computers and cheap internet access became available, the world was ready for a free operating system. Whichever got a certain mindshare first would dominate for a long time. But USL tripped 386BSD just as it was leaving the starting gate. Then when it picked itself up, Bill Jolitz tripped it again. BSD didn't get the initial mindshare first.

      Heck, according to some sources, Linux might have become a mere terminal for Minix if things had gone slightly different.

      Where does GNU fit in? Well, the BSDs were complete operating environments. The BSD codebase was complete before GNU ever started. They didn't need GNU. But Linux needed an environment to run on top of it, so they grabbed stuff from all over, a lot of it being GNU. The GNU philosophy went along with it, as a lot of GNU people started developing on a 100% free system, instead of developing on Sun workstations.

      What about commercialism? I would posit that the development nature of Linux caused it, rather than the licensing, or even the popularity (at least in the beginning). For a long time, in order to get a working Linux system, you needed to build it from scratch. This was time consuming and painful. In order to succeed, Linux NEEDED commercial distributions, so they arose.

      Of course, it helped that Linux had a mild mannered and charismatic person at the helm. Linus has never pissed anyone off in public (that I know of). He's like a penguin, water just rolls off of him. Compare that to RMS and Theo.

      --
      Don't blame me, I didn't vote for either of them!
    5. Re:pistols at noon by semanticgap · · Score: 1

      Of the Free Unices, GNU/Linux has the most commercial interest, the most users, and the most developers. This is fact. So any theoretical arguments about BSD creating a more productive atmosphere, are automatically incorrect.

      And of all operating systems, Microsoft Windows has the most commercial interest, the most users and the most developers. This is fact. So any theoretical arguments about GNU/Linux creating a more productive atmosphere, are automatically incorrect.

    6. Re:pistols at noon by Anonymous Coward · · Score: 0

      You're a Linux bigot and an idiot to boot. Mod this sucker down.

    7. Re:pistols at noon by Anonymous Coward · · Score: 0

      >> Linus has never pissed anyone off in public (that I know of).

      The possible exception of Andrew Tanenbaum...

    8. Re:pistols at noon by Anonymous Coward · · Score: 0

      Agreed. I think a GNU bigot would be a more appropriate description of him though.

    9. Re:pistols at noon by Anonymous Coward · · Score: 0

      I would mod you up, but I don't have any mod points. Your comment should have been 5:Funny

    10. Re:pistols at noon by Anonymous Coward · · Score: 0

      God damn zealots.

  7. Hmmm by Anonymous Coward · · Score: 0

    I hope FreeBSD doesn't give Linux the AIDS.

    1. Re:Hmmm by Sjobeck · · Score: 1

      I think you have now made it necessary for /. to create a new rating titled 'offensive' for us to use. Perhaps you didnt think twice about posting, and we all knows weve done that before, but, please, 1/4 of the worild is dying from this. I mean, c'mon, that is not funny. Or helpful. Or didactic. Or anything.

  8. You're Just Plain Wrong by Farley+Mullet · · Score: 1
    Of the Free Unices, GNU/Linux has the most commercial interest, the most users, and the most developers.

    I think you'd have to take a very limited view of the term "commercial interest" to come to that conclusion. For example, even the good ol' FSF considers the latest version of Apple's Public Source License "Free", so it seems hard to argue that Darwin doesn't qualify as a "Free Unix". And given that Darwin is at the core of Apple's OS X, which has a larger userbase than Linux, and an active developer community, it's hard to argue that there isn't enormous "commerical interest" in Darwin.

    And what, pray tell, was the genesis of Darwin? It's safe to say that the commercializability of the BSD license probably has something to do with it, given the prominent role the "BSD Subsystem" plays in Darwin's architecture. So maybe it's shortsighted and hasty to call those arguements "theoretical" and "automatically incorrect".

  9. NT BSD-based??? by PaulBu · · Score: 1

    There _many_ systems based on parts of BSD out there. (NT, OSX, etc...)

    NT??? From what I've heard NT5 was written by a bunch of DEC VMS guys and architecturally is closer to VMS than to ANY Un*x. The fact that they took BSD IP stack does not make them BSD-based, sorry...

    Paul B.

  10. There are three ways by bruthasj · · Score: 1

    1. int main() { printf("hello world\n"); return 0; }
    2. Recursive invocation of main, printing randomize letters and spaces of length 11 until you print hello world.
    3. This one is left as an exercise for the reader.

    1. Re:There are three ways by Suppafly · · Score: 1

      2. Recursive invocation of main, printing randomize letters and spaces of length 11 until you print hello world.

      I like that one.