Browse Source

change Makefile to auto define FB_XSIZE,FB_YSIZE.

make httplib load fast.
master
root 16 years ago
parent
commit
dc14c25d9b
  1. 1
      Targets/Bonito2fdev/conf/Makefile.Bonito2fdev
  2. 1
      pmon/netio/httplib.c
  3. 4
      sys/dev/pci/smi712.c

1
Targets/Bonito2fdev/conf/Makefile.Bonito2fdev

@ -37,6 +37,7 @@ RANLIB = $(CROSS_COMPILE)ranlib
SIZE = $(CROSS_COMPILE)size SIZE = $(CROSS_COMPILE)size
OPT?= -O2 OPT?= -O2
IDENT:=${IDENT} $(shell echo ${IDENT}|sed -n 's/.*-DX\([0-9]\+\)x\([0-9]\+\).*/ -DFB_XSIZE=\1 -DFB_YSIZE=\2 /p')
all: pmon all: pmon

1
pmon/netio/httplib.c

@ -278,6 +278,7 @@ httpread (int fd,void* buf,int nread)
} }
if (http->foffs >= http->end) { if (http->foffs >= http->end) {
http->start = http->end; http->start = http->end;
if(http->foffs>=buf_size)break;
n = read(http->sock, http->buf, HPSIZE); n = read(http->sock, http->buf, HPSIZE);
if(n<=0)break; if(n<=0)break;
http->end = http->start + n; http->end = http->start + n;

4
sys/dev/pci/smi712.c

@ -170,8 +170,8 @@ int smi712_init(char * fbaddress,char * ioaddress)
hw.height = 600; hw.height = 600;
#endif #endif
#if 1 #if 1
hw.width = 640; hw.width = FB_XSIZE;
hw.height = 480; hw.height = FB_YSIZE;
#endif #endif
hw.bits_per_pixel = 16; hw.bits_per_pixel = 16;
hw.hz = 60; hw.hz = 60;

Loading…
Cancel
Save