1 ¿ª·¢»·¾³
ËÞÖ÷»ú£ºUbuntu16.04
¿ª·¢°å£ºMini2440
Äں˰汾£º2.6.34.7
2 ÏÂÔØÓë½âѹ
ÏÂÔØlinux-2.6.34.7.tar.bz2²¢½âѹ£º
[plain] view plain copy
1.tar -axvf linux-2.6.34.7.tar.bz2
3 ĬÈÏÅäÖÃ
½øÈëÄÚºËÔ´Â붥¼¶Ä¿Â¼Ö´ÐУº
[plain] view plain copy
1.make defconfig
Êä³öÈçÏ£º
[plain] view plain copy
1.liyihai@ubuntu:~/Mini2440/Kernels/linux-2.6.34.7$ make defconfig
2. HOSTCC scripts/basic/fixdep
3. HOSTCC scripts/basic/docproc
4. HOSTCC scripts/basic/hash
5. HOSTCC scripts/kconfig/conf.o
6.scripts/kconfig/conf.c: In function ¡®conf_sym¡¯:
7.scripts/kconfig/conf.c:159:6: warning: variable ¡®type¡¯ set but not used [-Wunused-but-set-variable]
8. int type;
9. ^
10.scripts/kconfig/conf.c: In function ¡®conf_choice¡¯:
11.scripts/kconfig/conf.c:231:6: warning: variable ¡®type¡¯ set but not used [-Wunused-but-set-variable]
12. int type;
13. ^
14.scripts/kconfig/conf.c:307:9: warning: ignoring return value of ¡®fgets¡¯, declared with attribute warn_unused_result [-Wunused-result]
15. fgets(line, 128, stdin);
16. ^
17.scripts/kconfig/conf.c: In function ¡®conf_askvalue¡¯:
18.scripts/kconfig/conf.c:105:8: warning: ignoring return value of ¡®fgets¡¯, declared with attribute warn_unused_result [-Wunused-result]
19. fgets(line, 128, stdin);
20. ^
21. HOSTCC scripts/kconfig/kxgettext.o
22. SHIPPED scripts/kconfig/zconf.tab.c
23. SHIPPED scripts/kconfig/lex.zconf.c
24. SHIPPED scripts/kconfig/zconf.hash.c
25. HOSTCC scripts/kconfig/zconf.tab.o
26. HOSTLD scripts/kconfig/conf
27.*** Default configuration is based on 'i386_defconfig'
28.#
29.# configuration written to .config
30.#
¸ù¾ÝÉÏÊöÊä³öÐÅÏ¢µ¹ÊýµÚµ¹Êý4ÐпÉÖª£¬Ä¬ÈÏÇé¿öÏÂÄں˵ÄÅäÖÃÊÇÕë¶Ôx86¼Ü¹¹µÄ£¬²¢ÇÒ¸ù¾Ýi386_defconfigÉú³ÉÁË.config£¨Ô´ÂëÖб¾Ã»ÓдËÎļþ£¬ÊÇÅäÖÃʱ²Å´´½¨µÄ£©¡£Í¨¹ýfindÃüÁî²éÕÒi386_deconfig£¨Í¼1£©£º
ʹÓÃvim´ò¿ª·Ö±ð´ò¿ª.configºÍi386_defconfig£¬·¢ÏÖËüÃǵÄÄÚÈÝ»ù±¾Ò»Ñù£¬Í¨¹ýdiffÃüÁî¶ÔËüÃǽøÐбȽϣ¨Í¼2£©£º
ÓÉÉÏͼ¿É¼û£¬.configÓëi386_defconfigÊDz»ÍêȫͬµÄ£¬make defconfig²¢·Ç¼òµ¥µÄ½«arch/x86/configs/i386_defconfig¸´ÖƵ½.config¡£
3.1 ĬÈϼܹ¹
ÉÏÊöĬÈÏÅäÖÃÊÇÕë¶Ôx86¹¹¼ÜµÄ£¬ÄÇôÔõôÆô¶¯ARM¹¹¼ÜµÄĬÈÏÅäÖÃÄØ?´ð°¸ÊÇÖ¸¶¨¶¥¼¶MakefileµÄARCH±äÁ¿Öµ£¬Í¬Ê±Ö¸¶¨½»²æ±àÒ빤¾ßÁ´Ç°×º£º
[plain] view plain copy
1.ARCH ?= arm
2.CROSS_COMPILE ?= arm-linux-
ÕâʱºòÔÙÖ´ÐÐmake defconfigʱ£¬Õë¶ÔµÄ¾ÍÊÇARM¼Ü¹¹ÁË£º
[plain] view plain copy
1.liyihai@ubuntu:~/Mini2440/Kernels/linux-2.6.34.7$ make defconfig
2. HOSTCC scripts/basic/fixdep
3. HOSTCC scripts/basic/docproc
4. HOSTCC scripts/basic/hash
5. HOSTCC scripts/kconfig/conf.o
6.scripts/kconfig/conf.c: In function ¡®conf_sym¡¯:
7.scripts/kconfig/conf.c:159:6: warning: variable ¡®type¡¯ set but not used [-Wunused-but-set-variable]
8. int type;
9. ^
10.scripts/kconfig/conf.c: In function ¡®conf_choice¡¯:
11.scripts/kconfig/conf.c:231:6: warning: variable ¡®type¡¯ set but not used [-Wunused-but-set-variable]
12. int type;
13. ^
14.scripts/kconfig/conf.c:307:9: warning: ignoring return value of ¡®fgets¡¯, declared with attribute warn_unused_result [-Wunused-result]
15. fgets(line, 128, stdin);
16. ^
17.scripts/kconfig/conf.c: In function ¡®conf_askvalue¡¯:
18.scripts/kconfig/conf.c:105:8: warning: ignoring return value of ¡®fgets¡¯, declared with attribute warn_unused_result [-Wunused-result]
19. fgets(line, 128, stdin);
20. ^
21. HOSTCC scripts/kconfig/kxgettext.o
22. SHIPPED scripts/kconfig/zconf.tab.c
23. SHIPPED scripts/kconfig/lex.zconf.c
24. SHIPPED scripts/kconfig/zconf.hash.c
25. HOSTCC scripts/kconfig/zconf.tab.o
26. HOSTLD scripts/kconfig/conf
27.*** Default configuration is based on 'versatile_defconfig'
28.#
29.# configuration written to .config
30.#
ÓÉÉÏÊöÐÅÏ¢¿ÉÖª£¬´Ëʱ¸ù¾Ýversatile_defconfig½øÐÐĬÈÏÅäÖÃÉú³É.config£¬Ê¹ÓÃfind²éÕÒversatile_defconfig£¨Í¼3£©£º
ʹÓÃdiff±È½Ïversatile_defconfigÓë.config£º
ÓÉÉÏͼ¿É¼û£¬versatile_defconfigÓë.config»¹ÊDz»ÍêȫͬµÄ¡£
3.2 ÅäÖÃÎļþ.config
ÓÉÉϿɼû£¬ÅäÖÃÐÅÏ¢Ö÷Òª±£´æÓÚÄÚºËÔ´Â붥¼¶Ä¿Â¼µÄ.configÎļþÖУ¬ARM¹¹¼ÜµÄ.config×ʼ²¿·ÖµÄÄÚÈÝÈçÏÂËùʾ£º
[plain] view plain copy
1.#
2.# Automatically generated make config: don't edit
3.# Linux kernel version: 2.6.34.7
4.# Tue May 10 11:30:25 2016
5.#
6.CONFIG_ARM=y
7.CONFIG_SYS_SUPPORTS_APM_EMULATION=y
8.CONFIG_GENERIC_TIME=y
9.CONFIG_GENERIC_CLOCKEVENTS=y
10.CONFIG_HAVE_PROC_CPU=y
11.CONFIG_GENERIC_HARDIRQS=y
12.CONFIG_STACKTRACE_SUPPORT=y
13.CONFIG_HAVE_LATENCYTOP_SUPPORT=y
14.CONFIG_LOCKDEP_SUPPORT=y
15.CONFIG_TRACE_IRQFLAGS_SUPPORT=y
16.CONFIG_HARDIRQS_SW_RESEND=y
17.CONFIG_GENERIC_IRQ_PROBE=y
18.CONFIG_RWSEM_GENERIC_SPINLOCK=y
19.CONFIG_GENERIC_HWEIGHT=y
20.CONFIG_GENERIC_CALIBRATE_DELAY=y
21.CONFIG_NEED_DMA_MAP_STATE=y
22.CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
23.CONFIG_VECTORS_BASE=0xffff0000
24.CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
25.CONFIG_CONSTRUCTORS=y
¸ù¾ÝÉÏÊöÐÅÏ¢µÚ2ÐеÄ˵Ã÷¿ÉÖª£¬.configÎļþµÄÄÚÈÝÊÇÓÉmake config×Ô¶¯Éú³ÉµÄ£¨Æäʵi386_defconfigÒ²ÊǵĵÚ2ÐÐÒ²ÊÇÕâôд£©£¬²»ÒªÊÖ¶¯Ð޸ġ£
µÚ6ÐÐÖ¸¶¨ÁËʹÓÃARM¼Ü¹¹£¬´ËÍ⣬ÆäÓàËùÓеÄÅäÖÃÏÒÔCONFIG_Ϊǰ׺¡£
3.3 ÆäËüĬÈÏÅäÖÃÎļþ
¸ù¾Ý²Î¿¼×ÊÁÏ[1]µÄÌáʾ£¬ÔÚÄÚºËÔ´ÂëarchĿ¼ÖÐÓÐalpha¡¢x86¡¢armµÈ×ÓĿ¼£¬·Ö±ð¶ÔÓ¦ÏàÓ¦µÄ¼Ü¹¹£¨Í¼5£©£º
ÆäÖÐarmĿ¼°üº¬boot¡¢common¡¢configs¡¢includeÒÔ¼°ÄÚºËÒÑÖ§³ÖµÄARMоƬ×ÓĿ¼£¨Í¼6£©£º
ÉÏͼconfigsĿ¼°üº¬Á˸÷¸öARMоƬµÄĬÈÏÅäÖÃÎļþ£¨°üÀ¨3.1С½ÚµÄversatile_defconfig£©£¨Í¼7£©£º
¸ù¾Ý²Î¿¼×ÊÁÏ[1] µÄÌáʾ£¬ÈôҪʹÓÃÕâЩƽ̨µÄÅäÖÃÎļþ£¬Ö»Äܽ«Æ临ÖƵ½¶¥¼¶Ä¿Â¼²¢ÇÒÖØÃüÃûΪ.config£º
[plain] view plain copy
1.cd linux-2.6.34.7
2.cp arch/arm/configs/mini2440_defconfig .config
4 ½»»¥ÅäÖÃ
½øÈëÄÚºËÔ´Â붥¼¶Ä¿Â¼Ö´ÐУº
[plain] view plain copy
1.make config
Êä³öÈçÏ£º
[plain] view plain copy
1.liyihai@ubuntu:~/Mini2440/Kernels/linux-2.6.34.7$ make config
2. HOSTCC scripts/basic/fixdep
3. HOSTCC scripts/basic/docproc
4. HOSTCC scripts/basic/hash
5. HOSTCC scripts/kconfig/conf.o
6.scripts/kconfig/conf.c: In function ¡®conf_sym¡¯:
7.scripts/kconfig/conf.c:159:6: warning: variable ¡®type¡¯ set but not used [-Wunused-but-set-variable]
8. int type;
9. ^
10.scripts/kconfig/conf.c: In function ¡®conf_choice¡¯:
11.scripts/kconfig/conf.c:231:6: warning: variable ¡®type¡¯ set but not used [-Wunused-but-set-variable]
12. int type;
13. ^
14.scripts/kconfig/conf.c:307:9: warning: ignoring return value of ¡®fgets¡¯, declared with attribute warn_unused_result [-Wunused-result]
15. fgets(line, 128, stdin);
16. ^
17.scripts/kconfig/conf.c: In function ¡®conf_askvalue¡¯:
18.scripts/kconfig/conf.c:105:8: warning: ignoring return value of ¡®fgets¡¯, declared with attribute warn_unused_result [-Wunused-result]
19. fgets(line, 128, stdin);
20. ^
21. HOSTCC scripts/kconfig/kxgettext.o
22. SHIPPED scripts/kconfig/zconf.tab.c
23. SHIPPED scripts/kconfig/lex.zconf.c
24. SHIPPED scripts/kconfig/zconf.hash.c
25. HOSTCC scripts/kconfig/zconf.tab.o
26. HOSTLD scripts/kconfig/conf
27.scripts/kconfig/conf arch/x86/Kconfig
28.#
29.# using defaults found in /boot/config-3.16.0-30-generic
30.#
31./boot/config-3.16.0-30-generic:1264:warning: symbol value 'm' invalid for NET_DSA
32./boot/config-3.16.0-30-generic:1680:warning: symbol value 'm' invalid for MTD_CMDLINE_PARTS
33./boot/config-3.16.0-30-generic:2418:warning: symbol value 'm' invalid for NET_DSA_MV88E6XXX
34./boot/config-3.16.0-30-generic:2419:warning: symbol value 'm' invalid for NET_DSA_MV88E6060
35./boot/config-3.16.0-30-generic:2421:warning: symbol value 'm' invalid for NET_DSA_MV88E6131
36./boot/config-3.16.0-30-generic:2422:warning: symbol value 'm' invalid for NET_DSA_MV88E6123_61_65
37./boot/config-3.16.0-30-generic:2861:warning: symbol value 'm' invalid for IWL4965
38./boot/config-3.16.0-30-generic:3783:warning: symbol value 'm' invalid for GPIO_UCB1400
39./boot/config-3.16.0-30-generic:4259:warning: symbol value 'm' invalid for REGULATOR_88PM8607
40./boot/config-3.16.0-30-generic:4318:warning: symbol value 'm' invalid for REGULATOR_TWL4030
41./boot/config-3.16.0-30-generic:5396:warning: symbol value 'm' invalid for SND_HDA_CODEC_REALTEK
42./boot/config-3.16.0-30-generic:5397:warning: symbol value 'm' invalid for SND_HDA_CODEC_ANALOG
43./boot/config-3.16.0-30-generic:5398:warning: symbol value 'm' invalid for SND_HDA_CODEC_SIGMATEL
44./boot/config-3.16.0-30-generic:5399:warning: symbol value 'm' invalid for SND_HDA_CODEC_VIA
45./boot/config-3.16.0-30-generic:5402:warning: symbol value 'm' invalid for SND_HDA_CODEC_CIRRUS
46./boot/config-3.16.0-30-generic:5403:warning: symbol value 'm' invalid for SND_HDA_CODEC_CONEXANT
47./boot/config-3.16.0-30-generic:5404:warning: symbol value 'm' invalid for SND_HDA_CODEC_CA0110
48./boot/config-3.16.0-30-generic:5407:warning: symbol value 'm' invalid for SND_HDA_CODEC_CMEDIA
49./boot/config-3.16.0-30-generic:5408:warning: symbol value 'm' invalid for SND_HDA_CODEC_SI3054
50./boot/config-3.16.0-30-generic:5409:warning: symbol value 'm' invalid for SND_HDA_GENERIC
51./boot/config-3.16.0-30-generic:7288:warning: symbol value 'm' invalid for NFS_V3
52./boot/config-3.16.0-30-generic:7290:warning: symbol value 'm' invalid for NFS_V4
53.*
54.* Linux Kernel Configuration
55.*
56.*
57.* General setup
58.*
59.Prompt for development and/or incomplete code/drivers (EXPERIMENTAL) [N/y/?] (NEW)
ÓÉÉÏÊö×îºó1ÐпÉÖª£¬ÐèÒªÓû§È·ÈÏÊÇ·ñPrompt for development and/or incomplete code/drivers (EXPERIMENTAL)£¬Òò´Ë¿ÉÖªÕâÊǽ»»¥Ê½µÄÅäÖã¬ÐèÒªÓû§¶ÔÄں˷dz£Á˽⣬²Ù×÷±È½Ï·±Ëö¡£
5 ²Ëµ¥ÅäÖÃ
[plain] view plain copy
1.make menuconfig £¨¿´Í¼8£©
6 Çå¿ÕÅäÖÃ
ÈôҪɾ³ýÉÏÊöµÄÅäÖÃÖµ£¬Ö´ÐУº
[plain] view plain copy
1.make mrproper £¨¿´Í¼9£©
×¢£ºmake distcean²»ÄÜÌæ´úÉÏÊöÃüÁ