What does the variable FEATURES in target/linux/xxx/Makefile do?

Hi, I want to know what does the variable FEATURES in target/linux/xxx/Makefile do? Who uses this variable? If I added a new target, what should I write? Thanks

./target/linux/lantiq/xway/target.mk:4:FEATURES+=atm nand ramdisk
./target/linux/octeon/Makefile:10:FEATURES:=squashfs ramdisk pci usb
./target/linux/octeontx/Makefile:10:FEATURES:=targz pcie gpio rtc usb fpu
./target/linux/gemini/Makefile:10:FEATURES:=squashfs pci rtc usb dt gpio display ext4 rootfs-part boot-part
./target/linux/ath25/Makefile:10:FEATURES:=squashfs low_mem small_flash
./target/linux/ath25/files/drivers/net/phy/mvswitch.c:430:      .features       = PHY_BASIC_FEATURES,
./target/linux/armvirt/Makefile:9:FEATURES:=fpu pci rtc usb
./target/linux/armvirt/Makefile:10:FEATURES+=cpiogz ext4 ramdisk squashfs targz
./target/linux/bcm47xx/generic/target.mk:2:FEATURES+=pcmcia
./target/linux/bcm47xx/Makefile:10:FEATURES:=squashfs usb
./target/linux/bcm47xx/legacy/target.mk:1:FEATURES += low_mem pcmcia small_flash
./target/linux/ipq40xx/generic/target.mk:2:FEATURES+=emmc
./target/linux/ipq40xx/Makefile:6:FEATURES:=squashfs fpu ramdisk nand
./target/linux/ipq40xx/files/drivers/net/phy/qca807x.c:805:             /* PHY_GBIT_FEATURES */
./target/linux/ipq40xx/files/drivers/net/phy/qca807x.c:829:             /* PHY_GBIT_FEATURES */
./target/linux/ipq40xx/files/drivers/net/ethernet/qualcomm/essedma/edma.h:139:#define EDMA_SUPPORTED_FEATURES (SUPPORTED_10baseT_Half \
./target/linux/ipq40xx/mikrotik/target.mk:2:FEATURES += minor
./target/linux/ipq40xx/chromium/target.mk:2:FEATURES += emmc boot-part rootfs-part
./target/linux/omap/Makefile:10:FEATURES:=usb usbgadget ext4 targz fpu audio display nand rootfs-part squashfs
./target/linux/ict8800/Makefile:8:FEATURES:=squashfs nand usb gpio ubifs
./target/linux/layerscape/Makefile:11:FEATURES:=squashfs nand usb pcie gpio fpu ubifs ext4 rootfs-part boot-part
./target/linux/imx/Makefile:10:FEATURES:=audio display fpu gpio pcie rtc usb usbgadget squashfs targz nand ubifs boot-part rootfs-part

It selects a number of feature profiles for that target, kernel configs, default packages and image options.

How do I know what features are there?Is there a list?

Can you tell me who uses this variable? I searched the whole project and found that it is not used at all.

Did you try git grep?

3 Likes

Thanks for your professional answer. Could you please help with another question?

  1. Where does Build/Compile and Build/Clean defined?
# image.mk:
define BuildImage
  ifeq ($(IB),)
    .PHONY: download prepare compile clean image_prepare kernel_prepare install install-images
    compile:
		$(call Build/Compile)  ## Where does Build/Compile defined?

    clean:
		$(call Build/Clean)     ##  Where does Build/Clean defined?

    image_prepare: compile
		mkdir -p $(BIN_DIR) $(KDIR)/tmp
		rm -rf $(BUILD_DIR)/json_info_files
		$(call Image/Prepare)

  else
    image_prepare:
		mkdir -p $(BIN_DIR) $(KDIR)/tmp
  endif
  ...
  1. Is there a way to trim the root filesystem?

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.