diff --git a/doc/litex/debian/README.md b/doc/litex/debian/README.md index 0e3df7b5..1b1fe756 100644 --- a/doc/litex/debian/README.md +++ b/doc/litex/debian/README.md @@ -60,14 +60,14 @@ chmod +x litex_setup.py ```shell cd $WORK_DIR -export MNT=/tmp/riscv64-chroot +export CHROOT_DIR=/tmp/riscv64-chroot # install base files, note that the key added bellow may change sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0E98404D386FA1D9 sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6ED0E7B82643E131 -sudo mmdebstrap --architectures=riscv64 sid $MNT "deb http://deb.debian.org/debian sid main" +sudo mmdebstrap --architectures=riscv64 sid $CHROOT_DIR "deb http://deb.debian.org/debian sid main" # chroot into base filesystem and made basic configuration -sudo chroot $MNT +sudo chroot $CHROOT_DIR # Update package information apt-get update @@ -79,6 +79,7 @@ auto lo iface lo inet loopback allow-hotplug +auto eth0 iface eth0 inet dhcp EOF @@ -128,24 +129,11 @@ apt-get clean # exit chroot exit -sudo umount $MNT +sudo umount $CHROOT_DIR ``` # Compile linux -To do so, you will need a riscv toolchain configured to target linux. To get one you can follow https://github.com/riscv-collab/riscv-gnu-toolchain : - -```shell -git clone https://github.com/riscv-collab/riscv-gnu-toolchain.git --recursive -cd riscv-gnu-toolchain -./configure --prefix=/opt/riscv_rv64gc_linux -make -j$(nproc) linux -sudo make install -cd .. -``` - -Then you can compile the kernel : - ```shell cd $WORK_DIR git clone https://github.com/Dolu1990/litex-linux.git @@ -153,7 +141,7 @@ cd litex-linux git checkout f5ee078b cp $WORK_DIR/VexiiRiscv/doc/litex/debian/linux.config .config -export CROSS_COMPILE=/opt/riscv_rv64gc_linux/bin/riscv64-unknown-linux-gnu- +export CROSS_COMPILE=riscv64-unknown-linux-gnu- make -j$(nproc) ARCH=riscv oldconfig make -j$(nproc) ARCH=riscv all @@ -188,7 +176,7 @@ python3 -m litex_boards.targets.digilent_nexys_video --cpu-type=vexiiriscv --cpu ```shell cd $WORK_DIR -git clone https://github.com/Dolu1990/opensbi.git --branch upstream +git clone https://github.com/riscv-software-src/opensbi.git cd opensbi make CROSS_COMPILE=riscv64-unknown-linux-gnu- \ PLATFORM=generic \ @@ -207,7 +195,7 @@ make CROSS_COMPILE=riscv64-unknown-linux-gnu- \ cd $WORK_DIR cat > boot.json << EOF { -"Image": "0x40000000", +"Image": "0x41000000", "opensbi.bin": "0x40C00000" "opensbi.bin": "0x40f00000" } @@ -253,14 +241,20 @@ sudo e2label $SDCARD_P2 rootfs ```shell cd $WORK_DIR -export BOOT=mnt_p1 -mkdir -p $BOOT -sudo mount $SDCARD_P1 $BOOT -sudo cp boot.json $BOOT/boot.json -sudo cp opensbi/build/platform/generic/firmware/fw_jump.bin $BOOT/opensbi.bin -sudo cp buildroot/build/basic/images/Image $BOOT -sudo cp buildroot/build/basic/images/rootfs.cpio $BOOT -sudo umount $BOOT +export P1=mnt_p1 +mkdir -p $P1 +sudo mount $SDCARD_P1 $P1 +sudo cp boot.json $P1/boot.json +sudo cp opensbi/build/platform/generic/firmware/fw_jump.bin $P1/opensbi.bin +sudo cp litex-linux/arch/riscv/boot/Image $P1 +sudo umount $P1 + + +export P2=mnt_p2 +mkdir -p $P2 +sudo mount $SDCARD_P2 $P2 +sudo rsync -aAX --progress $CHROOT_DIR/ $P2/ +sudo umount $P2 ``` diff --git a/doc/litex/debian/linux.config b/doc/litex/debian/linux.config index f6cfd8f7..5c47da64 100644 --- a/doc/litex/debian/linux.config +++ b/doc/litex/debian/linux.config @@ -1,15 +1,15 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/riscv 6.9.0-rc5 Kernel Configuration +# Linux/riscv 6.10.0-rc2 Kernel Configuration # -CONFIG_CC_VERSION_TEXT="riscv64-unknown-linux-gnu-gcc (GCC) 11.1.0" +CONFIG_CC_VERSION_TEXT="riscv64-unknown-linux-gnu-gcc () 13.2.0" CONFIG_CC_IS_GCC=y -CONFIG_GCC_VERSION=110100 +CONFIG_GCC_VERSION=130200 CONFIG_CLANG_VERSION=0 CONFIG_AS_IS_GNU=y -CONFIG_AS_VERSION=23700 +CONFIG_AS_VERSION=24200 CONFIG_LD_IS_BFD=y -CONFIG_LD_VERSION=23700 +CONFIG_LD_VERSION=24200 CONFIG_LLD_VERSION=0 CONFIG_CC_CAN_LINK=y CONFIG_CC_CAN_LINK_STATIC=y @@ -32,6 +32,20 @@ CONFIG_WERROR=y CONFIG_LOCALVERSION="" # CONFIG_LOCALVERSION_AUTO is not set CONFIG_BUILD_SALT="" +CONFIG_HAVE_KERNEL_GZIP=y +CONFIG_HAVE_KERNEL_BZIP2=y +CONFIG_HAVE_KERNEL_LZMA=y +CONFIG_HAVE_KERNEL_LZO=y +CONFIG_HAVE_KERNEL_LZ4=y +CONFIG_HAVE_KERNEL_ZSTD=y +CONFIG_HAVE_KERNEL_UNCOMPRESSED=y +# CONFIG_KERNEL_GZIP is not set +# CONFIG_KERNEL_BZIP2 is not set +# CONFIG_KERNEL_LZMA is not set +# CONFIG_KERNEL_LZO is not set +# CONFIG_KERNEL_LZ4 is not set +# CONFIG_KERNEL_ZSTD is not set +CONFIG_KERNEL_UNCOMPRESSED=y CONFIG_DEFAULT_INIT="" CONFIG_DEFAULT_HOSTNAME="(none)" CONFIG_SYSVIPC=y @@ -57,6 +71,7 @@ CONFIG_IRQ_DOMAIN_HIERARCHY=y CONFIG_GENERIC_IRQ_IPI=y CONFIG_GENERIC_IRQ_IPI_MUX=y CONFIG_GENERIC_MSI_IRQ=y +CONFIG_GENERIC_IRQ_MATRIX_ALLOCATOR=y CONFIG_IRQ_FORCED_THREADING=y CONFIG_SPARSE_IRQ=y # end of IRQ subsystem @@ -119,6 +134,7 @@ CONFIG_TREE_RCU=y # CONFIG_RCU_EXPERT is not set CONFIG_TREE_SRCU=y CONFIG_TASKS_RCU_GENERIC=y +CONFIG_NEED_TASKS_RCU=y CONFIG_TASKS_TRACE_RCU=y CONFIG_RCU_STALL_COMMON=y CONFIG_RCU_NEED_SEGCBLIST=y @@ -203,7 +219,7 @@ CONFIG_POSIX_TIMERS=y CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y +# CONFIG_BASE_SMALL is not set CONFIG_FUTEX=y CONFIG_FUTEX_PI=y CONFIG_EPOLL=y @@ -270,18 +286,20 @@ CONFIG_FIX_EARLYCON_MEM=y CONFIG_PGTABLE_LEVELS=5 CONFIG_LOCKDEP_SUPPORT=y CONFIG_AS_HAS_INSN=y +CONFIG_AS_HAS_OPTION_ARCH=y # # SoC selection # -# CONFIG_SOC_MICROCHIP_POLARFIRE is not set +# CONFIG_ARCH_MICROCHIP is not set # CONFIG_ARCH_RENESAS is not set -# CONFIG_SOC_SIFIVE is not set +# CONFIG_ARCH_SIFIVE is not set # CONFIG_ARCH_SOPHGO is not set # CONFIG_SOC_STARFIVE is not set # CONFIG_ARCH_SUNXI is not set # CONFIG_ARCH_THEAD is not set -# CONFIG_SOC_VIRT is not set +# CONFIG_ARCH_VIRT is not set +# CONFIG_ARCH_CANAAN is not set # end of SoC selection # @@ -300,7 +318,6 @@ CONFIG_NONPORTABLE=y CONFIG_ARCH_RV64I=y # CONFIG_CMODEL_MEDLOW is not set CONFIG_CMODEL_MEDANY=y -CONFIG_MODULE_SECTIONS=y CONFIG_SMP=y # CONFIG_SCHED_MC is not set CONFIG_NR_CPUS=8 @@ -311,11 +328,15 @@ CONFIG_RISCV_ALTERNATIVE=y CONFIG_RISCV_ISA_C=y # CONFIG_RISCV_ISA_SVNAPOT is not set # CONFIG_RISCV_ISA_SVPBMT is not set +CONFIG_TOOLCHAIN_HAS_V=y +# CONFIG_RISCV_ISA_V is not set +CONFIG_TOOLCHAIN_HAS_ZBB=y +CONFIG_TOOLCHAIN_HAS_VECTOR_CRYPTO=y +# CONFIG_RISCV_ISA_ZBB is not set # CONFIG_RISCV_ISA_ZICBOM is not set # CONFIG_RISCV_ISA_ZICBOZ is not set CONFIG_TOOLCHAIN_HAS_ZIHINTPAUSE=y CONFIG_TOOLCHAIN_NEEDS_EXPLICIT_ZICSR_ZIFENCEI=y -CONFIG_TOOLCHAIN_NEEDS_OLD_ISA_SPEC=y CONFIG_FPU=y CONFIG_IRQ_STACKS=y CONFIG_THREAD_SIZE_ORDER=2 @@ -411,6 +432,7 @@ CONFIG_CPU_IDLE_GOV_LADDER=y # CONFIG_VIRTUALIZATION is not set CONFIG_ARCH_SUPPORTS_ACPI=y # CONFIG_ACPI is not set +CONFIG_CPU_MITIGATIONS=y # # General architecture-dependent options @@ -439,6 +461,7 @@ CONFIG_ARCH_WANTS_NO_INSTR=y CONFIG_HAVE_ASM_MODVERSIONS=y CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y CONFIG_HAVE_RSEQ=y +CONFIG_HAVE_RUST=y CONFIG_HAVE_FUNCTION_ARG_ACCESS_API=y CONFIG_HAVE_PERF_REGS=y CONFIG_HAVE_PERF_USER_STACK_DUMP=y @@ -466,7 +489,6 @@ CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y CONFIG_HAVE_ARCH_HUGE_VMAP=y CONFIG_HAVE_ARCH_HUGE_VMALLOC=y CONFIG_ARCH_WANT_HUGE_PMD_SHARE=y -CONFIG_HAVE_MOD_ARCH_SPECIFIC=y CONFIG_MODULES_USE_ELF_RELA=y CONFIG_HAVE_IRQ_EXIT_ON_IRQ_STACK=y CONFIG_HAVE_SOFTIRQ_ON_OWN_STACK=y @@ -500,6 +522,7 @@ CONFIG_HAVE_PREEMPT_DYNAMIC_KEY=y CONFIG_ARCH_WANT_LD_ORPHAN_WARN=y CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y CONFIG_ARCH_SUPPORTS_PAGE_TABLE_CHECK=y +CONFIG_ARCH_HAS_KERNEL_FPU_SUPPORT=y # # GCOV-based kernel profiling @@ -514,7 +537,6 @@ CONFIG_FUNCTION_ALIGNMENT=0 # end of General architecture-dependent options CONFIG_RT_MUTEXES=y -CONFIG_BASE_SMALL=0 CONFIG_MODULES=y # CONFIG_MODULE_FORCE_LOAD is not set # CONFIG_MODULE_UNLOAD is not set @@ -638,7 +660,7 @@ CONFIG_FLATMEM_MANUAL=y CONFIG_FLATMEM=y CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y CONFIG_ARCH_WANT_OPTIMIZE_HUGETLB_VMEMMAP=y -CONFIG_HAVE_FAST_GUP=y +CONFIG_HAVE_GUP_FAST=y CONFIG_SPLIT_PTLOCK_CPUS=4 CONFIG_ARCH_ENABLE_SPLIT_PMD_PTLOCK=y CONFIG_MEMORY_BALLOON=y @@ -675,6 +697,7 @@ CONFIG_SECRETMEM=y CONFIG_ARCH_SUPPORTS_PER_VMA_LOCK=y CONFIG_PER_VMA_LOCK=y CONFIG_LOCK_MM_AND_FIND_VMA=y +CONFIG_EXECMEM=y # # Data Access Monitoring @@ -887,6 +910,7 @@ CONFIG_BT_HCIBTUSB_RTL=y # CONFIG_BT_ATH3K is not set # CONFIG_BT_MTKSDIO is not set # CONFIG_BT_VIRTIO is not set +# CONFIG_BT_INTEL_PCIE is not set # end of Bluetooth device drivers # CONFIG_AF_RXRPC is not set @@ -1384,6 +1408,7 @@ CONFIG_NET_CORE=y # CONFIG_GENEVE is not set # CONFIG_BAREUDP is not set # CONFIG_GTP is not set +# CONFIG_PFCP is not set # CONFIG_MACSEC is not set # CONFIG_NETCONSOLE is not set # CONFIG_TUN is not set @@ -1604,6 +1629,7 @@ CONFIG_FIXED_PHY=y # # MII PHY device drivers # +# CONFIG_AIR_EN8811H_PHY is not set # CONFIG_AMD_PHY is not set # CONFIG_ADIN_PHY is not set # CONFIG_ADIN1100_PHY is not set @@ -1796,7 +1822,7 @@ CONFIG_SERIAL_CORE_CONSOLE=y # CONFIG_SERIAL_JSM is not set # CONFIG_SERIAL_SIFIVE is not set # CONFIG_SERIAL_SCCNXP is not set -# CONFIG_SERIAL_SC16IS7XX is not set +# CONFIG_SERIAL_SC16IS7XX_CORE is not set # CONFIG_SERIAL_ALTERA_JTAGUART is not set # CONFIG_SERIAL_ALTERA_UART is not set # CONFIG_SERIAL_XILINX_PS_UART is not set @@ -1874,6 +1900,7 @@ CONFIG_I2C_ALGOBIT=y # # I2C system bus drivers (mostly embedded / system-on-chip) # +# CONFIG_I2C_CADENCE is not set # CONFIG_I2C_CBUS_GPIO is not set # CONFIG_I2C_DESIGNWARE_PLATFORM is not set # CONFIG_I2C_DESIGNWARE_PCI is not set @@ -1932,7 +1959,6 @@ CONFIG_SPI_LITESPI=y # CONFIG_SPI_MICROCHIP_CORE_QSPI is not set # CONFIG_SPI_OC_TINY is not set # CONFIG_SPI_PCI1XXXX is not set -# CONFIG_SPI_PXA2XX is not set # CONFIG_SPI_SC18IS602 is not set # CONFIG_SPI_SIFIVE is not set # CONFIG_SPI_SN_F_OSPI is not set @@ -2342,7 +2368,6 @@ CONFIG_APERTURE_HELPERS=y CONFIG_VIDEO=y # CONFIG_AUXDISPLAY is not set # CONFIG_DRM is not set -# CONFIG_DRM_DEBUG_MODESET_LOCK is not set # # Frame buffer Devices @@ -2813,7 +2838,7 @@ CONFIG_USB_SERIAL_FTDI_SIO=y # CONFIG_USB_HSIC_USB4604 is not set # CONFIG_USB_LINK_LAYER_TEST is not set # CONFIG_USB_CHAOSKEY is not set -# CONFIG_USB_ONBOARD_HUB is not set +# CONFIG_USB_ONBOARD_DEV is not set # # USB Physical Layer drivers @@ -2953,6 +2978,7 @@ CONFIG_RTC_INTF_DEV=y # CONFIG_RTC_DRV_S35390A is not set # CONFIG_RTC_DRV_FM3130 is not set # CONFIG_RTC_DRV_RX8010 is not set +# CONFIG_RTC_DRV_RX8111 is not set # CONFIG_RTC_DRV_RX8581 is not set # CONFIG_RTC_DRV_RX8025 is not set # CONFIG_RTC_DRV_EM3027 is not set @@ -3040,6 +3066,7 @@ CONFIG_VIRTIO_BALLOON=y CONFIG_VIRTIO_INPUT=y CONFIG_VIRTIO_MMIO=y # CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES is not set +# CONFIG_VIRTIO_DEBUG is not set # CONFIG_VDPA is not set # CONFIG_VHOST_MENU is not set @@ -3088,6 +3115,7 @@ CONFIG_RISCV_TIMER=y # end of Clock Source drivers CONFIG_MAILBOX=y +# CONFIG_ARM_MHU_V3 is not set # CONFIG_PLATFORM_MHU is not set # CONFIG_ALTERA_MBOX is not set # CONFIG_MAILBOX_TEST is not set @@ -3190,7 +3218,6 @@ CONFIG_LITEX_SOC_CONTROLLER=y # CONFIG_IIO is not set # CONFIG_NTB is not set CONFIG_PWM=y -CONFIG_PWM_SYSFS=y # CONFIG_PWM_DEBUG is not set # CONFIG_PWM_ATMEL_TCB is not set # CONFIG_PWM_CLK is not set @@ -3208,6 +3235,10 @@ CONFIG_IRQCHIP=y # CONFIG_AL_FIC is not set # CONFIG_XILINX_INTC is not set CONFIG_RISCV_INTC=y +CONFIG_RISCV_APLIC=y +CONFIG_RISCV_APLIC_MSI=y +CONFIG_RISCV_IMSIC=y +CONFIG_RISCV_IMSIC_PCI=y CONFIG_SIFIVE_PLIC=y # CONFIG_LITEX_VEXRISCV_INTC is not set # end of IRQ chip support @@ -3274,6 +3305,7 @@ CONFIG_FPGA=y # CONFIG_ALTERA_PR_IP_CORE is not set # CONFIG_FPGA_MGR_ALTERA_PS_SPI is not set # CONFIG_FPGA_MGR_ALTERA_CVP is not set +# CONFIG_FPGA_MGR_XILINX_SELECTMAP is not set # CONFIG_FPGA_MGR_XILINX_SPI is not set # CONFIG_FPGA_MGR_ICE40_SPI is not set # CONFIG_FPGA_MGR_MACHXO2_SPI is not set @@ -3365,7 +3397,11 @@ CONFIG_FAT_DEFAULT_CODEPAGE=437 CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-15" CONFIG_FAT_DEFAULT_UTF8=y # CONFIG_EXFAT_FS is not set -# CONFIG_NTFS3_FS is not set +CONFIG_NTFS3_FS=y +# CONFIG_NTFS3_64BIT_CLUSTER is not set +# CONFIG_NTFS3_LZX_XPRESS is not set +# CONFIG_NTFS3_FS_POSIX_ACL is not set +CONFIG_NTFS_FS=y # end of DOS/FAT/EXFAT/NT Filesystems # @@ -3483,12 +3519,15 @@ CONFIG_LSM="" # # Memory initialization # +CONFIG_CC_HAS_AUTO_VAR_INIT_PATTERN=y +CONFIG_CC_HAS_AUTO_VAR_INIT_ZERO_BARE=y +CONFIG_CC_HAS_AUTO_VAR_INIT_ZERO=y CONFIG_INIT_STACK_NONE=y -# CONFIG_GCC_PLUGIN_STRUCTLEAK_USER is not set -# CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF is not set -# CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL is not set +# CONFIG_INIT_STACK_ALL_PATTERN is not set +# CONFIG_INIT_STACK_ALL_ZERO is not set # CONFIG_INIT_ON_ALLOC_DEFAULT_ON is not set # CONFIG_INIT_ON_FREE_DEFAULT_ON is not set +# CONFIG_INIT_MLOCKED_ON_FREE_DEFAULT_ON is not set CONFIG_CC_HAS_ZERO_CALL_USED_REGS=y # CONFIG_ZERO_CALL_USED_REGS is not set # end of Memory initialization @@ -3711,6 +3750,8 @@ CONFIG_GENERIC_NET_UTILS=y # CONFIG_CORDIC is not set # CONFIG_PRIME_NUMBERS is not set CONFIG_RATIONAL=y +CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y +CONFIG_ARCH_HAS_FAST_MULTIPLIER=y # # Crypto library routines @@ -3782,6 +3823,7 @@ CONFIG_DMA_DECLARE_COHERENT=y CONFIG_ARCH_DMA_DEFAULT_COHERENT=y CONFIG_SWIOTLB=y # CONFIG_SWIOTLB_DYNAMIC is not set +CONFIG_DMA_NEED_SYNC=y # CONFIG_DMA_RESTRICTED_POOL is not set # CONFIG_DMA_API_DEBUG is not set CONFIG_SGL_ALLOC=y @@ -3838,6 +3880,7 @@ CONFIG_DEBUG_KERNEL=y # # Compile-time checks and compiler options # +CONFIG_AS_HAS_NON_CONST_ULEB128=y CONFIG_DEBUG_INFO_NONE=y # CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT is not set # CONFIG_DEBUG_INFO_DWARF4 is not set @@ -3902,6 +3945,7 @@ CONFIG_ARCH_HAS_DEBUG_VIRTUAL=y # CONFIG_DEBUG_VIRTUAL is not set # CONFIG_DEBUG_MEMORY_INIT is not set # CONFIG_DEBUG_PER_CPU_MAPS is not set +# CONFIG_MEM_ALLOC_PROFILING is not set CONFIG_HAVE_ARCH_KASAN=y CONFIG_HAVE_ARCH_KASAN_VMALLOC=y CONFIG_CC_HAS_KASAN_GENERIC=y @@ -3996,8 +4040,8 @@ CONFIG_HAVE_FUNCTION_TRACER=y CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y CONFIG_HAVE_FUNCTION_GRAPH_RETVAL=y CONFIG_HAVE_DYNAMIC_FTRACE=y -CONFIG_HAVE_DYNAMIC_FTRACE_WITH_REGS=y CONFIG_HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS=y +CONFIG_HAVE_DYNAMIC_FTRACE_WITH_ARGS=y CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y CONFIG_HAVE_SYSCALL_TRACEPOINTS=y CONFIG_TRACING_SUPPORT=y @@ -4014,6 +4058,7 @@ CONFIG_HAVE_SAMPLE_FTRACE_DIRECT_MULTI=y # # arch/riscv/kernel Testing and Coverage # +CONFIG_AS_HAS_ULEB128=y CONFIG_RUNTIME_KERNEL_TESTING_MENU=y # end of arch/riscv/kernel Testing and Coverage # end of riscv Debugging @@ -4026,6 +4071,7 @@ CONFIG_RUNTIME_KERNEL_TESTING_MENU=y # CONFIG_FAULT_INJECTION is not set CONFIG_ARCH_HAS_KCOV=y CONFIG_CC_HAS_SANCOV_TRACE_PC=y +# CONFIG_KCOV is not set # CONFIG_RUNTIME_TESTING_MENU is not set CONFIG_ARCH_USE_MEMTEST=y # CONFIG_MEMTEST is not set