2010年9月10日

warning: deprecated conversion from string constant to 'char*'

Issue:
warning: deprecated conversion from string constant to 'char*'
warning: deprecated conversion from string constant to 'char*'
warning: deprecated conversion from string constant to 'char*'

Solution:
Happens on compiling with gcc v4.3.3.
Change [char *] to [const char *].

2010年9月3日

configure: error: cannot determine linux version when cross-compiling

Issue:
checking whether to build optimizer debugging code... no
checking whether to build parser debugging code... no
checking Linux kernel version... unknown
configure: error: cannot determine linux version when cross-compiling

Solution:
Directly edit "configure" file, and add a new line:
linux)
ac_cv_linux_vers=2
echo "$as_me:$LINENO: checking Linux kernel version" >&5
echo $ECHO_N "checking Linux kernel version... $ECHO_C" >&6

This is a work-around, actually I don't like that.

sysctl.h:41: error: expected ':', ',', ';', '}' or '__attribute__' before '*' token

Issue:
In file included from ./include/sys/sysctl.h:44,
from libc/sysdeps/linux/arm/ioperm.c:46:
sysctl.h:41: error: expected ':', ',', ';', '}' or '__attribute__' before '*' token
make[4]: *** [libc/sysdeps/linux/arm/ioperm.os] Error 1

Solution:
Directly edit sysctl.h from
struct __sysctl_args {
int __user *name;
int nlen;
void __user *oldval;
size_t __user *oldlenp;
void __user *newval;
size_t newlen;
unsigned long __unused[4];
};
to
struct __sysctl_args {
int __attribute__((noderef, address_space(1))) *name;
int nlen;
void __attribute__((noderef, address_space(1))) *oldval;
size_t __attribute__((noderef, address_space(1))) *oldlenp;
void __attribute__((noderef, address_space(1))) *newval;
size_t newlen;
unsigned long __unused[4];
};

Failed in compiling busybox

Issue:
LINK busybox_unstripped
modutils/lib.a(insmod.o): In function `insmod_main':
insmod.c:(.text.insmod_main+0x390): undefined reference to `query_module'
insmod.c:(.text.insmod_main+0x3c4): undefined reference to `query_module'
insmod.c:(.text.insmod_main+0x474): undefined reference to `query_module'
insmod.c:(.text.insmod_main+0x4c4): undefined reference to `query_module'
insmod.c:(.text.insmod_main+0x598): undefined reference to `query_module'
insmod.c:(.text.insmod_main+0xbe0): undefined reference to `create_module'
collect2: ld returned 1 exit status
make[4]: *** [busybox_unstripped] Error 1

Solution:
Uncheck [ ] Support version 2.2.x to 2.4.x Linux kernels
or
# CONFIG_FEATURE_2_4_MODULES is not set

2010年5月25日

Windows XP hangs at loading agp440.sys!?

1. Remove all USB devices except of mouse and keyboards, you can disable USB ports from BIOS as well. (Or yank out USB device when the boot is stopping at loading agp440.sys!?)
2. Trying to boot into Safe Mode.
3. Execute "chkdsk /R" and then reboot.
4. Windows will do disk check and recovery your system.
5. Done.

Reference: http://marc-bourassa.com/2005/04/24/agp440sys-and-dead-xp-system

Or

In my case, everything works fine after I remove CD-ROM drive.