Add support for rootfs in fpgactl

This commit is contained in:
Rodrigo Arias 2024-03-07 12:35:30 +01:00
parent a4cda932d2
commit 66e3c36f77

View File

@ -264,14 +264,16 @@ function load_bitstream() # {{{
bitstream=
bootloader=
kernelfile=
reloadfs=
kernel=
initrd=
rootfs=
resetcpu=
verbose=
bootloader_addr=0x80000000
kernel_addr=0x84000000
initrd_addr=0x8c300000
rootfs_addr=0x180000000
function usage()
{
@ -286,18 +288,20 @@ function usage()
echo " -b bootloader Load the bootloader file in $bootloader_addr" >&2
echo " -k kernel Load the kernel file in $kernel_addr" >&2
echo " -i initrd Load the initrd file in $initrd_addr" >&2
echo " -r rootfs Load the rootfs file in $rootfs_addr" >&2
echo " -v Be verbose" >&2
echo "" >&2
exit 1
}
while getopts "hvw:b:k:i:" opt; do
while getopts "hvw:b:k:i:r:" opt; do
case "${opt}" in
v) verbose=1 ;;
w) bitstream="${OPTARG}" ;;
b) bootloader="${OPTARG}"; resetcpu=1 ;;
k) kernel="${OPTARG}"; resetcpu=1 ;;
i) initrd="${OPTARG}"; resetcpu=1 ;;
r) rootfs="${OPTARG}"; resetcpu=1 ;;
h) usage ;;
*) usage ;;
esac
@ -312,6 +316,7 @@ test "$resetcpu" && do_system_reset
test "$bootloader" && load_file_in_memory "$bootloader" $bootloader_addr
test "$kernel" && load_file_in_memory "$kernel" $kernel_addr
test "$initrd" && load_file_in_memory "$initrd" $initrd_addr
test "$rootfs" && load_file_in_memory "$rootfs" $rootfs_addr
test "$resetcpu" && do_system_release
# vim:ts=2:sw=2:ai:foldmethod=marker:foldlevel=0: