feat/webworker: work in progress [might break]
This commit is contained in:
parent
64ae2ffd0b
commit
d72f7325ec
File diff suppressed because it is too large
Load Diff
|
@ -17,13 +17,13 @@ test -f "$1" && {
|
||||||
# and differentiate processes by prefixing output by PID's
|
# and differentiate processes by prefixing output by PID's
|
||||||
# to parse it later with AWK, but it was very hairy
|
# to parse it later with AWK, but it was very hairy
|
||||||
|
|
||||||
OUTPUT=/mnt/$PID
|
OUTPUT=/mnt/run/$PID # com/isoterminal/feat/javascript.js writes output here
|
||||||
|
|
||||||
|
touch $OUTPUT
|
||||||
echo -n "PID=$PID; $javascript" > /dev/browser/js
|
echo -n "PID=$PID; $javascript" > /dev/browser/js
|
||||||
sleep 0.1
|
# todo watch file
|
||||||
test -f $OUTPUT && {
|
cat $OUTPUT
|
||||||
cat $OUTPUT
|
rm $OUTPUT
|
||||||
rm $OUTPUT
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# should we use flock, an awesome way to make processes read/write the same file
|
# should we use flock, an awesome way to make processes read/write the same file
|
||||||
|
|
|
@ -30,6 +30,9 @@ help_tips(){
|
||||||
echo ""
|
echo ""
|
||||||
echo 'TIPS'
|
echo 'TIPS'
|
||||||
echo '----'
|
echo '----'
|
||||||
|
echo 'text editors ' "type '<vi|mg|nano> <textfile>'"
|
||||||
|
echo 'programming languages ' "type 'ls ~/bin/helloworld*'"
|
||||||
|
echo 'run 64bit linux app ' "type 'blink <x86_64 binary>'"
|
||||||
echo 'js run ' "type 'js 'alert(\"hello\")'"
|
echo 'js run ' "type 'js 'alert(\"hello\")'"
|
||||||
echo 'js console.log: ' "type 'console document.baseURI"
|
echo 'js console.log: ' "type 'console document.baseURI"
|
||||||
echo 'js function as cmd: ' "type 'alias $1=\"jsh $1\"' to run '$1 yo' as $1('yo')"
|
echo 'js function as cmd: ' "type 'alias $1=\"jsh $1\"' to run '$1 yo' as $1('yo')"
|
||||||
|
@ -38,7 +41,6 @@ help_tips(){
|
||||||
echo 'js capture console: ' "type 'tail -f /dev/browser/console'"
|
echo 'js capture console: ' "type 'tail -f /dev/browser/console'"
|
||||||
echo 'jsh<->sh hooks: ' "type 'chmod +x ~/hook.d/*/* && alert helloworld'"
|
echo 'jsh<->sh hooks: ' "type 'chmod +x ~/hook.d/*/* && alert helloworld'"
|
||||||
echo 'include file into page' "type 'require <url.js|css>'"
|
echo 'include file into page' "type 'require <url.js|css>'"
|
||||||
echo 'create AFRAME a-entity' "type 'a_entity <componentname> [...]"
|
|
||||||
echo ''
|
echo ''
|
||||||
echo 'type "help" or "man xrsh" to read the full manual'
|
echo 'type "help" or "man xrsh" to read the full manual'
|
||||||
ONBOARDING=1
|
ONBOARDING=1
|
||||||
|
|
|
@ -15,4 +15,3 @@ if( !window['/etc/profile.js'] ){
|
||||||
|
|
||||||
window['/etc/profile.js'] = true
|
window['/etc/profile.js'] = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
test -d /dev/browser || {
|
test -d /dev/browser || {
|
||||||
|
|
||||||
move_root_to_9pfs(){
|
move_root_to_9pfs(){
|
||||||
|
mkdir /mnt/run # for javascript<->unix pids
|
||||||
test -d /mnt/root && return 0
|
test -d /mnt/root && return 0
|
||||||
mv /root /mnt/.
|
mv /root /mnt/.
|
||||||
ln -fs /mnt/root /root
|
ln -fs /mnt/root /root
|
||||||
|
@ -15,14 +16,11 @@ test -d /dev/browser || {
|
||||||
}
|
}
|
||||||
|
|
||||||
setup_browser_dev(){
|
setup_browser_dev(){
|
||||||
mkdir -p /dev/browser
|
mkdir -p /mnt/dev/browser
|
||||||
echo 1 > /mnt/console.tty
|
touch /mnt/dev/browser/js
|
||||||
ln -s /mnt/console.tty /dev/browser/tty
|
touch /mnt/dev/browser/html
|
||||||
ln -fs /mnt/js /dev/browser/js
|
touch /mnt/dev/browser/console
|
||||||
ln -fs /mnt/index.html /dev/browser/html
|
ln -fs /mnt/dev/browser /dev/browser
|
||||||
ln -fs /mnt/console /dev/browser/console
|
|
||||||
touch /mnt/console
|
|
||||||
touch /mnt/index.html
|
|
||||||
}
|
}
|
||||||
|
|
||||||
setup_network(){
|
setup_network(){
|
||||||
|
@ -40,7 +38,11 @@ test -d /dev/browser || {
|
||||||
# listen for shell cmds passed to v86 from browser
|
# listen for shell cmds passed to v86 from browser
|
||||||
# (via isoterminal.exec(...))
|
# (via isoterminal.exec(...))
|
||||||
stty raw < /dev/ttyS1
|
stty raw < /dev/ttyS1
|
||||||
cat /dev/ttyS1 | xargs -I{} /bin/sh -c 'source /etc/profile; logger "isoterminal.exec({})"; {}'
|
#cat /dev/ttyS1 | xargs -I{} /bin/sh -c 'logger "isoterminal.exec({})"; {}'
|
||||||
|
mkfifo /var/run/ttyS1
|
||||||
|
echo "source /etc/profile" >> /var/run/ttyS1
|
||||||
|
cat /dev/ttyS1 > /var/run/ttyS1 &
|
||||||
|
/bin/sh < /var/run/ttyS1
|
||||||
}
|
}
|
||||||
|
|
||||||
setup_listen_homedir(){
|
setup_listen_homedir(){
|
||||||
|
|
|
@ -4,9 +4,9 @@ alias exitVR='js "document.querySelector(\"a-scene\").enterVR()"'
|
||||||
alias exitAR='js "document.querySelector(\"a-scene\").enterAR()"'
|
alias exitAR='js "document.querySelector(\"a-scene\").enterAR()"'
|
||||||
|
|
||||||
# (new)user friendlyness
|
# (new)user friendlyness
|
||||||
alias vi='echo "HINT: type :q (and press enter) to quit";read;vi';
|
alias vi='echo "HINT: type :q (and press enter) to quit\n[press a key]";read;vi';
|
||||||
alias mg='echo "HINT: type Ctrl+c Ctrl-x to quit";read;me';
|
alias mg='echo "HINT: type Ctrl+c Ctrl-x to quit\n[press a key]";read;me';
|
||||||
alias nano='echo "HINT: type Ctrl+x to quit" ;read;nano';
|
alias nano='echo "HINT: type Ctrl+x to quit\n[press a key]" ;read;nano';
|
||||||
|
|
||||||
# start index.js
|
# start index.js
|
||||||
test -f index.js && chmod +x index.js && ./index.js | grep -v undefined
|
test -f index.js && chmod +x index.js && ./index.js | grep -v undefined
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
7
edit.sh
7
edit.sh
|
@ -1,10 +1,15 @@
|
||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
make BR2_EXTERNAL=/buildroot-v86 v86_defconfig
|
make BR2_EXTERNAL=/buildroot-v86 v86_defconfig
|
||||||
mkdir output/legal-info && touch output/legal-info/{host-licenses,licenses,buildroot.config}
|
mkdir output/legal-info && touch output/legal-info/{host-licenses,licenses,buildroot.config}
|
||||||
|
|
||||||
make menuconfig
|
make menuconfig
|
||||||
|
|
||||||
|
test -d output/busybox-1.33.0 || mkdir -p output/busybox-1.33.0
|
||||||
|
cp /buildroot-v86/.config.busybox output/busybox-1.33.0/.config
|
||||||
make busybox-menuconfig
|
make busybox-menuconfig
|
||||||
|
cp output/busybox-1.33.0/.config /buildroot-v86/.config.busybox
|
||||||
|
|
||||||
make linux-menuconfig
|
make linux-menuconfig
|
||||||
make savedefconfig
|
make savedefconfig
|
||||||
make linux-savedefconfig
|
make linux-savedefconfig
|
||||||
|
|
Loading…
Reference in New Issue