This is a simple exercise designed to get you started on L4. It contains very detailed instructions, together with the existing source code and the L4 manual you should have no problem doing it.
~ % export PATH=$PATH:/home/disy/crossdev/$ARCH/binIf you are lazy you can just use the 9242 command for the cs9242 shell:
~ % 9242 newclass starting new subshell for class COMP9242... ~ % mips64-elf-ld mips64-elf-ld: no input files
~/cs9242 % tar jxvf pistachio-0.4-aos.tar.bz2 ~/cs9242 % cd pistachio-0.4-aos ~/cs9242/pistachio-0.4-aos % mkdir build ~/cs9242/pistachio-0.4-aos % cd kernel ~/cs9242/pistachio-0.4-aos/kernel % make BUILDDIR=`pwd`/../build/u4600-kernel ~/cs9242/pistachio-0.4-aos/kernel % cd ../build/u4600-kernel ~/cs9242/pistachio-0.4-aos/kernel % make menuconfig
~ % cd ~/cs9242/pistachio-0.4-aos/build ~/cs9242/pistachio-0.4-aos/build % mkdir u4600-user ~/cs9242/pistachio-0.4-aos/build % cd u4600-user ~/cs9242/pistachio-0.4-aos/build/u4600-user % ../../user/configure --host=mips64 --with-kerneldir=~/cs9242/pistachio-0.4-aos/build/u4600-kernel/ ~/cs9242/pistachio-0.4-aos/build/u4600-user % make
~/cs9242/pistachio-0.4-aos/build/u4600-user % ~cs9242/bin/u4600 contrib/elf-loader/mips64-loader
~/cs9242/pistachio-0.4-aos/build/u4600-user % cp contrib/elf-loader/mips64-loader /tftpboot/kernel.imgthen on the u4600 prompt do the following (see the Asyst lab notes or using sulima, for further information):
mips15> boot Loading file: 129.94.209.95:kernel.img (elf) 0x80400000/456152 + 55 syms/ Entry address is 80401c38 mips15> gand see some output and the pingpong program.
tar zxvf sos05.tar.gz
cd sos
make
/tftpboot/sos.$USER
tty_test
which starts up, prints out
its thread id, and then goes into a loop.printf
implementation that
outputs data to L4's debug console. In fact it uses the
provided l4e_print_string
function. This function should only be used for internal SOS
debugging, not as a console for applications, so, your task is to modify the printf
function to send data to the other serial port.
The second part of milestone zero is to find a partner for the rest of the project. The project is to be completed, in pairs, unless prior permission has been obtained from the LiC.
sos/main.c
and the code in the tty_test
application.tty_send_string
(or similar) in
ttyout.c
.syscall_loop
in main.c
to handle recognise your new protocol, and print out a debug
message when you receive one of these messages.tty_test.c
so that it tests your
tty_send_string
function.printf
to use your
new tty_send_string
function.tty_test
's output now goes to
the second serial line, not the console debugger.You will need to demonstrate user applications printing to the 2nd console via the serial driver, running on the U4600 hardware to the tutor during the demonstration period. You should be prepared to show your tutor which files you modified in your solution, and explain any design decisions you made.
You will let the tutor know who your partner is so that group accounts can be created for you.