aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYixun Lan <dlan@gentoo.org>2021-03-19 03:13:52 +0100
committerThomas Deutschmann <whissi@gentoo.org>2021-03-19 03:45:48 +0100
commitc541b76e7b401ab685412e1ab95cb77dbc859b20 (patch)
tree9245fdd7d8052b96cd28e73fe71a405a7e257c89
parentgen_configkernel.sh: config_kernel(): Warn when kernel config did not change (diff)
downloadgenkernel-c541b76e7b401ab685412e1ab95cb77dbc859b20.tar.gz
genkernel-c541b76e7b401ab685412e1ab95cb77dbc859b20.tar.bz2
genkernel-c541b76e7b401ab685412e1ab95cb77dbc859b20.zip
Add RISC-V support
Bug: https://bugs.gentoo.org/767937 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
-rw-r--r--arch/riscv64/arch-config449
-rw-r--r--arch/riscv64/config.sh8
-rw-r--r--arch/riscv64/modules_load2
-rwxr-xr-xgen_arch.sh3
-rwxr-xr-xgen_initramfs.sh2
-rw-r--r--patches/coreutils/8.32/coreutils-8.32-ls-restore-8.31-behavior-on-removed-directories.patch86
6 files changed, 549 insertions, 1 deletions
diff --git a/arch/riscv64/arch-config b/arch/riscv64/arch-config
new file mode 100644
index 0000000..2c1dd16
--- /dev/null
+++ b/arch/riscv64/arch-config
@@ -0,0 +1,449 @@
+CONFIG_64BIT=y
+# CONFIG_AHCI_CEVA is not set
+# CONFIG_AHCI_QORIQ is not set
+# CONFIG_AK8974 is not set
+CONFIG_AK8975=m
+# CONFIG_AL_FIC is not set
+# CONFIG_ALTERA_MBOX is not set
+CONFIG_AQTION=m
+CONFIG_ARCH_DMA_ADDR_T_64BIT=y
+CONFIG_ARCH_FLATMEM_ENABLE=y
+CONFIG_ARCH_HAS_BINFMT_FLAT=y
+CONFIG_ARCH_HAS_GIGANTIC_PAGE=y
+CONFIG_ARCH_HAS_KCOV=y
+CONFIG_ARCH_HAS_MMIOWB=y
+CONFIG_ARCH_MMAP_RND_BITS=18
+CONFIG_ARCH_MMAP_RND_BITS_MAX=24
+CONFIG_ARCH_MMAP_RND_BITS_MIN=18
+CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y
+CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y
+# CONFIG_ARCH_RV32I is not set
+CONFIG_ARCH_RV64I=y
+CONFIG_ARCH_SUPPORTS_INT128=y
+CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT=y
+CONFIG_ARCH_WANT_FRAME_POINTERS=y
+# CONFIG_ATH10K_AHB is not set
+CONFIG_AUDIT_GENERIC=y
+CONFIG_AUTOFS4_FS=y
+CONFIG_AUTOFS_FS=y
+# CONFIG_AXP20X_ADC is not set
+# CONFIG_AXP20X_POWER is not set
+CONFIG_AXP288_ADC=m
+CONFIG_AXP288_FUEL_GAUGE=m
+# CONFIG_BACKLIGHT_LED is not set
+# CONFIG_BATTERY_GOLDFISH is not set
+CONFIG_BATTERY_MAX17042=m
+# CONFIG_BCACHE is not set
+# CONFIG_BINFMT_FLAT is not set
+CONFIG_BLK_DEV_PMEM=m
+CONFIG_BLK_DEV_SKD=m
+CONFIG_BMC150_MAGN_I2C=m
+CONFIG_BMC150_MAGN=m
+CONFIG_BMG160_I2C=m
+CONFIG_BMG160=m
+CONFIG_BMG160_SPI=m
+CONFIG_BTT=y
+# CONFIG_CAN_FLEXCAN is not set
+# CONFIG_CAN_GRCAN is not set
+CONFIG_CHARGER_BQ24190=m
+# CONFIG_CHARGER_DETECTOR_MAX14656 is not set
+# CONFIG_CHARGER_UCS1002 is not set
+CONFIG_CLK_ANALOGBITS_WRPLL_CLN28HPC=y
+CONFIG_CLK_SIFIVE_PRCI=y
+CONFIG_CLK_SIFIVE=y
+CONFIG_CLONE_BACKWARDS=y
+# CONFIG_CM3605 is not set
+CONFIG_CMDLINE=""
+CONFIG_CMODEL_MEDANY=y
+# CONFIG_CMODEL_MEDLOW is not set
+# CONFIG_COMMON_CLK_CDCE925 is not set
+# CONFIG_COMMON_CLK_FIXED_MMIO is not set
+# CONFIG_COMMON_CLK_SI514 is not set
+# CONFIG_COMMON_CLK_SI570 is not set
+# CONFIG_COMMON_CLK_VC5 is not set
+# CONFIG_CONTEXT_TRACKING_FORCE is not set
+CONFIG_CONTEXT_TRACKING=y
+# CONFIG_CPU_THERMAL is not set
+CONFIG_CRC_CCITT=y
+CONFIG_CRYPTO_CRC32C=y
+# CONFIG_CRYPTO_DEV_CCREE is not set
+# CONFIG_CRYPTO_DEV_NITROX_CNN55XX is not set
+CONFIG_CRYPTO_LIB_POLY1305_RSIZE=1
+CONFIG_CRYPTO_USER_API_HASH=y
+CONFIG_CRYPTO_USER_API=y
+CONFIG_DAX_DRIVER=y
+CONFIG_DEFAULT_MMAP_MIN_ADDR=65536
+CONFIG_DEFERRED_STRUCT_PAGE_INIT=y
+CONFIG_DMA_DECLARE_COHERENT=y
+CONFIG_DMA_OF=y
+# CONFIG_DMARD06 is not set
+CONFIG_DMA_VIRTUAL_CHANNELS=m
+# CONFIG_DPOT_DAC is not set
+CONFIG_DTC=y
+# CONFIG_DW_AXI_DMAC is not set
+CONFIG_EFI_GENERIC_STUB=y
+CONFIG_EFI_PARAMS_FROM_FDT=y
+# CONFIG_ENVELOPE_DETECTOR is not set
+# CONFIG_FB_GOLDFISH is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_SSD1307 is not set
+CONFIG_FB_SYS_COPYAREA=m
+CONFIG_FB_SYS_FILLRECT=m
+CONFIG_FB_SYS_FOPS=m
+CONFIG_FB_SYS_IMAGEBLIT=m
+# CONFIG_FLATMEM_MANUAL is not set
+CONFIG_FPU=y
+CONFIG_FRAME_POINTER=y
+CONFIG_FRAME_WARN=2048
+# CONFIG_FSI is not set
+# CONFIG_FSL_EDMA is not set
+CONFIG_GCC_VERSION=100200
+CONFIG_GENERIC_ARCH_TOPOLOGY=y
+CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y
+CONFIG_GENERIC_CSUM=y
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_IOREMAP=y
+CONFIG_GENERIC_IRQ_MULTI_HANDLER=y
+CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y
+CONFIG_GENERIC_SCHED_CLOCK=y
+# CONFIG_GENWQE is not set
+# CONFIG_GOLDFISH_PIPE is not set
+# CONFIG_GOLDFISH_TTY is not set
+CONFIG_GOLDFISH=y
+# CONFIG_GPIO_74X164 is not set
+# CONFIG_GPIO_74XX_MMIO is not set
+# CONFIG_GPIO_ADNP is not set
+# CONFIG_GPIO_ALTERA is not set
+# CONFIG_GPIO_CADENCE is not set
+# CONFIG_GPIO_FTGPIO010 is not set
+# CONFIG_GPIO_GRGPIO is not set
+# CONFIG_GPIO_GW_PLD is not set
+# CONFIG_GPIO_HLWD is not set
+# CONFIG_GPIO_LOGICVC is not set
+# CONFIG_GPIO_SAMA5D2_PIOBU is not set
+# CONFIG_GPIO_SIFIVE is not set
+# CONFIG_GPIO_SYSCON is not set
+# CONFIG_GPIO_WATCHDOG is not set
+CONFIG_HANDLE_DOMAIN_IRQ=y
+CONFIG_HAVE_64BIT_ALIGNED_ACCESS=y
+CONFIG_HAVE_ARCH_KASAN=y
+CONFIG_HAVE_ARCH_KGDB_QXFER_PKT=y
+CONFIG_HAVE_CONTEXT_TRACKING=y
+CONFIG_HAVE_FUTEX_CMPXCHG=y
+CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y
+# CONFIG_HISI_HIKEY_USB is not set
+# CONFIG_HT16K33 is not set
+CONFIG_HVC_DRIVER=y
+CONFIG_HVC_RISCV_SBI=y
+# CONFIG_HW_RANDOM_CCTRNG is not set
+# CONFIG_I2C_ALI1535 is not set
+# CONFIG_I2C_ALI1563 is not set
+# CONFIG_I2C_ALI15X3 is not set
+# CONFIG_I2C_ARB_GPIO_CHALLENGE is not set
+# CONFIG_I2C_DEMUX_PINCTRL is not set
+# CONFIG_I2C_MUX_GPMUX is not set
+# CONFIG_I2C_MUX_PINCTRL is not set
+# CONFIG_I2C_RK3X is not set
+# CONFIG_I2C_SIS5595 is not set
+# CONFIG_I2C_SIS630 is not set
+# CONFIG_IIO_MUX is not set
+# CONFIG_IIO_RESCALE is not set
+CONFIG_INFINIBAND_BNXT_RE=m
+CONFIG_INFINIBAND_EFA=m
+CONFIG_INFINIBAND_QEDR=m
+# CONFIG_INPUT_ATMEL_CAPTOUCH is not set
+CONFIG_INPUT_AXP20X_PEK=m
+CONFIG_IONIC=m
+CONFIG_IPV6=y
+# CONFIG_IR_GPIO_CIR is not set
+# CONFIG_IR_GPIO_TX is not set
+# CONFIG_IR_HIX5HD2 is not set
+# CONFIG_IR_PWM_TX is not set
+CONFIG_IRQCHIP=y
+# CONFIG_IR_SPI is not set
+CONFIG_KCMP=y
+# CONFIG_KCOV is not set
+# CONFIG_KEYBOARD_BCM is not set
+# CONFIG_KEYBOARD_CAP11XX is not set
+# CONFIG_KEYBOARD_GOLDFISH_EVENTS is not set
+# CONFIG_KEYBOARD_OMAP4 is not set
+CONFIG_LIBFDT=y
+CONFIG_LIBNVDIMM=m
+# CONFIG_LITEX_SOC_CONTROLLER is not set
+# CONFIG_MAILBOX_TEST is not set
+CONFIG_MAILBOX=y
+# CONFIG_MANTIS_CORE is not set
+# CONFIG_MAX5821 is not set
+CONFIG_MAXPHYSMEM_128GB=y
+# CONFIG_MDIO_BUS_MUX_GPIO is not set
+# CONFIG_MDIO_BUS_MUX_MMIOREG is not set
+# CONFIG_MDIO_BUS_MUX_MULTIPLEXER is not set
+# CONFIG_MDIO_HISI_FEMAC is not set
+# CONFIG_MDIO_IPQ4019 is not set
+# CONFIG_MDIO_IPQ8064 is not set
+# CONFIG_MDIO_OCTEON is not set
+# CONFIG_MDIO_THUNDER is not set
+CONFIG_MEDIA_PCI_SUPPORT=y
+# CONFIG_MFD_ACT8945A is not set
+# CONFIG_MFD_ATMEL_FLEXCOM is not set
+# CONFIG_MFD_ATMEL_HLCDC is not set
+CONFIG_MFD_AXP20X_I2C=m
+CONFIG_MFD_AXP20X=m
+# CONFIG_MFD_CPCAP is not set
+# CONFIG_MFD_GATEWORKS_GSC is not set
+# CONFIG_MFD_HI6421_PMIC is not set
+# CONFIG_MFD_MAX77650 is not set
+# CONFIG_MFD_MAX77686 is not set
+# CONFIG_MFD_RK808 is not set
+# CONFIG_MFD_RN5T618 is not set
+# CONFIG_MFD_STMFX is not set
+# CONFIG_MFD_STMPE is not set
+CONFIG_MFD_SYSCON=y
+# CONFIG_MFD_TI_LP87565 is not set
+# CONFIG_MFD_TPS65217 is not set
+# CONFIG_MFD_TPS65218 is not set
+# CONFIG_MICROCHIP_PIT64B is not set
+CONFIG_MLX5_INFINIBAND=m
+# CONFIG_MMC_DW is not set
+# CONFIG_MMC_GOLDFISH is not set
+# CONFIG_MMC_SDHCI_AM654 is not set
+# CONFIG_MMC_SDHCI_CADENCE is not set
+# CONFIG_MMC_SDHCI_MILBEAUT is not set
+# CONFIG_MMC_SDHCI_OF_ARASAN is not set
+# CONFIG_MMC_SDHCI_OF_ASPEED is not set
+# CONFIG_MMC_SDHCI_OF_AT91 is not set
+# CONFIG_MMC_SDHCI_OF_DWCMSHC is not set
+# CONFIG_MMC_SDHCI_OMAP is not set
+CONFIG_MMIOWB=y
+CONFIG_MODULE_SECTIONS=y
+CONFIG_MODULES_USE_ELF_RELA=y
+# CONFIG_MOXTET is not set
+CONFIG_MTD_BLKDEVS=m
+CONFIG_MTD_BLOCK=m
+# CONFIG_MTD_NAND_CADENCE is not set
+# CONFIG_MTD_NAND_CAFE is not set
+# CONFIG_MTD_NAND_DENALI_DT is not set
+CONFIG_MTD_NAND_ECC_SW_HAMMING=y
+# CONFIG_MTD_NAND_INTEL_LGM is not set
+CONFIG_MTD_OF_PARTS=m
+# CONFIG_MUX_MMIO is not set
+CONFIG_ND_BLK=m
+CONFIG_ND_BTT=m
+CONFIG_ND_CLAIM=y
+CONFIG_NO_HZ_FULL=y
+# CONFIG_NO_HZ_IDLE is not set
+CONFIG_NR_CPUS=8
+CONFIG_NTB_IDT=m
+CONFIG_NTB=m
+# CONFIG_NTB_MSI is not set
+CONFIG_NTB_NETDEV=m
+CONFIG_NTB_PERF=m
+CONFIG_NTB_PINGPONG=m
+CONFIG_NTB_SWITCHTEC=m
+CONFIG_NTB_TOOL=m
+CONFIG_NTB_TRANSPORT=m
+CONFIG_NVDIMM_KEYS=y
+# CONFIG_NVMEM_REBOOT_MODE is not set
+CONFIG_OF_ADDRESS=y
+CONFIG_OF_EARLY_FLATTREE=y
+CONFIG_OF_FLATTREE=y
+CONFIG_OF_GPIO=y
+CONFIG_OF_IOMMU=y
+CONFIG_OF_IRQ=y
+CONFIG_OF_KOBJ=y
+CONFIG_OF_MDIO=m
+CONFIG_OF_NET=y
+# CONFIG_OF_OVERLAY is not set
+CONFIG_OF_PMEM=m
+CONFIG_OF_RESERVED_MEM=y
+# CONFIG_OF_UNITTEST is not set
+CONFIG_OF=y
+CONFIG_PA_BITS=56
+CONFIG_PAGE_OFFSET=0xffffffe000000000
+CONFIG_PCI_DOMAINS_GENERIC=y
+# CONFIG_PCIE_CADENCE_PLAT_HOST is not set
+# CONFIG_PCIE_XILINX is not set
+# CONFIG_PCI_FTPCI100 is not set
+# CONFIG_PCI_HOST_GENERIC is not set
+# CONFIG_PCI_J721E_HOST is not set
+CONFIG_PGTABLE_LEVELS=3
+# CONFIG_PHY_CADENCE_DPHY is not set
+# CONFIG_PHY_CADENCE_SALVO is not set
+# CONFIG_PHY_CADENCE_SIERRA is not set
+# CONFIG_PHY_CADENCE_TORRENT is not set
+# CONFIG_PHY_FSL_IMX8MQ_USB is not set
+# CONFIG_PHY_MAPPHONE_MDM6600 is not set
+# CONFIG_PHY_MIXEL_MIPI_DPHY is not set
+# CONFIG_PHY_OCELOT_SERDES is not set
+CONFIG_PHYS_ADDR_T_64BIT=y
+# CONFIG_PINCTRL_AXP209 is not set
+# CONFIG_PINCTRL_MICROCHIP_SGPIO is not set
+# CONFIG_PINCTRL_OCELOT is not set
+# CONFIG_PINCTRL_SINGLE is not set
+# CONFIG_PINCTRL_STMFX is not set
+# CONFIG_PLATFORM_MHU is not set
+CONFIG_PM_GENERIC_DOMAINS_OF=y
+# CONFIG_POWER_RESET_GPIO is not set
+# CONFIG_POWER_RESET_GPIO_RESTART is not set
+# CONFIG_POWER_RESET_LTC2952 is not set
+# CONFIG_POWER_RESET_REGULATOR is not set
+CONFIG_POWER_RESET_SYSCON_POWEROFF=y
+CONFIG_POWER_RESET_SYSCON=y
+# CONFIG_PROFILE_ALL_BRANCHES is not set
+# CONFIG_PWM_ATMEL_TCB is not set
+# CONFIG_PWM_FSL_FTM is not set
+# CONFIG_PWM_SIFIVE is not set
+CONFIG_PWRSEQ_EMMC=m
+# CONFIG_PWRSEQ_SD8787 is not set
+CONFIG_PWRSEQ_SIMPLE=m
+CONFIG_QED_RDMA=y
+CONFIG_RCU_NOCB_CPU=y
+CONFIG_REGMAP_MMIO=y
+# CONFIG_REGULATOR_AXP20X is not set
+# CONFIG_REGULATOR_BD9571MWV is not set
+# CONFIG_REGULATOR_DA9121 is not set
+# CONFIG_REGULATOR_FAN53880 is not set
+# CONFIG_REGULATOR_MAX8973 is not set
+# CONFIG_REGULATOR_MCP16502 is not set
+# CONFIG_REGULATOR_MP5416 is not set
+# CONFIG_REGULATOR_MP886X is not set
+# CONFIG_REGULATOR_MPQ7920 is not set
+# CONFIG_REGULATOR_PF8X00 is not set
+# CONFIG_REGULATOR_SY8106A is not set
+# CONFIG_REGULATOR_SY8824X is not set
+# CONFIG_REGULATOR_SY8827N is not set
+# CONFIG_REGULATOR_VCTRL is not set
+# CONFIG_RESET_INTEL_GW is not set
+CONFIG_RISCV_BASE_PMU=y
+CONFIG_RISCV_INTC=y
+CONFIG_RISCV_ISA_C=y
+CONFIG_RISCV_SBI_V01=y
+CONFIG_RISCV_SBI=y
+CONFIG_RISCV_TIMER=y
+CONFIG_RISCV=y
+# CONFIG_RPMSG_QCOM_GLINK_RPM is not set
+# CONFIG_RTC_DRV_CADENCE is not set
+# CONFIG_RTC_DRV_EFI is not set
+CONFIG_RTC_DRV_GOLDFISH=y
+# CONFIG_RTC_DRV_HYM8563 is not set
+# CONFIG_RTC_DRV_ISL12026 is not set
+# CONFIG_RTC_DRV_R7301 is not set
+# CONFIG_RTC_DRV_ZYNQMP is not set
+# CONFIG_SD_ADC_MODULATOR is not set
+# CONFIG_SENSORS_GPIO_FAN is not set
+# CONFIG_SENSORS_LIS3_SPI is not set
+# CONFIG_SENSORS_PWM_FAN is not set
+# CONFIG_SERIAL_8250_ASPEED_VUART is not set
+# CONFIG_SERIAL_CONEXANT_DIGICOLOR is not set
+# CONFIG_SERIAL_EARLYCON_RISCV_SBI is not set
+CONFIG_SERIAL_OF_PLATFORM=y
+CONFIG_SERIAL_SIFIVE_CONSOLE=y
+CONFIG_SERIAL_SIFIVE=y
+# CONFIG_SERIAL_XILINX_PS_UART is not set
+# CONFIG_SERIO_APBPS2 is not set
+CONFIG_SFC=m
+# CONFIG_SFC_MCDI_LOGGING is not set
+CONFIG_SFC_MCDI_MON=y
+CONFIG_SFC_MTD=y
+CONFIG_SFC_SRIOV=y
+# CONFIG_SIFIVE_L2 is not set
+CONFIG_SIFIVE_PLIC=y
+# CONFIG_SIMPLE_PM_BUS is not set
+# CONFIG_SND_AUDIO_GRAPH_CARD is not set
+# CONFIG_SND_SOC_SOF_OF is not set
+CONFIG_SOC_SIFIVE=y
+CONFIG_SOC_VIRT=y
+CONFIG_SPARSEMEM_EXTREME=y
+CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
+CONFIG_SPARSEMEM_VMEMMAP=y
+# CONFIG_SPI_FSL_SPI is not set
+# CONFIG_STAGING_BOARD is not set
+# CONFIG_SYSCON_REBOOT_MODE is not set
+CONFIG_SYS_SUPPORTS_HUGETLBFS=y
+# CONFIG_THERMAL_MMIO is not set
+CONFIG_THERMAL_OF=y
+# CONFIG_TI_ADS124S08 is not set
+# CONFIG_TI_ADS8344 is not set
+# CONFIG_TI_ADS8688 is not set
+CONFIG_TIMER_OF=y
+CONFIG_TIMER_PROBE=y
+# CONFIG_TOUCHSCREEN_AR1021_I2C is not set
+CONFIG_TOUCHSCREEN_AUO_PIXCIR=m
+# CONFIG_TOUCHSCREEN_CHIPONE_ICN8318 is not set
+# CONFIG_TOUCHSCREEN_EGALAX is not set
+# CONFIG_TOUCHSCREEN_IMX6UL_TSC is not set
+CONFIG_TUNE_GENERIC=y
+# CONFIG_USB_AMD5536UDC is not set
+# CONFIG_USB_AUDIO is not set
+CONFIG_USB_BDC_UDC=m
+# CONFIG_USB_CDC_COMPOSITE is not set
+# CONFIG_USB_CONFIGFS is not set
+# CONFIG_USB_DUMMY_HCD is not set
+# CONFIG_USB_EG20T is not set
+# CONFIG_USB_ETH is not set
+# CONFIG_USB_FOTG210_UDC is not set
+# CONFIG_USB_FUNCTIONFS is not set
+# CONFIG_USB_G_ACM_MS is not set
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+# CONFIG_USB_GADGET_DEBUG_FS is not set
+# CONFIG_USB_GADGET_DEBUG is not set
+# CONFIG_USB_GADGETFS is not set
+CONFIG_USB_GADGET=m
+CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2
+# CONFIG_USB_GADGET_TARGET is not set
+CONFIG_USB_GADGET_VBUS_DRAW=2
+# CONFIG_USB_GADGET_XILINX is not set
+# CONFIG_USB_G_DBGP is not set
+# CONFIG_USB_G_HID is not set
+# CONFIG_USB_G_MULTI is not set
+# CONFIG_USB_G_NCM is not set
+# CONFIG_USB_GOKU is not set
+# CONFIG_USB_G_PRINTER is not set
+# CONFIG_USB_GR_UDC is not set
+# CONFIG_USB_G_SERIAL is not set
+# CONFIG_USB_G_WEBCAM is not set
+# CONFIG_USBIP_VUDC is not set
+# CONFIG_USB_M66592 is not set
+# CONFIG_USB_MASS_STORAGE is not set
+# CONFIG_USB_MAX3420_UDC is not set
+# CONFIG_USB_MIDI_GADGET is not set
+# CONFIG_USB_MV_U3D is not set
+# CONFIG_USB_MV_UDC is not set
+# CONFIG_USB_NET2272 is not set
+# CONFIG_USB_NET2280 is not set
+# CONFIG_USB_PULSE8_CEC is not set
+# CONFIG_USB_PXA27X is not set
+# CONFIG_USB_R8A66597 is not set
+# CONFIG_USB_RAINSHADOW_CEC is not set
+# CONFIG_USB_RAW_GADGET is not set
+# CONFIG_USB_SNP_UDC_PLAT is not set
+# CONFIG_USB_ZERO is not set
+CONFIG_VA_BITS=39
+# CONFIG_VALIDATE_FS_PARSER is not set
+# CONFIG_VF610_ADC is not set
+# CONFIG_VF610_DAC is not set
+# CONFIG_VIDEO_BT848 is not set
+# CONFIG_VIDEO_CX18 is not set
+# CONFIG_VIDEO_CX23885 is not set
+# CONFIG_VIDEO_CX25821 is not set
+# CONFIG_VIDEO_CX88 is not set
+# CONFIG_VIDEO_DT3155 is not set
+# CONFIG_VIDEO_GO7007_USB is not set
+# CONFIG_VIDEO_HEXIUM_GEMINI is not set
+# CONFIG_VIDEO_HEXIUM_ORION is not set
+# CONFIG_VIDEO_IVTV is not set
+# CONFIG_VIDEO_MXB is not set
+# CONFIG_VIDEO_OV5640 is not set
+# CONFIG_VIDEO_OV5645 is not set
+# CONFIG_VIDEO_SAA7134 is not set
+# CONFIG_VIDEO_SAA7164 is not set
+# CONFIG_VIDEO_SOLO6X10 is not set
+# CONFIG_VIDEO_TW5864 is not set
+# CONFIG_VIDEO_TW686X is not set
+# CONFIG_VIDEO_TW68 is not set
+CONFIG_VIRT_CPU_ACCOUNTING_GEN=y
+CONFIG_VIRT_CPU_ACCOUNTING=y
+# CONFIG_WLCORE_SPI is not set
+# CONFIG_XIL_AXIS_FIFO is not set
+# CONFIG_XILLYBUS_OF is not set
+CONFIG_ZONE_DMA32=y
diff --git a/arch/riscv64/config.sh b/arch/riscv64/config.sh
new file mode 100644
index 0000000..6e57e3d
--- /dev/null
+++ b/arch/riscv64/config.sh
@@ -0,0 +1,8 @@
+# $Id$
+#
+# This file is sourced AFTER defaults/config.sh; generic options should be set there.
+# Arch-specific options that normally shouldn't be changed.
+#
+KERNEL_MAKE_DIRECTIVE="Image"
+KERNEL_MAKE_DIRECTIVE_2=""
+KERNEL_BINARY="arch/riscv/boot/Image"
diff --git a/arch/riscv64/modules_load b/arch/riscv64/modules_load
new file mode 100644
index 0000000..fe9cf4a
--- /dev/null
+++ b/arch/riscv64/modules_load
@@ -0,0 +1,2 @@
+# riscv64 module groups for genkernel initramfs auto-loading
+# (extending defaults/modules_load)
diff --git a/gen_arch.sh b/gen_arch.sh
index 7aef963..6da31aa 100755
--- a/gen_arch.sh
+++ b/gen_arch.sh
@@ -23,6 +23,9 @@ determine_kernel_arch() {
fi
fi
;;
+ riscv|riscv64*)
+ KERNEL_ARCH=riscv
+ ;;
x86)
if [ "${VER}" -ge "3" ]
then
diff --git a/gen_initramfs.sh b/gen_initramfs.sh
index 9c030c5..9a9f07d 100755
--- a/gen_initramfs.sh
+++ b/gen_initramfs.sh
@@ -1207,7 +1207,7 @@ append_linker() {
mkdir -p "${TDIR}"/sbin || gen_die "Failed to create '${TDIR}/sbin'!"
local libdir=$(get_chost_libdir)
- copy_system_binaries "${TDIR}/sbin" "${libdir}/../../sbin/ldconfig"
+ copy_system_binaries "${TDIR}/sbin" "${libdir%/usr\/*}/sbin/ldconfig"
else
# Only copy /etc/ld.so.conf.d -- /etc/ld.so.conf was already
# added to CPIO via append_base_layout() and because we only
diff --git a/patches/coreutils/8.32/coreutils-8.32-ls-restore-8.31-behavior-on-removed-directories.patch b/patches/coreutils/8.32/coreutils-8.32-ls-restore-8.31-behavior-on-removed-directories.patch
new file mode 100644
index 0000000..c20a706
--- /dev/null
+++ b/patches/coreutils/8.32/coreutils-8.32-ls-restore-8.31-behavior-on-removed-directories.patch
@@ -0,0 +1,86 @@
+https://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=10fcb97bd728f09d4a027eddf8ad2900f0819b0a
+
+Fixes
+
+ src/ls.c:3026:24: error: 'SYS_getdents' undeclared (first use in this function); did you mean 'SYS_getdents64'?
+
+as seen on riscv
+
+--- a/src/ls.c
++++ b/src/ls.c
+@@ -49,10 +49,6 @@
+ # include <sys/ptem.h>
+ #endif
+
+-#ifdef __linux__
+-# include <sys/syscall.h>
+-#endif
+-
+ #include <stdio.h>
+ #include <assert.h>
+ #include <setjmp.h>
+@@ -2896,7 +2892,6 @@ print_dir (char const *name, char const *realname, bool command_line_arg)
+ struct dirent *next;
+ uintmax_t total_blocks = 0;
+ static bool first = true;
+- bool found_any_entries = false;
+
+ errno = 0;
+ dirp = opendir (name);
+@@ -2972,7 +2967,6 @@ print_dir (char const *name, char const *realname, bool command_line_arg)
+ next = readdir (dirp);
+ if (next)
+ {
+- found_any_entries = true;
+ if (! file_ignored (next->d_name))
+ {
+ enum filetype type = unknown;
+@@ -3018,22 +3012,6 @@ print_dir (char const *name, char const *realname, bool command_line_arg)
+ if (errno != EOVERFLOW)
+ break;
+ }
+-#ifdef __linux__
+- else if (! found_any_entries)
+- {
+- /* If readdir finds no directory entries at all, not even "." or
+- "..", then double check that the directory exists. */
+- if (syscall (SYS_getdents, dirfd (dirp), NULL, 0) == -1
+- && errno != EINVAL)
+- {
+- /* We exclude EINVAL as that pertains to buffer handling,
+- and we've passed NULL as the buffer for simplicity.
+- ENOENT is returned if appropriate before buffer handling. */
+- file_failure (command_line_arg, _("reading directory %s"), name);
+- }
+- break;
+- }
+-#endif
+ else
+ break;
+
+--- a/tests/ls/removed-directory.sh
++++ b/tests/ls/removed-directory.sh
+@@ -26,20 +26,14 @@ case $host_triplet in
+ *) skip_ 'non linux kernel' ;;
+ esac
+
+-LS_FAILURE=2
+-
+-cat <<\EOF >exp-err || framework_failure_
+-ls: reading directory '.': No such file or directory
+-EOF
+-
+ cwd=$(pwd)
+ mkdir d || framework_failure_
+ cd d || framework_failure_
+ rmdir ../d || framework_failure_
+
+-returns_ $LS_FAILURE ls >../out 2>../err || fail=1
++ls >../out 2>../err || fail=1
+ cd "$cwd" || framework_failure_
+ compare /dev/null out || fail=1
+-compare exp-err err || fail=1
++compare /dev/null err || fail=1
+
+ Exit $fail
+