Re: [racket-users] racket on openwrt

2015-05-11 Thread Neil Van Dyke
This needs a lot of testing and probably some more work, but looks like 
we can probably have an official OpenWRT package of Racket.


I now have Racket at least partly running (pending testing) on Netgear 
WNDR3700v4 home WiFi router hardware, under the current official stable 
OpenWRT image, at the same time as the full OpenWRT router functionality 
in that official image.


This Racket is installed from package `racket_6.1.1-1_ar71xx.ipk`, which 
is built using the official OpenWRT package process.


I haven't had to do anything too hard yet; looks like others already did 
the hard parts.  So far, I've only had to craft an OpenWRT `Makefile` 
for Racket, not make any changes to the Racket source. That it got this 
far in just 1-2 person-days is a credit to Matthew and others, for 
making the Racket source tree already cross-compile well, and already 
having whatever low-level support for this MIPS-ish architecture.  Tony 
Garnock-Jones previously got Racket 5.x working on an even more 
impoverished OpenWRT device.


Besides needing testing, I also haven't seen how well a real Racket 
application program can be made to run with this amount of RAM.


Even if this tests OK, that doesn't mean that all OpenWRT devices can 
even minimally run Racket.  The particular device I'm using happens to 
be 128MB RAM and 128MB NAND flash, which is more than most OpenWRT 
devices, and might be the bare minimum you want for Racket.  You might 
be able to fit Racket on a device with 64MB flash, with aggressive 
trimming of OpenWRT, or you could move the disk space offboard if device 
has USB, but squeezing a real Racket-based application into less RAM 
would be tricky.)


I don't know how soon I'll be doing more work on this.  This is a low 
priority, and I might wait until the new core Racket build changes I 
believe are coming in 6.2, anyway (since there will be decisions to make 
about how to handle Racket's own packages within OpenWRT packages).




BusyBox v1.22.1 (2014-09-20 22:31:09 CEST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  ___ __
 |   |.-.-.-.|  |  |  |..|  |_
 |   -   ||  _  |  -__| ||  |  |  ||   _||   _|
 |___||   __|_|__|__||||__|  ||
  |__| W I R E L E S S   F R E E D O M
 -
 BARRIER BREAKER (14.07, r42625)
 -
  * 1/2 oz Galliano Pour all ingredients into
  * 4 oz cold Coffeean irish coffee mug filled
  * 1 1/2 oz Dark Rum   with crushed ice. Stir.
  * 2 tsp. Creme de Cacao
 -
root@OpenWrt:~# racket
Welcome to Racket v6.1.1.
 (+ 1 2)
3


Top while above is running (with the unnecessary .ipk file in tmpfs 
adding to RAM usage):


Mem: 76964K used, 49056K free, 0K shrd, 2260K buff, 33720K cached
CPU:   1% usr   0% sys   0% nic  96% idle   0% io   0% irq   1% sirq
Load average: 0.29 0.24 0.17 1/39 1476
  PID  PPID USER STAT   VSZ %VSZ %CPU COMMAND
 1476  1470 root S27860  22%   1% racket

BTW, the barrier breaker beverage recipe shown in the login banner is 
stock OpenWRT version-naming stuff.  People can remove that from their 
own devices; I'm just keeping this particular test device as stock as 
possible.


Neil V.

--
You received this message because you are subscribed to the Google Groups Racket 
Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] racket on openwrt

2015-05-10 Thread Neil Van Dyke

Has anyone already made an OpenWRT `.ipk` package of Racket?

Neil V.

--
You received this message because you are subscribed to the Google Groups Racket 
Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] racket on openwrt devices

2015-05-03 Thread Tony Garnock-Jones
On 2015-05-02 2:29 PM, Neil Van Dyke wrote:
 What's the current viability of running Racket on a small OpenWRT
 device?  (Anything new, such as due to the recent modularization of the
 core?)

Nothing that I know of since 2011ish. The smaller core might make it a
little easier to assemble a minimal set of collections.

 For example of specs of a popular beefy retail home WiFi router that
 runs OpenWRT well:
 Processor: Atheros AR7161 rev 2 680MHz (MIPS arch)
 RAM: 64MiB
 Flash: 16MiB

Nice. Hmm, that amount of nonvolatile storage will be a challenge.
Racket will run in 64MB RAM on a machine of that class, though not well,
if my intuitions from 2011 still hold.

(Last time I ran Racket on OpenWRT, I was using a Netgear WNDR3700v2.)

Tony

-- 
You received this message because you are subscribed to the Google Groups 
Racket Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] racket on openwrt devices

2015-05-03 Thread Neil Van Dyke

Tony Garnock-Jones wrote on 05/03/2015 12:55 PM:

On 2015-05-02 2:29 PM, Neil Van Dyke wrote:

What's the current viability of running Racket on a small OpenWRT
device?  (Anything new, such as due to the recent modularization of the
core?)

Nothing that I know of since 2011ish. The smaller core might make it a
little easier to assemble a minimal set of collections.


OK, thanks, Tony.  I'll have to give this a try in a week or two.


(Last time I ran Racket on OpenWRT, I was using a Netgear WNDR3700v2.)


I have a collection of these and similar WNDRs (my home office network 
is run by two 3700v2 and a 3800, running OpenWRT).  For Racket, I'll 
probably try a 3700v4 or 4300v1 first, since they're 128 RAM and 128 
NAND flash, albeit with a different SoC with lower CPU clock rate.  I 
don't want to rely on USB Storage for this project.


(Aside: A challenge for an open source project that you want large 
numbers of people to be able to adopt grassroots-style is to find router 
model(s) with sufficient specs, and that run OpenWRT well, and yet are 
still easily available for purchase online and at big-box retailers.  
Additionally, vendors like Netgear and Linksys often replace the product 
guts of a model with very different hardware, without changing the model 
number; so, someone ordering a WNDR3700 online could be getting any of 
4+ different devices, with widely varying specs, and some of which don't 
run OpenWRT.  Some open source projects can also work on Raspberry Pi 
devices, but sometimes you need the NICs/radios/switch hardware of a 
cheap router anyway, so you might as well do everything in one appliance 
box.  A soho router is more polished and less expensive than a RasPi 
with a bunch of daughterboards and USB hubs and devices hanging off of 
it precariously.)


Neil V.

--
You received this message because you are subscribed to the Google Groups Racket 
Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] racket on openwrt devices

2015-05-03 Thread Neil Van Dyke



Tony Garnock-Jones wrote on 05/03/2015 03:10 PM:

On 2015-05-03 2:50 PM, Neil Van Dyke wrote:

128 RAM and 128 NAND flash, albeit with a different SoC with lower
CPU clock rate.  I don't want to rely on USB Storage for this
project.

I should mention also that I couldn't do anything useful with Racket 5.x
(as it was at the time) on the WNDR3700v2 without using a swap file on a
USB stick (!). Simply not enough RAM or storage for Racket.


Very good to know.  Guess I'll just target the 128MB RAM devices, and 
not even bother with 64MB.  This weekend I'm writing a (hopefully) 
very-small-footprint HTTP-serving module in pure Racket.


Neil V.

--
You received this message because you are subscribed to the Google Groups Racket 
Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] racket on openwrt devices

2015-05-03 Thread Tony Garnock-Jones
On 2015-05-03 2:50 PM, Neil Van Dyke wrote:
 128 RAM and 128 NAND flash, albeit with a different SoC with lower 
 CPU clock rate.  I don't want to rely on USB Storage for this 
 project.

I should mention also that I couldn't do anything useful with Racket 5.x
(as it was at the time) on the WNDR3700v2 without using a swap file on a
USB stick (!). Simply not enough RAM or storage for Racket.

Tony

-- 
You received this message because you are subscribed to the Google Groups 
Racket Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] racket on openwrt devices

2015-05-02 Thread Neil Van Dyke
What's the current viability of running Racket on a small OpenWRT 
device?  (Anything new, such as due to the recent modularization of the 
core?)


For example of specs of a popular beefy retail home WiFi router that 
runs OpenWRT well:


Processor: Atheros AR7161 rev 2 680MHz (MIPS arch)
RAM: 64MiB
Flash: 16MiB

Getting that up as high as 128MB RAM and 64MB-128MB flash would probably 
be doable, but fitting Racket on the device within the above specs is 
strongly preferable, for open source projects.


(In the open source application I have in mind, Racket would leave the 
TCP/IP to OpenWRT and the SoC, and spend most of its time doing a 
different kind of protocol through a special USB device.)


Neil V.

--
You received this message because you are subscribed to the Google Groups Racket 
Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.