Commit 6abbb213 authored by Alessandro Rubini's avatar Alessandro Rubini Committed by Aurelio Colosimo

general: rename pproto to pptp

While the code layout comes from ptp-proposal, this is a different
package, now called pptp for "Portable PTP".
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
Acked-by: Aurelio Colosimo's avatarAurelio Colosimo <aurelio@aureliocolosimo.it>
parent 0b355da3
*.map* *.map*
*.o *.o
*.a *.a
pproto.bin pptp.bin
*.patch *.patch
...@@ -7,8 +7,8 @@ build_one () { ...@@ -7,8 +7,8 @@ build_one () {
echo "####################" echo "####################"
echo "Build for " "$1" echo "Build for " "$1"
make -s -k $2 make -s -k $2
test -f pproto.o && size pproto.o test -f pptp.o && size pptp.o
test -f pproto && size pproto test -f pptp && size pptp
} }
build_diags () { build_diags () {
......
...@@ -14,7 +14,7 @@ OBJCOPY = $(CROSS_COMPILE)objcopy ...@@ -14,7 +14,7 @@ OBJCOPY = $(CROSS_COMPILE)objcopy
OBJDUMP = $(CROSS_COMPILE)objdump OBJDUMP = $(CROSS_COMPILE)objdump
# Instead of repeating "proto-daemon" over and over, bless it TARGET # Instead of repeating "proto-daemon" over and over, bless it TARGET
TARGET = pproto TARGET = pptp
# The main target is the big object file. # The main target is the big object file.
all: $(TARGET).o all: $(TARGET).o
......
/* /*
* Alessandro Rubini for CERN, 2011 -- public domain * Alessandro Rubini for CERN, 2011 -- public domain
*/ */
#include <pproto/pproto.h> #include <pptp/pptp.h>
#include "bare-linux.h" #include "bare-linux.h"
void pp_puts(const char *s) void pp_puts(const char *s)
......
OUTPUT_FORMAT("elf32-i386") OUTPUT_FORMAT("elf32-i386")
OUTPUT_ARCH(i386) OUTPUT_ARCH(i386)
ENTRY(_pproto_start) ENTRY(_pptp_start)
SECTIONS SECTIONS
{ {
. = 0x10000000; /* A random address, non-standard by choice*/ . = 0x10000000; /* A random address, non-standard by choice*/
.text : { .text : {
_pproto_start = .; _pptp_start = .;
*(.boot) *(.boot)
*(.text) *(.text)
} }
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
*/ */
/* Socket interface for bare Linux */ /* Socket interface for bare Linux */
#include <pproto/pproto.h> #include <pptp/pptp.h>
#include <pproto/diag.h> #include <pptp/diag.h>
#include "bare-linux.h" #include "bare-linux.h"
/* FIXME: which socket we receive and send with? */ /* FIXME: which socket we receive and send with? */
......
...@@ -6,13 +6,13 @@ ...@@ -6,13 +6,13 @@
* This is the startup thing for "freestanding" stuff under Linux. * This is the startup thing for "freestanding" stuff under Linux.
* It must also clear the BSS as I'm too lazy to do that in asm * It must also clear the BSS as I'm too lazy to do that in asm
*/ */
#include <pproto/pproto.h> #include <pptp/pptp.h>
#include <pproto/diag.h> #include <pptp/diag.h>
#include "bare-linux.h" #include "bare-linux.h"
extern int __bss_start, __bss_end; extern int __bss_start, __bss_end;
void pproto_clear_bss(void) void pptp_clear_bss(void)
{ {
int *ptr; int *ptr;
...@@ -23,7 +23,7 @@ void pproto_clear_bss(void) ...@@ -23,7 +23,7 @@ void pproto_clear_bss(void)
static struct pp_instance ppi_static; static struct pp_instance ppi_static;
static struct pp_net_path net_path_static; static struct pp_net_path net_path_static;
void pproto_main(void) void pptp_main(void)
{ {
struct pp_instance *ppi = &ppi_static; /* no malloc, one instance */ struct pp_instance *ppi = &ppi_static; /* no malloc, one instance */
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* Alessandro Rubini for CERN, 2011 -- GNU GPL v2 or later * Alessandro Rubini for CERN, 2011 -- GNU GPL v2 or later
*/ */
.section .boot, "ax" .section .boot, "ax"
.extern pproto_main .extern pptp_main
call pproto_clear_bss /* In C, lazy me */ call pptp_clear_bss /* In C, lazy me */
call pproto_main call pptp_main
.end .end
\ No newline at end of file
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
/* /*
* This is the main loop for "freestanding" stuff under Linux. * This is the main loop for "freestanding" stuff under Linux.
*/ */
#include <pproto/pproto.h> #include <pptp/pptp.h>
#include "bare-linux.h" #include "bare-linux.h"
/* Define other hackish stuff */ /* Define other hackish stuff */
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
*/ */
#include <asm/unistd.h> #include <asm/unistd.h>
#include <pproto/pproto.h> #include <pptp/pptp.h>
#include "bare-linux.h" #include "bare-linux.h"
#include "syscalls.h" #include "syscalls.h"
......
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
#include <sys/select.h> #include <sys/select.h>
#include <linux/if_ether.h> #include <linux/if_ether.h>
#include <pproto/pproto.h> #include <pptp/pptp.h>
#include <pproto/diag.h> #include <pptp/diag.h>
#include "posix.h" #include "posix.h"
void posix_main_loop(struct pp_instance *ppi) void posix_main_loop(struct pp_instance *ppi)
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <time.h> #include <time.h>
#include <pproto/pproto.h> #include <pptp/pptp.h>
void pp_puts(const char *s) void pp_puts(const char *s)
{ {
......
...@@ -15,8 +15,8 @@ ...@@ -15,8 +15,8 @@
#include <arpa/inet.h> #include <arpa/inet.h>
#include <pproto/pproto.h> #include <pptp/pptp.h>
#include <pproto/diag.h> #include <pptp/diag.h>
#include "posix.h" #include "posix.h"
static int ch_check_stat = 0; static int ch_check_stat = 0;
......
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include <pproto/pproto.h> #include <pptp/pptp.h>
#include <pproto/diag.h> #include <pptp/diag.h>
#include "posix.h" #include "posix.h"
int main(int argc, char **argv) int main(int argc, char **argv)
......
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
#include <errno.h> #include <errno.h>
#include <stdlib.h> #include <stdlib.h>
#include <pproto/pproto.h> #include <pptp/pptp.h>
#include <pproto/diag.h> #include <pptp/diag.h>
#include "posix.h" #include "posix.h"
/* FIXME /* FIXME
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* *
* GNU LGPL 2.1 or later versions * GNU LGPL 2.1 or later versions
*/ */
#include <pproto/pproto.h> #include <pptp/pptp.h>
#include "../spec.h" #include "../spec.h"
#include <hw/endpoint_regs.h> #include <hw/endpoint_regs.h>
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* *
* GNU LGPL 2.1 or later versions * GNU LGPL 2.1 or later versions
*/ */
#include <pproto/pproto.h> #include <pptp/pptp.h>
#include "../spec.h" #include "../spec.h"
//#include "pps_gen.h" /* for pps_gen_get_time() */ //#include "pps_gen.h" /* for pps_gen_get_time() */
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* based on code by Tomasz Wlostowski * based on code by Tomasz Wlostowski
*/ */
#include <pproto/pproto.h> #include <pptp/pptp.h>
#include "../spec.h" #include "../spec.h"
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
/* /*
* This is the main loop for the Spec board * This is the main loop for the Spec board
*/ */
#include <pproto/pproto.h> #include <pptp/pptp.h>
#include "spec.h" #include "spec.h"
void spec_main_loop(struct pp_instance *ppi) void spec_main_loop(struct pp_instance *ppi)
......
/* /*
* Alessandro Rubini for CERN, 2011 -- public domain * Alessandro Rubini for CERN, 2011 -- public domain
*/ */
#include <pproto/pproto.h> #include <pptp/pptp.h>
#include <hw/wb_uart.h> #include <hw/wb_uart.h>
#include "spec.h" #include "spec.h"
......
/* /*
* Alessandro Rubini for CERN, 2011 -- GNU LGPL v2.1 or later * Alessandro Rubini for CERN, 2011 -- GNU LGPL v2.1 or later
*/ */
#include <pproto/pproto.h> #include <pptp/pptp.h>
#include "spec.h" #include "spec.h"
#include "include/gpio.h" #include "include/gpio.h"
......
/* /*
* Alessandro Rubini for CERN, 2011 -- GNU LGPL v2.1 or later * Alessandro Rubini for CERN, 2011 -- GNU LGPL v2.1 or later
*/ */
#include <pproto/pproto.h> #include <pptp/pptp.h>
#include "spec.h" #include "spec.h"
#include "include/gpio.h" #include "include/gpio.h"
static struct pp_instance ppi_static; static struct pp_instance ppi_static;
void pproto_main(void) void pptp_main(void)
{ {
struct pp_instance *ppi = &ppi_static; /* no malloc, one instance */ struct pp_instance *ppi = &ppi_static; /* no malloc, one instance */
...@@ -35,7 +35,7 @@ void pproto_main(void) ...@@ -35,7 +35,7 @@ void pproto_main(void)
/* Our crt0.S is unchanged: it wants a "main" function, and "_irq_entry" too" */ /* Our crt0.S is unchanged: it wants a "main" function, and "_irq_entry" too" */
int main(void) __attribute__((alias("pproto_main"))); int main(void) __attribute__((alias("pptp_main")));
void _irq_entry(void) void _irq_entry(void)
{ {
......
/* /*
* Alessandro Rubini for CERN, 2011 -- GNU LGPL v2.1 or later * Alessandro Rubini for CERN, 2011 -- GNU LGPL v2.1 or later
*/ */
#include <pproto/pproto.h> #include <pptp/pptp.h>
/* /*
* These are the functions provided by the various bare files * These are the functions provided by the various bare files
*/ */
...@@ -12,7 +12,7 @@ extern int spec_send_packet(struct pp_instance *ppi, void *pkt, int len); ...@@ -12,7 +12,7 @@ extern int spec_send_packet(struct pp_instance *ppi, void *pkt, int len);
extern void spec_main_loop(struct pp_instance *ppi); extern void spec_main_loop(struct pp_instance *ppi);
extern void _irq_entry(void); /* unused, to make crt0.S happy */ extern void _irq_entry(void); /* unused, to make crt0.S happy */
extern int main(void); /* alias to pproto_main, so crt0.S is happy */ extern int main(void); /* alias to pptp_main, so crt0.S is happy */
/* basics */ /* basics */
extern void *memset(void *s, int c, int count); extern void *memset(void *s, int c, int count);
......
/* /*
* Alessandro Rubini for CERN, 2011 -- public domain * Alessandro Rubini for CERN, 2011 -- public domain
*/ */
#include <pproto/pproto.h> #include <pptp/pptp.h>
/* /*
* Having no diagnostics, just make one function that returns 0 and alias * Having no diagnostics, just make one function that returns 0 and alias
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
* (please note that the vsprintf is not public domain but GPL) * (please note that the vsprintf is not public domain but GPL)
*/ */
#include <stdarg.h> #include <stdarg.h>
#include <pproto/pproto.h> #include <pptp/pptp.h>
#include <pproto/diag.h> #include <pptp/diag.h>
#define PP_BUF 128 /* We prefer small targets */ #define PP_BUF 128 /* We prefer small targets */
......
/* /*
* Alessandro Rubini for CERN, 2011 -- public domain * Alessandro Rubini for CERN, 2011 -- public domain
*/ */
#include <pproto/pproto.h> #include <pptp/pptp.h>
#include <pproto/diag.h> #include <pptp/diag.h>
/* /*
* This has diagnostics. It calls pp_printf (which one, we don't know) * This has diagnostics. It calls pp_printf (which one, we don't know)
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include <stdarg.h> #include <stdarg.h>
/* BEGIN OF HACKS */ /* BEGIN OF HACKS */
#include <pproto/pproto.h> #include <pptp/pptp.h>
/* <ctype.h> */ /* <ctype.h> */
static inline int isdigit(int c) static inline int isdigit(int c)
......
...@@ -7,9 +7,9 @@ ...@@ -7,9 +7,9 @@
#include <stdint.h> #include <stdint.h>
#include <stdarg.h> #include <stdarg.h>
#include <arch/arch.h> /* ntohs and so on */ #include <arch/arch.h> /* ntohs and so on */
#include <pproto/lib.h> #include <pptp/lib.h>
#include <pproto/ieee1588_types.h> #include <pptp/ieee1588_types.h>
#include <pproto/constants.h> #include <pptp/constants.h>
/* /*
......
/* /*
* FIXME: header * FIXME: header
*/ */
#include <pproto/pproto.h> #include <pptp/pptp.h>
/* This is a placeholder for white rabbit extension. */ /* This is a placeholder for white rabbit extension. */
/* TODO */ /* TODO */
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* FIXME header * FIXME header
*/ */
#include <pproto/pproto.h> #include <pptp/pptp.h>
/* FIXME: This is a temp workaround. How to define it? */ /* FIXME: This is a temp workaround. How to define it? */
#define PP_INT_MAX 2147483647 #define PP_INT_MAX 2147483647
......
/* /*
* FIXME header * FIXME header
*/ */
#include <pproto/pproto.h> #include <pptp/pptp.h>
/* Local clock is becoming Master. Table 13 (9.3.5) of the spec. */ /* Local clock is becoming Master. Table 13 (9.3.5) of the spec. */
void m1(struct pp_instance *ppi) void m1(struct pp_instance *ppi)
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* FIXME header * FIXME header
*/ */
#include <pproto/pproto.h> #include <pptp/pptp.h>
/* Unpack header from in buffer to msg_tmp_header field */ /* Unpack header from in buffer to msg_tmp_header field */
void msg_unpack_header(void *buf, struct pp_instance *ppi) void msg_unpack_header(void *buf, struct pp_instance *ppi)
......
/* /*
* Alessandro Rubini for CERN, 2011 -- public domain * Alessandro Rubini for CERN, 2011 -- public domain
*/ */
#include <pproto/pproto.h> #include <pptp/pptp.h>
/* /*
* This file deals with opening and closing an instance. The channel * This file deals with opening and closing an instance. The channel
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* FIXME header * FIXME header
*/ */
#include <pproto/pproto.h> #include <pptp/pptp.h>
void pp_init_clock(struct pp_instance *ppi) void pp_init_clock(struct pp_instance *ppi)
......
/* /*
* FIXME: header * FIXME: header
*/ */
#include <pproto/pproto.h> #include <pptp/pptp.h>
#include "state-common-fun.h" #include "state-common-fun.h"
void st_com_execute_slave(struct pp_instance *ppi) void st_com_execute_slave(struct pp_instance *ppi)
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* FIXME: header * FIXME: header
*/ */
#include <pproto/pproto.h> #include <pptp/pptp.h>
/* Contains all functions common to more than one state */ /* Contains all functions common to more than one state */
......
/* /*
* FIXME: header * FIXME: header
*/ */
#include <pproto/pproto.h> #include <pptp/pptp.h>
int pp_disabled(struct pp_instance *ppi, unsigned char *pkt, int plen) int pp_disabled(struct pp_instance *ppi, unsigned char *pkt, int plen)
{ {
......
/* /*
* FIXME: header * FIXME: header
*/ */
#include <pproto/pproto.h> #include <pptp/pptp.h>
#include <pproto/diag.h> #include <pptp/diag.h>
/* /*
* Fault troubleshooting. Now only prints an error messages and comes back to * Fault troubleshooting. Now only prints an error messages and comes back to
......
/* /*
* FIXME: header * FIXME: header
*/ */
#include <pproto/pproto.h> #include <pptp/pptp.h>
#include <pproto/diag.h> #include <pptp/diag.h>
/* /*
* Initializes network and other stuff * Initializes network and other stuff
......
/* /*
* FIXME: header * FIXME: header
*/ */
#include <pproto/pproto.h> #include <pptp/pptp.h>
#include "state-common-fun.h" #include "state-common-fun.h"
int pp_listening(struct pp_instance *ppi, unsigned char *pkt, int plen) int pp_listening(struct pp_instance *ppi, unsigned char *pkt, int plen)
......
/* /*
* FIXME: header * FIXME: header
*/ */
#include <pproto/pproto.h> #include <pptp/pptp.h>
#include "state-common-fun.h" #include "state-common-fun.h"
int pp_master(struct pp_instance *ppi, unsigned char *pkt, int plen) int pp_master(struct pp_instance *ppi, unsigned char *pkt, int plen)
......
/* /*
* FIXME: header * FIXME: header
*/ */
#include <pproto/pproto.h> #include <pptp/pptp.h>
#include "state-common-fun.h" #include "state-common-fun.h"
int pp_passive(struct pp_instance *ppi, unsigned char *pkt, int plen) int pp_passive(struct pp_instance *ppi, unsigned char *pkt, int plen)
......
/* /*
* FIXME: header * FIXME: header
*/ */
#include <pproto/pproto.h> #include <pptp/pptp.h>
int pp_pre_master(struct pp_instance *ppi, unsigned char *pkt, int plen) int pp_pre_master(struct pp_instance *ppi, unsigned char *pkt, int plen)
{ {
......
/* /*
* FIXME: header * FIXME: header
*/ */
#include <pproto/pproto.h> #include <pptp/pptp.h>
#include "state-common-fun.h" #include "state-common-fun.h"
int pp_slave(struct pp_instance *ppi, unsigned char *pkt, int plen) int pp_slave(struct pp_instance *ppi, unsigned char *pkt, int plen)
......
/* /*
* FIXME: header * FIXME: header
*/ */
#include <pproto/pproto.h> #include <pptp/pptp.h>
/* /*
* This is the default state machine table. It is weak so an extension * This is the default state machine table. It is weak so an extension
......
/* /*
* FIXME: header * FIXME: header
*/ */
#include <pproto/pproto.h> #include <pptp/pptp.h>
#include "state-common-fun.h" #include "state-common-fun.h"
int pp_uncalibrated(struct pp_instance *ppi, unsigned char *pkt, int plen) int pp_uncalibrated(struct pp_instance *ppi, unsigned char *pkt, int plen)
......
/* /*
* Alessandro Rubini for CERN, 2011 -- public domain * Alessandro Rubini for CERN, 2011 -- public domain
*/ */
#include <pproto/pproto.h> #include <pptp/pptp.h>
#include <pproto/diag.h> #include <pptp/diag.h>
/* /*
* This is the state machine code. i.e. the extension-independent * This is the state machine code. i.e. the extension-independent
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment