ath79: update WA/XC devices UBNT_VERSION to 8.7.4
[openwrt/staging/wigyori.git] / target / linux / ipq806x / image / chromium.mk
1 define Device/dsa-migration
2 DEVICE_COMPAT_VERSION := 1.1
3 DEVICE_COMPAT_MESSAGE := Config cannot be migrated from swconfig to DSA
4 endef
5
6 define Build/cros-gpt
7 cp $@ $@.tmp 2>/dev/null || true
8 ptgen -o $@.tmp -g \
9 -T cros_kernel -N kernel -p $(CONFIG_TARGET_KERNEL_PARTSIZE)m \
10 -N rootfs -p $(CONFIG_TARGET_ROOTFS_PARTSIZE)m \
11 -N rootfs_data -p \
12 $$((3687-$(CONFIG_TARGET_ROOTFS_PARTSIZE)-\
13 $(CONFIG_TARGET_KERNEL_PARTSIZE)))m
14 cat $@.tmp >> $@
15 rm $@.tmp
16 endef
17
18 define Build/append-kernel-part
19 dd if=$(IMAGE_KERNEL) bs=$(CONFIG_TARGET_KERNEL_PARTSIZE)M conv=sync >> $@
20 endef
21
22 # NB: Chrome OS bootloaders replace the '%U' in command lines with the UUID of
23 # the kernel partition it chooses to boot from. This gives a flexible way to
24 # consistently build and sign kernels that always use the subsequent
25 # (PARTNROFF=1) partition as their rootfs.
26 define Build/cros-vboot
27 $(STAGING_DIR_HOST)/bin/cros-vbutil \
28 -k $@ \
29 -c "root=PARTUUID=%U/PARTNROFF=1 rootwait fstools_partname_fallback_scan=1" \
30 -o $@.new
31 @mv $@.new $@
32 endef
33
34 define Device/OnhubImage
35 KERNEL_LOADADDR = 0x44208000
36 SOC := qcom-ipq8064
37 KERNEL_SUFFIX := -fit-zImage.itb.vboot
38 KERNEL_NAME := zImage
39 KERNEL = kernel-bin | fit none $$(KDIR)/image-$$(DEVICE_DTS).dtb | cros-vboot
40 IMAGES := factory.bin sysupgrade.bin
41 IMAGE/factory.bin := cros-gpt | append-kernel-part | append-rootfs
42 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
43 # Note: Chromium/Depthcharge-based bootloaders insert a reserved-memory
44 # ramoops node into the Device Tree automatically, so we can use
45 # kmod-ramoops.
46 DEVICE_PACKAGES := ath10k-firmware-qca988x-ct e2fsprogs kmod-fs-ext4 losetup \
47 partx-utils mkf2fs kmod-fs-f2fs \
48 ucode kmod-google-firmware kmod-tpm-i2c-infineon \
49 kmod-sound-soc-ipq8064-storm kmod-usb-storage \
50 kmod-ramoops
51 endef
52
53 define Device/asus_onhub
54 $(call Device/OnhubImage)
55 $(Device/dsa-migration)
56 DEVICE_VENDOR := ASUS
57 DEVICE_MODEL := OnHub SRT-AC1900
58 DEVICE_DTS := $$(SOC)-asus-onhub
59 BOARD_NAME := asus-onhub
60 endef
61 TARGET_DEVICES += asus_onhub
62
63 define Device/tplink_onhub
64 $(call Device/OnhubImage)
65 $(Device/dsa-migration)
66 DEVICE_VENDOR := TP-Link
67 DEVICE_MODEL := OnHub AC1900 Cloud Router
68 DEVICE_DTS := $$(SOC)-tplink-onhub
69 BOARD_NAME := tplink-onhub
70 endef
71 TARGET_DEVICES += tplink_onhub