Page 1 of 1

The power of SSH

Posted: Tue Dec 29, 2009 4:23 pm
by M_D_K
What happens when you add ssh and dc-tool together? you get a dreamcast in another country doing shit 'magically' :)

Code: Select all

(10:17:01 PM) Falco: What linux voodoo do I need
(10:17:02 PM) Falco: OH FUCK
(10:17:04 PM) M_D_K: :D
(10:17:12 PM) M_D_K: it worked
(10:17:16 PM) M_D_K: I had to arp first
(10:17:19 PM) Falco: what did you send?
(10:17:24 PM) Falco: black screen.
(10:17:24 PM) M_D_K: lua test
(10:17:29 PM) Falco: you getting the output?
(10:17:45 PM) Falco: and you just reset my DC.
(10:17:53 PM) Falco: Post this shit on the forums.
(10:18:03 PM) Falco: You're remotely compiling and sending to my DC from a different country via SSH
(10:18:05 PM) Falco: holy fuck.
(10:18:06 PM) Falco: bubbles!
(10:18:09 PM) M_D_K: ;)
(10:18:24 PM) Falco: this is fucking 1337.
and my ssh window

Code: Select all

mdk@ubuntu-server:~/lua_dc_test$ sudo arp -s 192.168.1.6 00d0f102b32d
mdk@ubuntu-server:~/lua_dc_test$ dc-tool -x lua_dc_test.elf -t 192.168.1.6
Console enabled
Upload <lua_dc_test.elf>
File format is elf32-shl, start address is 0x8c010000
Section .text, lma 0x8c010000, size 340608
Section .rodata, lma 0x8c063280, size 37064
Section .eh_frame, lma 0x8c06c348, size 228
Section .ctors, lma 0x8c06c4ac, size 8
Section .dtors, lma 0x8c06c4b4, size 8
Section .data, lma 0x8c06c4c0, size 12700
Section .stack, lma 0x300000, size 4
transferred 390620 bytes at 1047019.657994 bytes / sec
Executing at <0x8c010000>
Sending execute command (0x8c010000, console=1, cdfsredir=0)...executing

--
KallistiOS ##version##: Sat Dec 19 22:36:22 CST 2009
  mdk@ubuntu-server:/usr/local/dc/kos
thd: pre-emption enabled, HZ=100
maple: active drivers:
    Dreameye (Camera): Camera
    Sound Input Peripheral: Microphone
    PuruPuru (Vibration) Pack: JumpPack
    VMU Driver: Clock, LCD, MemoryCard
    Mouse Driver: Mouse
    Keyboard Driver: Keyboard
    Controller Driver: Controller
  DMA Buffer at ac0a5ce0
vid_set_mode: 640x480 NTSC
dc-load console support enabled
maple: attached devices:
  A0: Dreamcast Controller          (01000000: Controller)
  A1: Visual Memory                 (0e000000: Clock, LCD, MemoryCard)
  B0: Keyboard                      (40000000: Keyboard)
string - y
number - x
result of luaL_dofile() is 0
arch: shutting down kernel
maple: final stats -- device count = 3, vbl_cntr = 5, dma_cntr = 5
vid_set_mode: 640x480 NTSC
mdk@ubuntu-server:~/lua_dc_test$ dc-tool -r -t 192.168.1.6
Reseting...
mdk@ubuntu-server:~/lua_dc_test$ dc-tool -x ../bubbles/bubbles.elf -t 192.168.1.6
Console enabled
Upload <../bubbles/bubbles.elf>
File format is elf32-shl, start address is 0x8c010000
Section .text, lma 0x8c010000, size 278624
Section .rodata, lma 0x8c054060, size 33452
Section .eh_frame, lma 0x8c05c30c, size 228
Section .ctors, lma 0x8c05c470, size 8
Section .dtors, lma 0x8c05c478, size 8
Section .data, lma 0x8c05c480, size 13308
Section .stack, lma 0x300000, size 4
transferred 325632 bytes at 979524.063003 bytes / sec
Executing at <0x8c010000>
Sending execute command (0x8c010000, console=1, cdfsredir=0)...executing

--
KallistiOS ##version##: Sat Dec 19 22:36:22 CST 2009
  mdk@ubuntu-server:/usr/local/dc/kos
thd: pre-emption enabled, HZ=100
maple: active drivers:
    Dreameye (Camera): Camera
    Sound Input Peripheral: Microphone
    PuruPuru (Vibration) Pack: JumpPack
    VMU Driver: Clock, LCD, MemoryCard
    Mouse Driver: Mouse
    Keyboard Driver: Keyboard
    Controller Driver: Controller
  DMA Buffer at ac09e040
vid_set_mode: 640x480 NTSC
dc-load console support enabled
maple: attached devices:
  A0: Dreamcast Controller          (01000000: Controller)
  A1: Visual Memory                 (0e000000: Clock, LCD, MemoryCard)
  B0: Keyboard                      (40000000: Keyboard)
pvr: disabling vertical scaling for VGA
Bubbles KGL sample: press START to exit, A to toggle sphere type
that is all ;)

Re: The power of SSH

Posted: Tue Dec 29, 2009 4:41 pm
by kamokow
Thats... awesome, on so many levels. Ill leave it at that.

Re: The power of SSH

Posted: Tue Dec 29, 2009 4:52 pm
by Trask
So, no more excuses of devs not being at home to work on the game?


SSH tutorial for iPOD Touches, so dev on the iPOD and compile it from where ever you are using the above...get to work Falco! :D

http://www.ipodtouchhacks.com/ipod-touc ... ow-to-ssh/

Re: The power of SSH

Posted: Tue Dec 29, 2009 5:07 pm
by M_D_K
yeah I do that for my itouch, I made a template Makefile which handles pretty much everything

Code: Select all

APPNAME="GLTest"
CC=arm-apple-darwin9-gcc
CXX=arm-apple-darwin9-g++
LD=$(CC)
SRC=src
IMG=img/

LDFLAGS=	-lobjc \
		-bind_at_load \
		-framework Foundation \
		-framework CoreFoundation \
		-framework UIKit \
		-framework QuartzCore \
		-framework OpenGLES \
		-framework CoreGraphics \
		-F/usr/local/iphone-toolchain/sys/System/Library/PrivateFrameworks \
		-framework GraphicsServices \
		-w

all: $(APPNAME) bundle

OBJS=$(patsubst %.m,%.o,$(wildcard $(SRC)/*.m))
OBJS+=$(patsubst %.mm, %.o, $(wildcard $(SRC)/*.mm)) 
OBJS+=$(patsubst %.c,%.o,$(wildcard $(SRC)/*.c))
OBJS+=$(patsubst %.cpp,%.o,$(wildcard $(SRC)/*.cpp))

$(APPNAME): $(OBJS)
	$(LD) $(LDFLAGS) -o $@ $^

%.o:    %.mm
	$(CC) -c $(CPPFLAGS) $< -o $@

%.o:	%.m
	$(CC) -c $(CFLAGS) $< -o $@

%.o:	%.c
	$(CC) -c $(CFLAGS) $< -o $@

%.o:	%.cpp
	$(CC) -c $(CPPFLAGS) $< -o $@

bundle: $(APPNAME)
	@echo "Bundling $(APPNAME) to $(APPNAME).app"
	@mkdir -p $(APPNAME).app
	@cp $(APPNAME) $(APPNAME).app/$(APPNAME)_
	@cp ${IMG}* $(APPNAME).app
	$(shell ./create_shit.sh $(APPNAME))
	@cp Info.plist $(APPNAME).app
	@cp $(APPNAME).sh $(APPNAME).app/$(APPNAME)

install: clean bundle
	@echo "Installing $(APPNAME) at $(IP)"
	@echo "If you don't want to get asked for your pass 3 times set up ssh keys ;)"
	@ssh root@$(IP) "cd /Applications && rm -Rf $(APPNAME).app"
	@scp -rp $(APPNAME).app root@$(IP):/Applications
	@echo "Oh yeah you need sudo on the iphone/itouch as well(it's in Cydia)"
	@ssh root@$(IP) "cd /Applications/$(APPNAME).app ; ldid -S $(APPNAME)_; sudo -u mobile uicache"

uninstall:
	@echo "Uninstalling $(APPNAME) at $(IP)"
	@ssh root@$(IP) "cd /Applications && rm -Rf $(APPNAME).app; sudo -u mobile uicache"

clean:
	@echo "Cleaning..."
	@rm -f $(SRC)/*.o
	@rm -Rf $(APPNAME).app
	@rm -f $(APPNAME).sh
	@rm -f $(APPNAME)
	@rm -f Info.plist
create_shit.sh modifies a template info.plist to one suited to your app (right now verry limited)

Code: Select all

#/bin/bash

if [ $# -eq 0 ]; then
	echo "usage: create_shit.sh [APPNAME]";
	exit 0
fi

if [ -e "./$1.sh" ]; then
	echo "launcher exists, not recreating";
	exit 0
fi

#used so your app will more than likely launch properly as there are sometimes problems with which directory it's launched 'from'
echo "#!/bin/bash" > "$1.sh"
echo "HT=\$(dirname \"\$0\")" >> "$1.sh"
echo "exec \"\${HT}\"/$1_" >> "$1.sh"
chmod a+x "$1.sh"
cp .info.plist Info.plist

APPLOWER=`echo $1 | tr A-Z a-z `;
#I'll probably end up making this better so you can pass options and it
#totally generates an Info.plist not just modifies an existing one
sed -i "s/APPNAME/$1/" Info.plist
sed -i "s/APPLOWER/$APPLOWER/" Info.plist

Re: The power of SSH

Posted: Tue Dec 29, 2009 5:40 pm
by Falco Girgis
Trask wrote:So, no more excuses of devs not being at home to work on the game?


SSH tutorial for iPOD Touches, so dev on the iPOD and compile it from where ever you are using the above...get to work Falco! :D

http://www.ipodtouchhacks.com/ipod-touc ... ow-to-ssh/
Dude, I've been compiling for Dreamcast/PSP and even updating our repositories from SSH-ing via my iPhone for months now. ;)

Re: The power of SSH

Posted: Tue Dec 29, 2009 6:12 pm
by Trask
GyroVorbis wrote:
Trask wrote:So, no more excuses of devs not being at home to work on the game?


SSH tutorial for iPOD Touches, so dev on the iPOD and compile it from where ever you are using the above...get to work Falco! :D

http://www.ipodtouchhacks.com/ipod-touc ... ow-to-ssh/
Dude, I've been compiling for Dreamcast/PSP and even updating our repositories from SSH-ing via my iPhone for months now. ;)

LOL, that's great :D

Re: The power of SSH

Posted: Tue Dec 29, 2009 10:38 pm
by dandymcgee
:worship: No words...

Re: The power of SSH

Posted: Wed Dec 30, 2009 12:41 pm
by avansc
this has been going for 40 years. i think the telnet RFC is one of the first, certainly in the first 50. not encrypted like SSH and not as nice, altho ssh does not support some archaic archs(OS2), so in some instances telnet is still used. but remote consoles have been around since moses.

but pretty neat shit non the less.

edit: http://www.ietf.org/rfc/rfc0015.txt?number=15

Re: The power of SSH

Posted: Wed Dec 30, 2009 1:56 pm
by dandymcgee
avansc wrote:this has been going for 40 years. i think the telnet RFC is one of the first, certainly in the first 50. not encrypted like SSH and not as nice, altho ssh does not support some archaic archs(OS2), so in some instances telnet is still used. but remote consoles have been around since moses.

but pretty neat shit non the less.

edit: http://www.ietf.org/rfc/rfc0015.txt?number=15
I knew that, I love SSH. I had just never thought of using it to remotely compile a project on a Sega DreamCast. 8-)