galileo_defconfig: { extends: .defconfig }
grinn_chiliboard_defconfig: { extends: .defconfig }
grinn_liteboard_defconfig: { extends: .defconfig }
+hifive_unleashed_defconfig: { extends: .defconfig }
imx23evk_defconfig: { extends: .defconfig }
imx6-sabreauto_defconfig: { extends: .defconfig }
imx6-sabresd_defconfig: { extends: .defconfig }
--- /dev/null
+SiFive HiFive Unleashed
+=======================
+
+This file describes how to use the pre-defined Buildroot
+configuration for the SiFive HiFive Unleashed board.
+
+Further information about the HiFive Unleashed board can be found
+at https://www.sifive.com/boards/hifive-unleashed
+
+Building
+========
+
+Configure Buildroot using the default board configuration:
+
+ $ make hifive_unleashed_defconfig
+
+Customise the build as necessary:
+
+ $ make menuconfig
+
+Start the build:
+
+ $ make
+
+Result of the build
+===================
+
+Once the build has finished you will have the following files:
+
+ output/images/
+ +-- fw_jump.bin
+ +-- fw_jump.elf
+ +-- fw_payload.bin
+ +-- fw_payload.elf
+ +-- Image
+ +-- rootfs.ext2
+ +-- rootfs.ext4
+ +-- rootfs.tar
+ +-- sdcard.img
+
+
+Creating a bootable SD card with genimage
+=========================================
+
+Buildroot builds a SD card image for you. All you need to do is dd the
+image to your SD card, which can be done with the following command:
+
+ $ sudo dd if=output/images/sdcard.img of=/dev/mmcblk0 bs=4096
+
+Booting the SD card on the board
+================================
+
+Make sure that the all DIP switches are set to the off position for
+default boot mode (MSEL mode = 1111), insert the SD card and power
+up the board.
+
+Connect the USB cable and open minicom (/dev/ttyUSB1, 115200, 8N1).
+
+See the 'SiFive HiFive Unleashed Getting Started Guide' for
+more details (https://www.sifive.com/documentation).
+
+You will get a warning reported by fdisk when you examine the SD card.
+This is because the genimage.cfg file doesn't specify the SD card size
+(as people will naturally have different sized cards), so the
+secondary GPT header is placed after the rootfs rather than at the end
+of the disk where it is expected to be.
+
+You will see something like this at boot time:
+
+[ 2.318722] GPT:Primary header thinks Alt. header is not at the end of the disk.
+[ 2.325390] GPT:190496 != 122142719
+[ 2.328843] GPT:Alternate GPT header not at the end of the disk.
+[ 2.334824] GPT:190496 != 122142719
+[ 2.338302] GPT: Use GNU Parted to correct GPT errors.
+[ 2.343456] mmcblk0: p1 p2
--- /dev/null
+# Architecture
+BR2_riscv=y
+BR2_riscv_custom=y
+BR2_RISCV_ISA_CUSTOM_RVM=y
+BR2_RISCV_ISA_CUSTOM_RVF=y
+BR2_RISCV_ISA_CUSTOM_RVD=y
+BR2_RISCV_ISA_CUSTOM_RVC=y
+BR2_RISCV_64=y
+BR2_RISCV_ABI_LP64D=y
+
+# System
+BR2_SYSTEM_DHCP="eth0"
+BR2_TARGET_GENERIC_GETTY=y
+BR2_TARGET_GENERIC_GETTY_PORT="ttySIF0"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/sifive/hifive-unleashed/genimage.cfg"
+
+# Filesystem
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+
+# Linux headers same as kernel, a 5.1 series
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_1=y
+
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_GIT=y
+BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/alistair23/linux.git"
+BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="hifive-unleashed-5.1"
+BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/sifive/hifive-unleashed/linux.config.fragment"
+BR2_LINUX_KERNEL_IMAGE=y
+
+# Bootloader
+BR2_TARGET_OPENSBI=y
+BR2_TARGET_OPENSBI_PLAT="sifive/fu540"
+BR2_TARGET_OPENSBI_LINUX_PAYLOAD=y
+
+# Host tools
+BR2_PACKAGE_HOST_GENIMAGE=y