Skip to content

Commit

Permalink
Merge pull request timvideos#493 from antmicro/mor1kx_external_dt
Browse files Browse the repository at this point in the history
linux: mor1kx: Add support for the external DT
  • Loading branch information
mateusz-holenko authored Jul 22, 2020
2 parents 8126cd4 + e4b13b4 commit c4ca21c
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -406,14 +406,14 @@ tftp: $(FIRMWARE_FILEBASE).bin

ifeq ($(FIRMWARE),linux)
cp $(FIRMWARE_FILEBASE).bin $(TFTPD_DIR)/Image
cp $(FIRMWARE_DIR)/$(ROOTFS_FILE) $(TFTPD_DIR)/rootfs.cpio
cp $(FIRMWARE_DIR)/boot.json $(TFTPD_DIR)
ifeq ($(CPU),vexriscv)
cp $(FIRMWARE_DIR)/rv32.dtb $(TFTPD_DIR)
cp $(TARGET_BUILD_DIR)/emulator/emulator.bin $(TFTPD_DIR)
cp $(FIRMWARE_DIR)/$(ROOTFS_FILE) $(TFTPD_DIR)/rootfs.cpio
endif
ifeq ($(CPU),mor1kx)
# ATM nothing, DTB in the future
cp $(FIRMWARE_DIR)/mor1kx.dtb $(TFTPD_DIR)
endif
else
cp $(FIRMWARE_FILEBASE).bin $(TFTPD_DIR)/boot.bin
Expand Down
7 changes: 5 additions & 2 deletions scripts/build-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ if [ ${CPU} = mor1kx ]; then
DTB=mor1kx.dtb
ROOTFS_MD5="c9ef89b45b0d2c34d14978a21f2863bd"
DTB_MD5="0271bc8f63f2d928dc9536ac31a2c6b9"
LINUX_BRANCH=${LINUX_BRANCH:-litex_buildenv-mor1kx}
elif [ ${CPU} = vexriscv ]; then
export ARCH=riscv
ROOTFS=riscv32-rootfs.cpio
Expand Down Expand Up @@ -227,7 +226,11 @@ LLV_SRC="$TOP_DIR/third_party/linux-on-litex-vexriscv"

cat << EOF > $TARGET_LINUX_BUILD_DIR/boot.json
{
"Image": "0x00000000"
"mor1kx.dtb": "0x01000000",
"Image": "0x00000000",
"bootargs": {
"r1": "0x01000000"
}
}
EOF
elif [ ${CPU} = vexriscv ]; then
Expand Down
2 changes: 1 addition & 1 deletion third_party/litedram

0 comments on commit c4ca21c

Please sign in to comment.