s-macke / jor1k

Online OR1K Emulator running Linux
http://jor1k.com
BSD 2-Clause "Simplified" License
1.73k stars 196 forks source link

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) #84

Closed remisharrock closed 8 years ago

remisharrock commented 9 years ago

Hello, when I launch the demos on the gh-pages branch, it works. But when I launch the demos on the current master branch, I get this error :

image

s-macke commented 9 years ago

Yes, sorry about that. You need a newer kernel binary. Since Linux 4.0 or 4.1 they changed the endianess behavior of virtio. I didn't update the kernel, because the smp version doesn't work yet and everytime I update the kernel the repository increase by a few MB.

s-macke commented 9 years ago

you can try http://jor1k.com/jor1k/bin/or1k/vmlinux.bin.bz2

s-macke commented 9 years ago

Also I plan to change a lot of drivers to use virtio. That's why I might wait until Linux 4.2 until I update everything.

remisharrock commented 9 years ago

@s-macke : thanks ! I tried without success, same error. By the way, could you send me the source code for http://jor1k.com/sync/upload.php and the "how to setup the websocket server" wss://relay.widgetry.org/ ? I'd like to have a working installation on one server. How is going the local file system integration ? Also waiting for linux 4.2 ? Great job, I love your projet !

ysangkok commented 9 years ago

@remisharrock The websocket server is easy to setup, just run the Python script: https://github.com/benjamincburns/websockproxy

s-macke commented 9 years ago

The cloud function was broken. Fixed it. :)

Here is the script. It never worked flawless.

I. e. the user seems to have to upload the whole file and then it is checked if the size matches. This check should be done before uploading somehow and then the file should be rejected. Also I am not sure, if the error messages are returned correctly.

There is also some shell command executed dependent on a user provided string. This is not a good style. Even if the string is cleared of special signs.

It might be also good to send an already compressed version of the file for improved upload speed.

<?php
header('Access-Control-Allow-Origin: *');
ini_set('upload_max_filesize', '1M');
ini_set('post_max_size', '1M');

function clean($string) {
   $string = str_replace(' ', '-', $string); // Replaces all spaces with hyphens.
   return preg_replace('/[^A-Za-z0-9\-\.]/', '', $string); // Removes special chars.
}

$target = "tarballs/";
$target = $target . clean( basename( $_FILES['uploaded']['name']) ) ;
$ok=1;

//This is our size condition

if ($uploaded_size > 1048576)
{
        echo "Your file is too large.<br>";
        $ok=0;
}

//This is our limit file type condition
if ($uploaded_type =="text/php")
{
        echo "No PHP files<br>";
        $ok=0;
}

//Here we check that $ok was not set to 0 by an error
if ($ok==0)
{
         Echo "Sorry your file was not uploaded";
}
//If everything is ok we try to upload it
else
{
        if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target))
        {
                echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded";
                shell_exec('bzip2 -f '.$target);
        }
        else
        {
                echo "Sorry, there was a problem uploading your file.";
        }
}
?>      
s-macke commented 9 years ago

I have started to move all binary into a submodule. Once finished I won't have to worry anymore about the size of repository. d49616932af50f9f9cc6a1366ded18c25b3c5840

s-macke commented 8 years ago

Done, the last commits change all binary folders to the submodule. The master branch is finally usable again. Can you test it?