Overview
Context
Changes
Added kernel/Makefile version [e8365af227].
|
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
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
KERNEL_VERSION = 3.4.7
KERNEL_URL = http://www.kernel.org/pub/linux/kernel/v3.0/linux-$(KERNEL_VERSION).tar.bz2
PLATFORM = x86
MODULES_LIST = kernel/drivers/usb/storage/*.ko kernel/drivers/message/fusion/*.ko kernel/drivers/scsi/*.ko kernel/drivers/scsi/*/*.ko kernel/drivers/ata/*.ko kernel/drivers/ata/*/*.ko
all: vmlinuz modules modules-all
vmlinuz modules-all: linux-$(KERNEL_VERSION) linux-$(KERNEL_VERSION)/.config
$(MAKE) -C linux-$(KERNEL_VERSION)
rm -rf boot modules-all
mkdir boot modules-all
-$(MAKE) -C linux-$(KERNEL_VERSION) INSTALL_PATH="$(shell pwd)/boot" install
$(MAKE) -C linux-$(KERNEL_VERSION) INSTALL_MOD_PATH="$(shell pwd)/modules-all" modules_install
cp boot/vmlinuz .
modules: modules-all
rm -rf modules
mkdir modules/modules modules/firmware
./generate_modules_dir 'modules-all/lib/modules/$(KERNEL_VERSION)-appbox' modules/modules '$(MODULES_LIST)'
cp -rp modules-all/lib/firmware modules/
linux-$(KERNEL_VERSION)/.config: linux-$(KERNEL_VERSION)-$(PLATFORM)-config linux-$(KERNEL_VERSION)
cp linux-$(KERNEL_VERSION)-$(PLATFORM)-config linux-$(KERNEL_VERSION)/.config
linux-$(KERNEL_VERSION): linux-$(KERNEL_VERSION).tar.bz2
tar -xf linux-$(KERNEL_VERSION).tar.bz2
linux-$(KERNEL_VERSION).tar.bz2:
wget -O "$@.new" $(KERNEL_URL)
tar -tf "$@.new" >/dev/null
mv "$@.new" "$@"
clean:
rm -rf boot modules-all modules
rm -rf linux-$(KERNEL_VERSION)
rm -f linux-$(KERNEL_VERSION).tar.bz2.new
rm -f vmlinuz
distclean: clean
rm -f linux-$(KERNEL_VERSION).tar.bz2
.PHONY: all clean distclean
|
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Added kernel/generate_modules_dir version [b1ad0554ac].
|
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
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
#! /bin/bash
in_modules_root="$1"
out_modules_root="$2"
shift; shift
modules="$@"
mkdir -p "${out_modules_root}" 2>/dev/null >/dev/null
in_modules_root="$(cd "${in_modules_root}" || exit 1; pwd 2>/dev/null)"
out_modules_root="$(cd "${out_modules_root}" || exit 1; pwd 2>/dev/null)"
if [ -z "${in_modules_root}" -o -z "${out_modules_root}" ]; then
echo "Usage: generate_modules_dir <in_dir> <out_dir> <modules>" >&2
exit 1
fi
cd "${in_modules_root}" || exit 1
modules="$(for module in $(echo ${modules}); do
if [ ! -f "${module}" ]; then
continue
fi
readlink -f "${module}" | sed 's@^'"${in_modules_root}"'/@@'
done)"
for try in {1..100}; do
changed='0'
for module in ${modules}; do
module_re="$(echo "${module}" | sed 's@\.@\.@g')"
module_deps="$(grep "^${module_re}:" modules.dep | cut -f 2- -d :)"
for module_dep in ${module_deps}; do
module_dep_re="$(echo "${module_dep}" | sed 's@\.@\.@g')"
if echo "${modules}" | grep "^${module_dep_re}$" >/dev/null; then
continue
fi
echo "Adding ${module_dep} (for ${module})"
modules="${module_dep}
${modules}"
changed='1'
done
done
if [ "${changed}" = '0' ]; then
break
fi
done
for module in ${modules}; do
out_module_dir="${out_modules_root}/$(dirname "${module}")"
mkdir -p "${out_module_dir}"
cp "${module}" "${out_module_dir}"
done
|
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Added kernel/linux-3.4.7-x86-config version [5c41d0b0a8].