mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-02 17:55:19 +00:00
Update Dockerfile with buildroot info.
This commit is contained in:
parent
f45bdc1a65
commit
5f3b8cc868
@ -4,6 +4,8 @@ FROM wallysoc/ubuntu_wally
|
||||
# assume 4 threads are available to speed up
|
||||
ARG NUM_THREADS=4
|
||||
ENV RISCV=/opt/riscv
|
||||
ENV PATH="$PATH:${RISCV}/bin"
|
||||
ENV MANPATH="$MANPATH:${RISCV}/share/man"
|
||||
|
||||
WORKDIR /opt/riscv
|
||||
|
||||
@ -63,17 +65,21 @@ RUN opam init -y --disable-sandboxing && \
|
||||
cd sail-riscv && \
|
||||
ARCH=RV32 make c_emulator/riscv_sim_RV32 && \
|
||||
ARCH=RV64 make c_emulator/riscv_sim_RV64 && \
|
||||
ln -s ${RISCV}/sail-riscv/c_emulator/riscv_sim_RV64 ${RISCV}/bin/riscv_sim_RV64 && \
|
||||
ln -s ${RISCV}/sail-riscv/c_emulator/riscv_sim_RV32 ${RISCV}/bin/riscv_sim_RV32 && \
|
||||
cp ${RISCV}/sail-riscv/c_emulator/riscv_sim_RV64 ${RISCV}/bin/riscv_sim_RV64 && \
|
||||
cp ${RISCV}/sail-riscv/c_emulator/riscv_sim_RV32 ${RISCV}/bin/riscv_sim_RV32 && \
|
||||
rm -rf ${RISCV}/sail-riscv
|
||||
|
||||
COPY ./wally /opt/riscv/wally_buildroot
|
||||
|
||||
# Buildroot
|
||||
RUN git clone https://github.com/buildroot/buildroot.git && \
|
||||
cd buildroot && \
|
||||
git checkout 2021.05 && \
|
||||
# cp -r /opt/riscv/riscv-wally/linux/buildroot-config-src/wally ./board && \
|
||||
# cp ./board/wally/main.config .config && \
|
||||
wget https://raw.githubusercontent.com/openhwgroup/cvw/main/linux/buildroot-config-src/wally/main.config -o .config && \
|
||||
cp -r /opt/riscv/wally_buildroot ./board/wally && \
|
||||
cp ./board/wally/main.config .config && \
|
||||
# wget https://raw.githubusercontent.com/openhwgroup/cvw/main/linux/buildroot-config-src/wally/main.config -O .config && \
|
||||
make --jobs ${NUM_THREADS}
|
||||
|
||||
RUN pip3 install --no-cache-dir \
|
||||
|
1191
docs/docker/wally/busybox.config
Normal file
1191
docs/docker/wally/busybox.config
Normal file
File diff suppressed because it is too large
Load Diff
1312
docs/docker/wally/linux.config
Normal file
1312
docs/docker/wally/linux.config
Normal file
File diff suppressed because it is too large
Load Diff
3807
docs/docker/wally/main.config
Normal file
3807
docs/docker/wally/main.config
Normal file
File diff suppressed because it is too large
Load Diff
29
docs/docker/wally/rootfs_overlay/.profile
Normal file
29
docs/docker/wally/rootfs_overlay/.profile
Normal file
@ -0,0 +1,29 @@
|
||||
echo "Hello this ~/.profile is meant to demonstrate running some basic commands on Wally."
|
||||
echo "I am $(whoami)"
|
||||
echo "And I am on $(hostname)"
|
||||
touch myFile.txt
|
||||
echo "Hello World!" > myFile.txt
|
||||
echo "And farewell!" >> myFile.txt
|
||||
mkdir myDir
|
||||
mv myFile.txt myDir
|
||||
echo "Created myFile.txt and moved it to myDir. It contains:"
|
||||
cat myDir/myFile.txt
|
||||
touch myScript.sh
|
||||
echo "echo \"Hello this is another example script\"" > myScript.sh
|
||||
chmod +x myScript.sh
|
||||
echo "Created myScript.sh. Running it yields:"
|
||||
./myScript.sh
|
||||
cd myDir
|
||||
ln -s ../myScript.sh symLinkToMyScript.sh
|
||||
echo "Created symLinkToMyScript.sh. Running it yields:"
|
||||
./symLinkToMyScript.sh
|
||||
echo "Now let's remove all these example files and scripts"
|
||||
cd /
|
||||
rm -r myDir
|
||||
rm myScript.sh
|
||||
echo "Here is disk usage:"
|
||||
df -h
|
||||
echo "And here are the current processes:"
|
||||
ps
|
||||
echo "And finally a login prompt."
|
||||
login
|
41
docs/docker/wally/rootfs_overlay/etc/inittab
Normal file
41
docs/docker/wally/rootfs_overlay/etc/inittab
Normal file
@ -0,0 +1,41 @@
|
||||
# /etc/inittab
|
||||
#
|
||||
# Copyright (C) 2001 Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Note: BusyBox init doesn't support runlevels. The runlevels field is
|
||||
# completely ignored by BusyBox init. If you want runlevels, use
|
||||
# sysvinit.
|
||||
#
|
||||
# Format for each entry: <id>:<runlevels>:<action>:<process>
|
||||
#
|
||||
# id == tty to run on, or empty for /dev/console
|
||||
# runlevels == ignored
|
||||
# action == one of sysinit, respawn, askfirst, wait, and once
|
||||
# process == program to run
|
||||
|
||||
# Startup the system
|
||||
::sysinit:/bin/mount -t proc proc /proc
|
||||
::sysinit:/bin/mount -o remount,rw /
|
||||
::sysinit:/bin/mkdir -p /dev/pts /dev/shm
|
||||
::sysinit:/bin/mount -a
|
||||
::sysinit:/sbin/swapon -a
|
||||
null::sysinit:/bin/ln -sf /proc/self/fd /dev/fd
|
||||
null::sysinit:/bin/ln -sf /proc/self/fd/0 /dev/stdin
|
||||
null::sysinit:/bin/ln -sf /proc/self/fd/1 /dev/stdout
|
||||
null::sysinit:/bin/ln -sf /proc/self/fd/2 /dev/stderr
|
||||
::sysinit:/bin/hostname -F /etc/hostname
|
||||
# now run any rc scripts
|
||||
::sysinit:/etc/init.d/rcS
|
||||
|
||||
# (commented out) Put a getty on the serial port
|
||||
#console::respawn:/sbin/getty -L console 0 vt100 # GENERIC_SERIAL
|
||||
# Actually no, let's automatically login
|
||||
console::respawn:-/bin/sh
|
||||
|
||||
# Stuff to do for the 3-finger salute
|
||||
#::ctrlaltdel:/sbin/reboot
|
||||
|
||||
# Stuff to do before rebooting
|
||||
::shutdown:/etc/init.d/rcK
|
||||
::shutdown:/sbin/swapoff -a
|
||||
::shutdown:/bin/umount -a -r
|
Loading…
Reference in New Issue
Block a user