USE_LLVM := 0 CROSS_GCC := arm-none-eabi- ifeq ($(USE_LLVM),1) COMPILER := LLVM=1 else COMPILER := CROSS_COMPILE=$(CROSS_GCC) endif build_dir := $(CURDIR)/build-ux500 output_dir := $(HOME) rootfs := $(HOME)/rootfs-ux500.cpio config_file := $(build_dir)/.config rootfsbase := $(shell basename $(rootfs)) makejobs := $(shell grep '^processor' /proc/cpuinfo | sort -u | wc -l) makethreads := $(shell dc -e "$(makejobs) 1 + p") # Here you can instead select to append e.g. a Snowball or GT-S7710 or # GT-8190 etc device tree to be appended. #UX500_BOARD ?= snowball #UX500_BOARD ?= hrefv60plus-tvk #UX500_BOARD ?= hrefv60plus-stuib #UX500_BOARD ?= href520-tvk #UX500_BOARD ?= ux500-samsung-golden UX500_BOARD ?= ux500-samsung-skomer #UX500_BOARD ?= ux500-samsung-janice #UX500_BOARD ?= ux500-samsung-codina #UX500_BOARD ?= ux500-samsung-codina-tmo #UX500_BOARD ?= ux500-samsung-gavini #UX500_BOARD ?= ux500-samsung-kyle dtb := $(build_dir)/arch/arm/boot/dts/st/ste-$(UX500_BOARD).dtb tftproot := /var/lib/tftpboot nfsroot := /mnt/storage/nfsroot/ux500 # Taken from the PostmarkeOS install base pmos_initramfs := /mnt/storage/linus/pmbootstrap/chroot_rootfs_samsung-skomer/boot/initramfs #pmos_initramfs := /var/linus/pmbootstrap/chroot_rootfs_samsung-golden/boot/initramfs #pmos_initramfs := /var/linus/pmbootstrap/chroot_native/mnt/rootfs_samsung-skomer/boot/initramfs make_parallel := -j$(makethreads) -l$(makejobs) make_options := -f Makefile \ ARCH=arm \ $(make_parallel) \ $(COMPILER) \ KBUILD_OUTPUT=$(build_dir) #make_flags := CONFIG_DEBUG_SECTION_MISMATCH=y .PHONY: help help: @echo "**** Common Makefile ****" @echo "make config - configure for ux500" @echo "make build - build the kernel and produce a initramfs image" @echo "Specify attached DTB board type like this:" @echo "make build-dt UX500_BOARD=[hrefprev60|hrefv60plus|snowball]" @echo @echo "example for appended devicetree boot:" @echo "make -f u8500.mak config && make -f u8500.mak build" .PHONY: have-rootfs have-rootfs: @if [ ! -f $(rootfs) ] ; then \ echo "ERROR: no rootfs at $(rootfs)" ; \ echo "This is needed to boot the system." ; \ echo "ABORTING." ; \ exit 1 ; \ else \ echo "Rootfs available at $(rootfs)" ; \ fi @if [ ! -r $(rootfs) ] ; then \ echo "ERROR: rootfs at $(rootfs) not readable" ; \ echo "ABORTING." ; \ exit 1 ; \ fi .PHONY: have-rootfs-pmos have-rootfs-pmos: @if [ ! -f $(pmos_initramfs) ] ; then \ echo "ERROR: no rootfs at $(pmos_initramfs)" ; \ echo "This is needed to boot the system." ; \ echo "ABORTING." ; \ exit 1 ; \ else \ echo "Rootfs available at $(pmos_initramfs)" ; \ fi @if [ ! -r $(rootfs) ] ; then \ echo "ERROR: rootfs at $(pmos_initramfs) not readable" ; \ echo "ABORTING." ; \ exit 1 ; \ fi .PHONY: have-crosscompiler have-crosscompiler: @if [ $(USE_LLVM) -eq 1 ] ; then \ echo "LLVM OK" ; \ else \ echo -n "Check that $(CROSS_COMPILE)gcc is available..." ; \ which $(CROSS_COMPILE)gcc > /dev/null ; \ if [ ! $$? -eq 0 ] ; then \ echo "ERROR: cross-compiler $(CROSS_COMPILE)gcc not in PATH=$$PATH!" ; \ echo "ABORTING." ; \ exit 1 ; \ else \ echo "OK" ;\ fi \ fi config-pristine: have-rootfs @mkdir -p $(build_dir) @cp $(rootfs) $(build_dir) $(MAKE) $(make_options) u8500_defconfig yes "" | make $(make_options) oldconfig # systemd requirements: # CONFIG_DEVTMPFS # CONFIG_CGROUPS # CONFIG_INOTIFY_USER # CONFIG_SIGNALFD # CONFIG_TIMERFD # CONFIG_EPOLL # CONFIG_NET # CONFIG_SYSFS # CONFIG_PROC_FS # CONFIG_FHANDLE # CONFIG_AUTOFS4_FS # Config options needed to bring up rootfs on distros config-distro: config-base $(CURDIR)/scripts/config --file $(config_file) \ --enable PARTITION_ADVANCED \ --enable LDM_PARTITION \ --enable MSDOS_PARTITION \ --enable EXT4_FS \ --enable EXT4_POSIX_ACL \ --enable DEVTMPFS \ --enable CGROUPS \ --enable INOTIFY_USER \ --enable SIGNALFD \ --enable TIMERFD \ --enable EPOLL \ --enable NET \ --enable SYSFS \ --disable SYSFS_DEPRECATED \ --enable PROC_FS \ --enable FHANDLE \ --enable TMPFS_XATTR \ --enable TMPFS_POSIX_ACL \ --enable CGROUP_SCHED \ --enable FAIR_GROUP_SCHED \ --enable CFS_BANDWIDTH \ --disable RT_GROUP_SCHED \ --enable SECCOMP \ --enable SECCOMP_FILTER \ --enable CHECKPOINT_RESTORE \ --enable CGROUP_FREEZER \ --enable CGROUP_DEVICE \ --enable CPUSETS \ --enable PROC_PID_CPUSET \ --enable CGROUP_CPUACCT \ --enable RESOURCE_COUNTERS \ --enable CGROUP_MEM_RES_CTLR \ --enable CGROUP_MEM_RES_CTLR_DISABLED \ --enable CGROUP_MEM_RES_CTLR_SWAP \ --enable CGROUP_SCHED \ --enable FAIR_GROUP_SCHED \ --enable BLK_CGROUP \ --enable NAMESPACES \ --enable SCHED_AUTOGROUP \ --enable FHANDLE \ --enable SWAP \ --enable AUTOFS4_FS \ --enable BSD_PROCESS_ACCT \ --enable BSD_PROCESS_ACCT_V3 \ --enable TASKSTATS \ --enable TASK_DELAY_ACCT \ --enable TASK_XACCT \ --enable TASK_IO_ACCOUNTING \ --enable BUILD_BIN2C \ --enable IKCONFIG \ --enable IKCONFIG_PROC \ --enable PAGE_COUNTER \ --enable MEMCG \ --enable MEMCG_SWAP \ --enable MEMCG_SWAP_ENABLED \ --enable MEMCG_KMEM \ --enable CGROUP_PERF \ --enable CGROUP_WRITEBACK \ --enable USER_NS \ --enable BLK_DEV_BSG \ --enable BLK_DEV_BSGLIB \ --enable BLK_DEV_INTEGRITY \ --enable NET_INGRESS \ --enable IP_ADVANCED_ROUTER \ --set-str UEVENT_HELPER_PATH "" \ --enable WANT_DEV_COREDUMP \ --enable DEV_COREDUMP \ --enable CHR_DEV_SG \ --enable KEYS \ --enable ENCRYPTED_KEYS \ --enable SECURITY \ --enable SECURITYFS \ --enable SECURITY_NETWORK \ --enable SECURITY_NETWORK_XFRM \ --enable SECURITY_PATH \ --enable INTEGRITY \ --enable CRYPTO_USER_API \ --enable CRYPTO_USER_API_HASH \ --enable CRYPTO_USER_API_SKCIPHER \ --enable CRYPTO_USER_API_AEAD \ --enable ARM_CRYPTO \ --enable CRYPTO_SHA1_ARM \ --enable CRYPTO_SHA256_ARM \ --enable CRYPTO_SHA512_ARM \ --enable CRYPTO_AES_ARM \ --enable BINARY_PRINTF \ --enable MD \ --enable BLK_DEV_DM_BUILTIN \ --enable BLK_DEV_DM \ --enable DM_CRYPT \ --enable DM_UEVENT \ --enable SCSI \ --enable USB_STORAGE config-androidparts: config-base $(CURDIR)/scripts/config --file $(config_file) \ --enable PARTITION_ADVANCED \ --enable CMDLINE_PARTITION config-base: FORCE @mkdir -p $(build_dir) $(MAKE) $(make_options) u8500_defconfig # For multiplatform switch to this and disable earlydebug # $(MAKE) $(make_options) multi_v7_defconfig config-initramfs: have-rootfs config-base # Copy and configure in the initramfs @cp $(rootfs) $(build_dir)/$(rootfsbase) $(CURDIR)/scripts/config --file $(config_file) \ --enable BLK_DEV_INITRD \ --set-str INITRAMFS_SOURCE $(rootfsbase) \ --enable RD_GZIP \ --enable INITRAMFS_COMPRESSION_GZIP config-initramfs-pmos: have-rootfs-pmos config-base # Copy and configure in the initramfs cp $(pmos_initramfs) $(build_dir)/pmos-initramfs.cpio.gz if [ -f $(build_dir)/pmos-initramfs.cpio ] ; then \ rm $(build_dir)/pmos-initramfs.cpio ; \ fi gunzip $(build_dir)/pmos-initramfs.cpio.gz $(CURDIR)/scripts/config --file $(config_file) \ --enable BLK_DEV_INITRD \ --set-str INITRAMFS_SOURCE pmos-initramfs.cpio \ --enable RD_GZIP \ --enable INITRAMFS_COMPRESSION_GZIP # initramfs passed as initrd config-initrd: have-rootfs config-base # Configure in the initramfs $(CURDIR)/scripts/config --file $(config_file) \ --enable BLK_DEV_INITRD # For early printk config-earlydebug: config-base $(CURDIR)/scripts/config --file $(config_file) \ --enable DEBUG_LL \ --enable DEBUG_UNCOMPRESS \ --enable EARLY_PRINTK \ --set-str CMDLINE "root=/dev/ram0 console=ttyAMA2,115200n8 earlyprintk" \ --set-str UX500_DEBUG_UART 2 config-kasan: config-base $(CURDIR)/scripts/config --file $(config_file) \ --enable KASAN \ --enable KASAN_OUTLINE \ --enable STACKTRACE \ --enable SLUB_DEBUG_ON \ --enable TEST_KASAN config-cfi: config-base $(CURDIR)/scripts/config --file $(config_file) \ --enable CFI_CLANG \ --enable CFI_PERMISSIVE \ --enable LKDTM config-crypto-test: config-base $(CURDIR)/scripts/config --file $(config_file) \ --disable CRYPTO_MANAGER_DISABLE_TESTS \ --enable CRYPTO_MANAGER_EXTRA_TESTS \ --enable CRYPTO_DEV_STM32_CRYP \ --enable CRYPTO_DEV_STM32_HASH config-crypto-old: config-base $(CURDIR)/scripts/config --file $(config_file) \ --disable CRYPTO_MANAGER_DISABLE_TESTS \ --enable CRYPTO_MANAGER_EXTRA_TESTS \ --enable CRYPTO_DEV_UX500 \ --enable CRYPTO_DEV_UX500_HASH \ --enable CRYPTO_DEV_UX500_CRYP config-mainlined-features: config-base # Then reconfigure various stuff $(CURDIR)/scripts/config --file $(config_file) \ --enable MACH_U8500 \ --enable MACH_HREFV60 \ --enable DEBUG_FS \ --enable TICK_ONESHOT \ --enable NO_HZ \ --enable HIGH_RES_TIMERS \ --enable NET \ --enable PHONET \ --enable PHONET_PIPECTRL \ --enable CAIF \ --enable MISC_DEVICES \ --enable AB8500_PWM \ --enable SENSORS_BH1780 \ --enable DMADEVICES \ --enable STE_DMA40 \ --enable RTC_CLASS \ --enable RTC_DRV_PL031 \ --enable HW_RANDOM \ --enable HW_RANDOM_NOMADIK \ --enable I2C \ --enable I2C_NOMADIK \ --enable MFD_TC35892 \ --enable MFD_TC3589X \ --enable GPIO_TC35892 \ --enable GPIO_TC3589X \ --enable KEYBOARD_TC3589X \ --enable MFD_STMPE \ --enable INPUT_KEYBOARD \ --enable KEYBOARD_GPIO \ --enable KEYBOARD_NOMADIK \ --enable KEYBOARD_STMPE \ --enable INPUT_TOUCHSCREEN \ --enable TOUCHSCREEN_BU21013 \ --enable INPUT_MISC \ --enable INPUT_AB8500_PONKEY \ --enable GPIO_STMPE \ --enable AB8500_CORE \ --enable REGULATOR \ --enable REGULATOR_AB8500 \ --enable RTC_DRV_AB8500 \ --enable MMC \ --enable MMC_BLOCK \ --enable MMC_BLOCK_BOUNCE \ --enable MMC_ARMMMCI \ --enable NEW_LEDS \ --enable LEDS_CLASS \ --enable LEDS_LP55XX_COMMON \ --enable LEDS_LP5521 \ --enable EXT3_FS \ --enable FAT_FS \ --enable VFAT_FS \ --enable NLS \ --enable NLS_CODEPAGE_437 \ --enable NLS_ISO8859_1 \ --enable SENSORS_BH1780 \ --enable LEDS_LP5521 \ --enable HOTPLUG_CPU \ --enable CPU_FREQ \ --enable CPUFREQ_DT \ --enable CPU_FREQ_GOV_ONDEMAND \ --enable CPU_FREQ_GOV_SCHEDUTIL \ --enable CPU_FREQ_DEFAULT_GOV_SCHEDUTIL \ --disable KEYBOARD_ATKBD \ --enable USB_SUPPORT \ --enable ARCH_HAS_HCD \ --enable USB_MUSB_HDRC \ --enable USB_MUSB_UX500 \ --enable-after USB_MUSB_UX500 USB_UX500_DMA \ --enable USB_MUSB_PERIPHERAL \ --enable USB_GADGET_MUSB_HDRC \ --enable MUSB_PIO_ONLY \ --enable USB_GADGET \ --enable AB8500_USB \ --enable LEDS_LM3530 \ --enable PM_RUNTIME \ --enable HWSPINLOCK \ --enable HSEM_U8500 \ --enable POWER_SUPPLY \ --enable AB8500_BM \ --enable BATTERY_SAMSUNG_SDI \ --enable CPU_IDLE \ --enable CRYPTO_HW \ --enable CRYPTO_HW \ --disable CRYPTO_DEV_UX500 \ --disable CRYPTO_DEV_UX500_CRYP \ --disable CRYPTO_DEV_UX500_HASH \ --enable CRYPTO_DEV_STM32_HASH \ --enable CRYPTO_DEV_STM32_CRYP \ --enable ARM_U8500_CPUIDLE \ --enable NO_HZ_IDLE \ --disable NO_HZ \ --enable IIO \ --enable IIO_ST_ACCEL_3AXIS \ --enable IIO_ST_ACCEL_I2C_3AXIS \ --disable IIO_ST_ACCEL_SPI_3AXIS \ --enable IIO_ST_SENSORS_I2C \ --disable IIO_ST_SENSORS_SPI \ --enable IIO_ST_SENSORS_CORE \ --enable IIO_ST_GYRO_3AXIS \ --enable IIO_ST_GYRO_I2C_3AXIS \ --disable IIO_ST_GYRO_SPI_3AXIS \ --enable IIO_ST_MAGN_3AXIS \ --enable IIO_ST_MAGN_I2C_3AXIS \ --disable IIO_ST_MAGN_SPI_3AXIS \ --enable IIO_ST_PRESS \ --enable IIO_ST_PRESS_I2C \ --disable IIO_ST_PRESS_SPI \ --enable AK8974 \ --enable WIRELESS \ --enable CFG80211 \ --enable CFG80211_DEBUGFS \ --enable MAC80211 \ --enable MAC80211_LEDS \ --enable WLAN \ --enable CW1200 \ --enable CW1200_WLAN_SDIO \ --enable PERF_EVENTS \ --enable HW_PERF_EVENTS \ --enable CORESIGHT \ --enable CORESIGHT_LINKS_AND_SINKS \ --enable CORESIGHT_SINK_TPIU \ --enable CORESIGHT_SINK_ETBV10 \ --enable CORESIGHT_SOURCE_ETM3X \ --enable RMI4_CORE \ --enable RMI4_I2C \ --enable RMI4_F11 \ --enable RMI4_2D_SENSOR \ --enable TOUCHSCREEN_CYTTSP_CORE \ --enable TOUCHSCREEN_CYTTSP_SPI \ --enable IIO_TRIGGER \ --enable IIO_BUFFER \ --disable SENSORS_BH1780 \ --enable IIO \ --enable IIO_CONFIGFS \ --enable IIO_SW_TRIGGER \ --enable IIO_TRIGGERED_BUFFER \ --enable IIO_HRTIMER_TRIGGER \ --enable BH1780 \ --enable AB8500_GPADC \ --enable HWMON \ --enable SENSORS_NTC_THERMISTOR \ --enable SENSORS_IIO_HWMON \ --enable BACKLIGHT_LCD_SUPPORT \ --enable BACKLIGHT_CLASS_DEVICE \ --enable FB \ --enable CMA \ --enable DMA_CMA \ --disable CMA_SIZE_SEL_PERCENTAGE \ --enable CMA_SIZE_SEL_MBYTES \ --set-str CMA_SIZE_MBYTES "128" \ --set-str CMA_ALIGNMENT "8" \ --enable DRM \ --enable DRM_MCDE \ --enable DRM_PANEL \ --enable DRM_PANEL_SAMSUNG_S6D16D0 \ --enable DRM_PANEL_SONY_ACX424AKP \ --enable DRM_PANEL_NOVATEK_NT35560 \ --enable DRM_LIMA \ --enable LOGO \ --enable FRAMEBUFFER_CONSOLE \ --enable CPUFREQ_DT \ --enable CPU_THERMAL \ --enable SRAM # --disable SND_VERBOSE_PROCFS # --disable SND_PROC_FS # --disable SND_SUPPORT_OLD_API # --enable COMMON_CLK_DEBUG # --enable FAULT_INJECTION # --enable FAULT_INJECTION_DEBUG_FS # --enable FAIL_MMC_REQUEST config-common: config-base config-mainlined-features @echo "Common config..." $(CURDIR)/scripts/config --file $(config_file) \ --disable STAGING \ --disable STAGING_EXCLUDE_BUILD \ --enable HSI \ --enable STE_HSI \ --enable HSI_CHAR \ --enable PARTITION_ADVANCED \ --enable BLKDEV_PARTITION \ --enable SOUND \ --enable SND \ --enable SND_DRIVERS \ --enable SND_SOC \ --enable SND_SOC_UX500 \ --enable SND_SOC_UX500_PLAT_MSP_I2S # Fault injection: # cd /debug/mmc0/fail_mmc_request # echo 5 > probability # ecno -1 > times config-disable-usb: config-common @echo "Disabling USB support" $(CURDIR)/scripts/config --file $(config_file) \ --disable ARCH_HAS_HCD \ --disable USB_MUSB_HDRC \ --disable USB_MUSB_UX500 \ --disable USB_UX500_DMA \ --disable USB_MUSB_PERIPHERAL \ --disable USB_GADGET_MUSB_HDRC \ --disable MUSB_PIO_ONLY \ --disable USB_GADGET config-bfq: config-common @echo "Enabling BFQ" $(CURDIR)/scripts/config --file $(config_file) \ --enable MQ_IOSCHED_DEADLINE \ --enable MQ_IOSCHED_KYBER \ --enable IOSCHED_BFQ \ --enable BFQ_GROUP_IOSCHED config-kernel-in-vmalloc: config-base $(CURDIR)/scripts/config --file $(config_file) \ --enable EMBEDDED \ --enable ARM_KERNEL_IN_VMALLOC config-janice: config-common @echo "Enabling Janice" $(CURDIR)/scripts/config --file $(config_file) \ --enable REGULATOR_FIXED_VOLTAGE \ --enable BACKLIGHT_CLASS_DEVICE \ --enable SPI \ --enable SPI_MASTER \ --enable SPI_GPIO \ --enable DRM_PANEL_SAMSUNG_S6E63M0 \ --enable DRM_PANEL_SAMSUNG_S6E63M0_SPI \ --enable WLAN \ --enable WLAN_VENDOR_BROADCOM \ --enable BRCMFMAC \ --enable BRCMFMAC_SDIO \ --enable BT \ --enable BT_BCM \ --enable BT_HCIUART \ --enable BT_HCIUART_BCM \ --enable IIO \ --enable IIO_RESCALE \ --enable GP2AP002 \ --enable MPU3050 \ --enable MPU3050_I2C \ --enable BMC150_ACCEL \ --enable YAMAHA_YAS530 \ --enable TOUCHSCREEN_ATMEL_MXT \ --enable KEYBOARD_TM2_TOUCHKEY \ --enable EXTCON \ --enable EXTCON_FSA9480 \ --enable SENSORS_NTC_THERMISTOR \ --enable NET \ --enable NFC \ --enable NFC_HCI \ --enable NFC_SHDLC \ --enable NFC_PN544 \ --enable NFC_PN544_I2C \ --enable GNSS \ --enable SERIAL_DEV_BUS \ --enable GNSS_SIRF_SERIAL \ --enable INPUT_ISA1200_HAPTIC config-gavini: config-common @echo "Enabling Gavini" $(CURDIR)/scripts/config --file $(config_file) \ --enable REGULATOR_FIXED_VOLTAGE \ --enable BACKLIGHT_CLASS_DEVICE \ --enable BACKLIGHT_KTD253 \ --enable SPI \ --enable SPI_MASTER \ --enable SPI_GPIO \ --enable DRM_PANEL_SAMSUNG_DB7430 \ --enable DRM_PANEL_SAMSUNG_LMS397KF04 \ --enable INPUT_TOUCHSCREEN \ --enable TOUCHSCREEN_MMS114 \ --enable WLAN \ --enable WLAN_VENDOR_BROADCOM \ --enable BRCMFMAC \ --enable BRCMFMAC_SDIO \ --enable BT \ --enable BT_BCM \ --enable BT_HCIUART \ --enable BT_HCIUART_BCM \ --enable IIO \ --enable I2C_GPIO \ --enable I2C_MUX \ --enable MPU3050 \ --enable MPU3050_I2C \ --enable BMC150_ACCEL \ --enable EXTCON \ --enable EXTCON_FSA9480 config-codina: config-common @echo "Enabling Codina" $(CURDIR)/scripts/config --file $(config_file) \ --enable REGULATOR_FIXED_VOLTAGE \ --enable WLAN \ --enable WLAN_VENDOR_BROADCOM \ --enable BRCMFMAC \ --enable BRCMFMAC_SDIO \ --enable BT \ --enable BT_BCM \ --enable BT_HCIUART \ --enable BT_HCIUART_BCM \ --enable I2C_GPIO \ --enable I2C_MUX \ --enable IIO \ --enable BMA180 \ --enable BMC150_ACCEL \ --enable TSL2772 \ --enable PM_RUNTIME \ --enable INPUT_GPIO_VIBRA \ --enable INPUT_TOUCHSCREEN \ --enable TOUCHSCREEN_ZINITIX \ --enable BACKLIGHT_CLASS_DEVICE \ --enable BACKLIGHT_KTD253 \ --enable DRM_PANEL_WIDECHIPS_WS2401 \ --enable DRM_PANEL_SAMSUNG_S6D27A1 \ --enable LEDS_CLASS_FLASH \ --enable LEDS_RT8515 \ --enable LEDS_REGULATOR \ --enable LEDS_TRIGGER_GPIO \ --enable MEDIA_SUPPORT \ --enable MEDIA_CAMERA_SUPPORT \ --enable VIDEO_DEV \ --enable VIDEO_V4L2 \ --enable MEDIA_CONTROLLER \ --enable VIDEO_V4L2_SUBDEV_API \ --enable V4L2_FLASH_LED_CLASS \ --enable NET \ --enable NFC \ --enable NFC_HCI \ --enable NFC_SHDLC \ --enable NFC_PN544 \ --enable NFC_PN544_I2C config-skomer: config-common @echo "Enabling Skomer" $(CURDIR)/scripts/config --file $(config_file) \ --enable REGULATOR_FIXED_VOLTAGE \ --enable DRM_PANEL_NOVATEK_NT35510 \ --enable WLAN \ --enable WLAN_VENDOR_BROADCOM \ --enable BRCMFMAC \ --enable BRCMFMAC_SDIO \ --enable BT \ --enable BT_BCM \ --enable BT_HCIUART \ --enable BT_HCIUART_BCM \ --enable BACKLIGHT_CLASS_DEVICE \ --enable I2C_GPIO \ --enable I2C_MUX \ --enable IIO \ --enable BMA180 \ --enable BMC150_ACCEL \ --enable PM_RUNTIME \ --enable GP2AP002 \ --enable INPUT_GPIO_VIBRA \ --enable INPUT_TOUCHSCREEN \ --enable TOUCHSCREEN_CY8CTMA140 \ --enable BACKLIGHT_KTD253 \ --enable LEDS_CLASS_FLASH \ --enable LEDS_RT8515 \ --enable MEDIA_SUPPORT \ --enable MEDIA_CAMERA_SUPPORT \ --enable VIDEO_DEV \ --enable VIDEO_V4L2 \ --enable MEDIA_CONTROLLER \ --enable VIDEO_V4L2_SUBDEV_API \ --enable V4L2_FLASH_LED_CLASS \ --enable GNSS \ --enable SERIAL_DEV_BUS \ --enable GNSS_SIRF_SERIAL config-kyle: config-common @echo "Enabling Kyle" $(CURDIR)/scripts/config --file $(config_file) \ --enable REGULATOR_FIXED_VOLTAGE \ --enable DRM_PANEL_NOVATEK_NT35510 \ --enable WLAN \ --enable WLAN_VENDOR_BROADCOM \ --enable BRCMFMAC \ --enable BRCMFMAC_SDIO \ --enable BT \ --enable BT_BCM \ --enable BT_HCIUART \ --enable BT_HCIUART_BCM \ --enable BACKLIGHT_CLASS_DEVICE \ --enable I2C_GPIO \ --enable I2C_MUX \ --enable IIO \ --enable BMA180 \ --enable BMC150_ACCEL \ --enable PM_RUNTIME \ --enable GP2AP002 \ --enable INPUT_GPIO_VIBRA \ --enable INPUT_TOUCHSCREEN \ --enable TOUCHSCREEN_MMS114 \ --enable BACKLIGHT_KTD253 \ --enable LEDS_CLASS_FLASH \ --enable LEDS_RT8515 \ --enable MEDIA_SUPPORT \ --enable MEDIA_CAMERA_SUPPORT \ --enable VIDEO_DEV \ --enable VIDEO_V4L2 \ --enable MEDIA_CONTROLLER \ --enable VIDEO_V4L2_SUBDEV_API \ --enable V4L2_FLASH_LED_CLASS \ --enable GNSS \ --enable SERIAL_DEV_BUS \ --enable GNSS_SIRF_SERIAL config-golden: config-common @echo "Enabling Golden" $(CURDIR)/scripts/config --file $(config_file) \ --enable REGULATOR_FIXED_VOLTAGE \ --enable BACKLIGHT_CLASS_DEVICE \ --enable DRM_PANEL_SAMSUNG_S6E63M0 \ --enable DRM_PANEL_SAMSUNG_S6E63M0_DSI \ --enable WLAN \ --enable WLAN_VENDOR_BROADCOM \ --enable BRCMFMAC \ --enable BRCMFMAC_SDIO \ --enable BT \ --enable BT_BCM \ --enable BT_HCIUART \ --enable BT_HCIUART_BCM \ --enable GP2AP002 \ --enable INPUT_GPIO_VIBRA \ --enable IIO \ --enable INV_MPU6050_I2C \ --enable LEDS_CLASS_FLASH \ --enable LEDS_RT8515 \ --enable MEDIA_SUPPORT \ --enable MEDIA_CAMERA_SUPPORT \ --enable VIDEO_DEV \ --enable VIDEO_V4L2 \ --enable MEDIA_CONTROLLER \ --enable VIDEO_V4L2_SUBDEV_API \ --enable V4L2_FLASH_LED_CLASS \ --enable TOUCHSCREEN_ATMEL_MXT \ --enable KEYBOARD_TM2_TOUCHKEY # Compile in the right firmware per phone ifeq ($(UX500_BOARD),ux500-samsung-gavini) # No need for brcm/brcmfmac4330-sdio.samsung,gavini.bin U8500_FIRMWARE := brcm/brcmfmac4330-sdio.bin brcm/brcmfmac4330-sdio.samsung,gavini.txt brcm/BCM4330B1.samsung,gavini.hcd endif ifeq ($(UX500_BOARD),ux500-samsung-golden) U8500_FIRMWARE := brcm/brcmfmac4334-sdio.samsung,golden.bin brcm/brcmfmac4334-sdio.samsung,golden.txt brcm/BCM4334B0.samsung,golden.hcd endif ifeq ($(UX500_BOARD),ux500-samsung-janice) # No need for brcm/brcmfmac4330-sdio.samsung,janice.bin U8500_FIRMWARE := brcm/brcmfmac4330-sdio.bin brcm/brcmfmac4330-sdio.samsung,janice.txt brcm/BCM4330B1.samsung,janice.hcd endif ifeq ($(UX500_BOARD),ux500-samsung-kyle) U8500_FIRMWARE := brcm/brcmfmac4334-sdio.samsung,kyle.bin brcm/brcmfmac4334-sdio.samsung,kyle.txt brcm/BCM4334B0.samsung,kyle.hcd endif ifeq ($(UX500_BOARD),ux500-samsung-skomer) U8500_FIRMWARE := brcm/brcmfmac4334-sdio.samsung,skomer.bin brcm/brcmfmac4334-sdio.samsung,skomer.txt brcm/BCM4334B0.samsung,skomer.hcd endif ifeq ($(UX500_BOARD),ux500-samsung-codina) # No need for brcm/brcmfmac4330-sdio.samsung,codina.bin U8500_FIRMWARE := brcm/brcmfmac4330-sdio.bin brcm/brcmfmac4330-sdio.samsung,codina.txt brcm/BCM4330B1.samsung,codina.hcd endif ifeq ($(UX500_BOARD),ux500-samsung-codina-tmo) U8500_FIRMWARE := brcm/brcmfmac4334-sdio.samsung,codina-tmo.bin brcm/brcmfmac4334-sdio.samsung,codina-tmo.txt brcm/BCM4334B0.samsung,codina-tmo.hcd endif config-samsung-firmware: config-common @echo "Enabling Samsung U8500 firmware" $(CURDIR)/scripts/config --file $(config_file) \ --set-str EXTRA_FIRMWARE "$(U8500_FIRMWARE)" \ --set-str EXTRA_FIRMWARE_DIR "/home/linus/src/firmware/samsung-u8500" #config-earlydebug config-initramfs # config: config-common config-appended-dtb config-distro config-initramfs config-kasan config: config-common config-distro config-initramfs $(CURDIR)/scripts/config --file $(config_file) \ --enable USE_OF \ --enable ARM_APPENDED_DTB \ --set-str CMDLINE "console=ttyAMA2,115200n8" \ --enable PROC_DEVICETREE yes "" | make $(make_options) oldconfig # PostmarkeOS configuration, also use build-pmos with this # make -f ux500.mak config-pmos && make -f ux500.mak build-pmos # fastboot flash boot $(HOME)/boot.img # config-crypto-test # config-crypto-stm32 config-pmos: config-common config-distro config-initramfs-pmos config-janice config-gavini config-codina config-skomer config-kyle config-golden config-samsung-firmware config-crypto-test $(CURDIR)/scripts/config --file $(config_file) \ --set-str CMDLINE "console=ttyAMA2,115200n8 PMOS_NO_OUTPUT_REDIRECT" \ --enable USE_OF \ --enable PROC_DEVICETREE \ --enable KERNEL_XZ \ --enable INITRAMFS_COMPRESSION_XZ yes "" | make $(make_options) oldconfig # This is used when booting PMOS on the HREF boards # make -f ux500.mak config-pmos-append-dtb && make -f ux500.mak build-pmos # fastboot --base 0x0 boot zImage null-initrd config-pmos-append-dtb: config-common config-distro config-initramfs-pmos $(CURDIR)/scripts/config --file $(config_file) \ --enable USE_OF \ --enable BLK_DEV_INITRD \ --enable PROC_DEVICETREE \ --enable ARM_APPENDED_DTB \ --set-str CMDLINE "console=ttyAMA2,115200n8 page_alloc.shuffle=1 PMOS_NO_OUTPUT_REDIRECT" yes "" | make $(make_options) oldconfig menuconfig: FORCE $(MAKE) $(make_options) menuconfig saveconfig: config-base config-mainlined-features config-janice config-golden config-skomer config-kyle config-codina config-gavini yes "" | make $(make_options) oldconfig $(MAKE) $(make_options) savedefconfig cp $(build_dir)/defconfig arch/arm/configs/u8500_defconfig # cp $(build_dir)/defconfig arch/arm/configs/multi_v7_defconfig # Tag on KBUILD_VERBOSE=1 to get verbose build output build-zimage: have-crosscompiler $(MAKE) $(make_options) zImage $(make_flags) @echo "Copy zImage to $(output_dir)/zImage..." @cp -f $(build_dir)/arch/arm/boot/zImage $(output_dir)/zImage build-dtbs: FORCE $(MAKE) $(make_options) dtbs $(make_flags) check-bindings: FORCE $(MAKE) $(make_options) dt_binding_check -k $(make_flags) $(MAKE) $(make_options) dtbs_check -k $(make_flags) build-zimage-dt: build-zimage build-dtbs @if [ ! -r $(dtb) ] ; then \ echo "NO DTB in $(dtb)!" ; \ exit 1 ; \ fi @echo "Catenate DTB onto zImage $(output_dir)/zImage..." cat $(dtb) >> $(output_dir)/zImage @echo "INFO boot with fastboot like this:" @echo "fastboot --base 0x0 boot zImage null-initrd" @echo "fastboot --base 0x0 -c \"console=ttyAMA2,115200,n8 root=/dev/mmcblk0p2 rw rootwait rootfstype=ext4 init=/sbin/init\" boot zImage null-initrd" if [ -w $(tftproot) ] ; then \ cp $(output_dir)/zImage $(tftproot) ; \ fi if [ -w $(nfsroot) ] ; then \ cp $(output_dir)/zImage $(nfsroot) ; \ fi build-uimage-dt: build-zimage-dt @which mkimage > /dev/null ; \ if [ ! $$? -eq 0 ] ; then \ echo "mkimage not in PATH=$$PATH" ; \ echo "This tool creates the uImage and comes from the uboot tools" ; \ echo "On Ubuntu/Debian sudo apt-get install uboot-mkimage" ; \ echo "SKIPPING uImage GENERATION" ; \ else \ mkimage \ -A arm \ -O linux \ -T kernel \ -C none \ -a 0x00008000 \ -e 0x00008000 \ -n "Ux500 Device Tree kernel" \ -d $(output_dir)/zImage \ $(output_dir)/uImage ; \ fi if [ -w $(tftproot) ] ; then \ cp $(output_dir)/uImage $(tftproot) ; \ echo "INFO TFTP boot like this (snowball ethernet):" ; \ echo "setenv ethaddr 6e:e6:84:36:8e:9e ; setenv serverip 192.168.1.121 ; setenv ipaddr 192.168.1.35 ; tftpboot 0x01000000 192.168.1.121:uImage ; bootm" ; \ fi @echo "INFO: Boot uImage like this:" @echo "mmc rescan 1 ; fat load mmc 1 0x0 /uImage ; bootm 0x0" @echo "setenv bootargs console=ttyAMA2,115200n8 root=/dev/mmcblk1p2 rw rootwait rootfstype=ext4 init=/sbin/init; mmc rescan 1 ; fat load mmc 1 0x0 /uImage ; bootm 0x0" # This can be flashed directly into one of the Samsung phones using # Heimdall, but requires some kernel hacks to set up caches. # The load addresses etc were extracted from an XCover 2 firmware image build-abootimg-dt: build-zimage build-dtbs @which abootimg > /dev/null ; \ if [ ! $$? -eq 0 ] ; then \ echo "abootimg not in PATH=$$PATH" ; \ echo "This tool creates the boot.img and comes from the abootimg tools" ; \ echo "SKIPPING boot.img GENERATION" ; \ else \ echo "dummy" > $(output_dir)/null-initrd ; \ abootimg --create $(output_dir)/boot.img -k $(output_dir)/zImage -r $(output_dir)/null-initrd -s $(dtb) -c "pagesize=0x800" -c "kerneladdr=0x8000" -c "ramdiskaddr=0x01000000" -c "secondaddr=0x00f00000" -c "tagsaddr=0x100" ; \ fi # This can be flashed with U-Boot's fastboot mode and then booted # with U-Boot. bootsize Golden 0x619800, bootsize Skomer 0x6b1000 build-pmos: build-dtbs build-zimage @echo "building PostmarketOS image" @which abootimg > /dev/null ; \ if [ ! $$? -eq 0 ] ; then \ echo "abootimg not in PATH=$$PATH" ; \ echo "This tool creates the boot.img and comes from the abootimg tools" ; \ echo "SKIPPING boot.img GENERATION" ; \ else \ abootimg --create $(output_dir)/boot.img -k $(output_dir)/zImage -r $(pmos_initramfs) -s $(dtb) -c "pagesize=0x800" -c "kerneladdr=0x8000" -c "ramdiskaddr=0x01000000" -c "secondaddr=0x00f00000" -c "tagsaddr=0x100" ; \ fi if [ -w $(nfsroot) ] ; then \ cp $(output_dir)/boot.img $(nfsroot) ; \ echo "Copied boot.img to $(nfsroot)" ; \ fi # build-postmarket-img build-abootimg-dt build: build-zimage-dt @echo "complete." TAGS: FORCE $(MAKE) $(make_options) TAGS clean: $(MAKE) -f Makefile clean rm -rf $(build_dir) # Rules without commands or prerequisites that do not match a file name # are considered to always change when make runs. This means that any rule # that depends on FORCE will always be remade also. FORCE: