-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
67 lines (52 loc) · 1.67 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
ifneq ($(KERNELRELEASE),)
# kbuild part of makefile
obj-m += davinci/
obj-m += generic/
subdir-y += arch/arm/boot/dts
else
# normal makefile
export KDIR ?= /lib/modules/`uname -r`/build
build:
$(MAKE) -C $(KDIR) M=$$PWD
install:
$(MAKE) -C $(KDIR) M=$$PWD INSTALL_MOD_DIR=kernel/sound/soc modules_install
depmod -A
clean:
$(MAKE) -C $(KDIR) M=$$PWD clean
# Module specific targets
unload:
modprobe -r snd_soc_botic
#modprobe -r snd_soc_botic_codec
modprobe -r snd_soc_sabre32
modprobe -r snd_soc_davinci_mcasp
load:
modprobe snd_soc_davinci_mcasp
modprobe snd_soc_sabre32
#modprobe snd_soc_botic_codec
modprobe snd_soc_botic
config:
# configure botic arguments that are not set on the kernel command line
echo "MDR-" > /sys/module/snd_soc_botic/parameters/serconfig
echo 45158400 > /sys/module/snd_soc_botic/parameters/clk_44k1
echo 49152000 > /sys/module/snd_soc_botic/parameters/clk_48k
## BBB without external clocks
#echo 0 > /sys/module/snd_soc_botic/parameters/clk_44k1
#echo 24576000 > /sys/module/snd_soc_botic/parameters/clk_48k
reload: build install unload load config
@echo Reloaded.
@dmesg | tail -10
# Notice: this often fails if Ethernet cable is plugged into BBB during reboot
reload-dtb: build
kexec -l --command-line="`cat /proc/cmdline | sed s/quiet//`" --dtb="arch/arm/boot/dts/am335x-boneblack-botic.dtb" /boot/vmlinuz-`uname -r`
@sync
@echo "Remove Ethernet cable..."
sleep 10
@echo "Restarting..."
kexec -e -x
prepare: relink scripts
relink:
find arch/arm/boot/dts -type l -print0 | xargs -0r rm
find "$(KDIR)/arch/arm/boot/dts" -maxdepth 1 -name "*.dtsi" -print0 | xargs -0r ln -s -t arch/arm/boot/dts
scripts:
$(MAKE) -C $(KDIR) scripts
endif