aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Watt <jpewhacker@gmail.com>2019-12-11 13:36:07 -0600
committerTrevor Woerner <twoerner@gmail.com>2019-12-12 01:20:26 -0500
commit5e963499996d8c7735f6ed012af6f0b05f1e6c29 (patch)
tree51503db090908e1de534eb2e55d36f33d8e2f87d
parente8fd1f92ed59e0e71a7418779b912c5da342495c (diff)
downloadmeta-rockchip-5e963499996d8c7735f6ed012af6f0b05f1e6c29.tar.gz
meta-rockchip-5e963499996d8c7735f6ed012af6f0b05f1e6c29.tar.bz2
meta-rockchip-5e963499996d8c7735f6ed012af6f0b05f1e6c29.zip
rk3288: Convert to using wic
Coverts the firefly-rk3288, tinker-rk3288, and vyasa-rk3288 machines to use wic instead of the rockchip-gpt-img class. The rock2-squared machine has to keep the older image class because u-boot doesn't provided a combined idbloader for it. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
-rw-r--r--conf/machine/firefly-rk3288.conf15
-rw-r--r--conf/machine/include/rk3288.inc2
-rw-r--r--conf/machine/rock2-square.conf6
-rw-r--r--conf/machine/tinker-rk3288.conf15
-rw-r--r--conf/machine/vyasa-rk3288.conf14
-rw-r--r--wic/firefly-rk3288.wks26
-rw-r--r--wic/tinker-rk3288.wks26
-rw-r--r--wic/vyasa-rk3288.wks27
8 files changed, 127 insertions, 4 deletions
diff --git a/conf/machine/firefly-rk3288.conf b/conf/machine/firefly-rk3288.conf
index 0900440..71e0bc3 100644
--- a/conf/machine/firefly-rk3288.conf
+++ b/conf/machine/firefly-rk3288.conf
@@ -10,4 +10,17 @@ require conf/machine/include/rk3288.inc
KERNEL_DEVICETREE = "rk3288-firefly.dtb"
UBOOT_MACHINE = "firefly-rk3288_defconfig"
-GPTIMG_APPEND = "console=tty1 console=ttyS2,115200n8 rw root=/dev/mmcblk0p7 rootfstype=ext4 init=/sbin/init"
+
+WKS_FILE = "firefly-rk3288.wks"
+IMAGE_FSTYPES += "wic"
+
+WKS_FILE_DEPENDS ?= " \
+ mtools-native \
+ dosfstools-native \
+ virtual/bootloader \
+ virtual/kernel \
+ "
+IMAGE_BOOT_FILES ?= "\
+ ${KERNEL_IMAGETYPE} \
+ ${KERNEL_DEVICETREE} \
+ "
diff --git a/conf/machine/include/rk3288.inc b/conf/machine/include/rk3288.inc
index 6e9a09a..b261692 100644
--- a/conf/machine/include/rk3288.inc
+++ b/conf/machine/include/rk3288.inc
@@ -12,5 +12,3 @@ SERIAL_CONSOLES = "115200;ttyS2"
PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot"
SPL_BINARY ?= "idbloader.img"
-IMAGE_FSTYPES += "rockchip-gpt-img"
-IMAGE_CLASSES += "rockchip-gpt-img"
diff --git a/conf/machine/rock2-square.conf b/conf/machine/rock2-square.conf
index 737d3ae..46064ee 100644
--- a/conf/machine/rock2-square.conf
+++ b/conf/machine/rock2-square.conf
@@ -11,3 +11,9 @@ require conf/machine/include/rk3288.inc
SPL_BINARY = "u-boot-spl-dtb.bin"
KERNEL_DEVICETREE = "rk3288-rock2-square.dtb"
UBOOT_MACHINE = "rock2_defconfig"
+
+# This board doesn't support the combined idbloader, so resort to the older
+# image class
+IMAGE_FSTYPES += "rockchip-gpt-img"
+IMAGE_CLASSES += "rockchip-gpt-img"
+
diff --git a/conf/machine/tinker-rk3288.conf b/conf/machine/tinker-rk3288.conf
index 9e23f8d..e460d43 100644
--- a/conf/machine/tinker-rk3288.conf
+++ b/conf/machine/tinker-rk3288.conf
@@ -9,4 +9,17 @@ require conf/machine/include/rk3288.inc
KERNEL_DEVICETREE = "rk3288-tinker.dtb"
UBOOT_MACHINE = "tinker-rk3288_defconfig"
-GPTIMG_APPEND = "console=tty1 console=ttyS2,115200n8 rw root=/dev/mmcblk0p7 rootfstype=ext4 init=/sbin/init"
+
+WKS_FILE = "tinker-rk3288.wks"
+IMAGE_FSTYPES += "wic"
+
+WKS_FILE_DEPENDS ?= " \
+ mtools-native \
+ dosfstools-native \
+ virtual/bootloader \
+ virtual/kernel \
+ "
+IMAGE_BOOT_FILES ?= "\
+ ${KERNEL_IMAGETYPE} \
+ ${KERNEL_DEVICETREE} \
+ "
diff --git a/conf/machine/vyasa-rk3288.conf b/conf/machine/vyasa-rk3288.conf
index bfbd09b..03a436a 100644
--- a/conf/machine/vyasa-rk3288.conf
+++ b/conf/machine/vyasa-rk3288.conf
@@ -12,3 +12,17 @@ KERNEL_DEVICETREE = "rk3288-vyasa.dtb"
KERNEL_EXTRA_ARGS += "LOADADDR=0x02000000"
UBOOT_MACHINE = "vyasa-rk3288_defconfig"
+
+WKS_FILE = "vyasa-rk3288.wks"
+IMAGE_FSTYPES += "wic"
+
+WKS_FILE_DEPENDS ?= " \
+ mtools-native \
+ dosfstools-native \
+ virtual/bootloader \
+ virtual/kernel \
+ "
+IMAGE_BOOT_FILES ?= "\
+ ${KERNEL_IMAGETYPE} \
+ ${KERNEL_DEVICETREE} \
+ "
diff --git a/wic/firefly-rk3288.wks b/wic/firefly-rk3288.wks
new file mode 100644
index 0000000..5013aea
--- /dev/null
+++ b/wic/firefly-rk3288.wks
@@ -0,0 +1,26 @@
+# Copyright (C) 2019 Garmin Ltd. or its subsidiaries
+# Released under the MIT license (see COPYING.MIT for the terms)
+#
+# Disk layout
+# Note that the reference documentation refers to 512 byte disk sectors, but
+# wic uses 1KB blocks
+#
+# Partition Start Sector Number of Sectors
+# loader1 64 8000
+# reserved1 8064 128
+# reserved2 8192 8192
+# loader2 16384 8192
+# atf 24576 8192
+# boot 32768 229376
+# root 262144 -
+#
+
+part loader1 --ondisk mmcblk0 --align 32 --size 4000K --source rawcopy --sourceparams="file=idbloader.img"
+part reserved1 --ondisk mmcblk0 --align 4032 --size 64K
+part reserved2 --ondisk mmcblk0 --align 4096 --size 4096K
+part loader2 --ondisk mmcblk0 --align 8192 --size 4096K --source rawcopy --sourceparams="file=u-boot.bin"
+part atf --ondisk mmcblk0 --align 12288 --size 4096K
+part /boot --ondisk mmcblk0 --align 16384 --size=114688K --active --source bootimg-partition --fstype=vfat --label boot --sourceparams="loader=u-boot"
+part / --ondisk mmcblk0 --align 131072 --source rootfs --fstype=ext4 --label root
+
+bootloader --ptable gpt --append="console=tty1 console=ttyS2,115200n8 rw root=/dev/mmcblk0p7 rootfstype=ext4 init=/sbin/init"
diff --git a/wic/tinker-rk3288.wks b/wic/tinker-rk3288.wks
new file mode 100644
index 0000000..5013aea
--- /dev/null
+++ b/wic/tinker-rk3288.wks
@@ -0,0 +1,26 @@
+# Copyright (C) 2019 Garmin Ltd. or its subsidiaries
+# Released under the MIT license (see COPYING.MIT for the terms)
+#
+# Disk layout
+# Note that the reference documentation refers to 512 byte disk sectors, but
+# wic uses 1KB blocks
+#
+# Partition Start Sector Number of Sectors
+# loader1 64 8000
+# reserved1 8064 128
+# reserved2 8192 8192
+# loader2 16384 8192
+# atf 24576 8192
+# boot 32768 229376
+# root 262144 -
+#
+
+part loader1 --ondisk mmcblk0 --align 32 --size 4000K --source rawcopy --sourceparams="file=idbloader.img"
+part reserved1 --ondisk mmcblk0 --align 4032 --size 64K
+part reserved2 --ondisk mmcblk0 --align 4096 --size 4096K
+part loader2 --ondisk mmcblk0 --align 8192 --size 4096K --source rawcopy --sourceparams="file=u-boot.bin"
+part atf --ondisk mmcblk0 --align 12288 --size 4096K
+part /boot --ondisk mmcblk0 --align 16384 --size=114688K --active --source bootimg-partition --fstype=vfat --label boot --sourceparams="loader=u-boot"
+part / --ondisk mmcblk0 --align 131072 --source rootfs --fstype=ext4 --label root
+
+bootloader --ptable gpt --append="console=tty1 console=ttyS2,115200n8 rw root=/dev/mmcblk0p7 rootfstype=ext4 init=/sbin/init"
diff --git a/wic/vyasa-rk3288.wks b/wic/vyasa-rk3288.wks
new file mode 100644
index 0000000..3fc9a5b
--- /dev/null
+++ b/wic/vyasa-rk3288.wks
@@ -0,0 +1,27 @@
+# Copyright (C) 2019 Garmin Ltd. or its subsidiaries
+# Released under the MIT license (see COPYING.MIT for the terms)
+#
+# Disk layout
+# Note that the reference documentation refers to 512 byte disk sectors, but
+# wic uses 1KB blocks
+#
+# Partition Start Sector Number of Sectors
+# loader1 64 8000
+# reserved1 8064 128
+# reserved2 8192 8192
+# loader2 16384 8192
+# atf 24576 8192
+# boot 32768 229376
+# root 262144 -
+#
+
+part loader1 --ondisk mmcblk2 --align 32 --size 4000K --source rawcopy --sourceparams="file=idbloader.img"
+part reserved1 --ondisk mmcblk2 --align 4032 --size 64K
+part reserved2 --ondisk mmcblk2 --align 4096 --size 4096K
+part loader2 --ondisk mmcblk2 --align 8192 --size 4096K --source rawcopy --sourceparams="file=u-boot.bin"
+part atf --ondisk mmcblk2 --align 12288 --size 4096K
+part /boot --ondisk mmcblk2 --align 16384 --size=114688K --active --source bootimg-partition --fstype=vfat --label boot --sourceparams="loader=u-boot"
+part / --ondisk mmcblk2 --align 131072 --source rootfs --fstype=ext4 --label root
+
+bootloader --ptable gpt --append="console=tty1 console=ttyS2,115200n8 rw root=/dev/mmcblk2p7 rootfstype=ext4 init=/sbin/init"
+