Skip to content

Commit

Permalink
[timvideos#387] add linux rootfs rebuild instructions/config
Browse files Browse the repository at this point in the history
  • Loading branch information
mateusz-holenko committed May 21, 2020
1 parent bfc2a7a commit 5a8adc6
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 0 deletions.
14 changes: 14 additions & 0 deletions software/linux-rootfs/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Steps to rebuild a rootfs image with buildroot:

(1) clone buildroot:

git clone https://github.com/buildroot/buildroot
cd buildroot

(2) configure build

cp ../litex_vexriscv_defconfig .config
make olddefconfig
make

(3) the resulting image is in output/images
41 changes: 41 additions & 0 deletions software/linux-rootfs/litex_vexriscv_defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#
# Target options
#
BR2_riscv=y
BR2_RISCV_32=y

#
# Instruction Set Extensions
#
BR2_riscv_custom=y
BR2_RISCV_ISA_CUSTOM_RVM=y
BR2_RISCV_ISA_CUSTOM_RVA=y
BR2_RISCV_ISA_CUSTOM_RVC=n
BR2_RISCV_ABI_ILP32=y

# GCC
BR2_GCC_VERSION_8_X=y
BR2_GCC_VERSION="8.3.0"

# System
BR2_TARGET_GENERIC_GETTY=y
BR2_TARGET_GENERIC_GETTY_PORT="console"

# Filesystem
BR2_TARGET_ROOTFS_CPIO=y

# Kernel headers
BR2_KERNEL_HEADERS_VERSION=y
BR2_DEFAULT_KERNEL_VERSION="5.0.13"
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_0=y

# Rootfs overlay
BR2_ROOTFS_OVERLAY="../rootfs_overlay"

# Extra packages
#BR2_PACKAGE_DHRYSTONE=y
#BR2_PACKAGE_MICROPYTHON=y
#BR2_PACKAGE_SPIDEV_TEST=y
#BR2_PACKAGE_MTD=y
#BR2_PACKAGE_MTD_JFFS_UTILS=y

20 changes: 20 additions & 0 deletions software/linux-rootfs/rootfs_overlay/etc/profile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
export PATH="/bin:/sbin:/usr/bin:/usr/sbin"

if [ "$PS1" ]; then
if [ "`id -u`" -eq 0 ]; then
export PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\# '
else
export PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
fi
fi

export PAGER='/bin/more'
export EDITOR='/bin/vi'

# Source configuration files from /etc/profile.d
for i in /etc/profile.d/*.sh ; do
if [ -r "$i" ]; then
. $i
fi
done
unset i

0 comments on commit 5a8adc6

Please sign in to comment.