Difference between revisions of "Patchstick"

From AwkwardTV
Jump to: navigation, search
(Secondary goals)
(Code ideas)
Line 108: Line 108:
 
# v20070331.0
 
# v20070331.0
 
#
 
#
 +
 +
# Set a source and target to make it easier to test the
 +
# script's actions.
 +
source=""
 +
target="/Volumes/OSBoot"
  
 
echo -n "Disabling watchdog..."
 
echo -n "Disabling watchdog..."
mkdir /Volumes/OSBoot/etc/mach_init.disabled
+
mkdir $target/etc/mach_init.disabled
mv /Volumes/OSBoot/etc/mach_init.d/ripstop.plist /Volumes/OSBoot/etc/mach_init.disabled
+
mv $target/etc/mach_init.d/ripstop.plist $target/etc/mach_init.disabled
echo "/sbin/kextunload -b com.apple.driver.AppleTCOWatchdog" >> /Volumes/OSBoot/etc/rc.local  
+
echo "$source/sbin/kextunload -b com.apple.driver.AppleTCOWatchdog" >> $target/etc/rc.local  
 
echo "done"
 
echo "done"
 
echo -n "Installing sshd..."
 
echo -n "Installing sshd..."
cp /usr/sbin/sshd /Volumes/OSBoot/usr/sbin/
+
cp $source/usr/sbin/sshd $target/usr/sbin/
cp /System/Library/LaunchDaemons/ssh.plist /Volumes/OSBoot/System/Library/LaunchDaemons/ssh.plist
+
cp $source/System/Library/LaunchDaemons/ssh.plist $target/System/Library/LaunchDaemons/ssh.plist
 
echo "done"
 
echo "done"
 
echo -n "Installing various programs..."
 
echo -n "Installing various programs..."
cp /usr/bin/sort /Volumes/OSBoot/usr/bin/sort
+
cp $source/usr/bin/sort $target/usr/bin/sort
cp /usr/bin/nidump /Volumes/OSBoot/usr/bin/nidump
+
cp $source/usr/bin/nidump $target/usr/bin/nidump
cp /usr/bin/passwd /Volumes/OSBoot/usr/bin/passwd
+
cp $source/usr/bin/passwd $target/usr/bin/passwd
cp /usr/bin/du /Volumes/OSBoot/usr/bin/du
+
cp $source/usr/bin/du $target/usr/bin/du
cp /usr/bin/kdump /Volumes/OSBoot/usr/bin/kdump
+
cp $source/usr/bin/kdump $target/usr/bin/kdump
cp /usr/bin/ktrace /Volumes/OSBoot/usr/bin/ktrace
+
cp $source/usr/bin/ktrace $target/usr/bin/ktrace
cp /usr/sbin/kextstat /Volumes/OSBoot/usr/sbin/kextstat
+
cp $source/usr/sbin/kextstat $target/usr/sbin/kextstat
cp /usr/bin/gdb /Volumes/OSBoot/usr/bin/gdb/
+
cp $source/usr/bin/gdb $target/usr/bin/gdb/
cp /usr/bin/vim /Volumes/OSBoot/usr/bin/
+
cp $source/usr/bin/vim $target/usr/bin/
cp /usr/bin/nc /Volumes/OSBoot/usr/bin/
+
cp $source/usr/bin/nc $target/usr/bin/
cp /usr/bin/diff /Volumes/OSBoot/usr/bin/
+
cp $source/usr/bin/diff $target/usr/bin/
cp /usr/bin/strings /Volumes/OSBoot/usr/bin/
+
cp $source/usr/bin/strings $target/usr/bin/
cp -pRvf /usr/libexec/gdb /Volumes/OSBoot/usr/libexec/
+
cp -pRvf $source/usr/libexec/gdb $target/usr/libexec/
cp -pRvf /Volumes/OSBoot/System/Library/PrivateFrameworks/PlatformHardwareManagement.framework /Volumes/OSBoot/System/Library/PrivateFrameworks/
+
cp -pRvf $target/System/Library/PrivateFrameworks/PlatformHardwareManagement.framework $target/System/Library/PrivateFrameworks/
cp /usr/bin/bspatch /Volumes/OSBoot/usr/bin/
+
cp $source/usr/bin/bspatch $target/usr/bin/
cp /usr/bin/bzip2 /Volumes/OSBoot/usr/bin/
+
cp $source/usr/bin/bzip2 $target/usr/bin/
 
echo "done"
 
echo "done"
 
</pre>
 
</pre>

Revision as of 17:47, 3 April 2007

This is the page about Project Patchstick, a 100% legal way to open up the ATV for hacking without having to open the case.

Primary Goals

  • Build our own Darwin kernel that boots on the ATV
  • Build our own sshd (probably dropbear)
  • Install sshd on the ATV, enable it

Secondary goals

Steps to be taken

  • get a homebrew Darwin kernel to boot up
  • build boot scripts that upload the sshd binary to the ATV, and enable it

Artwork


XML format for fetching additional plugins

The idea is to have an XML format for fetching information on available plugins that is as easy as possible and as flexible as necessary. Please comment.

alan_quatermain is working on a frappliance that uses this data.

http://plugins.awkwardtv.org/xml/

<?xml version="1.0" encoding="utf-8"?>
<item>
    <category>Communication</category>
    <title>My Great New Frappliance</title>
    <shortname>mygreatnewfrappliance</shortname>
    <version>0.1</version>
</item>

<item>
...
</item>

Once the user clicks that, mygreatnewfrappliance XML gets loaded:

http://plugins.awkwardtv.org/xml/?p=atvfiles

<?xml version="1.0" encoding="utf-8"?>
<item>
    <category>Communication</category>
    <title>My Great New Frappliance</title>
    <shortname>mygreatnewfrappliance</shortname>
    <author>Joe Doe</author>
    <icon url="http://example.com/downloads/icon" />
    <screenshot url="http://example.com/downloads/icon" />
    <enclosure url="http://example.com/downloads/mygreatnewfrappliance.tgz"  md5="5655cc6f7d1ba118665fe14be41ad296" length="5650889" type="application/tgz" />
    <guid>mygreatnewfrappliance</guid>
    <version>1.0v1</version>
    <pubDate>Wed, 8 Jun 2005 19:00:00 GMT</pubDate>
    <copyright>© Copyright 2007 Joe Doe</copyright>
    <license>GPL</license>
    <url>http://www.mygreatsite.com/myproduct</url>
    <keywords>(set of keywords to be defined)</keywords>
    <info>
        <English>
            <subtitle>Cooking plugins is fun!</subtitle>
            <summary>This plugin doesn't really exist, but here we have one sentence of description saying what it does and why it is so insanely great.</summary>
            <description>A longer description here, up to one screen page</description>
        </English>
        <Dutch>
        </Dutch>
        <French>
        </French>
        <German>
            <subtitle></subtitle>
            <summary></summary>
            <description></description>
        </German>
        <Italian>
            <subtitle></subtitle>
            <summary></summary>
            <description></description>
        </Italian>
        <Japanese>
            <subtitle></subtitle>
            <summary></summary>
            <description></description>
        </Japanese>
        <Spanish>
            <subtitle></subtitle>
            <summary></summary>
            <description></description>
        </Spanish>
    </info>
</item>

Code ideas

#!/bin/sh

#
# Initial ideas for AwkwardTV Patchstick Script to be done
# by phoem at phoempc.com
# v20070331.0
#

# Set a source and target to make it easier to test the
# script's actions.
source=""
target="/Volumes/OSBoot"

echo -n "Disabling watchdog..."
mkdir $target/etc/mach_init.disabled
mv $target/etc/mach_init.d/ripstop.plist $target/etc/mach_init.disabled
echo "$source/sbin/kextunload -b com.apple.driver.AppleTCOWatchdog" >> $target/etc/rc.local 
echo "done"
echo -n "Installing sshd..."
cp $source/usr/sbin/sshd $target/usr/sbin/
cp $source/System/Library/LaunchDaemons/ssh.plist $target/System/Library/LaunchDaemons/ssh.plist
echo "done"
echo -n "Installing various programs..."
cp $source/usr/bin/sort $target/usr/bin/sort
cp $source/usr/bin/nidump $target/usr/bin/nidump
cp $source/usr/bin/passwd $target/usr/bin/passwd
cp $source/usr/bin/du $target/usr/bin/du
cp $source/usr/bin/kdump $target/usr/bin/kdump
cp $source/usr/bin/ktrace $target/usr/bin/ktrace
cp $source/usr/sbin/kextstat $target/usr/sbin/kextstat
cp $source/usr/bin/gdb $target/usr/bin/gdb/
cp $source/usr/bin/vim $target/usr/bin/
cp $source/usr/bin/nc $target/usr/bin/
cp $source/usr/bin/diff $target/usr/bin/
cp $source/usr/bin/strings $target/usr/bin/
cp -pRvf $source/usr/libexec/gdb $target/usr/libexec/
cp -pRvf $target/System/Library/PrivateFrameworks/PlatformHardwareManagement.framework $target/System/Library/PrivateFrameworks/
cp $source/usr/bin/bspatch $target/usr/bin/
cp $source/usr/bin/bzip2 $target/usr/bin/
echo "done"