LINUX.ORG.RU

Ошибки при компиляции ядра с поддержкой suspend'а (2.4.24)


0

0

Вот тут решил добавить в 2.4.24 suspend, и при компиляции получил сдеующее:
.....................................
make[3]: Вход в каталог `/usr/src/linux-2.4.24/kernel/power'
gcc -D__KERNEL__ -I/usr/src/linux-2.4.24/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686 -nostdinc -iwithprefix include -DKBUILD_BASENAME=ui -DEXPORT_SYMTAB -c ui.c
ui.c: In function `handle_loglevel_change':
ui.c:346: `vc_cons' undeclared (first use in this function)
ui.c:346: (Each undeclared identifier is reported only once
ui.c:346: for each function it appears in.)
ui.c: In function `prepare_status':
ui.c:502: `vc_cons' undeclared (first use in this function)
ui.c: In function `update_status':
ui.c:621: `vc_cons' undeclared (first use in this function)
make[3]: *** [ui.o] Ошибка 1
make[3]: Выход из каталог `/usr/src/linux-2.4.24/kernel/power'
make[2]: *** [first_rule] Ошибка 2
make[2]: Выход из каталог `/usr/src/linux-2.4.24/kernel/power'
make[1]: *** [_subdir_power] Ошибка 2
make[1]: Выход из каталог `/usr/src/linux-2.4.24/kernel'
make: *** [_dir_kernel] Ошибка 2

Ну я залез в ui.c где то в начале почти сразу после вступительных комментариев вижу

//...........some code........................
#include <linux/suspend-common.h>
#include <linux/console.h>
//...........some code........................

//#define USE_DEV_CONSOLE

/* We want the number of lines & columns for the suspend console, not the current console */
#undef video_num_columns
#define video_num_columns (vc_cons[suspend_console].d->vc_cols)
#undef video_num_lines
#define video_num_lines (vc_cons[suspend_console].d->vc_rows)

странно но определения vc_cons нет! В console.h нашёл только


struct vc_data;
struct console_font_op;

Попробовал заменить vc_cons на vc_data не помогло, также ругается только вместо vc_cons пишет vc_data.
Но интереснее другое, на тех строчках которые обьявлены, нет вообще упоминания о vc_cons.
Только video_num_columns и video_num_lines.

339 if (splash_is_on(suspend_console)) {
340 /* proc interface ensures bar_granularity_limit >= 0 */
341 if (bar_granularity_limit)
342 barwidth = bar_granularity_limit;
343 else
344 barwidth = 100;
345 } else
346 barwidth = (video_num_columns - 2 * (video_num_columns / 4) - 2);


500 /* Print version */
501 posn[0] = (unsigned char) (0);
502 posn[1] = (unsigned char) (video_num_lines);
503 move_cursor_to(posn);
504 cond_console_print(swsusp_version, strlen(swsusp_version));


617 if (splash_is_on(suspend_console)) {
618 if (newbarposn != barposn)
619 fb_splash_set_progress(suspend_console, value, maximum);
620 } else {
621 posn[1] = (unsigned char) ((video_num_lines / 3) + 1);


Может кто-нибудь знает что делать.

Заранее спасибо!!!

★★★★★

У тебя ядро видно патченое - т.к. я у себя даже такого каталога не нашел, но попробуй добавить инклудник:
#include <linux/console_struct.h>

zaz ★★★★
()
Ответ на: комментарий от cyclon

Пардон, опечатался. Всмысле забыл кое-что поправить. Но теперь ошибкав другом, БЛИИН!!!

gcc -D__KERNEL__ -I/usr/src/linux-2.4.24-susp/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686 -nostdinc -iwithprefix include -DKBUILD_BASENAME=process -DEXPORT_SYMTAB -c process.c
process.c: In function `refrigerator':
process.c:166: warning: implicit declaration of function `PROCESS_SIG_MASK'
process.c:167: `RECALC_SIGPENDING' undeclared (first use in this function)
process.c:167: (Each undeclared identifier is reported only once
process.c:167: for each function it appears in.)
process.c: In function `freeze_processes':
process.c:277: `FOR_EACH_THREAD_START' undeclared (first use in this function)
process.c:277: parse error before '{' token
process.c:282: `p' undeclared (first use in this function)
process.c:257: warning: unused variable `todo'
process.c:257: warning: unused variable `threadcount'
process.c:257: warning: unused variable `newtodo'
process.c:258: warning: unused variable `lastprocessesfrozen'
process.c:259: warning: unused variable `FOR_EACH_THREAD_TASK_STRUCTS'
process.c:260: warning: unused variable `index'
process.c:260: warning: unused variable `origfrozen'
process.c:261: warning: unused variable `orignum_active'
process.c:261: warning: unused variable `lastnum_active'
process.c:262: warning: unused variable `start_time'
process.c:262: warning: unused variable `last_time'
process.c:265: warning: unused variable `iorequestflags'
process.c:283: continue statement not within a loop
process.c: At top level:
process.c:290: parse error before "do"
process.c:296: warning: type defaults to `int' in declaration of `lastnum_active'
process.c:296: `orignum_active' undeclared here (not in a function)
process.c:296: warning: data definition has no type or storage class
process.c:297: parse error before "if"
process.c:300: warning: type defaults to `int' in declaration of `last_time'
process.c:300: `start_time' undeclared here (not in a function)
process.c:300: warning: data definition has no type or storage class
process.c:301: parse error before "while"
process.c:304: syntax error before '{' token
process.c:310: parse error before string constant
process.c:312: warning: type defaults to `int' in declaration of `printk'
process.c:312: warning: function declaration isn't a prototype
process.c:312: warning: data definition has no type or storage class
process.c:321: warning: type defaults to `int' in declaration of `freezing'
process.c:321: redefinition of `freezing'
process.c:149: `freezing' previously defined here
process.c:321: warning: data definition has no type or storage class
process.c:322: warning: type defaults to `int' in declaration of `idletimeout'
process.c:322: conflicting types for `idletimeout'
process.c:44: previous declaration of `idletimeout'
process.c:322: warning: data definition has no type or storage class
process.c:323: parse error before "return"
process.c:326: parse error before numeric constant
process.c:326: warning: type defaults to `int' in declaration of `schedule_timeout'
process.c:326: warning: function declaration isn't a prototype
process.c:326: conflicting types for `schedule_timeout'
/usr/src/linux-2.4.24-susp/include/linux/sched.h:148: previous declaration of `schedule_timeout'
process.c:326: warning: data definition has no type or storage class
process.c:333: warning: type defaults to `int' in declaration of `last_time'
process.c:333: redefinition of `last_time'
process.c:300: `last_time' previously defined here
process.c:333: initializer element is not constant
process.c:333: warning: data definition has no type or storage class
process.c:334: warning: type defaults to `int' in declaration of `showidlelist'
process.c:334: warning: data definition has no type or storage class
process.c:335: parse error before '}' token
process.c:337: parse error before string constant
process.c:341: warning: type defaults to `int' in declaration of `show_state'
process.c:341: warning: function declaration isn't a prototype
process.c:341: conflicting types for `show_state'
/usr/src/linux-2.4.24-susp/include/linux/sched.h:140: previous declaration of `show_state'
process.c:341: warning: data definition has no type or storage class
process.c:342: parse error before '}' token
process.c:343: warning: type defaults to `int' in declaration of `last_time'
process.c:343: redefinition of `last_time'
process.c:333: `last_time' previously defined here
process.c:343: initializer element is not constant
process.c:343: warning: data definition has no type or storage class
process.c:344: parse error before '}' token
process.c:347: warning: type defaults to `int' in declaration of `idletimeout'
process.c:347: warning: data definition has no type or storage class
process.c:348: parse error before "if"
process.c:358: parse error before '->' token
process.c:359: warning: type defaults to `int' in declaration of `do_suspend_sync'
process.c:359: warning: function declaration isn't a prototype
process.c:359: conflicting types for `do_suspend_sync'
process.c:87: previous declaration of `do_suspend_sync'
process.c:359: warning: data definition has no type or storage class
process.c:360: parse error before '->' token
process.c:375: syntax error before '{' token
process.c:382: warning: type defaults to `int' in declaration of `start_time'
process.c:382: initializer element is not constant
process.c:382: warning: data definition has no type or storage class
process.c:385: parse error before '{' token
process.c:385: parse error before "void"
process.c:393: warning: type defaults to `int' in declaration of `newtodo'
process.c:393: warning: data definition has no type or storage class
process.c:394: warning: type defaults to `int' in declaration of `threadcount'
process.c:394: warning: data definition has no type or storage class
process.c:396: parse error before "do"
process.c:410: parse error before numeric constant
process.c:410: warning: type defaults to `int' in declaration of `check_shift_keys'

cyclon ★★★★★
() автор топика
Ответ на: комментарий от cyclon

process.c:410: warning: function declaration isn't a prototype
process.c:410: conflicting types for `check_shift_keys'
/usr/src/linux-2.4.24-susp/include/linux/suspend-common.h:275: previous declaration of `check_shift_keys'
process.c:410: warning: data definition has no type or storage class
process.c:417: syntax error before '{' token
process.c:421: parse error before "if"
process.c:451: parse error before "void"
process.c:452: warning: type defaults to `int' in declaration of `WAKE_UP'
process.c:452: warning: parameter names (without types) in function declaration
process.c:452: warning: data definition has no type or storage class
process.c:453: parse error before '{' token
process.c:463: parse error before numeric constant
process.c:463: warning: type defaults to `int' in declaration of `check_shift_keys'
process.c:463: warning: function declaration isn't a prototype
process.c:463: warning: data definition has no type or storage class
process.c:474: parse error before numeric constant
process.c:474: warning: type defaults to `int' in declaration of `schedule_timeout'
process.c:474: warning: function declaration isn't a prototype
process.c:474: warning: data definition has no type or storage class
process.c:477: syntax error before '{' token
process.c:501: syntax error before '{' token
process.c:514: warning: type defaults to `int' in declaration of `lastprocessesfrozen'
process.c:514: initializer element is not constant
process.c:514: warning: data definition has no type or storage class
process.c:515: parse error before "do"
process.c:518: parse error before string constant
process.c:518: warning: type defaults to `int' in declaration of `printk'
process.c:518: warning: function declaration isn't a prototype
process.c:518: warning: data definition has no type or storage class
process.c:519: parse error before "void"
process.c:520: syntax error before '{' token
process.c:533: warning: type defaults to `int' in declaration of `show_task'
process.c:533: warning: parameter names (without types) in function declaration
process.c:533: conflicting types for `show_task'
process.c:246: previous declaration of `show_task'
process.c:533: warning: data definition has no type or storage class
process.c:534: parse error before '}' token
process.c:550: warning: type defaults to `int' in declaration of `freezing'
process.c:550: redefinition of `freezing'
process.c:321: `freezing' previously defined here
process.c:550: warning: data definition has no type or storage class
process.c:553: parse error before '{' token
process.c:564: parse error before numeric constant
process.c:564: warning: type defaults to `int' in declaration of `check_shift_keys'
process.c:564: warning: function declaration isn't a prototype
process.c:564: warning: data definition has no type or storage class
process.c: In function `thaw_processes':
process.c:593: `STORAGE_UNSUSPEND' undeclared (first use in this function)
process.c:593: parse error before "swsusp_state"
process.c:596: `NUM_CPUS' undeclared (first use in this function)
process.c:604: `FOR_EACH_THREAD_START' undeclared (first use in this function)
process.c:604: parse error before '{' token
process.c:607: `p' undeclared (first use in this function)
process.c:575: warning: unused variable `FOR_EACH_THREAD_TASK_STRUCTS'
process.c: At top level:
process.c:610: parse error before '}' token
process.c:614: warning: type defaults to `int' in declaration of `swsusp_state'
process.c:614: conflicting types for `swsusp_state'
process.c:57: previous declaration of `swsusp_state'
process.c:614: warning: data definition has no type or storage class
process.c:616: parse error before "while"
process.c:619: parse error before numeric constant
process.c:619: warning: type defaults to `int' in declaration of `check_shift_keys'
process.c:619: warning: function declaration isn't a prototype
process.c:619: warning: data definition has no type or storage class
process.c:132: warning: `freeze_order' defined but not used
process.c:135: warning: `to_be_frozen' defined but not used
{standard input}: Assembler messages:
{standard input}:254: Error: symbol `freezing' is already defined
{standard input}:290: Error: symbol `freezing' is already defined
{standard input}:434: Error: symbol `last_time' is already defined
{standard input}:440: Error: symbol `last_time' is already defined
make[3]: *** [process.o] Ошибка 1
make[3]: Выход из каталог `/usr/src/linux-2.4.24-susp/kernel/power'
make[2]: *** [first_rule] Ошибка 2
make[2]: Выход из каталог `/usr/src/linux-2.4.24-susp/kernel/power'
make[1]: *** [_subdir_power] Ошибка 2
make[1]: Выход из каталог `/usr/src/linux-2.4.24-susp/kernel'
make: *** [_dir_kernel] Ошибка 2

cyclon ★★★★★
() автор топика

Да если после этого патча ядро так классно компилится то работать она наверное тоже классно будет :)

По второй ошибке ничего сказать немогу это уже чисто внутрение проблемы суспенда - а мне ковыряться с ним влом, почитай доки - может у тебя версия ядра не та иле делаешь чтото не так.

zaz ★★★★
()
Ответ на: комментарий от zaz

Ну да х*й с этим суспендом без него два года жил и дальше проживу!

cyclon ★★★★★
() автор топика
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.