As of deets 0.1, you can now also populate Cosmo template variables through Lua code. For example:
/tmp/silly.lua:
require("utils-grep")
local intel = grep_program_output("VGA.*Intel","lspci")
file.file({"/tmp/garbage"}, {
ensure = "present",
owner = "root",
group = "root",
mode = "755",
source = file.cosmotemplate("/tmp/silly.cosmo", intel)
})
/tmp/silly.cosmo:
# On $systeminfo|hostname, we might have used the following information
# to populate this config file.
#
# We did not.
$map{$v|1}[[# $it]]
Then run sudo luau --rectify /tmp/silly.lua and your /tmp/garbage should
be equally useless whether or not you have an Intel video card.
% ssh root@192.168.2.15
root@192.168.2.15's password:
BusyBox v1.19.0.git (Maemo 3:1.19-7+0m6) built-in shell (ash)
Enter 'help' for a list of built-in commands.
RM680-22-6_PR_RM680:~# cat /proc/cpuinfo
Processor : ARMv7 Processor rev 2 (v7l)
BogoMIPS : 298.32
Features : swp half thumb fastmult vfp edsp neon vfpv3
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x3
CPU part : 0xc08
CPU revision : 2
Hardware : Nokia RM-680 board
Revision : 1124
Serial : 0000000000000000
SoC Info : OMAP3630 ES1.2-hs
IDCODE : 2b89102f
Pr. ID : 00000000 00000000 000000cc cafeb891
RM680-22-6_PR_RM680:~# uname -a
Linux RM680 2.6.32.39-dfl61-20112201 #1 PREEMPT Wed Jun 1 18:17:45 EEST 2011 armv7l GNU/Linux
RM680-22-6_PR_RM680:~# dpkg --version | head -n 1
Debian `dpkg' package management program version 1.15.8.8 (armel).
RM680-22-6_PR_RM680:~# apt-get --version | head -n 1
apt 0.7.25.3 for armel compiled on Mar 28 2011 23:31:47
I am holding a device running MeeGo 1.2 Harmattan 1.2011.22-6PRRM680, courtesy of the good folks at Nokia.
If you have debootstrapped the internal microSD card, the vendor-supplied U-Boot config should serve you adequately.
To boot off of a USB stick, however, interrupt the boot sequence (if you don't have a JTAG/serial board at this point, go buy one immediately), and enter the following commands:
setenv x_bootcmd_kernel fatload usb 1:1 0x6400000 uImage
setenv x_bootargs_root root=/dev/sdc2 rootdelay=10
saveenv
reset
If you just want to testboot once, and don't want to make
it permanent, omit the saveenv. If you do want to make
it permanent, consider removing the superfluous pings from
the bootcmd, but be careful to escape semicolons and
dollar signs instead of zealously copying and pasting.
If you haven't bothered putting a FAT partition with uImage
on the USB stick, omit the setenv x_bootcmd_kernel line.
Once you've booted Debian, you may wish to natively-debootstrap or copy your new partition to /dev/sda2 (which is what Linux will call the ext3 partition of your microSD card).
To then return to fully booting off of microSD so you can repurpose the USB stick,
setenv x_bootcmd_kernel fatload usb 0:1 0x6400000 uImage
setenv x_bootargs_root root=/dev/sda2 rootdelay=10
saveenv
reset
Enjoy.
Processor : ARMv6-compatible processor rev 6 (v6l)
BogoMIPS : 132.71
Features : swp half thumb fastmult edsp java
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xb76
CPU revision : 6
Cache type : write-back
Cache clean : cp15 c7 ops
Cache lockdown : format C
Cache format : Harvard
I size : 16384
I assoc : 4
I line length : 32
I sets : 128
D size : 16384
D assoc : 4
D line length : 32
D sets : 128
Hardware : SMDK6410
Revision : 0000
Finally (2010.09~rc1-2) I am running Debian's U-Boot on the Sheevaplug, and booting with this env:
bootcmd=run bootcmd_mmc; bootm 0x300000 0x0800000
bootargs=console=ttyS0,115200 root=/dev/mmcblk0p2
bootcmd_mmc=mmc init; mmc init; ext2load mmc 0 0x0800000 /uInitrd; ext2load mmc 0 0x300000 /uImage
Having to run mmc init twice is annoying, but it beats dealing
with whichever fork I had on it last.
I am betting that Luakit will be more usable than Uzbl within a week. I am also betting that I will hear chirping about Luakit not integrating with the Monkeysphere, and though I agree that this is a problem, it seems to be difficult to solve.
To do it correctly, one would need hooks or callbacks in WebKitGTK+, which, in turn, would need support in LibSoup, which would probably then need support in GnuTLS.
Since apparently this will take years of bickering to accomplish, perhaps some sort of hack is called for. I suppose one could, for each HTTPS URL visited, make an OOB connection, download the certificate, and then run it through Monkeysphere validation, before then letting WebKitGTK+ make another connection and download (hopefully the same) certificate a second time.
This strikes me as ugly and problematic. Ideas?
Processor : ARMv7 Processor rev 5 (v7l)
BogoMIPS : 799.53
Features : swp half thumb fastmult vfp edsp thumbee neon vfpv3
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x2
CPU part : 0xc08
CPU revision : 5
Hardware : Genesi Efika MX
Revision : 51030
Serial : 0000000000000000`
total used free shared buffers cached
Mem: 482740 44836 437904 0 4672 21104
-/+ buffers/cache: 19060 463680
Swap: 0 0 0
Bus 002 Device 002: ID 0b95:772a ASIX Electronics Corp.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 13d3:3273 IMC Networks 802.11 n/g/b Wireless LAN USB Mini-Card
Bus 001 Device 002: ID 1a40:0101 TERMINUS TECHNOLOGY INC. USB-2.0 4-Port HUB
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
% sudo fw_printenv | sed 's/^/sudo fw_setenv /;s/=/ "/;s/$/"/;'
sudo fw_setenv bootcmd "setenv ethact egiga0; ${x_bootcmd_ethernet}; setenv ethact egiga1; ${x_bootcmd_ethernet}; ${x_bootcmd_usb}; ${x_bootcmd_kernel}; setenv bootargs ${x_bootargs} ${x_bootargs_root}; bootm 0x6400000;"
sudo fw_setenv bootdelay "3"
sudo fw_setenv baudrate "115200"
sudo fw_setenv x_bootcmd_ethernet "ping 192.168.2.1"
sudo fw_setenv x_bootcmd_usb "usb start"
sudo fw_setenv x_bootcmd_kernel "nand read.e 0x6400000 0x100000 0x400000"
sudo fw_setenv x_bootargs "console=ttyS0,115200"
sudo fw_setenv x_bootargs_root "ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs"
sudo fw_setenv stdin "serial"
sudo fw_setenv stdout "serial"
sudo fw_setenv stderr "serial"
sudo fw_setenv ethact "egiga0"
sudo fw_setenv ethaddr "00:99:99:99:99:99"
sudo fw_setenv eth1addr "00:99:99:99:99:98"