summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAshish Gupta <ashmew2@gmail.com>2017-05-30 22:35:19 (GMT)
committer Ashish Gupta <ashmew2@gmail.com>2017-09-12 17:59:04 (GMT)
commitad3dbb2dfe3e5a92485e467c3b72f4baebb0a751 (patch)
treef1c84b39679b045fd8317fb9dfa2a8cfde828c1a
parent6a239fa74e8377df5618d00ba21337ff00a0d25a (diff)
downloadnetsurf-ad3dbb2dfe3e5a92485e467c3b72f4baebb0a751.tar.gz
netsurf-ad3dbb2dfe3e5a92485e467c3b72f4baebb0a751.tar.bz2
Release nightly for KolibriOS.
Check board.kolibrios.org forum thread for Netsurf for more details.
-rw-r--r--Makefile3
-rw-r--r--content/fetchers/file.c33
-rw-r--r--content/fetchers/httplib_kolibri.c8
-rw-r--r--frontends/kolibrios/Makefile7
-rw-r--r--frontends/kolibrios/fb/gui.c6
-rw-r--r--frontends/kolibrios/kos32sys.h13
6 files changed, 60 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index cc0c440..6b7e3d5 100644
--- a/Makefile
+++ b/Makefile
@@ -289,7 +289,8 @@ else
endif
else
ifeq ($(TARGET),kolibrios)
- CROSSDIR := /opt/netsurf/kos32-gcc/cross/autobuild/tools/win32/bin
+# CROSSDIR := /opt/netsurf/kos32-gcc/cross/autobuild/tools/win32/bin
+ CROSSDIR := /home/autobuild/tools/win32/bin
ENVDIR := /opt/netsurf/kos32-gcc/env/
CC := $(CROSSDIR)/kos32-gcc
LD := $(CROSSDIR)/kos32-ld
diff --git a/content/fetchers/file.c b/content/fetchers/file.c
index 067d9be..1aeb40b 100644
--- a/content/fetchers/file.c
+++ b/content/fetchers/file.c
@@ -42,6 +42,21 @@
#ifdef HAVE_MMAP
#include <sys/mman.h>
#endif
+
+#ifdef _TARGET_IS_KOLIBRIOS
+static inline uint32_t sys_uptime(void)
+{
+ uint32_t uptime;
+
+ __asm__ __volatile__(
+ "int $0x40 \n\t"
+ :"=a"(uptime)
+ :"a"(26),"b"(9));
+
+ return uptime / 100;
+}
+#endif
+
#include <libwapcaplet/libwapcaplet.h>
#include "netsurf/inttypes.h"
@@ -191,6 +206,11 @@ static void fetch_file_free(void *ctx)
/** callback to start a file fetch */
static bool fetch_file_start(void *ctx)
{
+#ifdef _TARGET_IS_KOLIBRIOS
+ struct fetch_file_context *c = ctx;
+ debug_board_printf("[%u] Starting file fetch : %s\n", sys_uptime(), nsurl_access(c->url));
+#endif
+
return true;
}
@@ -250,6 +270,9 @@ static void fetch_file_process_error(struct fetch_file_context *ctx, int code)
if (fetch_file_send_callback(&msg, ctx))
goto fetch_file_process_error_aborted;
+#ifdef _TARGET_IS_KOLIBRIOS
+ debug_board_printf("[%u] Finished file fetch : %s\n", sys_uptime(), nsurl_access(ctx->url));
+#endif
msg.type = FETCH_FINISHED;
fetch_file_send_callback(&msg, ctx);
@@ -332,6 +355,9 @@ static void fetch_file_process_plain(struct fetch_file_context *ctx,
fetch_file_send_callback(&msg, ctx);
if (ctx->aborted == false) {
+#ifdef _TARGET_IS_KOLIBRIOS
+ debug_board_printf("[%u] Finished file fetch : %s\n", sys_uptime(), nsurl_access(ctx->url));
+#endif
msg.type = FETCH_FINISHED;
fetch_file_send_callback(&msg, ctx);
}
@@ -435,6 +461,9 @@ fetch_file_process_aborted:
}
if (ctx->aborted == false) {
+#ifdef _TARGET_IS_KOLIBRIOS
+ debug_board_printf("[%u] Finished file fetch : %s\n", sys_uptime(), nsurl_access(ctx->url));
+#endif
msg.type = FETCH_FINISHED;
fetch_file_send_callback(&msg, ctx);
}
@@ -741,6 +770,10 @@ static void fetch_file_process_dir(struct fetch_file_context *ctx,
if (fetch_file_send_callback(&msg, ctx))
goto fetch_file_process_dir_aborted;
+#ifdef _TARGET_IS_KOLIBRIOS
+ debug_board_printf("[%u] Finished file fetch : %s\n", sys_uptime(), nsurl_access(ctx->url));
+#endif
+
msg.type = FETCH_FINISHED;
fetch_file_send_callback(&msg, ctx);
diff --git a/content/fetchers/httplib_kolibri.c b/content/fetchers/httplib_kolibri.c
index d3f2689..d5a52c3 100644
--- a/content/fetchers/httplib_kolibri.c
+++ b/content/fetchers/httplib_kolibri.c
@@ -76,10 +76,14 @@ bool init_fetcher(lwc_string *scheme) {
assert(lwc_string_isequal(scheme, corestring_lwc_http, &supported_scheme) == lwc_error_ok);
LOG("Initializing http library!");
- if(kolibri_http_init() == 0)
+ debug_board_printf("---- [NETSURF] Trying to initialize http library.\n");
+ if(kolibri_http_init() == 0) {
LOG("[INFO] Loaded http.obj library successfully.\n");
+ debug_board_printf("---- [NETSURF] Successfully initialized http library.\n");
+ }
else {
LOG("[ERROR] Could not load http.obj library.\n");
+ debug_board_printf("---- [NETSURF] Could not initialize http library. Exiting.\n");
assert(0 && 1);
return false;
}
@@ -151,6 +155,7 @@ void *setup_fetch(struct fetch *parent_fetch, struct nsurl *url,
bool start_fetch(void *httpf) {
LOG("-=- start_fetch : httpf: 0x%x", httpf);
+
add_to_poll((struct httpfetcher *) httpf);
return true;
}
@@ -308,6 +313,7 @@ void poll_fetch(lwc_string *scheme) {
}
fetch_msg msg;
+
msg.type = FETCH_FINISHED;
msg.data.header_or_data.buf = NULL;
msg.data.header_or_data.len = 0;
diff --git a/frontends/kolibrios/Makefile b/frontends/kolibrios/Makefile
index 963b085..c1496de 100644
--- a/frontends/kolibrios/Makefile
+++ b/frontends/kolibrios/Makefile
@@ -4,7 +4,7 @@ KOL_OBJ_DIR := $(ENVDIR)/obj
KOL_LIBC := $(KOLIBRI_SVN_CHECKOUT)/contrib/sdk/sources/newlib/libc/include/
KOL_LIB_DIR := $(KOLIBRI_SVN_CHECKOUT)/contrib/sdk/lib
-LIB_LDFLAGS := -L$(KOL_LIB_DIR) -lfreetype -lpng16 -ljpeg
+LIB_LDFLAGS := -L$(KOL_LIB_DIR) -lfreetype
OS_LDFLAGS := -static -S -Tapp-dynamic.lds --image-base 0 -Map netsurf-kolibrios.map
NS_INCLUDE := $(PREFIX)/include
NS_LIB_LDFLAGS := -L$(PREFIX)/lib/ -lnsbmp -lnsutils -lwapcaplet -lsvgtiny -lnsgif -lutf8proc -lcss -lnsfb -lparserutils -ldom -lhubbub
@@ -22,11 +22,6 @@ CFLAGS += '-DNETSURF_USE_KOLIBRI_HTTPLIB'
# Only for FB compat with kolibri. Get rid soon.
CFLAGS += '-DKOLIBRI_RUNTIME_RESPATH="$(NETSURF_KOLIBRI_RESPATH)"'
-# Enable PNG and others from here (no pkg config for now)
-CFLAGS += '-DWITH_PNG'
-CFLAGS += '-DWITH_GIF'
-CFLAGS += '-DWITH_JPEG'
-
# compile time font locations
CFLAGS += '-DNETSURF_FB_FONTPATH="$(NETSURF_KOLIBRI_FONTPATH)"'
CFLAGS += '-DKOLIBRI_FONT_FREETYPE_SANS_SERIF="$(NETSURF_KOLIBRI_FONT_SANS_SERIF)"'
diff --git a/frontends/kolibrios/fb/gui.c b/frontends/kolibrios/fb/gui.c
index 6d21b73..bded722 100644
--- a/frontends/kolibrios/fb/gui.c
+++ b/frontends/kolibrios/fb/gui.c
@@ -489,7 +489,7 @@ process_cmdline(int argc, char** argv)
/* Remove me! */
/* feurl = "file:///usbhd0/1/bin/res/text.html"; */
- feurl = "http://board.kolibrios.org";
+ /* feurl = "http://board.kolibrios.org"; */
/* NS on KolibriOS does not support option parsing (yet) */
@@ -2117,6 +2117,8 @@ static struct gui_misc_table framebuffer_misc_table = {
*/
int main(int argc, char** argv)
{
+ debug_board_printf("--- [NETSURF] Starting Netsurf for KolibriOS.\n");
+
struct browser_window *bw;
char *options;
char *messages;
@@ -2136,7 +2138,7 @@ int main(int argc, char** argv)
/* Initialize heap so that we can do memory allocations */
unsigned int heapsize = heap_init();
- LOG("[SYSTEM] Initialized heap (Size = %u bytes)\n", heapsize);
+ debug_board_printf("--- [NETSURF] Initialized heap.\n");
assert(heapsize != 0);
/* fix args */
diff --git a/frontends/kolibrios/kos32sys.h b/frontends/kolibrios/kos32sys.h
index de4bf6a..18ac3fa 100644
--- a/frontends/kolibrios/kos32sys.h
+++ b/frontends/kolibrios/kos32sys.h
@@ -536,6 +536,19 @@ static inline void Blit(void *bitmap, int dst_x, int dst_y,
::"a"(73),"b"(0),"c"(&bc.dstx));
};
+static inline uint32_t sys_uptime(void)
+{
+ uint32_t uptime;
+
+ __asm__ __volatile__(
+ "int $0x40 \n\t"
+ :"=a"(uptime)
+ :"a"(26),"b"(9));
+
+ return uptime / 100;
+}
+
+
void* load_library(const char *name);
void* get_proc_address(void *handle, const char *proc_name);