aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrevor Woerner <twoerner@gmail.com>2019-12-10 12:49:15 -0500
committerTrevor Woerner <twoerner@gmail.com>2019-12-10 12:52:18 -0500
commit6732e8b981e24ec82a853a1fd3965877a75a694b (patch)
tree74602b2039572679e156ed8aa619a8fb7b9c79e8
parent85f1ba657f34454b83bc01d13053806f75b165b9 (diff)
downloadmeta-rockchip-6732e8b981e24ec82a853a1fd3965877a75a694b.tar.gz
meta-rockchip-6732e8b981e24ec82a853a1fd3965877a75a694b.tar.bz2
meta-rockchip-6732e8b981e24ec82a853a1fd3965877a75a694b.zip
rock2-square: reinstate non-idbloader u-boot
Unfortunately, although the rock2-square is an rk3288-based device, its U-Boot has not been updated to use the TPL+SPL/idbloader mechanism. This commit adds back the previous U-Boot packaging but only for the rock2-square. Signed-off-by: Trevor Woerner <twoerner@gmail.com>
-rw-r--r--classes/rockchip-gpt-img.bbclass8
-rw-r--r--conf/machine/rock2-square.conf1
-rw-r--r--recipes-bsp/u-boot/u-boot%.bbappend6
3 files changed, 15 insertions, 0 deletions
diff --git a/classes/rockchip-gpt-img.bbclass b/classes/rockchip-gpt-img.bbclass
index f40cf36..3ee46c8 100644
--- a/classes/rockchip-gpt-img.bbclass
+++ b/classes/rockchip-gpt-img.bbclass
@@ -38,6 +38,7 @@ do_image_rockchip_gpt_img[depends] = "parted-native:do_populate_sysroot \
virtual/bootloader:do_deploy"
PER_CHIP_IMG_GENERATION_COMMAND_rk3288 = "generate_rk3288_loader1_image"
+PER_CHIP_IMG_GENERATION_COMMAND_rock2-square = "generate_rock2_loader1_image"
IMAGE_CMD_rockchip-gpt-img () {
# Change to image directory
@@ -139,3 +140,10 @@ generate_rk3288_loader1_image () {
dd if=${DEPLOY_DIR_IMAGE}/u-boot-${MACHINE}.bin of=${GPTIMG} conv=notrunc,fsync seek=16384
}
+
+generate_rock2_loader1_image () {
+ # Burn bootloader
+ mkimage -n rk3288 -T rksd -d ${DEPLOY_DIR_IMAGE}/${SPL_BINARY} ${WORKDIR}/${UBOOT}
+ cat ${DEPLOY_DIR_IMAGE}/u-boot-${MACHINE}.bin >> ${WORKDIR}/${UBOOT}
+ dd if=${WORKDIR}/${UBOOT} of=${GPTIMG} conv=notrunc,fsync seek=64
+}
diff --git a/conf/machine/rock2-square.conf b/conf/machine/rock2-square.conf
index 1f4e938..737d3ae 100644
--- a/conf/machine/rock2-square.conf
+++ b/conf/machine/rock2-square.conf
@@ -8,5 +8,6 @@
require conf/machine/include/rk3288.inc
+SPL_BINARY = "u-boot-spl-dtb.bin"
KERNEL_DEVICETREE = "rk3288-rock2-square.dtb"
UBOOT_MACHINE = "rock2_defconfig"
diff --git a/recipes-bsp/u-boot/u-boot%.bbappend b/recipes-bsp/u-boot/u-boot%.bbappend
new file mode 100644
index 0000000..801f710
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot%.bbappend
@@ -0,0 +1,6 @@
+do_compile_append_rock2-square () {
+ # copy to default search path
+ if [ "${SPL_BINARY}" = "u-boot-spl-dtb.bin" ]; then
+ cp ${B}/spl/${SPL_BINARY} ${B}
+ fi
+}