Closed DeviosLang closed 1 year ago
I think the opencores.org ftp is down. I don't think the files were backed up when this text was backed up.
Also, recently we do not use virtual box images for setting up the development environment. I have been using docker images. The image explained on this mediawiki explains.
The current VirtualBox-image version (OpenRISC_Ubuntu_2011-11-28) contains the following tools/items:
Would a docker image work for you? What features are you interested from this old image?
docker image is ok。where can i get the docker image?thank you。 i am interested in:
Understood, I have a docker image that has a toolchain, I will extend this to add or1ksim and get back shortly.
I am working on a docker image but haven't had much time. This is what I have so far.
FROM ubuntu:latest
RUN apt-get update && apt-get install -y \
bc \
bison \
build-essential \
curl \
flex \
git \
python3-pip \
xz-utils
ENV OE_TOOLCHAIN=ubuntu2204-gcc13.1.0
RUN mkdir -p /opt/or1k \
&& cd /opt/or1k \
&& curl --remote-name --location \
https://buildbot.embecosm.com/job/or1k-gcc-ubuntu2204-release/5/artifact/or1k-embecosm-${OE_TOOLCHAIN}.tar.gz \
&& tar -xf or1k-embecosm-${OE_TOOLCHAIN}.tar.gz
ENV OR1KSIM=2023-07-17
RUN mkdir -p /opt/or1k \
&& cd /opt/or1k \
&& curl --remote-name --location \
https://github.com/stffrdhrn/or1ksim/releases/download/${OR1KSIM}/or1ksim-${OR1KSIM}.tar.gz \
&& tar -xf or1ksim-${OR1KSIM}.tar.gz \
&& mv /opt/or1k/or1k /opt/or1k/or1ksim
# Cleanup packages
RUN rm /opt/or1k/*.tar.*
# Copy in sim file from https://raw.githubusercontent.com/stffrdhrn/or1k-utils/master/or1ksim.cfg
COPY sim.cfg /opt/or1k/
RUN groupadd -g 998 or1kuser && \
useradd -m -u 998 -g or1kuser or1kuser
ENV PATH "$PATH:/opt/or1k/or1k-embecosm-${OE_TOOLCHAIN}/bin"
ENV PATH "$PATH:/opt/or1k/or1ksim/bin"
# For bringing in external files
RUN mkdir -p /tmp/src/work
VOLUME /tmp/src/work
WORKDIR /tmp/src
LABEL maintainer Stafford Horne <shorne@gmail.com>
To build/run
sudo docker build sim -t or1k-sim-env
sudo docker run -it --rm or1k-sim-env
# work with podman
podman build sim -t or1k-sim-env
podman run -it --rm or1k-sim-env
You can run a simple app as follows
root@3095858521d7:/tmp/src# echo "int main() { return 0; }" > main.c
root@3095858521d7:/tmp/src# or1k-elf-gcc main.c
root@3095858521d7:/tmp/src# sim -f /opt/or1k/sim.cfg ./a.out
Seeding random generator with value 0x5431f985
Insn MMU 0KB: 1 ways, 64 sets, entry size 1 bytes
Data MMU 0KB: 1 ways, 64 sets, entry size 1 bytes
Ethernet TAP type
...
I am having some problems with running sim though so I would like to do a bit more testing before publishing the image. I thought I would get something to you though in case you want to help debugging.
thank you
There were some bugs in the image above. I have fixed things and pushed images to docker hub. Please try this :
int this wiki "https://github.com/openrisc/community-wiki/blob/master/Ubuntu_VirtualBox-image_updates_and_information.mw" i find the image (ftp://ocuser:ocuser@openrisc.opencores.org/virtualbox-image/OpenRISC_Ubuntu_2011-12-15.vdi.bz2), but the OpenRISC_Ubuntu_2011-12-15.vdi.bz2 can not download.