hello from shelly

This commit is contained in:
Aurel Feer 2022-05-22 17:21:17 +02:00
parent 12c1c2a23a
commit f7441cb70d
6 changed files with 45 additions and 3 deletions

View File

@ -6,9 +6,10 @@ bootdriver /armv8/sbin/boot_armv8_generic
cpudriver /armv8/sbin/cpu_a57_qemu loglevel=3 serial=0x9000000 logmask=128
module /armv8/sbin/init
module /armv8/sbin/hello echoclient
module /armv8/sbin/memeater
# module /armv8/sbin/memeater
module /armv8/sbin/mallocator
module /armv8/sbin/stackoverflow
module /armv8/sbin/echoserver
module /armv8/sbin/shelly
# End of file, this needs to have a certain length...

View File

@ -7,7 +7,8 @@ cpudriver /armv8/sbin/cpu_imx8x
module /armv8/sbin/init
module /armv8/sbin/enet
module /armv8/sbin/hello echoclient
module /armv8/sbin/memeater
# module /armv8/sbin/memeater
module /armv8/sbin/mallocator
module /armv8/sbin/stackoverflow
module /armv8/sbin/echoserver
module /armv8/sbin/shelly

View File

@ -12,7 +12,7 @@
let
-- Default list of modules to build/install
modules_common = [ "/sbin/" ++ f | f <- [ "init", "hello", "memeater", "mallocator", "stackoverflow", "echoserver", "enet"
modules_common = [ "/sbin/" ++ f | f <- [ "init", "hello", "mallocator", "stackoverflow", "echoserver", "enet", "shelly"
] ]
in
[

View File

@ -313,6 +313,14 @@ app_main(int argc, char *argv[]) {
// Grading
grading_test_late();
//spawn shell
struct spawninfo shelly_si;
domainid_t shelly_pid;
err = spawn_load_by_name("shelly", &shelly_si, &shelly_pid);
if (err_is_fail(err)) {
DEBUG_ERR(err, "when spawning shelly");
}
debug_printf("Message handler loop\n");
// Hang around
struct waitset *default_ws = get_default_waitset();

18
usr/shelly/Hakefile Normal file
View File

@ -0,0 +1,18 @@
--------------------------------------------------------------------------
-- Copyright (c) 2007-2010, ETH Zurich.
-- All rights reserved.
--
-- This file is distributed under the terms in the attached LICENSE file.
-- If you do not find this file, copies can be found by writing to:
-- ETH Zurich D-INFK, Haldeneggsteig 4, CH-8092 Zurich. Attn: Systems Group.
--
-- Hakefile for /usr/shelly
--
--------------------------------------------------------------------------
[ build application
{
target = "shelly",
cFiles = [ "shelly.c" ]
}
]

14
usr/shelly/shelly.c Normal file
View File

@ -0,0 +1,14 @@
/**
* \file
* \brief shelly - a shell process
*/
#include <stdio.h>
#include <stdlib.h>
#include <aos/aos.h>
int main(int argc, char *argv[])
{
debug_printf("welcome to shelly!\n");
}