Skip to content

Commit

Permalink
Release 20210621
Browse files Browse the repository at this point in the history
* fontamsoc-sw a0e14cb...d650dd4 (5):
  > ram initialization improvements; devtbl.PRELDRADDR now becomes null after devtbl.RRESET such that ram initialization happens only once after global reset; infinite loop after devtbl.CRESET
  > bugfix devtbl.PRELDRADDR; reduce code utilization of memtest portion
  > use devtbl.RRESET after memory initialization
  > devtbl.PRELDRADDR support
  > simplify loader

* linux 271d19984ebb...cf6067f14fc1 (1):
  > use -mzpoprp for accurate stacktrace

* improve README and makefile
  • Loading branch information
tambewilliam committed Jun 21, 2021
1 parent bbc015c commit 8e7542e
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 3 deletions.
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,31 @@ Environment `PATH` must be updated as follow `PATH="${PATH}:/opt/pu32-toolchain/
## Running Linux in GDB

pu32-elf-gdb pu32-vmlinux -ex 'target sim --hdd pu32-rootfs.ext2' -ex 'load' -ex 'set args root=/dev/hda earlyprintk=keep' -ex 'r'

## Running Linux in an FPGA

Create mbr-style disk image:

sudo pu32-mksocimg -k pu32-vmlinux.bin -r pu32-rootfs.ext2 pu32-vmlinux.img

Flash image to sdcard using either `dd if=pu32-vmlinux.img of=/dev/<sdx> bs=1M oflag=sync status=progress` or [BalenaEtcher](https://www.balena.io/etcher).

Flash corresponding FPGA bitstream:
- [xula2lx25](xula2lx25.bit)
- [nexys4ddr](nexys4ddr.bit)

## Reconfigure Linux kernel

make -f pu32-toolchain/makefile linux-menuconfig

Rebuild the Linux kernel:

make -f pu32-toolchain/makefile touch-linux pu32-toolchain-build/.linux

## Reconfigure Buildroot

make -f pu32-toolchain/makefile buildroot-menuconfig

Rebuild buildroot:

make -f pu32-toolchain/makefile touch-buildroot pu32-toolchain-build/.buildroot
2 changes: 1 addition & 1 deletion fontamsoc-sw
2 changes: 1 addition & 1 deletion linux
Submodule linux updated 1 files
+1 −1 arch/pu32/Makefile
16 changes: 15 additions & 1 deletion makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0-only
# Contributed by William Fonkou Tambe

.PHONY: all clean
.PHONY: all linux-menuconfig buildroot-menuconfig touch-binutils touch-gcc touch-linux touch-glibc touch-buildroot touch-fontamsoc-sw clean

NPROC ?= $(shell nproc)

Expand Down Expand Up @@ -85,6 +85,20 @@ pu32-toolchain.tar.xz: \
tar -caf pu32-toolchain.tar.xz -C /opt/ --exclude pu32-toolchain/.git pu32-toolchain && \
ls -lha >&2

linux-menuconfig:
$(eval KERNEL_BUILD := "${PWD}/linux-build/")
$(eval KERNEL_SOURCE := "${PWD}/pu32-toolchain/linux/")
if [ ! -e ${KERNEL_BUILD} ]; then mkdir -p ${KERNEL_BUILD} && cd ${KERNEL_BUILD} && \
make -C ${KERNEL_SOURCE} O=${KERNEL_BUILD} ARCH=pu32 defconfig; fi
if [ -e ${KERNEL_BUILD} ]; then cd ${KERNEL_BUILD} && make ARCH=pu32 CROSS_COMPILE=pu32-elf- menuconfig; fi

buildroot-menuconfig:
$(eval BUILDROOT_BUILD := "${PWD}/buildroot-build/")
$(eval BUILDROOT_SOURCE := "${PWD}/pu32-toolchain/buildroot/")
if [ ! -e ${BUILDROOT_BUILD} ]; then mkdir -p ${BUILDROOT_BUILD} && cd ${BUILDROOT_BUILD} && \
make -C ${BUILDROOT_SOURCE} O=${BUILDROOT_BUILD} pu32_defconfig; fi
if [ -e ${BUILDROOT_BUILD} ]; then cd ${BUILDROOT_BUILD} && make menuconfig; fi

touch-binutils:
touch pu32-toolchain/binutils
touch-gcc:
Expand Down

0 comments on commit 8e7542e

Please sign in to comment.