luapower for Linux on ARM processors?


  • Will it be possible to run luapower on Linux with an ARM processor?
    If that can be done then cross platform development includes Raspberry Pi's, routers and a lot of NAS devices, that would be great!


  • 8
    Posts
    2592
    Views
    Log in to reply


  • Hi FlipFlop,

    Are you asking if I have plans to add build scripts and binaries for Linux/ARM? Or are you asking what will it take to do that because you want to try that yourself? :)

    To the first question, I don't have immediate plans for that, there's too much to do on the desktop first. Android/ARM is a tempting target to add, but I'm not sure when that will come.

    To the second question: I think it's easier than you'd think. Take a look at some of the build scripts and read the building guide and the guide for writing build scripts. In fact I'm pretty sure you won't find an easier way to do it than with luapower. And you can always ask for help here if you get stuck.



  • Hi,
    unfortunately, didn't really got time to get into LuaPower yet, hope I could step in during the next holydays.
    but with the new 5$ Raspberry Pi Zero, it could really be interesting to add support for ARM on LuaPower. will look that way too..
    Fred



  • I read about the $5 Pi a few days ago. Pretty impressive. Couldn't find a benchmark comparing that board to a more familiar x86 platform. Do you know of any?

    Tell you what, you do the building, I'll get the icon and put on the website, deal? :P We'll also need to add some PI-specific libs I guess too to make it more useful, right? What would those be?



  • Probably an interesting repo to get started: https://github.com/Wiladams/LJIT2RPi
    Access to hardware (gpio, spi, pwm, etc) could be neat.

    I could help testing with a Raspberry Pi 1/2 and a BeagleBone Black.



  • I compiled all luapower modules on my Raspberry Pi 2, steps taken:

    mgit build luajit (since the shipped one does not run)
    mgit build lfs (same as above)
    mgit build-all --all (created a PR to fix an issue: https://github.com/luapower/luapower-all)

    Seems like a few libs didn't compile just yet (soundio, pixman) but that's about all.

    stdout: http://hastebin.com/qegarudaja
    stderr: http://hastebin.com/iqemiribiw



  • Oh wow, I didn't expect that TBH :) Guess I'll have to add the Pi target then. Here's a TODO list, if anyone wants to jump at any of the items, I'd appreciate it (I'm short on time at the moment):

    • find out a good short name for the target: is "pi" ok? are binaries compiled for Pi2 compatibile with Pi Zero or is that yet another target? I don't think "arm" is sufficient, i.e. those binaries wouldn't work on an android right? (sorry if it sounds like a stupid question, I know close to nothing about ARM)
    • fix packages that should build but don't (making a separate build-pi.sh script if necessary)
    • find out the easiest way to run a Pi VM on an Ubuntu 14 (and/or on a Windows) and add those instructions to building -- I need this so that I and others can upgrade & rebuild packages automatically without having a Pi (I'll probably get one anyway but I don't like the dependency on hardware for putting together a continuous integration system which could run on a VPS)
    • add the "pi" target to the luapower module so that the dependency graph can be generated
      • add special logic for detecting if a package supports the "pi" target: there must be a "build-pi.sh" and if there isn't one, there must be a "build-linux32.sh" and a binary in bin/pi. This means that luapower won't detect the "pi" target anymore if you remove the pi binaries from your tree, but that's better than having to manually declare the target somewhere.
    • add the "pi" target to bundle so that we can make single-exe deployments and do a test with everything bundled
    • add the "pi" target to website including icons, etc.

    NOTE: luapower-all is an auto-merged repo, pull requests should be directed to individual module repos (if you want to know which file belongs to which repo, type mgit ls-tracked | grep <file>)



  • Re adding LJIT2RPi - on a first look it seems to have good coverage of the platform. Haven't looked at the code in detail but if it's by William Adams it's probably good stuff.

    That being said, I have a few problems with the approach to publishing that lib:

    • RPi is a Linux, thus a mix of cross-platform libs (some of which luapower already includes) and RPi specific ones. On a "rpi" platform package, I would only add the specific ones, and separate out the cross-platform ones, even when they are only useful on Pi (eg. OpenVG). With luapwer it's ok and encouraged to have 1000 small packages with very long dependency lists because we know how to scale that without increasing the friction, so no point in having bundles of unrelated modules anymore.
    • we need API tables or at least an orientation doc (like winapi), why doesn't people add those? I'm tired of having to poke around 5 files in ljsyscall every time I need to make a select() call. People write some great software but then they don't give you the API table, I don't get it.

    Sorry for my little rant here but sometimes I feel that we programmers have some very low standards of usability :)


8
Posts
2592
Views
Log in to reply

Internal error.

Oops! Looks like something went wrong!