From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/9512 Path: news.gmane.org!not-for-mail From: Hesham Almatary Newsgroups: gmane.comp.hardware.lowrisc.devel,gmane.linux.lib.musl.general Subject: Re: musl risc-v port & gsoc - resources & ideas Date: Sun, 6 Mar 2016 18:31:30 +0000 Message-ID: References: <20160304035811.GA10218@brightrain.aerifal.cx> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1457289160 20212 80.91.229.3 (6 Mar 2016 18:32:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 6 Mar 2016 18:32:40 +0000 (UTC) Cc: lowrisc-dev@lists.lowrisc.org, musl@lists.openwall.com To: Rich Felker Original-X-From: lowrisc-dev-bounces@lists.lowrisc.org Sun Mar 06 19:32:30 2016 Return-path: Envelope-to: gchld-lowrisc-dev@m.gmane.org Original-Received: from bagpuss.pepperfish.net ([148.251.8.16]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1acdTf-00064G-PW for gchld-lowrisc-dev@m.gmane.org; Sun, 06 Mar 2016 19:32:27 +0100 Original-Received: from platypus.pepperfish.net (unknown [10.112.100.20]) by bagpuss.pepperfish.net (Postfix) with ESMTP id 97371B74; Sun, 6 Mar 2016 18:32:26 +0000 (GMT) Original-Received: from ip6-localhost ([::1] helo=platypus.pepperfish.net) by platypus.pepperfish.net with esmtp (Exim 4.80 #2 (Debian)) id 1acdTe-0006nH-G0; Sun, 06 Mar 2016 18:32:26 +0000 Original-Received: from inmail0 ([10.112.100.10] helo=mx0.pepperfish.net) by platypus.pepperfish.net with esmtp (Exim 4.80 #2 (Debian)) id 1acdTc-0006n8-Oh for ; Sun, 06 Mar 2016 18:32:24 +0000 Original-Received: from mail-lb0-f178.google.com ([209.85.217.178]) by mx0.pepperfish.net with esmtps (TLS1.2:RSA_ARCFOUR_SHA1:128) (Exim 4.80) (envelope-from ) id 1acdTa-0005e7-1I for lowrisc-dev@lists.lowrisc.org; Sun, 06 Mar 2016 18:32:24 +0000 Original-Received: by mail-lb0-f178.google.com with SMTP id k15so108868966lbg.0 for ; Sun, 06 Mar 2016 10:32:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=A708MW6IW1YZtl5CkID5SaKBu+fzI9ckvp/IO9asEIs=; b=OI6UeGnkDGy1HclLksoeuo0MYyJ0QJRAOufj8NdfJccD8RbqDXnmG90cCDKKHSXP/Y q8lOlM/GnCwo+No2Z+Xhu1F+M4EzKgKxECW7jVmm8uSEUgIGIinXesNWza8Nxn6opMPd n17nH03vTnZGIOE/C59YP1CPDD7eCSO3u5LqKkyFD840f/OXWR/1GX3U7fZtd+tnzYNN z+WKqmsbCc0etQ7QPnPuiAYcr7QvckRbEAuC6n/Yv06drwSo7HdvIm/3XmSrupUtiFQM 2yq9oEiAX6AFdJEIbErj9//akyvGBKxn9azjXbF/JscjPmhXgttqjKojEQHnxb1tCCya lbZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=A708MW6IW1YZtl5CkID5SaKBu+fzI9ckvp/IO9asEIs=; b=X6SkiGZSiwKEzbMlvuGiQvayuMR9gsafhhdn4ipoG6t4JtdY03S9aefYEMn2XTMulG NY27VhNCmBWHzdFQcbAtsEQiyDcK7wk3MHT+6L4N6Qfxa9he2DYWU8g7unyrSS7VHq4S 2zkom2b43qoGwhSHeQOC5wzTbC1Uzkv0iwmiTL5+/9HGzz3ai2hIOFm4OMKto+cHQK7m fRo51Eo9yMx1LnQ9GD2x4l0R9xpGFqHuaB8L7Dai6DMUDjA1BPfYACFDOXGyggmDa6ED /MEZxz8qrc7gni1jgRqVXPtZCgM77p3OCPRLFOw6wYT/vkHS4Sx6ZfKCxVFjVsMbIXAA xLeg== X-Gm-Message-State: AD7BkJIop8d0oPTls0hqnKCvSdKGE2T0yznC5758OuOqLkqQWuCMS9VK4hZCBuikvzkrdjSKsoSk3Cum1ROLww== X-Received: by 10.112.144.226 with SMTP id sp2mr6360933lbb.70.1457289130423; Sun, 06 Mar 2016 10:32:10 -0800 (PST) Original-Received: by 10.25.26.19 with HTTP; Sun, 6 Mar 2016 10:31:30 -0800 (PST) In-Reply-To: <20160304035811.GA10218@brightrain.aerifal.cx> X-Spam-Score: 0.0 X-Spam-Score-int: 0 X-Spam-Bar: / X-Scanned-By: pepperfish.net, Sun, 06 Mar 2016 18:32:24 +0000 X-Spam-Report: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.5 PPF_RECEIVED_HTTP Received header mentions http 1.0 PPF_FROM_CONTAINS_MAIL The From header contains 'mail' 1.2 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (heshamelmatary[at]gmail.com) -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.217.178 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 ANONWHOIS_70 Domain protected by takebackprivacy.net [URIs: openwall.com] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-ACL-Warn: message may be spam X-Scan-Signature: 0efd4b88cb710e1fe5e4a380b3ceab4a X-BeenThere: lowrisc-dev@lists.lowrisc.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Hardware or software development discussion for lowRISC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: lowrisc-dev-bounces@lists.lowrisc.org Errors-To: lowrisc-dev-bounces@lists.lowrisc.org Xref: news.gmane.org gmane.comp.hardware.lowrisc.devel:306 gmane.linux.lib.musl.general:9512 Archived-At: Hi Rich, Thanks for this detailed e-mail. It's worth mentioning that during my last GSoC project that ported seL4 to RISC-V, I had to add RISC-V support to the muslc library [1] (only 32-bit, imitating the or1k port). It was mainly useful for userspace tasks, and works pretty well. I thought this might be a good starting point for anyone who might work on this project. We can work to get this local code upstream if that makes sense. [1] https://github.com/heshamelmatary/musllibc Best, Hesham On Fri, Mar 4, 2016 at 3:58 AM, Rich Felker wrote: > lowrisc.org has been accepted into Google Summer of Code 2016, and has > porting musl to risc-v as one of the suggested projects: > > http://www.lowrisc.org/docs/gsoc-2016-ideas/ > > I'm very hopeful that we'll make the port happen this year. In this > email I'd like to go over some resources that may be helpful to > students interested in applying, and some ideas for other tasks that > could be included in proposals. > > The musl wiki contains a porting page with some useful but > not-entirely-up-to-date information on porting musl to a new arch. > This is a good starting point, and updating it could actually be part > of the gsoc project. See http://wiki.musl-libc.org/wiki/Porting > > Some information on recent changes can be found in the mailing list > archives. These threads pertain to changes to how ports are expected > to provide atomic primitives: > > http://www.openwall.com/lists/musl/2015/05/17/2 > http://www.openwall.com/lists/musl/2015/05/20/1 > http://www.openwall.com/lists/musl/2016/01/10/6 > > which was committed here: > > http://git.musl-libc.org/cgit/musl/commit/?id=1315596b510189b5159e742110b504177bdd4932 > > and other subsequent commits with per-arch improvements. > > And these cover the bits deduplication: > > http://www.openwall.com/lists/musl/2016/01/25/1 > http://www.openwall.com/lists/musl/2016/01/27/9 > > which was committed here: > > http://git.musl-libc.org/cgit/musl/commit/?id=4dfac11538cb20c848c30d754863800061ee8c81 > > Threads on the recent mips64 port work, which is almost ready for > merging, may also be helpful to read. It's broken up across several > threads but you can find most of the content in the January-March 2016 > archives. > > Since a port of musl to a new arch does not actually involve much > code, mainly attention to detail to make sure that all of the type > definitions/ABI/etc. are correct, I think that for a proposal to be > big enough to make a reasonable GSoC project, it should go beyond just > the basic porting. Some ideas for things to include would be: > > - Improvement of porting documentation > > - Feedback/patches on where there's too much redundancy between ports > and how to reduce it (i.e. making improvements to musl that reduce > the amount of code/headers needed for a new port). > > - Patches for musl-cross and/or musl-cross-make (build systems for > generating a cross-compiler toolchain) to make it easy to build a > musl/riscv cross compiler. > > - Optimizing performance-critical code like memcpy or floating point > math functions for riscv. > > - Improving test coverage, especially for things that are easy to get > wrong in a new port. > > I'll follow up with more ideas if I think of any. > > Students interested in the project are welcome (and encouraged!) to > ask questions and discuss here on the musl list. Obviously everyone > should have in mind writing their own proposals but I want everyone to > have access to knowledge/resources/community for ideas. > > Rich > -- Hesham