summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--board/firefly/firefly-rk3288/extlinux.conf6
-rwxr-xr-xboard/firefly/firefly-rk3288/post-build.sh3
-rwxr-xr-xboard/firefly/firefly-rk3288/post-image.sh20
-rw-r--r--board/firefly/firefly-rk3288/readme.txt40
-rw-r--r--board/firefly/firefly-rk3288/sd-image.cfg22
-rw-r--r--configs/firefly_rk3288_defconfig31
-rw-r--r--configs/firefly_rk3288_demo_defconfig39
7 files changed, 161 insertions, 0 deletions
diff --git a/board/firefly/firefly-rk3288/extlinux.conf b/board/firefly/firefly-rk3288/extlinux.conf
new file mode 100644
index 0000000000..39ac5b9dac
--- /dev/null
+++ b/board/firefly/firefly-rk3288/extlinux.conf
@@ -0,0 +1,6 @@
+default firefly-rk3288
+
+label firefly-rk3288
+kernel /boot/uImage
+devicetree /boot/rk3288-firefly.dtb
+append console=ttyS2,115200n8 root=/dev/mmcblk0p1 rootwait
diff --git a/board/firefly/firefly-rk3288/post-build.sh b/board/firefly/firefly-rk3288/post-build.sh
new file mode 100755
index 0000000000..94e89ce6a4
--- /dev/null
+++ b/board/firefly/firefly-rk3288/post-build.sh
@@ -0,0 +1,3 @@
+BOARD_DIR="$(dirname $0)"
+
+install -m 0644 -D $BOARD_DIR/extlinux.conf $TARGET_DIR/boot/extlinux/extlinux.conf
diff --git a/board/firefly/firefly-rk3288/post-image.sh b/board/firefly/firefly-rk3288/post-image.sh
new file mode 100755
index 0000000000..1dd30a6e7e
--- /dev/null
+++ b/board/firefly/firefly-rk3288/post-image.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+MKIMAGE=$HOST_DIR/usr/bin/mkimage
+
+BOARD_DIR="$(dirname $0)"
+GENIMAGE_CFG="${BOARD_DIR}/sd-image.cfg"
+GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
+
+$MKIMAGE -n rk3288 -T rksd -d $BINARIES_DIR/u-boot-spl-dtb.bin $BINARIES_DIR/u-boot-spl-dtb.img
+
+rm -rf "${GENIMAGE_TMP}"
+
+genimage \
+ --rootpath "${TARGET_DIR}" \
+ --tmppath "${GENIMAGE_TMP}" \
+ --inputpath "${BINARIES_DIR}" \
+ --outputpath "${BINARIES_DIR}" \
+ --config "${GENIMAGE_CFG}"
+
+exit $?
diff --git a/board/firefly/firefly-rk3288/readme.txt b/board/firefly/firefly-rk3288/readme.txt
new file mode 100644
index 0000000000..d6210857f1
--- /dev/null
+++ b/board/firefly/firefly-rk3288/readme.txt
@@ -0,0 +1,40 @@
+Firefly RK3288
+
+How to build it
+===============
+
+ $ make firefly_rk3288_defconfig
+
+Then you can edit the build options using
+
+ $ make menuconfig
+
+Compile all and build rootfs image:
+
+ $ make
+
+Result of the build
+-------------------
+
+After building, you should get a tree like this:
+
+ output/images/
+ ├── rk3288-firefly.dtb
+ ├── rootfs.ext2
+ ├── rootfs.ext4 -> rootfs.ext2
+ ├── sdcard.img
+ ├── u-boot-dtb.img
+ ├── u-boot-spl-dtb.bin
+ ├── u-boot-spl-dtb.img
+ └── uImage
+
+Prepare your SDCard
+===================
+
+Buildroot generates a ready-to-use SD card image that you can flash directly to
+the card. The image will be in output/images/sdcard.img.
+You can write this image directly to an SD card device (i.e. /dev/xxx):
+
+ $ dd if=output/images/sdcard.img of=/dev/xxx
+
+Finally, you can insert the SD card to the Firefly RK3288 board and boot it.
diff --git a/board/firefly/firefly-rk3288/sd-image.cfg b/board/firefly/firefly-rk3288/sd-image.cfg
new file mode 100644
index 0000000000..a9eb9f0142
--- /dev/null
+++ b/board/firefly/firefly-rk3288/sd-image.cfg
@@ -0,0 +1,22 @@
+image sdcard.img {
+ hdimage {
+ }
+
+ partition u-boot-spl-dtb {
+ in-partition-table = "no"
+ image = "u-boot-spl-dtb.img"
+ offset = 32K
+ }
+
+ partition u-boot-dtb {
+ in-partition-table = "no"
+ image = "u-boot-dtb.img"
+ offset = 128K
+ }
+
+ partition rootfs {
+ partition-type = 0x83
+ image = "rootfs.ext4"
+ size = 512M
+ }
+}
diff --git a/configs/firefly_rk3288_defconfig b/configs/firefly_rk3288_defconfig
new file mode 100644
index 0000000000..bd3faa62ba
--- /dev/null
+++ b/configs/firefly_rk3288_defconfig
@@ -0,0 +1,31 @@
+BR2_arm=y
+BR2_cortex_a12=y
+BR2_ARM_FPU_NEON_VFPV4=y
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_4=y
+BR2_TARGET_GENERIC_HOSTNAME="firefly-rk3288"
+BR2_TARGET_GENERIC_ISSUE="Welcome to FIREFLY RK3288!"
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/firefly/firefly-rk3288/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/firefly/firefly-rk3288/post-image.sh"
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_GIT=y
+BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git@github.com:mmind/linux-rockchip.git"
+BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="ccb89e9b5657b4911c16d08e1581121222ee12c4"
+BR2_LINUX_KERNEL_DEFCONFIG="rk3288_veyron"
+BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x02000000"
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="rk3288-firefly"
+BR2_LINUX_KERNEL_INSTALL_TARGET=y
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+# BR2_TARGET_ROOTFS_TAR is not set
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2016.01"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="firefly-rk3288"
+BR2_TARGET_UBOOT_NEEDS_DTC=y
+BR2_TARGET_UBOOT_FORMAT_DTB_IMG=y
+BR2_TARGET_UBOOT_SPL=y
+BR2_TARGET_UBOOT_SPL_NAME="spl/u-boot-spl-dtb.bin"
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_UBOOT_TOOLS=y
diff --git a/configs/firefly_rk3288_demo_defconfig b/configs/firefly_rk3288_demo_defconfig
new file mode 100644
index 0000000000..4a0aca12d0
--- /dev/null
+++ b/configs/firefly_rk3288_demo_defconfig
@@ -0,0 +1,39 @@
+BR2_arm=y
+BR2_cortex_a12=y
+BR2_ARM_FPU_NEON_VFPV4=y
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_4=y
+BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
+BR2_TOOLCHAIN_BUILDROOT_CXX=y
+BR2_TARGET_GENERIC_HOSTNAME="firefly-rk3288"
+BR2_TARGET_GENERIC_ISSUE="Welcome to FIREFLY RK3288!"
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/firefly/firefly-rk3288/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/firefly/firefly-rk3288/post-image.sh"
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_GIT=y
+BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git@github.com:mmind/linux-rockchip.git"
+BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="ccb89e9b5657b4911c16d08e1581121222ee12c4"
+BR2_LINUX_KERNEL_DEFCONFIG="rk3288_veyron"
+BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x02000000"
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="rk3288-firefly"
+BR2_LINUX_KERNEL_INSTALL_TARGET=y
+BR2_PACKAGE_QT5=y
+BR2_PACKAGE_QT5BASE_LICENSE_APPROVED=y
+BR2_PACKAGE_QT5BASE_EXAMPLES=y
+BR2_PACKAGE_QT5BASE_GUI=y
+BR2_PACKAGE_QT5BASE_EGLFS=y
+BR2_PACKAGE_MALI_T76X=y
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+# BR2_TARGET_ROOTFS_TAR is not set
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2016.01"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="firefly-rk3288"
+BR2_TARGET_UBOOT_NEEDS_DTC=y
+BR2_TARGET_UBOOT_FORMAT_DTB_IMG=y
+BR2_TARGET_UBOOT_SPL=y
+BR2_TARGET_UBOOT_SPL_NAME="spl/u-boot-spl-dtb.bin"
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_UBOOT_TOOLS=y
OpenPOWER on IntegriCloud