From owner-freebsd-ports@freebsd.org Sun Jun 4 14:36:00 2017 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3D6A1B7CDCD; Sun, 4 Jun 2017 14:36:00 +0000 (UTC) (envelope-from gurenchan@gmail.com) Received: from mail-pg0-x241.google.com (mail-pg0-x241.google.com [IPv6:2607:f8b0:400e:c05::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 13DC578363; Sun, 4 Jun 2017 14:36:00 +0000 (UTC) (envelope-from gurenchan@gmail.com) Received: by mail-pg0-x241.google.com with SMTP id v18so3708930pgb.3; Sun, 04 Jun 2017 07:36:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=LQrCAlml5h9EkeSF+HHs1vW/4G6M9x7PaYVtVv55HS0=; b=GPf9wviEloPFtVrJ4GYxQEf+PXvClAZ09MPI7GwB7xfH2TqWdRYeRHe46ngCyGKond K2kdA8v/qAKg2Ho5XOCmdpYyMeAS6HaB8MsnV6MQwQGDQTn62IKOq3D8YQa4F4Bc5DCI nR2mS7C+rclOT3Hgh2qfInybOdB/B3AeoRDDh+mmAW6wVcw9bqT9mbnzeuq//uQSoHuC wo3n/O9ong/WQlDHd5674Tc9FqBQDdhY6emjQVwLEtuB9thgVgl/5NDEoy1jWtsrBOVs Phs0H04TjnO8eQn1wn0YoKd/NiErGga7s+rtC0wkIW/qEj2YlcP6iibyBGPE+CD8doJz rnRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=LQrCAlml5h9EkeSF+HHs1vW/4G6M9x7PaYVtVv55HS0=; b=CAaZJms3jlNxDJgv5paOL2TYzLwVfXYd1WAnGCMxSXAAVEAvDUY2j10RngDunjhun2 HOA6YivIxv8DHBMsBvbzCcZ3VW+VcrKfneJwNgnvW9CPWIrehxK5sNkdMth2S6cd0jro xr+/8vSRX1AfnLHJuh4hQwl/gvx6bE2TfR63V2dcjeZ3yNxB+USPCmLC4SgA+82KCMIc wOwtPlBdhThhrJN6qKkjYj8Hr07tHRhi1YxOnJ9oFI/v6BOS2HnJAusnU7IKQ/QsK7M5 dpWdJiaZpqiBowLTIv7Z8u097mv4WlZQxErWRSACj5ndOnZVk5u/TpPoHF2yOoYIDEDJ dhyQ== X-Gm-Message-State: AODbwcARYTrFOWjbSxippxxSJVmKka/ZnsIJyv6rzZA4ZFipmXRqisjR zUyRLCd2/k7cH8GWDsLDJohzpY179w== X-Received: by 10.84.179.65 with SMTP id a59mr9733231plc.82.1496586959507; Sun, 04 Jun 2017 07:35:59 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.168.79 with HTTP; Sun, 4 Jun 2017 07:35:59 -0700 (PDT) In-Reply-To: <16f2c369-2758-9bd8-9dcb-5e1b400d2336@elischer.org> References: <16f2c369-2758-9bd8-9dcb-5e1b400d2336@elischer.org> From: blubee blubeeme Date: Sun, 4 Jun 2017 22:35:59 +0800 Message-ID: Subject: Re: [Help] Linux low level data structures < - > FreeBSD low level data structures To: Julian Elischer Cc: FreeBSD current , freebsd-ports@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jun 2017 14:36:00 -0000 Hi Julian My goals are to port the Linux graphics stack over to FreeBSD w/o relying too heavily on the linuxkpi stuff. That's cool for a lot of use cases but it just seems a bit too brittle. It is a very large I understand the task will not be easy but I am willing to do the work, even from scratch if necessary although some help would be appreciated. I've been watching the Linux DRM project grow and while the top levels has changed, it's been a very long time since the actual low level stuff has been changed. Most of the diffs have shown changes in the [linux/driver/gpu/drm] layer which relies heavily on the [linux/include/drm] that does a lot of the heavy lifting here's a link to the latest version files: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/drm?h=v4.12-rc3 here's a diff of the latest version of the [linux/driver/gpu/drm] : https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/diff/?id=v4.12-rc3&id2=v4.12-rc2&dt=2 The diffs in the drivers change constantly but the lower level stuff hasn't changed as much. Doing some of the lower level translation to native FreeBSD style data structures then the upper part could be easily migrated, even with something as using AST to translate the headers to their FreeBSD equivalent without worrying about inadvertently breaking something or having major diffs that needs people to actively look at maintaining. That's a high level overview of my plan and what I'd like to achieve. Will it be easy, most likely not but once it's done FreeBSD will be just fine. Hope that helps clarify things for anyone who is interested. Any assistance would be greatly appreciated. Best, Owen On Sun, Jun 4, 2017 at 9:26 PM, Julian Elischer wrote: > On 4/6/17 7:07 pm, blubee blubeeme wrote: > >> Hello >> >> Is there anyone on either of these lists that have experience with both >> linux low level data structures and their equivalents on FreeBSD? >> >> For instance the linux header file: >> >> >> which includes the header file: >> >> >> Then looking at that file: >> >> >> >> >> >> > > You are going to have to be a lot more specific about this. > I have worked in several places where they use s shim layer to make Linux > basic services work on freeBSD. > usually a mix of functions, macros and inlines. > However you need to narrow down your questions a bit as the POSSIBLE scope > of your question is too large for anyone to attempt an answer. > > Remember that both systems are POSIX inspired so outside the kernel there > are many more simlarities than one might be led to expect, > but you need to be way more specific. > It's even possible to write kernel code to run on both, but it is usually > domain specific. > > > >> I'll be doing a lot of work trying to find these FreeBSD equivalent of >> these types of files to port some code. >> >> Does anyone here have experience with something like this? Is there any >> other projects that maps these low level data structures from >> Linux <-> FreeBSD, etc? >> >> Best, >> Owen >> _______________________________________________ >> freebsd-current@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/freebsd-current >> To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org >> " >> > > >