From owner-soc-status@FreeBSD.ORG Sat Jul 26 00:21:36 2014 Return-Path: Delivered-To: soc-status@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 29B7B478 for ; Sat, 26 Jul 2014 00:21:36 +0000 (UTC) Received: from mail-we0-x22d.google.com (mail-we0-x22d.google.com [IPv6:2a00:1450:400c:c03::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ACB4D2ED1 for ; Sat, 26 Jul 2014 00:21:35 +0000 (UTC) Received: by mail-we0-f173.google.com with SMTP id q58so5025454wes.32 for ; Fri, 25 Jul 2014 17:21:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=gj6vP4LK5vBGcZtM6Ah9I0JYgf4+mT9Y14XBikK9tCk=; b=npn6S/FNBr+SFFdgtMM+vxQ+PX8eRPw5dtqSjqt0wJHeLBVs7Xcb1eh7QwjnvlAEAW utHf4NWBHtT41knhHXpU1IfBrxbkqyz0EP4R1VzLrxSuXpLObegzti3kaliF3SvzMj43 y8ehAQe9lRJVe8yB45tDtHHVJSjl1QVZj94b8mh1Jr55tJaaFYcWQDMyOFFVMuws0uy1 7uNnsJtW69IpI/2EabriC+Tnr0Qq0vPyhSAQZTcTb7BB19fqz+TqsAp0WDYgnnLTany7 sL8+Fhq5z97wK4CQqmmq9crHV4qW+q8YRppRp1G4BSR87AJ567WJzSIJSMLPKSEKlEX8 orPw== MIME-Version: 1.0 X-Received: by 10.194.121.6 with SMTP id lg6mr26763610wjb.116.1406334093851; Fri, 25 Jul 2014 17:21:33 -0700 (PDT) Received: by 10.194.185.239 with HTTP; Fri, 25 Jul 2014 17:21:33 -0700 (PDT) Date: Fri, 25 Jul 2014 21:21:33 -0300 Message-ID: Subject: Weekly report (ALL) - Lua loader From: Pedro Arthur To: soc-status@FreeBSD.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18 X-BeenThere: soc-status@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Summer of Code Status Reports and Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Jul 2014 00:21:36 -0000 Hi, I realized I was not sending my weekly report to soc-status@FreeBSD.org besides my mentor, so I decide to group all my previous report in a single email. ---------------------- WEEKLY REPORT 26/05 ----------------------- Lua loader (Pedro Souza) I'll include in this report the work done in the weeks before the gsoc start. Tasks done: - Decouple forth interpreter from loader interpreter. Now any interpreter should use the intereface: typedef void interp_init_t(void *ctx); typedef int interp_run_t(void *ctx, const char *input); typedef int interp_incl_t(void *ctx, const char *filename); struct interp { interp_init_t *init; interp_run_t *run; interp_incl_t *incl; void *context; }; - Implemented the interpreter interfaces for the loader simple commands (interp_simple) and forth (interp_forth). - Included the lua 5.2.3 source code into head/sys/boot/ - Fixed the lua code to compile a minimal lua interpreter without C std libs (using libstand) and implemented the missing functionalities (partial) in head/sys/boot/lua/src/lstd.c - Added interp_lua interface with interp_incl_t disabled (to not conflict with loader.rc) - Added "print" and "perform" functions to lua interpreter which prints to the console and perform a loader comand (boot, load, ...) respectively. Bugs found: Some times when I compile and install a loader (in my case zfsloader) when I reboot I get the message "Invalid format" from the boot2. I'm almost sure it's a bug because I had the following code in my loader interp_init_t: printf("some string"); <-- then I get the invalid format I changed it to: printf("some string __"); <-- and now it runs fine. To be sure I changed it back to the previous code and got the same invalid format error. So always I do some change in the loader and I get a invalid format error I just remove/add some characters in any printf string and it works fine. Links: Code repo: pedrosouza/lua_loader/head/ Wiki page: LuaLoader ---------------------- WEEKLY REPORT 09/06 ----------------------- This week I focused on checking if the lua interpreter was working properly. Besides minor changes I did the following changes: Fixed a bug where numbers were not parsed. Implemented interp_lua_incl Improve double to string conversion. Sync branch with head Now I'll start to work on the lua scripts. ---------------------- WEEKLY REPORT 16/06 ----------------------- This week I dedicated myself to read the Forth script files and get a more deep understanding of them. I also started to plan how I'll structure the lua scripts and which function bindngs are needed. Some of those functions I already implemented. I plan to have some kind of loader menu done in lua until the weekend. ---------------------- WEEKLY REPORT 23/06 ----------------------- This week I worked in the lua boot menu scripts, and added some C functions needed to the lua interpreter. The menu contains almost the options found in the Forth menu and is functional. - Added getenv function to lua - Added std functions needed to support lua aux lib (lauxlib.c) and lua base lib (lbaselib.c) - Added loader.lua, menu.lua, core.lua which provides a simple boot menu ---------------------- WEEKLY REPORT 30/06 ----------------------- This week I worked on the menu drawing, the menu box, brand and logo. I also started reading the forth script which handles boot password and I intend to implement it for the next week and polish the menu drawing. ---------------------- WEEKLY REPORT 07/07 ----------------------- This week I worked in the boot password check and the .conf file parsing. Following there are the changes made: - Added password.lua which handles boot & loader password. - Added the lua string library (lstrlib.c) - Added file handling functions (io.open, io.close and io.read) - Added config.lua which parses .conf files (WIP) ---------------------- WEEKLY REPORT 14/07 ----------------------- This week I continued to work on the .conf files loading (parse & execute). The loading code is almost done it can correctly load modules, the only issue is the handling of Forth commands contained in 'exec' and possible 'module_after', 'module_before', 'module_error' which I've not found a solution yet. I also started to work on the kernel loading from env var 'bootfile', 'kernel' and modules path. ---------------------- WEEKLY REPORT 21/07 ----------------------- This week I almost finished the kernel loading and module parsing. I also started to read the php.4th file but I was not able to fully understand it. I'll continue to work on it but if someone has experience with the pnp.4th script and can help me with it I would appreciate it. --------------------------------------------------------------------------------- Regards, Pedro.