mac80211: ath12k: prevent ltssm crash
[openwrt/openwrt.git] / target / linux / octeon / image / Makefile
1 # SPDX-License-Identifier: GPL-2.0-only
2 #
3 # Copyright (C) 2009-2010 OpenWrt.org
4
5 include $(TOPDIR)/rules.mk
6 include $(INCLUDE_DIR)/image.mk
7
8 define Build/append-dtb-to-elf
9 $(TARGET_CROSS)objcopy --update-section .appended_dtb=$(KDIR)/image-$(DEVICE_DTS).dtb $@
10 endef
11
12 define Build/strip-kernel
13 # Workaround pre-SDK-1.9.0 u-boot versions not handling the .notes section
14 $(TARGET_CROSS)strip -R .notes $@ -o $@.stripped && mv $@.stripped $@
15 endef
16
17 DTS_DIR := $(DTS_DIR)/cavium-octeon
18
19 define Device/Default
20 PROFILES = Default $$(DEVICE_NAME)
21 KERNEL_NAME := vmlinux.elf
22 KERNEL_INITRAMFS_NAME := vmlinux-initramfs.elf
23 KERNEL := kernel-bin | strip-kernel | patch-cmdline
24 IMAGES := sysupgrade.tar
25 IMAGE/sysupgrade.tar/squashfs := append-rootfs | pad-extra 128k | sysupgrade-tar rootfs=$$$$@
26 IMAGE/sysupgrade.tar := sysupgrade-tar
27 endef
28
29 define Device/generic
30 DEVICE_VENDOR := Generic
31 DEVICE_MODEL := Octeon
32 FILESYSTEMS := ext4
33 endef
34 TARGET_DEVICES += generic
35
36 ITUSROUTER_CMDLINE:=console=ttyS0,115200 root=/dev/mmcblk1p2 rootfstype=squashfs,ext4,f2fs rootwait
37 define Device/itus_shield-router
38 DEVICE_VENDOR := Itus Networks
39 DEVICE_MODEL := Shield Router
40 CMDLINE := $(ITUSROUTER_CMDLINE)
41 IMAGE/sysupgrade.tar/squashfs += | append-metadata
42 endef
43 TARGET_DEVICES += itus_shield-router
44
45 # Disable PCIe on ER as it doesn't have PCIe peripherals and some devices lock up on initialization
46 ER_CMDLINE:=-mtdparts=phys_mapped_flash:640k(boot0)ro,640k(boot1)ro,64k(eeprom)ro root=/dev/mmcblk0p2 rootfstype=squashfs,ext4 rootwait pcie_octeon.pcie_disable=1
47 define Device/ubnt_edgerouter
48 DEVICE_VENDOR := Ubiquiti
49 DEVICE_MODEL := EdgeRouter
50 BOARD_NAME := er
51 CMDLINE := $(ER_CMDLINE)
52 SUPPORTED_DEVICES += er
53 endef
54 TARGET_DEVICES += ubnt_edgerouter
55
56 define Device/ubnt_edgerouter-e300
57 DEVICE_VENDOR := Ubiquiti
58 DEVICE_PACKAGES += kmod-gpio-button-hotplug kmod-leds-gpio kmod-of-mdio kmod-sfp kmod-usb3 kmod-usb-dwc3 kmod-usb-storage-uas
59 KERNEL := kernel-bin | patch-cmdline | append-dtb-to-elf
60 KERNEL_DEPENDS := $$(wildcard $(DTS_DIR)/$(DEVICE_DTS).dts)
61 CMDLINE := root=/dev/mmcblk0p2 rootfstype=squashfs,ext4 rootwait
62 endef
63
64 define Device/ubnt_edgerouter-4
65 $(Device/ubnt_edgerouter-e300)
66 DEVICE_MODEL := EdgeRouter 4
67 DEVICE_DTS := cn7130_ubnt_edgerouter-4
68 endef
69 TARGET_DEVICES += ubnt_edgerouter-4
70
71 define Device/ubnt_edgerouter-6p
72 $(Device/ubnt_edgerouter-e300)
73 DEVICE_MODEL := EdgeRouter 6P
74 DEVICE_DTS := cn7130_ubnt_edgerouter-6p
75 endef
76 TARGET_DEVICES += ubnt_edgerouter-6p
77
78 ERLITE_CMDLINE:=-mtdparts=phys_mapped_flash:512k(boot0)ro,512k(boot1)ro,64k(eeprom)ro root=/dev/sda2 rootfstype=squashfs,ext4 rootwait
79 define Device/ubnt_edgerouter-lite
80 DEVICE_VENDOR := Ubiquiti
81 DEVICE_MODEL := EdgeRouter Lite
82 BOARD_NAME := erlite
83 CMDLINE := $(ERLITE_CMDLINE)
84 SUPPORTED_DEVICES += erlite
85 endef
86 TARGET_DEVICES += ubnt_edgerouter-lite
87
88 define Device/ubnt_unifi-usg
89 $(Device/ubnt_edgerouter-lite)
90 DEVICE_MODEL := UniFi Security Gateway
91 BOARD_NAME := ubnt,usg
92 DEVICE_PACKAGES += kmod-gpio-button-hotplug kmod-leds-gpio
93 DEVICE_DTS := cn5020_ubnt_usg
94 KERNEL += | append-dtb-to-elf
95 endef
96 TARGET_DEVICES += ubnt_unifi-usg
97
98 define Device/cisco_vedge1000
99 DEVICE_VENDOR := Cisco Viptela
100 DEVICE_MODEL := vEdge 1000
101 BOARD_NAME := cisco,vedge1000
102 DEVICE_PACKAGES += \
103 blkid \
104 kmod-hwmon-jc42 \
105 kmod-hwmon-max6697 \
106 kmod-of-mdio \
107 kmod-rtc-ds1307 \
108 kmod-usb-dwc3 \
109 kmod-usb-storage-uas \
110 kmod-usb3 \
111 sfdisk \
112 uboot-envtools
113 KERNEL := kernel-bin | append-dtb-elf
114 KERNEL_DEPENDS := $$(wildcard $(DTS_DIR)/$(DEVICE_DTS).dts)
115 DEVICE_DTS := cn6130_cisco_vedge1000
116 endef
117 TARGET_DEVICES += cisco_vedge1000
118
119 $(eval $(call BuildImage))