mirror of
https://github.com/openhwgroup/cvw.git
synced 2025-04-23 21:38:55 -04:00
Merge pull request #378 from JacobPease/main
Linux Makefile, Readme, flash-sd.sh fix, and probe script
This commit is contained in:
commit
7744198be4
6 changed files with 334 additions and 63 deletions
81
fpga/probe
Executable file
81
fpga/probe
Executable file
|
@ -0,0 +1,81 @@
|
|||
#!/usr/bin/python3
|
||||
###########################################
|
||||
## probe.sh
|
||||
##
|
||||
## Written: Jacob Pease jacobpease@protonmail.com
|
||||
## Created: 16 August 2023
|
||||
## Modified: 16 August 2023
|
||||
##
|
||||
## A component of the CORE-V-WALLY configurable RISC-V project.
|
||||
##
|
||||
## Copyright (C) 2021-23 Harvey Mudd College & Oklahoma State University
|
||||
##
|
||||
## SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1
|
||||
##
|
||||
## Licensed under the Solderpad Hardware License v 2.1 (the “License”); you may not use this file
|
||||
## except in compliance with the License, or, at your option, the Apache License version 2.0. You
|
||||
## may obtain a copy of the License at
|
||||
##
|
||||
## https:##solderpad.org#licenses#SHL-2.1#
|
||||
##
|
||||
## Unless required by applicable law or agreed to in writing, any work distributed under the
|
||||
## License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
|
||||
## either express or implied. See the License for the specific language governing permissions
|
||||
## and limitations under the License.
|
||||
################################################################################################
|
||||
|
||||
import sys
|
||||
|
||||
def usage():
|
||||
print("Usage: ./probes name width probenum")
|
||||
exit(1)
|
||||
|
||||
def convertLine(x):
|
||||
temp = x.split()
|
||||
temp[1] = int(temp[1])
|
||||
return tuple(temp)
|
||||
|
||||
def probeBits( probe ):
|
||||
str = ''
|
||||
|
||||
if (probe[1] > 1):
|
||||
for i in range(probe[1]):
|
||||
if i != (probe[1]-1):
|
||||
str = str + f"{{{probe[0]}[{i}]}} "
|
||||
else:
|
||||
str = str + f"{{{probe[0]}[{i}]}} "
|
||||
|
||||
else:
|
||||
str = f'{{{probe[0]}}}'
|
||||
|
||||
return str
|
||||
|
||||
def printProbe( probe, i ):
|
||||
bits = probeBits(probe)
|
||||
|
||||
print(bits)
|
||||
|
||||
return (
|
||||
f'create_debug_port u_ila_0 probe\n'
|
||||
f'set_property port_width {probe[1]} [get_debug_ports u_ila_0/probe{i}]\n'
|
||||
f'set_property PROBE_TYPE DATA_AND_TRIGGER [get_debug_ports u_ila_0/probe{i}]\n'
|
||||
f'connect_debug_port u_ila_0/probe{i} [get_nets [list {bits}]]\n\n'
|
||||
)
|
||||
|
||||
def main(args):
|
||||
if (len(args) != 3):
|
||||
usage()
|
||||
|
||||
name = args[0]
|
||||
width = int(args[1])
|
||||
probeNum = int(args[2])
|
||||
|
||||
|
||||
probe = (name, width)
|
||||
|
||||
print(printProbe(probe, probeNum))
|
||||
|
||||
if __name__ == '__main__':
|
||||
main(sys.argv[1:])
|
||||
|
||||
|
124
linux/Makefile
Normal file
124
linux/Makefile
Normal file
|
@ -0,0 +1,124 @@
|
|||
RISCV := /opt/riscv
|
||||
BUILDROOT := ${RISCV}/buildroot
|
||||
IMAGES := ${BUILDROOT}/output/images
|
||||
WALLY := $(shell dirname $(shell pwd))
|
||||
WALLYLINUX := $(shell pwd)
|
||||
DIS := ${IMAGES}/disassembly
|
||||
BRPACKAGES := $(WALLYLINUX)/buildroot-packages
|
||||
|
||||
# Buildroot Config Stuff
|
||||
WALLYBOARDSRC := $(WALLYLINUX)/buildroot-config-src/wally
|
||||
WALLYBOARD := $(BUILDROOT)/board/wally
|
||||
|
||||
# Buildroot Package Stuff
|
||||
PACKAGE_SOURCE := ${WALLYLINUX}/buildroot-packages/package-source
|
||||
FPGA_AXI_SDC := ${WALLYLINUX}/buildroot-packages/fpga-axi-sdc
|
||||
DRIVER := ${PACKAGE_SOURCE}/fpga-axi-sdc.c
|
||||
PATCHFILE := $(BRPACKAGES)/package.patch
|
||||
|
||||
# Device tree files
|
||||
DTS ?= $(shell find -type f -regex ".*\.dts" | sort)
|
||||
DTB := $(DTS:%.dts=%.dtb)
|
||||
DTB := $(foreach name, $(DTB), $(IMAGES)/$(shell basename $(name)))
|
||||
|
||||
# Disassembly stuff
|
||||
BINARIES := fw_jump.elf vmlinux busybox
|
||||
OBJDUMPS := $(foreach name, $(BINARIES), $(basename $(name) .elf))
|
||||
OBJDUMPS := $(foreach name, $(OBJDUMPS), $(DIS)/$(name).objdump)
|
||||
|
||||
.PHONY: all generate disassemble install clean cleanDTB cleanDriver test
|
||||
|
||||
# Generate all device trees -------------------------------------------
|
||||
# TODO: Add configuration for only generating device tree for specified
|
||||
# supported FPGA.
|
||||
|
||||
all:
|
||||
$(MAKE) install
|
||||
make -C $(BUILDROOT) --jobs
|
||||
$(MAKE) generate
|
||||
# TODO: Need to find a way to set the PATH for child processes.
|
||||
# source ../setup.sh; $(MAKE) disassemble
|
||||
|
||||
# Temp rule for debugging
|
||||
test:
|
||||
@echo $(OBJDUMPS)
|
||||
|
||||
generate: $(DTB) $(IMAGES)
|
||||
|
||||
$(IMAGES)/%.dtb: ./devicetree/%.dts
|
||||
dtc -I dts -O dtb $< > $@
|
||||
|
||||
$(IMAGES):
|
||||
@ echo "No output/images directory in buildroot."
|
||||
@ echo "Run make --jobs in buildroot directory before generating device tree binaries."; exit 1
|
||||
|
||||
$(RISCV):
|
||||
@ echo "ERROR: No $(RISCV) directory. Make sure you have installed the Wally Toolchain."
|
||||
@ echo "this can be done with <WALLY>/bin/wally-tool-chain-install.sh"
|
||||
|
||||
# Disassembly rules ---------------------------------------------------
|
||||
|
||||
disassemble:
|
||||
mkdir -p $(DIS)
|
||||
make -j $(OBJDUMPS)
|
||||
|
||||
$(DIS)/%.objdump: $(IMAGES)/%.elf
|
||||
riscv64-unknown-elf-objdump -DS $< >> $@
|
||||
|
||||
$(DIS)/%.objdump: $(IMAGES)/%
|
||||
riscv64-unknown-elf-objdump -S $< >> $@
|
||||
|
||||
$(IMAGES)/vmlinux: $(BUILDROOT)/output/build/linux-5.10.7/vmlinux
|
||||
cp $< $@
|
||||
|
||||
$(IMAGES)/busybox: $(BUILDROOT)/output/build/busybox-1.33.0/busybox
|
||||
cp $< $@
|
||||
|
||||
# Generating new Buildroot directories --------------------------------
|
||||
|
||||
# This directive should be run as: make install BUILDROOT=path/to/buildroot
|
||||
install: $(BUILDROOT)/package/fpga-axi-sdc $(WALLYBOARD) $(DRIVER)
|
||||
cp $(WALLYBOARD)/main.config $(BUILDROOT)/.config
|
||||
|
||||
# CONFIG DEPENDENCIES 2021.05 -----------------------------------------
|
||||
# $(WALLYBOARD)/main.config: $(WALLYBOARD) $(BRPACKAGES)/wally.config
|
||||
# cp $(BRPACKAGES)/wally.config $@
|
||||
|
||||
# $(WALLYBOARD)/linux.config: $(BRPACKAGES)/linux.config $(WALLYBOARD)
|
||||
# cp $(BRPACKAGES)/linux.config $@
|
||||
|
||||
$(WALLYBOARD): $(BUILDROOT)
|
||||
cp -r $(WALLYBOARDSRC) $(BUILDROOT)/board
|
||||
cp $(BRPACKAGES)/wally.config $(WALLYBOARD)/main.config
|
||||
cp $(BRPACKAGES)/linux.config $(WALLYBOARD)/linux.config
|
||||
|
||||
# Buildroot Package ---------------------------------------------------
|
||||
$(BUILDROOT)/package/fpga-axi-sdc: $(BUILDROOT) $(PATCHFILE) $(BRPACKAGES)/fpga-axi-sdc
|
||||
cp -r $(BRPACKAGES)/fpga-axi-sdc $(BUILDROOT)/package
|
||||
sed -i 's|FPGA_AXI_SDC_SITE =|FPGA_AXI_SDC_SITE = $(PACKAGE_SOURCE)|1' $(BUILDROOT)/package/fpga-axi-sdc/fpga-axi-sdc.mk
|
||||
cd $(BUILDROOT); if git apply --check $(PATCHFILE) > /dev/null ; then git apply $(PATCHFILE); fi
|
||||
|
||||
$(PATCHFILE):
|
||||
cd $(BUILDROOT); git apply $(PATCHFILE)
|
||||
|
||||
$(BUILDROOT):
|
||||
git clone https://github.com/buildroot/buildroot.git $@
|
||||
# cd $@; git checkout 2023.05.x
|
||||
cd $@; git checkout 2021.05
|
||||
|
||||
$(DRIVER):
|
||||
@ if [ -d "$(WALLY)/addins/vivado-risc-v" ] ; then git submodule update --init $(WALLY)/addins/vivado-risc-v; fi
|
||||
cp ../addins/vivado-risc-v/patches/fpga-axi-sdc.c $@
|
||||
# For 2021.05
|
||||
sed -i "s|card_hw_reset|hw_reset|1" $@
|
||||
|
||||
# ---------------------------------------------------------------------
|
||||
|
||||
cleanDriver:
|
||||
rm -f $(DRIVER)
|
||||
|
||||
cleanDTB:
|
||||
rm -f $(IMAGES)/*.dtb
|
||||
|
||||
clean:
|
||||
rm -rf $(DIS)
|
52
linux/README.MD
Normal file
52
linux/README.MD
Normal file
|
@ -0,0 +1,52 @@
|
|||
# Linux for core-v-wally
|
||||
|
||||
## Table of Contents
|
||||
|
||||
1. [Setting up Buildroot](#buildroot)
|
||||
2. [Generating Device Tree Binaries](#devicetree)
|
||||
3. [Disassembling the Binaries for Debugging](#disassembly)
|
||||
4. [Creating a Bootable SD Card](#sdcard)
|
||||
|
||||
## Setting up Buildroot <a name="buildroot"></a>
|
||||
|
||||
In order to generate the Linux and boot stage binaries compatible with Wally, Buildroot is used for cross-compilation. To set up a Buildroot directory, configuration files for Buildroot, Linux, and Busybox must be copied into the correct locations inside the main Buildroot directory. This can be done automatically using the Makefile inside Wally's Linux subdirectory (this one). To install and patch a fresh Buildroot directory, type:
|
||||
|
||||
$ make install BUILDROOT=path/to/buildroot
|
||||
|
||||
You can override the `BUILDROOT` variable to place buildroot where you want it. By default it will be placed at `/opt/riscv/buildroot`. In addition to copying the configuration files, it will install the buildroot package needed to build the SD card driver for Linux.
|
||||
|
||||
To install a new buildroot directory, build the binaries, and generate the device tree binaries in one command, use:
|
||||
|
||||
$ make BUILDROOT=path/to/buildroot
|
||||
|
||||
Or simply use the default buildroot location in `/opt/riscv`:
|
||||
|
||||
$ make
|
||||
|
||||
Note that the `$RISCV` variable cannot be set prior to building in buildroot or the build will fail. It is best to run `source ./setup.sh` to alter your `$PATH` and set the `$RISCV` variable after buildroot has succesfully built the binaries. If you're new to buildroot, you can find the binaries in `<BUILDROOT>/output/images`.
|
||||
|
||||
## Generating Device Tree Binaries <a name="devicetree"></a>
|
||||
|
||||
The device tree files for the various FPGA's Wally supports, as well as QEMU's device tree for the virt machine, are located in the `./devicetree` subdirectory. These device tree files are necessary for the boot process. In order to build the device tree binaries (.dtb) from the device tree sources (.dts), we can build all of them at once using:
|
||||
|
||||
$ make generate BUILDROOT=path/to/buildroot
|
||||
|
||||
Or for the default buildroot location:
|
||||
|
||||
$ make generate
|
||||
|
||||
The .dts files will end up in the `<BUILDROOT>/output/images` folder of your chosen buildroot directory.
|
||||
|
||||
## Disassembling the Binaries for Debugging <a name="disassembly"></a>
|
||||
|
||||
By using the `riscv64-unknown-elf-objdump` utility, we can disassemble the binaries in `<BUILDROOT>/output/images` so that we can explore the resulting machine code instructions and see what assembly or C code the instructions came from, along with the corresponding addresses. This is useful during debugging in order to trace how code is being executed.
|
||||
|
||||
To create the disassembled binaries, run:
|
||||
|
||||
$ make disassemble BUILDROOT=path/to/buildroot
|
||||
|
||||
You'll find the resulting disassembled files in `<BUILDROOT>/output/images/disassembly`.
|
||||
|
||||
## Creating a Bootable SD Card <a name="sdcard"></a>
|
||||
|
||||
|
|
@ -64,8 +64,10 @@ CONFIG_POSIX_CPU_TIMERS_TASK_WORK=y
|
|||
#
|
||||
# Timers subsystem
|
||||
#
|
||||
CONFIG_HZ_PERIODIC=y
|
||||
# CONFIG_NO_HZ_IDLE is not set
|
||||
CONFIG_TICK_ONESHOT=y
|
||||
CONFIG_NO_HZ_COMMON=y
|
||||
# CONFIG_HZ_PERIODIC is not set
|
||||
CONFIG_NO_HZ_IDLE=y
|
||||
# CONFIG_NO_HZ is not set
|
||||
# CONFIG_HIGH_RES_TIMERS is not set
|
||||
# end of Timers subsystem
|
||||
|
@ -122,12 +124,7 @@ CONFIG_GCC11_NO_ARRAY_BOUNDS=y
|
|||
CONFIG_CC_NO_ARRAY_BOUNDS=y
|
||||
CONFIG_ARCH_SUPPORTS_INT128=y
|
||||
# CONFIG_CGROUPS is not set
|
||||
CONFIG_NAMESPACES=y
|
||||
CONFIG_UTS_NS=y
|
||||
CONFIG_TIME_NS=y
|
||||
CONFIG_IPC_NS=y
|
||||
# CONFIG_USER_NS is not set
|
||||
CONFIG_PID_NS=y
|
||||
# CONFIG_NAMESPACES is not set
|
||||
# CONFIG_CHECKPOINT_RESTORE is not set
|
||||
# CONFIG_SCHED_AUTOGROUP is not set
|
||||
# CONFIG_SYSFS_DEPRECATED is not set
|
||||
|
@ -178,7 +175,7 @@ CONFIG_KALLSYMS=y
|
|||
# CONFIG_KALLSYMS_SELFTEST is not set
|
||||
# CONFIG_KALLSYMS_ALL is not set
|
||||
CONFIG_KALLSYMS_BASE_RELATIVE=y
|
||||
CONFIG_KCMP=y
|
||||
# CONFIG_KCMP is not set
|
||||
CONFIG_RSEQ=y
|
||||
# CONFIG_DEBUG_RSEQ is not set
|
||||
# CONFIG_EMBEDDED is not set
|
||||
|
@ -363,7 +360,7 @@ CONFIG_PAGE_SIZE_LESS_THAN_64KB=y
|
|||
CONFIG_PAGE_SIZE_LESS_THAN_256KB=y
|
||||
CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT=y
|
||||
CONFIG_CLONE_BACKWARDS=y
|
||||
CONFIG_COMPAT_32BIT_TIME=y
|
||||
# CONFIG_COMPAT_32BIT_TIME is not set
|
||||
CONFIG_HAVE_ARCH_VMAP_STACK=y
|
||||
CONFIG_VMAP_STACK=y
|
||||
CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y
|
||||
|
@ -372,6 +369,7 @@ CONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y
|
|||
CONFIG_STRICT_KERNEL_RWX=y
|
||||
CONFIG_ARCH_HAS_STRICT_MODULE_RWX=y
|
||||
CONFIG_STRICT_MODULE_RWX=y
|
||||
CONFIG_ARCH_USE_MEMREMAP_PROT=y
|
||||
# CONFIG_LOCK_EVENT_COUNTS is not set
|
||||
CONFIG_ARCH_WANT_LD_ORPHAN_WARN=y
|
||||
CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
|
||||
|
@ -393,9 +391,7 @@ CONFIG_RT_MUTEXES=y
|
|||
CONFIG_BASE_SMALL=0
|
||||
CONFIG_MODULES=y
|
||||
# CONFIG_MODULE_FORCE_LOAD is not set
|
||||
CONFIG_MODULE_UNLOAD=y
|
||||
# CONFIG_MODULE_FORCE_UNLOAD is not set
|
||||
# CONFIG_MODULE_UNLOAD_TAINT_TRACKING is not set
|
||||
# CONFIG_MODULE_UNLOAD is not set
|
||||
# CONFIG_MODVERSIONS is not set
|
||||
# CONFIG_MODULE_SRCVERSION_ALL is not set
|
||||
# CONFIG_MODULE_SIG is not set
|
||||
|
@ -408,6 +404,7 @@ CONFIG_MODPROBE_PATH="/sbin/modprobe"
|
|||
# CONFIG_TRIM_UNUSED_KSYMS is not set
|
||||
CONFIG_BLOCK=y
|
||||
CONFIG_BLOCK_LEGACY_AUTOLOAD=y
|
||||
CONFIG_BLK_ICQ=y
|
||||
# CONFIG_BLK_DEV_BSGLIB is not set
|
||||
# CONFIG_BLK_DEV_INTEGRITY is not set
|
||||
# CONFIG_BLK_DEV_ZONED is not set
|
||||
|
@ -431,7 +428,7 @@ CONFIG_BLK_MQ_VIRTIO=y
|
|||
#
|
||||
CONFIG_MQ_IOSCHED_DEADLINE=y
|
||||
CONFIG_MQ_IOSCHED_KYBER=y
|
||||
# CONFIG_IOSCHED_BFQ is not set
|
||||
CONFIG_IOSCHED_BFQ=y
|
||||
# end of IO Schedulers
|
||||
|
||||
CONFIG_UNINLINE_SPIN_UNLOCK=y
|
||||
|
@ -498,7 +495,7 @@ CONFIG_GENERIC_EARLY_IOREMAP=y
|
|||
# CONFIG_IDLE_PAGE_TRACKING is not set
|
||||
CONFIG_ARCH_HAS_CURRENT_STACK_POINTER=y
|
||||
CONFIG_ZONE_DMA32=y
|
||||
CONFIG_VM_EVENT_COUNTERS=y
|
||||
# CONFIG_VM_EVENT_COUNTERS is not set
|
||||
# CONFIG_PERCPU_STATS is not set
|
||||
# CONFIG_GUP_TEST is not set
|
||||
CONFIG_ARCH_HAS_PTE_SPECIAL=y
|
||||
|
@ -587,6 +584,7 @@ CONFIG_EFI_GENERIC_STUB=y
|
|||
# CONFIG_EFI_TEST is not set
|
||||
# CONFIG_RESET_ATTACK_MITIGATION is not set
|
||||
# CONFIG_EFI_DISABLE_PCI_DMA is not set
|
||||
CONFIG_EFI_EARLYCON=y
|
||||
# CONFIG_EFI_DISABLE_RUNTIME is not set
|
||||
# CONFIG_EFI_COCO_SECRET is not set
|
||||
# end of EFI (Extensible Firmware Interface) Support
|
||||
|
@ -611,7 +609,16 @@ CONFIG_OF_RESERVED_MEM=y
|
|||
# CONFIG_OF_OVERLAY is not set
|
||||
CONFIG_OF_DMA_DEFAULT_COHERENT=y
|
||||
# CONFIG_PARPORT is not set
|
||||
# CONFIG_BLK_DEV is not set
|
||||
CONFIG_BLK_DEV=y
|
||||
# CONFIG_BLK_DEV_NULL_BLK is not set
|
||||
# CONFIG_BLK_DEV_LOOP is not set
|
||||
|
||||
#
|
||||
# DRBD disabled because PROC_FS or INET not selected
|
||||
#
|
||||
# CONFIG_BLK_DEV_RAM is not set
|
||||
# CONFIG_VIRTIO_BLK is not set
|
||||
# CONFIG_BLK_DEV_UBLK is not set
|
||||
|
||||
#
|
||||
# NVME Support
|
||||
|
@ -690,16 +697,7 @@ CONFIG_INPUT=y
|
|||
#
|
||||
# Hardware I/O ports
|
||||
#
|
||||
CONFIG_SERIO=y
|
||||
CONFIG_SERIO_SERPORT=y
|
||||
CONFIG_SERIO_LIBPS2=y
|
||||
# CONFIG_SERIO_RAW is not set
|
||||
# CONFIG_SERIO_ALTERA_PS2 is not set
|
||||
# CONFIG_SERIO_PS2MULT is not set
|
||||
# CONFIG_SERIO_ARC_PS2 is not set
|
||||
# CONFIG_SERIO_APBPS2 is not set
|
||||
# CONFIG_SERIO_GPIO_PS2 is not set
|
||||
# CONFIG_USERIO is not set
|
||||
# CONFIG_SERIO is not set
|
||||
# CONFIG_GAMEPORT is not set
|
||||
# end of Hardware I/O ports
|
||||
# end of Input device support
|
||||
|
@ -712,7 +710,7 @@ CONFIG_VT=y
|
|||
CONFIG_CONSOLE_TRANSLATIONS=y
|
||||
CONFIG_VT_CONSOLE=y
|
||||
CONFIG_HW_CONSOLE=y
|
||||
# CONFIG_VT_HW_CONSOLE_BINDING is not set
|
||||
CONFIG_VT_HW_CONSOLE_BINDING=y
|
||||
CONFIG_UNIX98_PTYS=y
|
||||
CONFIG_LEGACY_PTYS=y
|
||||
CONFIG_LEGACY_PTY_COUNT=256
|
||||
|
@ -722,14 +720,28 @@ CONFIG_LDISC_AUTOLOAD=y
|
|||
#
|
||||
# Serial drivers
|
||||
#
|
||||
# CONFIG_SERIAL_8250 is not set
|
||||
CONFIG_SERIAL_EARLYCON=y
|
||||
CONFIG_SERIAL_8250=y
|
||||
# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set
|
||||
CONFIG_SERIAL_8250_16550A_VARIANTS=y
|
||||
# CONFIG_SERIAL_8250_FINTEK is not set
|
||||
CONFIG_SERIAL_8250_CONSOLE=y
|
||||
CONFIG_SERIAL_8250_NR_UARTS=1
|
||||
CONFIG_SERIAL_8250_RUNTIME_UARTS=1
|
||||
# CONFIG_SERIAL_8250_EXTENDED is not set
|
||||
# CONFIG_SERIAL_8250_DW is not set
|
||||
# CONFIG_SERIAL_8250_RT288X is not set
|
||||
CONFIG_SERIAL_OF_PLATFORM=y
|
||||
|
||||
#
|
||||
# Non-8250 serial port support
|
||||
#
|
||||
# CONFIG_SERIAL_EARLYCON_SEMIHOST is not set
|
||||
# CONFIG_SERIAL_UARTLITE is not set
|
||||
# CONFIG_SERIAL_SIFIVE is not set
|
||||
CONFIG_SERIAL_CORE=y
|
||||
CONFIG_SERIAL_CORE_CONSOLE=y
|
||||
CONFIG_SERIAL_SIFIVE=y
|
||||
CONFIG_SERIAL_SIFIVE_CONSOLE=y
|
||||
# CONFIG_SERIAL_SCCNXP is not set
|
||||
# CONFIG_SERIAL_ALTERA_JTAGUART is not set
|
||||
# CONFIG_SERIAL_ALTERA_UART is not set
|
||||
|
@ -741,6 +753,7 @@ CONFIG_LDISC_AUTOLOAD=y
|
|||
# CONFIG_SERIAL_SPRD is not set
|
||||
# end of Serial drivers
|
||||
|
||||
CONFIG_SERIAL_MCTRL_GPIO=y
|
||||
# CONFIG_SERIAL_NONSTANDARD is not set
|
||||
# CONFIG_NULL_TTY is not set
|
||||
CONFIG_HVC_DRIVER=y
|
||||
|
@ -888,7 +901,7 @@ CONFIG_BCMA_POSSIBLE=y
|
|||
#
|
||||
# Console display driver support
|
||||
#
|
||||
CONFIG_VGA_CONSOLE=y
|
||||
# CONFIG_VGA_CONSOLE is not set
|
||||
CONFIG_DUMMY_CONSOLE=y
|
||||
CONFIG_DUMMY_CONSOLE_COLUMNS=80
|
||||
CONFIG_DUMMY_CONSOLE_ROWS=25
|
||||
|
@ -896,7 +909,8 @@ CONFIG_DUMMY_CONSOLE_ROWS=25
|
|||
# end of Graphics support
|
||||
|
||||
# CONFIG_SOUND is not set
|
||||
# CONFIG_HID_SUPPORT is not set
|
||||
CONFIG_HID_SUPPORT=y
|
||||
# CONFIG_HID is not set
|
||||
CONFIG_USB_OHCI_LITTLE_ENDIAN=y
|
||||
# CONFIG_USB_SUPPORT is not set
|
||||
CONFIG_MMC=y
|
||||
|
@ -1082,6 +1096,7 @@ CONFIG_SIFIVE_PLIC=y
|
|||
# CONFIG_ANDROID_BINDER_IPC is not set
|
||||
# end of Android
|
||||
|
||||
# CONFIG_LIBNVDIMM is not set
|
||||
# CONFIG_DAX is not set
|
||||
# CONFIG_NVMEM is not set
|
||||
|
||||
|
@ -1204,7 +1219,7 @@ CONFIG_HAVE_HARDENED_USERCOPY_ALLOCATOR=y
|
|||
# CONFIG_FORTIFY_SOURCE is not set
|
||||
# CONFIG_STATIC_USERMODEHELPER is not set
|
||||
CONFIG_DEFAULT_SECURITY_DAC=y
|
||||
CONFIG_LSM="landlock,lockdown,yama,loadpin,safesetid,integrity,bpf"
|
||||
CONFIG_LSM="lockdown,yama,loadpin,safesetid,integrity,bpf"
|
||||
|
||||
#
|
||||
# Kernel hardening options
|
||||
|
@ -1239,7 +1254,7 @@ CONFIG_CRYPTO_ALGAPI2=y
|
|||
CONFIG_CRYPTO_HASH=y
|
||||
CONFIG_CRYPTO_HASH2=y
|
||||
# CONFIG_CRYPTO_MANAGER is not set
|
||||
CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y
|
||||
# CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is not set
|
||||
# CONFIG_CRYPTO_NULL is not set
|
||||
# CONFIG_CRYPTO_CRYPTD is not set
|
||||
# CONFIG_CRYPTO_AUTHENC is not set
|
||||
|
@ -1361,11 +1376,7 @@ CONFIG_CRYPTO_CRC32C=y
|
|||
#
|
||||
# end of Userspace interface
|
||||
|
||||
CONFIG_CRYPTO_HW=y
|
||||
# CONFIG_CRYPTO_DEV_VIRTIO is not set
|
||||
# CONFIG_CRYPTO_DEV_SAFEXCEL is not set
|
||||
# CONFIG_CRYPTO_DEV_CCREE is not set
|
||||
# CONFIG_CRYPTO_DEV_AMLOGIC_GXL is not set
|
||||
# CONFIG_CRYPTO_HW is not set
|
||||
|
||||
#
|
||||
# Certificates for signature checking
|
||||
|
@ -1440,9 +1451,11 @@ CONFIG_UCS2_STRING=y
|
|||
CONFIG_HAVE_GENERIC_VDSO=y
|
||||
CONFIG_GENERIC_GETTIMEOFDAY=y
|
||||
CONFIG_GENERIC_VDSO_TIME_NS=y
|
||||
CONFIG_FONT_SUPPORT=y
|
||||
CONFIG_FONT_8x16=y
|
||||
CONFIG_FONT_AUTOSELECT=y
|
||||
CONFIG_ARCH_HAS_PMEM_API=y
|
||||
CONFIG_ARCH_STACKWALK=y
|
||||
CONFIG_STACKDEPOT=y
|
||||
CONFIG_SBITMAP=y
|
||||
# end of Library routines
|
||||
|
||||
|
@ -1475,16 +1488,10 @@ CONFIG_DEBUG_MISC=y
|
|||
#
|
||||
# Compile-time checks and compiler options
|
||||
#
|
||||
CONFIG_DEBUG_INFO=y
|
||||
# CONFIG_DEBUG_INFO_NONE is not set
|
||||
CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y
|
||||
CONFIG_DEBUG_INFO_NONE=y
|
||||
# CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT is not set
|
||||
# CONFIG_DEBUG_INFO_DWARF4 is not set
|
||||
# CONFIG_DEBUG_INFO_DWARF5 is not set
|
||||
# CONFIG_DEBUG_INFO_REDUCED is not set
|
||||
CONFIG_DEBUG_INFO_COMPRESSED_NONE=y
|
||||
# CONFIG_DEBUG_INFO_COMPRESSED_ZLIB is not set
|
||||
# CONFIG_DEBUG_INFO_SPLIT is not set
|
||||
CONFIG_GDB_SCRIPTS=y
|
||||
CONFIG_FRAME_WARN=2048
|
||||
# CONFIG_STRIP_ASM_SYMS is not set
|
||||
CONFIG_READABLE_ASM=y
|
||||
|
@ -1522,9 +1529,9 @@ CONFIG_HAVE_KCSAN_COMPILER=y
|
|||
# Memory Debugging
|
||||
#
|
||||
# CONFIG_PAGE_EXTENSION is not set
|
||||
# CONFIG_DEBUG_PAGEALLOC is not set
|
||||
CONFIG_SLUB_DEBUG=y
|
||||
# CONFIG_SLUB_DEBUG_ON is not set
|
||||
CONFIG_DEBUG_PAGEALLOC=y
|
||||
# CONFIG_DEBUG_PAGEALLOC_ENABLE_DEFAULT is not set
|
||||
# CONFIG_SLUB_DEBUG is not set
|
||||
# CONFIG_PAGE_OWNER is not set
|
||||
# CONFIG_PAGE_POISONING is not set
|
||||
# CONFIG_DEBUG_RODATA_TEST is not set
|
||||
|
|
|
@ -2,7 +2,7 @@ FPGA_AXI_SDC_MODULE_VERSION = 1.0
|
|||
# TODO This variable needs to change based on where the package
|
||||
# contents are stored on each individual computer. Might parameterize
|
||||
# this somehow.
|
||||
FPGA_AXI_SDC_SITE = /home/jpease/repos/fpga-axi-sdc
|
||||
FPGA_AXI_SDC_SITE =
|
||||
FPGA_AXI_SDC_SITE_METHOD = local
|
||||
FPGA_AXI_SDC_LICENSE = GPLv2
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Exit on any error (return code != 0)
|
||||
set -e
|
||||
# set -e
|
||||
|
||||
# Output colors
|
||||
GREEN='\033[1;32m'
|
||||
|
@ -11,10 +11,10 @@ NAME="$GREEN"${0:2}"$NC"
|
|||
|
||||
# File location variables
|
||||
RISCV=/opt/riscv
|
||||
IMAGES=/home/ross/repos/buildroot/output/images/
|
||||
IMAGES=$RISCV/buildroot/output/images/
|
||||
FW_JUMP=$IMAGES/fw_jump.bin
|
||||
LINUX_KERNEL=$IMAGES/Image
|
||||
DEVICE_TREE=$IMAGES/wally-artya7.dtb
|
||||
DEVICE_TREE=$IMAGES/wally-vcu108.dtb
|
||||
|
||||
# Mount Directory
|
||||
MNT_DIR=wallyimg
|
||||
|
@ -61,12 +61,19 @@ echo -e "$NAME: Device tree block size: $DST_SIZE"
|
|||
echo -e "$NAME: OpenSBI FW_JUMP block size: $FW_JUMP_SIZE"
|
||||
echo -e "$NAME: Kernel block size: $KERNEL_SIZE"
|
||||
|
||||
read -p "Warning: " -n 1 -r
|
||||
read -p "Warning: Doing this will replace all data on this card.\nContinue? y/n: " -n 1 -r
|
||||
echo
|
||||
if [[ $REPLY =~ ^[Yy]$ ]] ; then
|
||||
# Make empty image
|
||||
#echo -e "$NAME: Creating blank image"
|
||||
#sudo dd if=/dev/zero of=$1 bs=4k conv=noerror status=progress && sync
|
||||
DEVBASENAME=$(basename $1)
|
||||
CHECKMOUNT=$(lsblk | grep "sdb4" | tr -s ' ' | cut -d' ' -f 7)
|
||||
|
||||
if [ ! -z $CHECKMOUNT ] ; then
|
||||
sudo umount -v $CHECKMOUNT
|
||||
fi
|
||||
|
||||
#Make empty image
|
||||
echo -e "$NAME: Creating blank image"
|
||||
sudo dd if=/dev/zero of=$1 bs=64k status=progress && sync
|
||||
|
||||
# GUID Partition Tables (GPT)
|
||||
# ===============================================
|
||||
|
@ -76,12 +83,10 @@ if [[ $REPLY =~ ^[Yy]$ ]] ; then
|
|||
# to 1 sector boundaries I think? This would normally be set to 2048
|
||||
# apparently.
|
||||
|
||||
# sudo sgdisk -g --clear --set-alignment=1 \
|
||||
# --new=1:34:+$FW_JUMP_SIZE: --change-name=1:'opensbi' --typecode=1:2E54B353-1271-4842-806F-E436D6AF6985 \
|
||||
# --new=2:$KERNEL_START:+$KERNEL_SIZE --change-name=2:'kernel' --typecode=2:3000 \
|
||||
# --new=3:$FS_START:-0 --change-name=3:'filesystem' \
|
||||
# $1
|
||||
sudo sgdisk -z $1
|
||||
|
||||
sleep 1
|
||||
|
||||
echo -e "$NAME: Creating GUID Partition Table"
|
||||
sudo sgdisk -g --clear --set-alignment=1 \
|
||||
--new=1:34:+$DST_SIZE: --change-name=1:'fdt' \
|
||||
|
@ -92,6 +97,8 @@ if [[ $REPLY =~ ^[Yy]$ ]] ; then
|
|||
|
||||
sudo partprobe $1
|
||||
|
||||
sleep 3
|
||||
|
||||
echo -e "$NAME: Copying binaries into their partitions."
|
||||
DD_FLAGS="bs=4k iflag=fullblock oflag=direct conv=fsync status=progress"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue