ipq-wifi: drop upstreamed board-2.bin
[openwrt/staging/chunkeey.git] / target / linux / ipq40xx / image / chromium.mk
1 define Build/cros-gpt
2 cp $@ $@.tmp 2>/dev/null || true
3 ptgen -o $@.tmp -g \
4 -T cros_kernel -N kernel -p $(CONFIG_TARGET_KERNEL_PARTSIZE)m \
5 -N rootfs -p $(CONFIG_TARGET_ROOTFS_PARTSIZE)m
6 cat $@.tmp >> $@
7 rm $@.tmp
8 endef
9
10 define Build/append-kernel-part
11 dd if=$(IMAGE_KERNEL) bs=$(CONFIG_TARGET_KERNEL_PARTSIZE)M conv=sync >> $@
12 endef
13
14 # NB: Chrome OS bootloaders replace the '%U' in command lines with the UUID of
15 # the kernel partition it chooses to boot from. This gives a flexible way to
16 # consistently build and sign kernels that always use the subsequent
17 # (PARTNROFF=1) partition as their rootfs.
18 define Build/cros-vboot
19 $(STAGING_DIR_HOST)/bin/cros-vbutil \
20 -k $@ -c "root=PARTUUID=%U/PARTNROFF=1" -o $@.new
21 @mv $@.new $@
22 endef
23
24 define Device/google_wifi
25 DEVICE_VENDOR := Google
26 DEVICE_MODEL := WiFi (Gale)
27 SOC := qcom-ipq4019
28 KERNEL_SUFFIX := -fit-zImage.itb.vboot
29 KERNEL = kernel-bin | fit none $$(DTS_DIR)/$$(DEVICE_DTS).dtb | cros-vboot
30 KERNEL_NAME := zImage
31 IMAGES += factory.bin
32 IMAGE/factory.bin := cros-gpt | append-kernel-part | append-rootfs
33 DEVICE_PACKAGES := partx-utils mkf2fs e2fsprogs \
34 kmod-fs-ext4 kmod-fs-f2fs kmod-google-firmware
35 endef
36 TARGET_DEVICES += google_wifi