2 cp
$@
$@.tmp
2>/dev
/null || true
4 -T cros_kernel
-N kernel
-p
$(CONFIG_TARGET_KERNEL_PARTSIZE
)m \
5 -N rootfs
-p
$(CONFIG_TARGET_ROOTFS_PARTSIZE
)m \
7 $$((3687-$(CONFIG_TARGET_ROOTFS_PARTSIZE
)-\
8 $(CONFIG_TARGET_KERNEL_PARTSIZE
)))m
13 define Build
/append-kernel-part
14 dd if
=$(IMAGE_KERNEL
) bs
=$(CONFIG_TARGET_KERNEL_PARTSIZE
)M conv
=sync
>> $@
17 # NB: Chrome OS bootloaders replace the '%U' in command lines with the UUID of
18 # the kernel partition it chooses to boot from. This gives a flexible way to
19 # consistently build and sign kernels that always use the subsequent
20 # (PARTNROFF=1) partition as their rootfs.
21 define Build
/cros-vboot
22 $(STAGING_DIR_HOST
)/bin
/cros-vbutil \
24 -c
"root=PARTUUID=%U/PARTNROFF=1 rootwait fstools_partname_fallback_scan=1" \
29 define Device
/OnhubImage
30 KERNEL_LOADADDR
= 0x44208000
32 KERNEL_SUFFIX
:= -fit-zImage.itb.vboot
34 KERNEL
= kernel-bin | fit none
$$(KDIR
)/image-
$$(DEVICE_DTS
).dtb | cros-vboot
35 IMAGES
:= factory.bin sysupgrade.bin
36 IMAGE
/factory.bin
:= cros-gpt | append-kernel-part | append-rootfs
37 IMAGE
/sysupgrade.bin
:= sysupgrade-tar | append-metadata
38 # Note: Chromium/Depthcharge-based bootloaders insert a reserved-memory
39 # ramoops node into the Device Tree automatically, so we can use
41 DEVICE_PACKAGES
:= ath10k-firmware-qca988x-ct e2fsprogs kmod-fs-ext4 losetup \
42 partx-utils mkf2fs kmod-fs-f2fs \
43 ucode kmod-google-firmware kmod-tpm-i2c-infineon \
44 kmod-sound-soc-ipq8064-storm kmod-usb-storage \
48 define Device
/asus_onhub
49 $(call Device
/OnhubImage
)
51 DEVICE_MODEL
:= OnHub SRT-AC1900
52 DEVICE_DTS
:= $$(SOC
)-asus-onhub
53 BOARD_NAME
:= asus-onhub
55 TARGET_DEVICES
+= asus_onhub
57 define Device
/tplink_onhub
58 $(call Device
/OnhubImage
)
59 DEVICE_VENDOR
:= TP-Link
60 DEVICE_MODEL
:= OnHub AC1900 Cloud Router
61 DEVICE_DTS
:= $$(SOC
)-tplink-onhub
62 BOARD_NAME
:= tplink-onhub
64 TARGET_DEVICES
+= tplink_onhub