diff --git a/alsa/alsa.build b/alsa/alsa.build index f30ba3b..81115c8 100644 --- a/alsa/alsa.build +++ b/alsa/alsa.build @@ -10,8 +10,8 @@ # Configure extension creation parameters # ###################################################### -SRCNAM=alsa-lib-1.1.1.tar.bz2 -WRKDIR=alsa-lib-1.1.1 +SRCNAM=alsa-lib-1.2.5.1.tar.bz2 +WRKDIR=alsa-lib-1.2.5.1 EXTNAM=alsa TMPDIR=/tmp/alsa @@ -84,7 +84,7 @@ mv $TMPDIR/usr/local/lib/pkgconfig $TMPDIR-dev/usr/local/lib cp *.patch $TMPDIR cd $TMPDIR cd usr -patch -p1 < alsa-ipc-gid.patch +patch -p1 < ../alsa-ipc-gid.patch cd .. rm -f alsa-ipc-gid.patch diff --git a/eepromutils/.gitignore b/eepromutils/.gitignore new file mode 100644 index 0000000..2323a8a --- /dev/null +++ b/eepromutils/.gitignore @@ -0,0 +1,2 @@ +eepdump +eepmake diff --git a/eepromutils/Makefile b/eepromutils/Makefile new file mode 100644 index 0000000..d897a6f --- /dev/null +++ b/eepromutils/Makefile @@ -0,0 +1,14 @@ +# Current tools are eepmake and eepdump + +CC ?= gcc + +all: eepmake eepdump + +eepmake: eeptypes.h eepmake.c + $(CC) eepmake.c -o eepmake -Wno-format + +eepdump: eeptypes.h eepdump.c + $(CC) eepdump.c -o eepdump -Wno-format + +clean: + rm -f eepmake eepdump diff --git a/eepromutils/README.txt b/eepromutils/README.txt new file mode 100755 index 0000000..44261b6 --- /dev/null +++ b/eepromutils/README.txt @@ -0,0 +1,12 @@ +Utilities to create, flash and dump HAT EEPROM images. + +Edit eeprom_setting.txt for your particular board and run through +eepmake tool, then use eepflash tool to write to attached HAT ID EEPROM + +Tools available: + + eepmake: Parses EEPROM text file and creates binary .eep file + + eepdump: Dumps a binary .eep file as human readable text (for debug) + + eepflash: Write or read .eep binary image to/from HAT EEPROM diff --git a/eepromutils/eepdump.c b/eepromutils/eepdump.c new file mode 100644 index 0000000..2b9b514 --- /dev/null +++ b/eepromutils/eepdump.c @@ -0,0 +1,230 @@ +#include +#include +#include +#include +#include + +#include "eeptypes.h" + +struct header_t header; +struct atom_t atom; +struct vendor_info_d vinf; +struct gpio_map_d gpiomap; +unsigned char* data; + +int read_bin(char *in, char *outf) { + + uint16_t crc; + FILE *fp, *out; + int i,j; + + fp=fopen(in, "r"); + if (!fp) { + printf("Error reading file %s\n", in); + return -1; + } + + out=fopen(outf, "w"); + if (!out) { + printf("Error writing file %s\n", outf); + return -1; + } + + if (!fread(&header, sizeof(header), 1, fp)) goto err; + + fprintf(out, "# ---------- Dump generated by eepdump handling format version 0x%02x ----------\n#\n", FORMAT_VERSION); + + if (FORMAT_VERSION!=header.ver) fprintf(out, "# WARNING: format version mismatch!!!\n"); + + fprintf(out, "# --Header--\n# signature=0x%08x\n# version=0x%02x\n# reserved=%u\n# numatoms=%u\n# eeplen=%u\n# ----------\n\n\n", header.signature, header.ver, header.res, header.numatoms, header.eeplen); + + + for (i = 0; i>16, vinf.serial_3 & 0xffff, vinf.serial_2>>16, vinf.serial_2 & 0xffff, vinf.serial_1); + fprintf(out, "product_id 0x%04x\n", vinf.pid); + fprintf(out, "product_ver 0x%04x\n", vinf.pver); + + vinf.vstr = (char *) malloc(vinf.vslen+1); + vinf.pstr = (char *) malloc(vinf.pslen+1); + + if (!fread(vinf.vstr, vinf.vslen, 1, fp)) goto err; + if (!fread(vinf.pstr, vinf.pslen, 1, fp)) goto err; + //close strings + vinf.vstr[vinf.vslen] = 0; + vinf.pstr[vinf.pslen] = 0; + + fprintf(out, "vendor \"%s\" # length=%u\n", vinf.vstr, vinf.vslen); + fprintf(out, "product \"%s\" # length=%u\n", vinf.pstr, vinf.pslen); + + if (!fread(&crc, CRC_SIZE, 1, fp)) goto err; + + } else if (atom.type==ATOM_GPIO_TYPE) { + //decode GPIO map + if (!fread(&gpiomap, GPIO_SIZE, 1, fp)) goto err; + + fprintf(out, "# GPIO map info\n"); + fprintf(out, "gpio_drive %d\n", gpiomap.flags & 15); //1111 + fprintf(out, "gpio_slew %d\n", (gpiomap.flags & 48)>>4); //110000 + fprintf(out, "gpio_hysteresis %d\n", (gpiomap.flags & 192)>>6); //11000000 + fprintf(out, "back_power %d\n", gpiomap.power); + fprintf(out, "# GPIO FUNCTION PULL\n# ---- -------- ----\n"); + + for (j = 0; j<28; j++) { + if (gpiomap.pins[j] & (1<<7)) { + //board uses this pin + + char *pull_str = "INVALID"; + switch ((gpiomap.pins[j] & 96)>>5) { //1100000 + case 0: pull_str = "DEFAULT"; + break; + case 1: pull_str = "UP"; + break; + case 2: pull_str = "DOWN"; + break; + case 3: pull_str = "NONE"; + break; + } + + char *func_str = "INVALID"; + switch ((gpiomap.pins[j] & 7)) { //111 + case 0: func_str = "INPUT"; + break; + case 1: func_str = "OUTPUT"; + break; + case 4: func_str = "ALT0"; + break; + case 5: func_str = "ALT1"; + break; + case 6: func_str = "ALT2"; + break; + case 7: func_str = "ALT3"; + break; + case 3: func_str = "ALT4"; + break; + case 2: func_str = "ALT5"; + break; + } + + fprintf(out, "setgpio %d %s %s\n", j, func_str, pull_str); + } + } + + if (!fread(&crc, CRC_SIZE, 1, fp)) goto err; + + } else if (atom.type==ATOM_DT_TYPE) { + //decode DT blob + + fprintf(out, "dt_blob"); + data = (char *) malloc(atom.dlen-CRC_SIZE); + if (!fread(data, atom.dlen-CRC_SIZE, 1, fp)) goto err; + + for (j = 0; j&2 + exit 1 +fi + +while [ "$1" != "" ]; do + PARAM=`echo $1 | awk -F= '{print $1}'` + VALUE=`echo $1 | awk -F= '{print $2}'` + case $PARAM in + -h | --help) + usage + exit + ;; + -r | --read) + MODE="read" + ;; + -w | --write) + MODE="write" + ;; + -t | --type) + if [ "$VALUE" = "24c32" ] || [ "$VALUE" = "24c64" ] || [ "$VALUE" = "24c128" ] || + [ "$VALUE" = "24c256" ] || [ "$VALUE" = "24c512" ] || [ "$VALUE" = "24c1024" ]; then + TYPE=$VALUE + else + echo "ERROR: Unrecognised eeprom type. Try -h for help" + exit 1 + fi + ;; + -d | --device) + BUS=$VALUE + ;; + -a | --address) + ADDR=$VALUE + ;; + -f | --file) + FILE=$VALUE + ;; + *) + echo "ERROR: unknown parameter \"$PARAM\"" + usage + exit 1 + ;; + esac + shift +done + +if [ "$MODE" = "NOT_SET" ]; then + echo "You need to set mode (read or write). Try -h for help." + exit 1 +elif [ "$FILE" = "NOT_SET" ]; then + echo "You need to set binary .eep file to read to/from. Try -h for help." + exit 1 +elif [ "$TYPE" = "NOT_SET" ]; then + echo "You need to set eeprom type. Try -h for help." + exit 1 +fi + +echo "This will attempt to talk to an eeprom at i2c address 0x$ADDR on bus $BUS. Make sure there is an eeprom at this address." +echo "This script comes with ABSOLUTELY no warranty. Continue only if you know what you are doing." + +modprobe i2c_dev +if [ "$BUS" = "NOT_SET" ]; then + if [ -e "/dev/i2c-0" ]; then + BUS=0 + elif [ -e "/dev/i2c-10" ]; then + BUS=10 + else + dtoverlay i2c-gpio i2c_gpio_sda=0 i2c_gpio_scl=1 bus=10 + rc=$? + if [ $rc != 0 ]; then + echo "Loading of i2c-gpio dtoverlay failed. Do an rpi-update (and maybe apt-get update; apt-get upgrade)." + exit $rc + fi + if [ -e "/dev/i2c-10" ]; then + BUS=10 + else + echo "Expected I2C bus (i2c-10) not found." + fi + fi +fi + +if [ "$ADDR" = "NOT_SET" ]; then + ADDR=50 +fi + +#modprobe at24 + +rc=$? +if [ $rc != 0 ]; then + echo "Modprobe of at24 failed. Do an rpi-update." + exit $rc +fi + +SYS=/sys/class/i2c-adapter/i2c-$BUS + +if [ ! -d "$SYS/$BUS-00$ADDR" ]; then + echo "$TYPE 0x$ADDR" > $SYS/new_device +fi + +DD_VERSION=$(dd --version | grep coreutils | sed -e 's/\.//' | cut -d' ' -f 3) +if [ $DD_VERSION -ge 824 ] + then + DD_STATUS="progress" + else + DD_STATUS="none" +fi + +if [ "$MODE" = "write" ] + then + echo "Writing..." + dd if=$FILE of=$SYS/$BUS-00$ADDR/eeprom status=$DD_STATUS + rc=$? +elif [ "$MODE" = "read" ] + then + echo "Reading..." + dd if=$SYS/$BUS-00$ADDR/eeprom of=$FILE status=$DD_STATUS + rc=$? +fi + +echo "Closing EEPROM Device." +echo "0x$ADDR" > $SYS/delete_device + +if [ $rc != 0 ]; then + echo "Error doing I/O operation." + exit $rc +else + echo "Done." +fi diff --git a/eepromutils/eepmake.c b/eepromutils/eepmake.c new file mode 100644 index 0000000..04dea0c --- /dev/null +++ b/eepromutils/eepmake.c @@ -0,0 +1,620 @@ +/* + * Parses EEPROM text file and createds binary .eep file + * Usage: eepmake input_file output_file +*/ + +#include +#include +#include +#include +#include +#include +#include + +#include "eeptypes.h" + +#define HEADER_SIGN 0x69502d52 //"R-Pi" in ASCII reversed for endianness + +//todo: larger initial mallocs + +struct header_t header; +struct atom_t *custom_atom, vinf_atom, gpio_atom, dt_atom; +struct vendor_info_d* vinf; +struct gpio_map_d* gpiomap; + +bool product_serial_set, product_id_set, product_ver_set, vendor_set, product_set, + gpio_drive_set, gpio_slew_set, gpio_hysteresis_set, gpio_power_set; + +bool data_receive, has_dt, receive_dt; + +char **data; +char *current_atom; //rearranged to write out +unsigned int data_len, custom_ct, total_size, data_cap, custom_cap; + + +int write_binary(char* out) { + FILE *fp; + int i, offset; + short crc; + + fp=fopen(out, "wb"); + if (!fp) { + printf("Error writing file %s\n", out); + return -1; + } + + fwrite(&header, sizeof(header), 1, fp); + + + current_atom = (char *) malloc(vinf_atom.dlen+ATOM_SIZE-CRC_SIZE); + offset = 0; + //vendor information atom first part + memcpy(current_atom, &vinf_atom, ATOM_SIZE-CRC_SIZE); + offset += ATOM_SIZE-2; + //data first part + memcpy(current_atom+offset, vinf_atom.data, VENDOR_SIZE); + offset += VENDOR_SIZE; + //data strings + memcpy(current_atom+offset, vinf->vstr, vinf->vslen); + offset += vinf->vslen; + memcpy(current_atom+offset, vinf->pstr, vinf->pslen); + offset += vinf->pslen; + //vinf last part + crc = getcrc(current_atom, offset); + memcpy(current_atom+offset, &crc, CRC_SIZE); + offset += CRC_SIZE; + + fwrite(current_atom, offset, 1, fp); + free(current_atom); + + current_atom = (char *) malloc(gpio_atom.dlen+ATOM_SIZE-CRC_SIZE); + offset = 0; + //GPIO map first part + memcpy(current_atom, &gpio_atom, ATOM_SIZE-CRC_SIZE); + offset += ATOM_SIZE-CRC_SIZE; + //GPIO data + memcpy(current_atom+offset, gpiomap, GPIO_SIZE); + offset += GPIO_SIZE; + //GPIO map last part + crc = getcrc(current_atom, offset); + memcpy(current_atom+offset, &crc, CRC_SIZE); + offset += CRC_SIZE; + + fwrite(current_atom, offset, 1, fp); + free(current_atom); + + if (has_dt) { + printf("Writing out DT...\n"); + current_atom = (char *) malloc(dt_atom.dlen+ATOM_SIZE-CRC_SIZE); + offset = 0; + + memcpy(current_atom, &dt_atom, ATOM_SIZE-CRC_SIZE); + offset += ATOM_SIZE-CRC_SIZE; + + memcpy(current_atom+offset, dt_atom.data, dt_atom.dlen-CRC_SIZE); + offset += dt_atom.dlen-CRC_SIZE; + + crc = getcrc(current_atom, offset); + memcpy(current_atom+offset, &crc, CRC_SIZE); + offset += CRC_SIZE; + + fwrite(current_atom, offset, 1, fp); + free(current_atom); + } + + for (i = 0; iserial_4, + &high1, &vinf->serial_3, &high2, &vinf->serial_2, &vinf->serial_1); + + vinf->serial_3 |= high1<<16; + vinf->serial_2 |= high2<<16; + + if ((vinf->serial_4==0) && (vinf->serial_3==0) && (vinf->serial_2==0) && (vinf->serial_1==0)) { + //read 128 random bits from /dev/urandom + int random_file = open("/dev/urandom", O_RDONLY); + ssize_t result = read(random_file, &vinf->serial_1, 16); + close(random_file); + if (result <= 0) printf("Unable to read from /dev/urandom to set up UUID"); + else { + //put in the version + vinf->serial_3 = (vinf->serial_3 & 0xffff0fff) | 0x00004000; + + //put in the variant + vinf->serial_2 = (vinf->serial_2 & 0x3fffffff) | 0x80000000; + + printf("UUID=%08x-%04x-%04x-%04x-%04x%08x\n", vinf->serial_4, vinf->serial_3>>16, vinf->serial_3 & 0xffff, vinf->serial_2>>16, vinf->serial_2 & 0xffff, vinf->serial_1); + } + + } + + } else if (strcmp(cmd, "product_id")==0) { + product_id_set = true; //required field + sscanf(c, "%100s %hx", cmd, &vinf->pid); + + } else if (strcmp(cmd, "product_ver")==0) { + product_ver_set = true; //required field + sscanf(c, "%100s %hx", cmd, &vinf->pver); + + } else if (strcmp(cmd, "vendor")==0) { + vendor_set = true; //required field + + vinf->vstr = (char*) malloc (256); + sscanf(c, "%100s \"%255[^\"]\"", cmd, vinf->vstr); + + total_size-=vinf->vslen; + vinf_atom.dlen-=vinf->vslen; + + vinf->vslen = strlen(vinf->vstr); + + total_size+=vinf->vslen; + vinf_atom.dlen+=vinf->vslen; + + } else if (strcmp(cmd, "product")==0) { + product_set = true; //required field + + vinf->pstr = (char*) malloc (256); + sscanf(c, "%100s \"%255[^\"]\"", cmd, vinf->pstr); + + total_size-=vinf->pslen; + vinf_atom.dlen-=vinf->pslen; + + vinf->pslen = strlen(vinf->pstr); + + total_size+=vinf->pslen; + vinf_atom.dlen+=vinf->pslen; + } + + /* GPIO map related part */ + else if (strcmp(cmd, "gpio_drive")==0) { + gpio_drive_set = true; //required field + + sscanf(c, "%100s %1x", cmd, &val); + if (val>8 || val<0) printf("Warning: gpio_drive property in invalid region, using default value instead\n"); + else gpiomap->flags |= val; + + + } else if (strcmp(cmd, "gpio_slew")==0) { + gpio_slew_set = true; //required field + + sscanf(c, "%100s %1x", cmd, &val); + + if (val>2 || val<0) printf("Warning: gpio_slew property in invalid region, using default value instead\n"); + else gpiomap->flags |= val<<4; + + } else if (strcmp(cmd, "gpio_hysteresis")==0) { + gpio_hysteresis_set = true; //required field + + sscanf(c, "%100s %1x", cmd, &val); + + if (val>2 || val<0) printf("Warning: gpio_hysteresis property in invalid region, using default value instead\n"); + else gpiomap->flags |= val<<6; + + } else if (strcmp(cmd, "back_power")==0) { + gpio_power_set = true; //required field + + sscanf(c, "%100s %1x", cmd, &val); + + if (val>2 || val<0) printf("Warning: back_power property in invalid region, using default value instead\n"); + else gpiomap->power = val; + + } else if (strcmp(cmd, "setgpio")==0) { + fn = (char*) malloc (101); + pull = (char*) malloc (101); + + sscanf(c, "%100s %d %100s %100s", cmd, &val, fn, pull); + + if (val=GPIO_COUNT) printf("Error: GPIO number out of bounds\n"); + else { + valid = true; + pin = 0; + + if (strcmp(fn, "INPUT")==0) { + //no action + } else if (strcmp(fn, "OUTPUT")==0) { + pin |= 1; + } else if (strcmp(fn, "ALT0")==0) { + pin |= 4; + } else if (strcmp(fn, "ALT1")==0) { + pin |= 5; + } else if (strcmp(fn, "ALT2")==0) { + pin |= 6; + } else if (strcmp(fn, "ALT3")==0) { + pin |= 7; + } else if (strcmp(fn, "ALT4")==0) { + pin |= 3; + } else if (strcmp(fn, "ALT5")==0) { + pin |= 2; + } else { + printf("Error at setgpio: function type not recognised\n"); + valid=false; + } + + if (strcmp(pull, "DEFAULT")==0) { + //no action + } else if (strcmp(pull, "UP")==0) { + pin |= 1<<5; + } else if (strcmp(pull, "DOWN")==0) { + pin |= 2<<5; + } else if (strcmp(pull, "NONE")==0) { + pin |= 3<<5; + } else { + printf("Error at setgpio: pull type not recognised\n"); + valid=false; + } + + pin |= 1<<7; //board uses this pin + + if (valid) gpiomap->pins[val] = pin; + } + } + + /* DT atom related part */ + else if (strcmp(cmd, "dt_blob")==0) { + finish_data(); + + has_dt = true; + c+=strlen("dt_blob"); + + receive_dt=true; + data_receive=true; + + data_len = 0; + data_cap = 4; + data = &dt_atom.data; + *data = (char *) malloc(data_cap); + + parse_data(c); + continue_data = true; + + } + + /* Custom data related part */ + else if (strcmp(cmd, "custom_data")==0) { + finish_data(); + + c+=strlen("custom_data"); + + if (custom_cap == custom_ct) { + custom_cap *= 2; + custom_atom = (struct atom_t*) realloc(custom_atom, custom_cap * sizeof(struct atom_t)); + } + + receive_dt=false; + data_receive=true; + + data_len = 0; + data_cap = 4; + data = &custom_atom[custom_ct].data; + *data = (char *) malloc(data_cap); + + parse_data(c); + continue_data = true; + + } else if (strcmp(cmd, "end") ==0) { + //close last data atom + continue_data=false; + } + /* Incoming data */ + else if (data_receive) { + parse_data(c); + continue_data = true; + } + + + if (!continue_data) finish_data(); + +} + +int read_text(char* in) { + FILE * fp; + char * line = NULL; + char * c = NULL; + size_t len = 0; + ssize_t read; + char *comment = NULL; + int atomct = 2; + int linect = 0; + char * command = (char*) malloc (101); + int i; + + has_dt = false; + + printf("Opening file %s for read\n", in); + + fp = fopen(in, "r"); + if (fp == NULL) { + printf("Error opening input file\n"); + return -1; + } + + //allocating memory and setting up required atoms + custom_cap = 1; + custom_atom = (struct atom_t*) malloc(sizeof(struct atom_t) * custom_cap); + + total_size=ATOM_SIZE*2+HEADER_SIZE+VENDOR_SIZE+GPIO_SIZE; + + vinf_atom.type = ATOM_VENDOR_TYPE; + vinf_atom.count = ATOM_VENDOR_NUM; + vinf = (struct vendor_info_d *) calloc(1, sizeof(struct vendor_info_d)); + vinf_atom.data = (char *)vinf; + vinf_atom.dlen = VENDOR_SIZE + CRC_SIZE; + + gpio_atom.type = ATOM_GPIO_TYPE; + gpio_atom.count = ATOM_GPIO_NUM; + gpiomap = (struct gpio_map_d *) calloc(1, sizeof(struct gpio_map_d)); + gpio_atom.data = (char *)gpiomap; + gpio_atom.dlen = GPIO_SIZE + CRC_SIZE; + + while ((read = getline(&line, &len, fp)) != -1) { + linect++; + c = line; + + for (i=0; i3) { + if (strcmp(argv[3], "-c")==0) { + custom_o=4; + } else { + //DT file specified + if (dt_atom.dlen) total_size-=(ATOM_SIZE +dt_atom.dlen - CRC_SIZE); + ret = read_dt(argv[3]); + if (ret) { + printf("Error reading DT file, aborting\n"); + return 0; + } + } + } + + if (argc>4 && strcmp(argv[4], "-c")==0) custom_o = 5; + + if (custom_o) + for (i = custom_o; i + +/* Atom types */ +#define ATOM_INVALID_TYPE 0x0000 +#define ATOM_VENDOR_TYPE 0x0001 +#define ATOM_GPIO_TYPE 0x0002 +#define ATOM_DT_TYPE 0x0003 +#define ATOM_CUSTOM_TYPE 0x0004 +#define ATOM_HINVALID_TYPE 0xffff + +#define ATOM_VENDOR_NUM 0x0000 +#define ATOM_GPIO_NUM 0x0001 +#define ATOM_DT_NUM 0x0002 + +//minimal sizes of data structures +#define HEADER_SIZE 12 +#define ATOM_SIZE 10 +#define VENDOR_SIZE 22 +#define GPIO_SIZE 30 +#define CRC_SIZE 2 + +#define GPIO_MIN 2 +#define GPIO_COUNT 28 + +#define FORMAT_VERSION 0x01 + +#define CRC16 0x8005 + +/* EEPROM header structure */ +struct header_t { + uint32_t signature; + unsigned char ver; + unsigned char res; + uint16_t numatoms; + uint32_t eeplen; +}; + +/* Atom structure */ +struct atom_t { + uint16_t type; + uint16_t count; + uint32_t dlen; + char* data; + uint16_t crc16; +}; + +/* Vendor info atom data */ +struct vendor_info_d { + uint32_t serial_1; //least significant + uint32_t serial_2; + uint32_t serial_3; + uint32_t serial_4; //most significant + uint16_t pid; + uint16_t pver; + unsigned char vslen; + unsigned char pslen; + char* vstr; + char* pstr; +}; + +/* GPIO map atom data */ +struct gpio_map_d { + unsigned char flags; + unsigned char power; + unsigned char pins[GPIO_COUNT]; +}; + + +uint16_t getcrc(char* data, unsigned int size) { + + uint16_t out = 0; + int bits_read = 0, bit_flag; + + /* Sanity check: */ + if((data == NULL) || size==0) + return 0; + + while(size > 0) + { + bit_flag = out >> 15; + + /* Get next bit: */ + out <<= 1; + out |= (*data >> bits_read) & 1; // item a) work from the least significant bits + + /* Increment bit counter: */ + bits_read++; + if(bits_read > 7) + { + bits_read = 0; + data++; + size--; + } + + /* Cycle check: */ + if(bit_flag) + out ^= CRC16; + + } + + // item b) "push out" the last 16 bits + int i; + for (i = 0; i < 16; ++i) { + bit_flag = out >> 15; + out <<= 1; + if(bit_flag) + out ^= CRC16; + } + + // item c) reverse the bits + uint16_t crc = 0; + i = 0x8000; + int j = 0x0001; + for (; i != 0; i >>=1, j <<= 1) { + if (i & out) crc |= j; + } + + return crc; +} diff --git a/gfortran/compile_gfortran b/gfortran/compile_gfortran new file mode 100644 index 0000000..5f7c46c --- /dev/null +++ b/gfortran/compile_gfortran @@ -0,0 +1,16 @@ +tce-load -i mpc-dev texinfo gperf isl-dev + +cd gcc-10.2.0 + +mkdir ../gcc-build +cd ../gcc-build + +CC="gcc -Os -pipe" CXX="g++ -Os -pipe" ../gcc-10.2.0/configure --libdir=/usr/lib --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-c99 --enable-long-long --enable-clocale=gnu --enable-languages=c,c++,fortran,go --disable-multilib --disable-libstdcxx-pch --enable-cloog-backend=isl --with-isl=/usr --with-system-zlib --enable-frame-pointer --disable-bootstrap --enable-lto --with-pkgversion=piCore --with-arch=armv6zk --with-tune=arm1176jzf-s --with-fpu=vfp --with-float=hard --with-gxx-include-dir=/usr/include/c++/10.2.0 + +find . -name Makefile -type f -exec sed -i 's/-g -O2//g' {} \; +find . -name Makefile -type f -exec sed -i 's/-O2 -g//g' {} \; +find . -name config.status -type f -exec sed -i 's/-g -O2//g' {} \; + +time make +sudo make install + diff --git a/gfortran/gfortran.build b/gfortran/gfortran.build new file mode 100644 index 0000000..fad134d --- /dev/null +++ b/gfortran/gfortran.build @@ -0,0 +1,91 @@ +#!/bin/sh +# +###################################################### +# Build script for RPI # +# # +# See .info for details # +###################################################### + +###################################################### +# Configure extension creation parameters # +###################################################### + +EXTNAM=gfortran +TMPDIR=/mnt/mmcblk0p2/tinypilot/gfortran/tmp + +###################################################### +# Prepare extension creation # +###################################################### + +INITIALDIR=$PWD + +###################################################### +# Compile extension # +###################################################### + +# Export variables needed for compilation +# Compile + +cd gcc-build + +mkdir -p $TMPDIR +make install DESTDIR=$TMPDIR + +find $TMPDIR/ -type d | xargs chmod -v 755; + +# Strip executables + +find $TMPDIR | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded + +################################################### +# Create base extension in temp dir # +################################################### + +mkdir -p $TMPDIR-bin $TMPDIR-lib +mkdir -p $TMPDIR-bin/usr/local/libexec/gcc/armv7l-unknown-linux-gnueabihf/10.2.0/ +cp -a $TMPDIR/usr/local/libexec/gcc/armv7l-unknown-linux-gnueabihf/10.2.0/f951 $TMPDIR-bin/usr/local/libexec/gcc/armv7l-unknown-linux-gnueabihf/10.2.0/ +cp -a $TMPDIR/usr/local/libexec/gcc/armv7l-unknown-linux-gnueabihf/10.2.0/liblto_plugin.* $TMPDIR-bin/usr/local/libexec/gcc/armv7l-unknown-linux-gnueabihf/10.2.0/ +mkdir -p $TMPDIR-bin/usr/lib/gcc/armv7l-unknown-linux-gnueabihf/10.2.0/ +cp -a $TMPDIR/usr/lib/gcc/armv7l-unknown-linux-gnueabihf/10.2.0/finclude $TMPDIR-bin/usr/lib/gcc/armv7l-unknown-linux-gnueabihf/10.2.0/ +cp -a $TMPDIR/usr/lib/gcc/armv7l-unknown-linux-gnueabihf/10.2.0/crt*.o $TMPDIR-bin/usr/lib/gcc/armv7l-unknown-linux-gnueabihf/10.2.0/ +cp -a $TMPDIR/usr/lib/gcc/armv7l-unknown-linux-gnueabihf/10.2.0/libgcc*.a $TMPDIR-bin/usr/lib/gcc/armv7l-unknown-linux-gnueabihf/10.2.0/ +mkdir -p $TMPDIR-bin/usr/lib/ +cp -a $TMPDIR/usr/lib/libgfortran.a $TMPDIR-bin/usr/lib/ +cp -a $TMPDIR/usr/lib/libgfortran.la $TMPDIR-bin/usr/lib/ +cp -a $TMPDIR/usr/lib/libgfortran.spec $TMPDIR-bin/usr/lib/ +mkdir -p $TMPDIR-bin/usr/local/bin/ +cp -a $TMPDIR/usr/local/bin/gfortran $TMPDIR-bin/usr/local/bin +cp -a $TMPDIR/usr/local/bin/armv7l-unknown-linux-gnueabihf-gfortran $TMPDIR-bin/usr/local/bin +mkdir -p $TMPDIR-lib/usr/lib/ +cp -a $TMPDIR/usr/lib/libgfortran.so $TMPDIR-lib/usr/lib/ +cp -a $TMPDIR/usr/lib/libgfortran.so.5 $TMPDIR-lib/usr/lib/ +cp -a $TMPDIR/usr/lib/libgfortran.so.5.0.0 $TMPDIR-lib/usr/lib/ + +find $TMPDIR-bin/ -type d | xargs chmod -v 755; +find $TMPDIR-lib/ -type d | xargs chmod -v 755; + +cd $TMPDIR-bin +cd .. +mksquashfs $TMPDIR-bin $EXTNAM.tcz +cd $TMPDIR-bin +find usr -not -type d > $EXTNAM.tcz.list +mv ../$EXTNAM.tcz* . + +# Create md5 file + +md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt + +sudo cp -v $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional + +cd $TMPDIR-lib +cd .. +mksquashfs $TMPDIR-lib $EXTNAM-lib.tcz +cd $TMPDIR-lib +find usr -not -type d > $EXTNAM-lib.tcz.list +mv ../$EXTNAM-lib.tcz* . + +# Create md5 file + +md5sum $EXTNAM-lib.tcz > $EXTNAM-lib.tcz.md5.txt + +sudo cp -v $EXTNAM-lib.tcz* /mnt/mmcblk0p2/tce/optional diff --git a/gpsd/gpsd.build b/gpsd/gpsd.build index 4aae5af..4fddacc 100644 --- a/gpsd/gpsd.build +++ b/gpsd/gpsd.build @@ -13,7 +13,7 @@ PYTHON=python`cat /opt/python` # Configure it -WRKDIR=gpsd-3.20 +WRKDIR=gpsd-3.23.1 SRCNAM=$WRKDIR.tar.xz EXTNAM=gpsd TMPDIR=/tmp @@ -50,6 +50,7 @@ export CFLAGS="-Os -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp" export CXXFLAGS="-Os -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp" cd $WRKDIR +patch -p1 < ../gpsd.patch # Compile # Install in base temp dir diff --git a/gpsd/gpsd.hotplug.wrapper b/gpsd/gpsd.hotplug.wrapper new file mode 100755 index 0000000..bd6b7ae --- /dev/null +++ b/gpsd/gpsd.hotplug.wrapper @@ -0,0 +1,6 @@ +#!/bin/sh +#echo "hotplug $ACTION $DEVNAME" > /tmp/wrapperlog +if [ "$ACTION" = "add" ]; then + stty -F $DEVNAME 4800 # set to 4800 baud! this is default for gps +fi +GPSD_SOCKET=/tmp/gpsd.sock /usr/local/sbin/gpsdctl $ACTION $DEVNAME diff --git a/gpsd/gpsd.patch b/gpsd/gpsd.patch new file mode 100644 index 0000000..f480020 --- /dev/null +++ b/gpsd/gpsd.patch @@ -0,0 +1,31 @@ +--- gpsd-3.23.1.orig/SConscript ++++ gpsd-3.23.1/SConscript +@@ -347,7 +347,7 @@ + # Build control + ("coveraging", False, "build with code coveraging enabled"), + ("debug", False, "add debug information to build, unoptimized"), +- ("debug_opt", False, "add debug information to build, optimized"), ++ ("debug_opt", True, "add debug information to build, optimized"), + ("gpsdclients", True, "gspd client programs"), + ("gpsd", True, "gpsd itself"), + ("implicit_link", imloads, "implicit linkage is supported in shared libs"), +@@ -388,7 +388,7 @@ + rundir = "/var/run" + + nonboolopts = ( +- ("gpsd_group", def_group, "privilege revocation group"), ++ ("gpsd_group", "staff", "privilege revocation group"), + ("gpsd_user", "nobody", "privilege revocation user",), + ("manbuild", "auto", + "build help in man and HTML formats. No/Auto/Yes."), +--- gpsd-3.23.1.orig/gpsd/gpsd.c ++++ gpsd-3.23.1/gpsd/gpsd.c +@@ -98,7 +98,7 @@ + #define COMMAND_TIMEOUT 60*15 + #define NOREAD_TIMEOUT 60*3 + #define RELEASE_TIMEOUT 60 +-#define DEVICE_REAWAKE 0.01 ++#define DEVICE_REAWAKE 0.1 + #define DEVICE_RECONNECT 2 + + #define QLEN 5 diff --git a/modules/5.10.77-piCore-v7/gpio-ir-recv.ko b/modules/5.10.77-piCore-v7/gpio-ir-recv.ko new file mode 100644 index 0000000..f07ab1f Binary files /dev/null and b/modules/5.10.77-piCore-v7/gpio-ir-recv.ko differ diff --git a/modules/5.10.77-piCore-v7/ir-rc6-decoder.ko b/modules/5.10.77-piCore-v7/ir-rc6-decoder.ko new file mode 100644 index 0000000..89359f1 Binary files /dev/null and b/modules/5.10.77-piCore-v7/ir-rc6-decoder.ko differ diff --git a/modules/5.10.77-piCore-v7_modules.tar.xz b/modules/5.10.77-piCore-v7_modules.tar.xz new file mode 100644 index 0000000..c67f573 Binary files /dev/null and b/modules/5.10.77-piCore-v7_modules.tar.xz differ diff --git a/modules/5.10.77-piCore-v7l/gpio-ir-recv.ko b/modules/5.10.77-piCore-v7l/gpio-ir-recv.ko new file mode 100644 index 0000000..6d286db Binary files /dev/null and b/modules/5.10.77-piCore-v7l/gpio-ir-recv.ko differ diff --git a/modules/5.10.77-piCore-v7l/ir-rc6-decoder.ko b/modules/5.10.77-piCore-v7l/ir-rc6-decoder.ko new file mode 100644 index 0000000..58f1baa Binary files /dev/null and b/modules/5.10.77-piCore-v7l/ir-rc6-decoder.ko differ diff --git a/modules/5.10.77-piCore-v7l_modules.tar.xz b/modules/5.10.77-piCore-v7l_modules.tar.xz new file mode 100644 index 0000000..b90078f Binary files /dev/null and b/modules/5.10.77-piCore-v7l_modules.tar.xz differ diff --git a/modules/5.10.77-piCore/gpio-ir-recv.ko b/modules/5.10.77-piCore/gpio-ir-recv.ko new file mode 100644 index 0000000..e4cc4fb Binary files /dev/null and b/modules/5.10.77-piCore/gpio-ir-recv.ko differ diff --git a/modules/5.10.77-piCore/ir-rc6-decoder.ko b/modules/5.10.77-piCore/ir-rc6-decoder.ko new file mode 100644 index 0000000..7e8f1a0 Binary files /dev/null and b/modules/5.10.77-piCore/ir-rc6-decoder.ko differ diff --git a/modules/5.10.77-piCore_modules.tar.xz b/modules/5.10.77-piCore_modules.tar.xz new file mode 100644 index 0000000..59f9c54 Binary files /dev/null and b/modules/5.10.77-piCore_modules.tar.xz differ diff --git a/modules/copy_modules.sh b/modules/copy_modules.sh deleted file mode 100755 index 100a1c0..0000000 --- a/modules/copy_modules.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -KERNEL=4.9.22 - -cp -v lib/modules/$KERNEL-piCore/kernel/drivers/media/rc/rc-core.ko modules -cp -v lib/modules/$KERNEL-piCore/kernel/drivers/media/rc/lirc_dev.ko modules -cp -v lib/modules/$KERNEL-piCore/kernel/drivers/staging/media/lirc/lirc_rpi.ko modules - -cp -v lib/modules/$KERNEL-piCore-v7/kernel/drivers/media/rc/rc-core.ko v7_modules -cp -v lib/modules/$KERNEL-piCore-v7/kernel/drivers/media/rc/lirc_dev.ko v7_modules -cp -v lib/modules/$KERNEL-piCore-v7/kernel/drivers/staging/media/lirc/lirc_rpi.ko v7_modules diff --git a/mydata.tgz b/mydata.tgz index a32f2c0..690439c 100644 Binary files a/mydata.tgz and b/mydata.tgz differ diff --git a/portaudio/portaudio.build b/portaudio/portaudio.build index 40b8d99..90b7166 100644 --- a/portaudio/portaudio.build +++ b/portaudio/portaudio.build @@ -10,7 +10,7 @@ # Configure extension creation parameters # ###################################################### -SRCNAM=pa_stable_v190600_20161030.tgz +SRCNAM=pa_stable_v190700_20210406.tgz WRKDIR=portaudio EXTNAM=portaudio TMPDIR=/tmp/portaudio diff --git a/pypilot_dependencies/README b/pypilot_dependencies/README deleted file mode 100644 index 09cea7b..0000000 --- a/pypilot_dependencies/README +++ /dev/null @@ -1 +0,0 @@ -python3.6 get-pip.py --trusted-host pypi.org --trusted-host files.pythonhosted.org diff --git a/pypilot_dependencies/avrdude/avrdude.build b/pypilot_dependencies/avrdude/avrdude.build index bf4a75c..03fe675 100644 --- a/pypilot_dependencies/avrdude/avrdude.build +++ b/pypilot_dependencies/avrdude/avrdude.build @@ -11,7 +11,7 @@ ###################################################### EXTNAM=avrdude -WRKDIR=avrdude/avrdude +WRKDIR=avrdude TMPDIR=/tmp/$EXTNAM @@ -19,6 +19,8 @@ TMPDIR=/tmp/$EXTNAM # Prepare extension creation # ###################################################### +su tc -c "tce-load -i m4 libtool autoconf automake sed grep libelf-dev bison" + # Remove dirs and files left from previous creation rm -r -f $TMPDIR @@ -27,6 +29,8 @@ rm -r -f $TMPDIR mkdir -p $TMPDIR +tar xvf avrdude.tar.gz + ###################################################### # Compile extension # ###################################################### @@ -41,7 +45,8 @@ INITIALDIR=$PWD cd $WRKDIR # Compile -./configure +./bootstrap +./configure --enable-linuxspi make make DESTDIR=$TMPDIR install diff --git a/pypilot_dependencies/avrdude/avrdude.tar.gz b/pypilot_dependencies/avrdude/avrdude.tar.gz new file mode 100644 index 0000000..70db826 Binary files /dev/null and b/pypilot_dependencies/avrdude/avrdude.tar.gz differ diff --git a/pypilot_dependencies/blas/blas.build b/pypilot_dependencies/blas/blas.build index 4778b5f..e0b8ac7 100644 --- a/pypilot_dependencies/blas/blas.build +++ b/pypilot_dependencies/blas/blas.build @@ -10,8 +10,8 @@ # Configure extension creation parameters # ###################################################### -SRCNAM=blas-3.5.0.tar.gz -WRKDIR=BLAS-3.5.0 +SRCNAM=blas-3.10.0.tgz +WRKDIR=BLAS-3.10.0 EXTNAM=blas TMPDIR=/tmp/blas @@ -50,7 +50,7 @@ make # Install in base temp dir mkdir -p $TMPDIR/usr/lib -cp blas*.a $TMPDIR/usr/lib/libblas.a +cp blas_LINUX.a $TMPDIR/usr/lib/libblas.a # Delete compilation work directory diff --git a/pypilot_dependencies/hat/RPi.GPIO-0.7.0.tar.gz b/pypilot_dependencies/hat/RPi.GPIO-0.7.0.tar.gz new file mode 100644 index 0000000..dbb5364 Binary files /dev/null and b/pypilot_dependencies/hat/RPi.GPIO-0.7.0.tar.gz differ diff --git a/pypilot_dependencies/hat/RPi.GPIO.build b/pypilot_dependencies/hat/RPi.GPIO.build index f7dafd5..7d01eac 100644 --- a/pypilot_dependencies/hat/RPi.GPIO.build +++ b/pypilot_dependencies/hat/RPi.GPIO.build @@ -12,7 +12,7 @@ # Configure extension creation parameters # ###################################################### -PYTHON=`cat /opt/python` +PYTHON=python`cat /opt/python` WRKDIR=RPi.GPIO-0.7.0 @@ -54,6 +54,7 @@ tar -xf $SRCNAM # Configure it cd $WRKDIR +patch -p1 < ../RPi.GPIO.patch # Install in place diff --git a/pypilot_dependencies/hat/RPi.GPIO.patch b/pypilot_dependencies/hat/RPi.GPIO.patch new file mode 100644 index 0000000..f130b62 --- /dev/null +++ b/pypilot_dependencies/hat/RPi.GPIO.patch @@ -0,0 +1,139 @@ +--- RPi.GPIO-0.7.0.orig/source/common.c ++++ RPi.GPIO-0.7.0/source/common.c +@@ -31,6 +31,10 @@ + int setup_error = 0; + int module_setup = 0; + ++const int (*pin_to_gpio)[41]; ++int gpio_direction[54]; ++rpi_info rpiinfo; ++ + int check_gpio_priv(void) + { + // check module has been imported cleanly +--- RPi.GPIO-0.7.0.orig/source/common.h ++++ RPi.GPIO-0.7.0/source/common.h +@@ -30,14 +30,14 @@ + #define I2C 42 + #define PWM 43 + +-int gpio_mode; +-const int pin_to_gpio_rev1[41]; +-const int pin_to_gpio_rev2[41]; +-const int pin_to_gpio_rev3[41]; +-const int (*pin_to_gpio)[41]; +-int gpio_direction[54]; +-rpi_info rpiinfo; +-int setup_error; +-int module_setup; ++extern int gpio_mode; ++extern const int pin_to_gpio_rev1[41]; ++extern const int pin_to_gpio_rev2[41]; ++extern const int pin_to_gpio_rev3[41]; ++extern const int (*pin_to_gpio)[41]; ++extern int gpio_direction[54]; ++extern rpi_info rpiinfo; ++extern int setup_error; ++extern int module_setup; + int check_gpio_priv(void); + int get_gpio_number(int channel, unsigned int *gpio); +--- RPi.GPIO-0.7.0.orig/source/constants.c ++++ RPi.GPIO-0.7.0/source/constants.c +@@ -26,6 +26,24 @@ + #include "c_gpio.h" + #include "event_gpio.h" + ++PyObject *high; ++PyObject *low; ++PyObject *input; ++PyObject *output; ++PyObject *pwm; ++PyObject *serial; ++PyObject *i2c; ++PyObject *spi; ++PyObject *unknown; ++PyObject *board; ++PyObject *bcm; ++PyObject *pud_off; ++PyObject *pud_up; ++PyObject *pud_down; ++PyObject *rising_edge; ++PyObject *falling_edge; ++PyObject *both_edge; ++ + void define_constants(PyObject *module) + { + high = Py_BuildValue("i", HIGH); +--- RPi.GPIO-0.7.0.orig/source/constants.h ++++ RPi.GPIO-0.7.0/source/constants.h +@@ -23,22 +23,22 @@ + #define PY_PUD_CONST_OFFSET 20 + #define PY_EVENT_CONST_OFFSET 30 + +-PyObject *high; +-PyObject *low; +-PyObject *input; +-PyObject *output; +-PyObject *pwm; +-PyObject *serial; +-PyObject *i2c; +-PyObject *spi; +-PyObject *unknown; +-PyObject *board; +-PyObject *bcm; +-PyObject *pud_off; +-PyObject *pud_up; +-PyObject *pud_down; +-PyObject *rising_edge; +-PyObject *falling_edge; +-PyObject *both_edge; ++extern PyObject *high; ++extern PyObject *low; ++extern PyObject *input; ++extern PyObject *output; ++extern PyObject *pwm; ++extern PyObject *serial; ++extern PyObject *i2c; ++extern PyObject *spi; ++extern PyObject *unknown; ++extern PyObject *board; ++extern PyObject *bcm; ++extern PyObject *pud_off; ++extern PyObject *pud_up; ++extern PyObject *pud_down; ++extern PyObject *rising_edge; ++extern PyObject *falling_edge; ++extern PyObject *both_edge; + + void define_constants(PyObject *module); +--- RPi.GPIO-0.7.0.orig/source/event_gpio.c ++++ RPi.GPIO-0.7.0/source/event_gpio.c +@@ -57,7 +57,7 @@ + }; + struct callback *callbacks = NULL; + +-pthread_t threads; ++static pthread_t threads; + int event_occurred[54] = { 0 }; + int thread_running = 0; + int epfd_thread = -1; +--- RPi.GPIO-0.7.0.orig/source/py_pwm.h ++++ RPi.GPIO-0.7.0/source/py_pwm.h +@@ -20,5 +20,5 @@ + SOFTWARE. + */ + +-PyTypeObject PWMType; ++extern PyTypeObject PWMType; + PyTypeObject *PWM_init_PWMType(void); +--- RPi.GPIO-0.7.0.orig/source/soft_pwm.c ++++ RPi.GPIO-0.7.0/source/soft_pwm.c +@@ -25,7 +25,7 @@ + #include + #include "c_gpio.h" + #include "soft_pwm.h" +-pthread_t threads; ++static pthread_t threads; + + struct pwm + { diff --git a/pypilot_dependencies/hat/python-PIL/python-PIL.build b/pypilot_dependencies/hat/python-PIL/python-Pillow.build similarity index 87% rename from pypilot_dependencies/hat/python-PIL/python-PIL.build rename to pypilot_dependencies/hat/python-PIL/python-Pillow.build index 5540671..604729f 100644 --- a/pypilot_dependencies/hat/python-PIL/python-PIL.build +++ b/pypilot_dependencies/hat/python-PIL/python-Pillow.build @@ -11,12 +11,11 @@ # Configure extension creation parameters # ###################################################### -PYNAM=PIL -NAM=Pillow-3.4.0 -#NAM=Pillow-7.2.0 +PYNAM=Pillow +NAM=Pillow PYTHON=python`cat /opt/python` -EXTNAM=$PYTHON-$PYNAM +EXTNAM=$PYTHON-$NAM TMPDIR=/tmp/$PYTHON-$NAM PYTDIR=/usr/local/lib/$PYTHON/site-packages @@ -28,6 +27,8 @@ INITIALDIR=$PWD # Remove dirs and files left from previous creation +sudo pip3.8 uninstall $PYNAM + # Create temporary directory mkdir -p $TMPDIR$PYTDIR @@ -38,14 +39,11 @@ mkdir -p $TMPDIR$PYTDIR # Install in place -#sudo pip3.6 install $PYNAM -tar zxvf $NAM*tar.gz -cd $NAM* -sudo $PYTHON setup.py install +sudo pip3.8 install $PYNAM # Move files to tmp dir -cp -rf $PYTDIR/$PYNAM $TMPDIR$PYTDIR +cp -rf $PYTDIR/PIL* $PYTDIR/$PYNAM-*-info $TMPDIR$PYTDIR # Delete *.pyc files @@ -74,7 +72,7 @@ mv -f ../$EXTNAM.tcz . md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt # copy extension files -sudo cp -v $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional +cp $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional # Cleanup temp directory diff --git a/pypilot_dependencies/hat/wiringPi.build b/pypilot_dependencies/hat/wiringPi.build index 17a0df4..963e913 100644 --- a/pypilot_dependencies/hat/wiringPi.build +++ b/pypilot_dependencies/hat/wiringPi.build @@ -52,12 +52,12 @@ tar -xf $SRCNAM cd $WRKDIR cd wiringPi -make DESTDIR=$TMPDIR install +make DESTDIR=$TMPDIR/usr install cd ../devLib -make DESTDIR=$TMPDIR install +make DESTDIR=$TMPDIR/usr install cd ../gpio -make DESTDIR=$TMPDIR install +make DESTDIR=$TMPDIR/usr install cd ../.. rm -r -f $WRKDIR diff --git a/pypilot_dependencies/hat/wiringPi.tar.gz b/pypilot_dependencies/hat/wiringPi.tar.gz new file mode 100644 index 0000000..e7cc4aa Binary files /dev/null and b/pypilot_dependencies/hat/wiringPi.tar.gz differ diff --git a/pypilot_dependencies/lapack/lapack.build b/pypilot_dependencies/lapack/lapack.build index 623e491..da28c04 100644 --- a/pypilot_dependencies/lapack/lapack.build +++ b/pypilot_dependencies/lapack/lapack.build @@ -10,8 +10,8 @@ # Configure extension creation parameters # ###################################################### -SRCNAM=lapack-3.1.1.tgz -WRKDIR=lapack-3.1.1 +SRCNAM=lapack-3.10.0.tar.gz +WRKDIR=lapack-3.10.0 EXTNAM=lapack TMPDIR=/tmp/lapack @@ -51,7 +51,7 @@ make # Install in base temp dir mkdir -p $TMPDIR/usr/lib -cp lapack*.a $TMPDIR/usr/lib/liblapack.a +cp liblapack*.a $TMPDIR/usr/lib/liblapack.a # Delete compilation work directory diff --git a/pypilot_dependencies/lirc/lirc-0.10.0.tar.bz2 b/pypilot_dependencies/lirc/lirc-0.10.0.tar.bz2 new file mode 100644 index 0000000..d3d6190 Binary files /dev/null and b/pypilot_dependencies/lirc/lirc-0.10.0.tar.bz2 differ diff --git a/pypilot_dependencies/lirc/lirc.build b/pypilot_dependencies/lirc/lirc.build index 84e1d02..596d48e 100644 --- a/pypilot_dependencies/lirc/lirc.build +++ b/pypilot_dependencies/lirc/lirc.build @@ -46,7 +46,7 @@ cd $WRKDIR # Compile tce-load -i bash automake autoconf libtool m4 -sudo ln -s /usr/local/bin/python3.6 /usr/local/bin/python3 +sudo ln -s /usr/local/bin/python3.8 /usr/local/bin/python3 ./autogen.sh ./configure diff --git a/pypilot_dependencies/python-RTIMULib/RTIMULib2.tar.gz b/pypilot_dependencies/python-RTIMULib/RTIMULib2.tar.gz new file mode 100644 index 0000000..d82727c Binary files /dev/null and b/pypilot_dependencies/python-RTIMULib/RTIMULib2.tar.gz differ diff --git a/pypilot_dependencies/python-RTIMULib/python-RTIMULib.build b/pypilot_dependencies/python-RTIMULib/python-RTIMULib.build old mode 100644 new mode 100755 diff --git a/pypilot_dependencies/python-numpy/python-numpy.build b/pypilot_dependencies/python-numpy/python-numpy.build index d1d81a5..e85d847 100644 --- a/pypilot_dependencies/python-numpy/python-numpy.build +++ b/pypilot_dependencies/python-numpy/python-numpy.build @@ -5,68 +5,46 @@ # # # See .info for details # # # -# February 13, 2013 # ###################################################### ###################################################### # Configure extension creation parameters # ###################################################### -WRKDIR=numpy-1.18.1 -SRCNAM=$WRKDIR.tar.gz -PYTHON=`cat /opt/python` -EXTNAM=$PYTHON-numpy -TMPDIR=/tmp/$PYTHON-numpy -PYTDIR=/usr/local/lib/$PYTHON/site-packages +PYNAM=numpy +NAM=numpy -wget -c https://github.com/numpy/numpy/releases/download/v1.18.1/numpy-1.18.1.tar.gz -#wget -c https://github.com/numpy/numpy/releases/download/v1.12.0rc2/numpy-1.12.0rc2.tar.gz +PYTHONVERSION=`cat /opt/python` +PYTHON="python"$PYTHONVERSION +EXTNAM=$PYTHON-$NAM +TMPDIR=/tmp/$PYTHON-$NAM +PYTDIR=/usr/local/lib/$PYTHON/site-packages ###################################################### # Prepare extension creation # ###################################################### +INITIALDIR=$PWD + # Remove dirs and files left from previous creation -rm -r -f $PYTDIR/$EXTNAM*.egg +#sudo pip3.8 uninstall Flask # Create temporary directory -mkdir -p $TMPDIR/$PYTDIR +mkdir -p $TMPDIR$PYTDIR ###################################################### # Compile extension # ###################################################### -INITIALDIR=$PWD - -# Export variables needed for compilation - -export CFLAGS="-Os -pipe" -export CXXFLAGS="-Os -pipe -fno-exceptions -fno-rtti" -export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig - -# Unpack source in current directory - -tar -xf $SRCNAM - -# Configure it - -cd $WRKDIR - # Install in place -sudo $PYTHON setup.py install - -# Delete compilation work directory - -cd .. -rm -rf $WRKDIR +sudo pip3.8 install $PYNAM # Move files to tmp dir - -mkdir -p $TMPDIR/$PYTDIR -cp -r $PYTDIR/numpy-*.egg $TMPDIR/$PYTDIR +mkdir -p $TMPDIR$PYTDIR +cp -rf $PYTDIR/$PYNAM-*-info $PYTDIR/$NAM $PYTDIR/$NAM*py $TMPDIR$PYTDIR # Delete *.pyc files @@ -76,10 +54,9 @@ find $TMPDIR/ -name *.pyc | xargs rm -r find $TMPDIR/ -type d | xargs chmod -v 755; -# Strip executables - find $TMPDIR | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded + ################################################### # Create base extension in temp dir # ################################################### @@ -89,13 +66,14 @@ cd .. mksquashfs $TMPDIR $EXTNAM.tcz cd $TMPDIR find usr -not -type d > $EXTNAM.tcz.list -mv ../$EXTNAM.tcz . +mv -f ../$EXTNAM.tcz . # Create md5 file md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt -cp -fv $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional +# copy extension files +cp $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional # Cleanup temp directory diff --git a/pypilot_dependencies/python-pylirc/python-lirc.build b/pypilot_dependencies/python-pylirc/python-lirc.build index 1faf82e..d5d4710 100644 --- a/pypilot_dependencies/python-pylirc/python-lirc.build +++ b/pypilot_dependencies/python-pylirc/python-lirc.build @@ -5,69 +5,46 @@ # # # See .info for details # # # -# February 13, 2013 # ###################################################### ###################################################### # Configure extension creation parameters # ###################################################### -WRKDIR=python-lirc-1.2.3 -SRCNAM=$WRKDIR.tar.gz -PYTHON=python`cat /opt/python` -EXTNAM=$PYTHON-pylirc -TMPDIR=/tmp/$PYTHON-pylirc -PYTDIR=/usr/local/lib/$PYTHON/site-packages - -#wget -c https://files.pythonhosted.org/packages/a9/e1/a19ed9cac5353ec07294be7b1aefc8f89985987b356e916e2c39b5b03d9a/pylirc2-0.1.tar.gz -wget -c https://files.pythonhosted.org/packages/20/37/5614ed0459439a96430e1aac479b6608b51e69ca0bd7d91277517d5895e9/python-lirc-1.2.3.tar.gz +PYNAM=lirc +NAM=lirc +PYTHONVERSION=`cat /opt/python` +PYTHON="python"$PYTHONVERSION +EXTNAM=$PYTHON-$NAM +TMPDIR=/tmp/$PYTHON-$NAM +PYTDIR=/usr/local/lib/$PYTHON/site-packages ###################################################### # Prepare extension creation # ###################################################### +INITIALDIR=$PWD + # Remove dirs and files left from previous creation -rm -r -f $PYTDIR/$EXTNAM*.egg +#sudo pip3.8 uninstall Flask # Create temporary directory -mkdir -p $TMPDIR/$PYTDIR +mkdir -p $TMPDIR$PYTDIR ###################################################### # Compile extension # ###################################################### -INITIALDIR=$PWD - -# Export variables needed for compilation - -export CFLAGS="-Os -pipe" -export CXXFLAGS="-Os -pipe -fno-exceptions -fno-rtti" -export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig - -# Unpack source in current directory - -tar -xf $SRCNAM - -# Configure it - -cd $WRKDIR - # Install in place -sudo $PYTHON setup.py install - -# Delete compilation work directory - -cd .. -rm -rf $WRKDIR +sudo pip3.8 install $PYNAM # Move files to tmp dir - -mkdir -p $TMPDIR/$PYTDIR -cp -rv $PYTDIR/pylirc* $TMPDIR/$PYTDIR +mkdir -p $TMPDIR$PYTDIR +cp -rf $PYTDIR/$PYNAM $PYTDIR/$PYNAM-setup $TMPDIR$PYTDIR # Delete *.pyc files @@ -77,10 +54,9 @@ find $TMPDIR/ -name *.pyc | xargs rm -r find $TMPDIR/ -type d | xargs chmod -v 755; -# Strip executables - find $TMPDIR | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded + ################################################### # Create base extension in temp dir # ################################################### @@ -90,13 +66,14 @@ cd .. mksquashfs $TMPDIR $EXTNAM.tcz cd $TMPDIR find usr -not -type d > $EXTNAM.tcz.list -mv ../$EXTNAM.tcz . +mv -f ../$EXTNAM.tcz . # Create md5 file md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt -cp -fv $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional +# copy extension files +cp $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional # Cleanup temp directory diff --git a/pypilot_dependencies/python-pyudev/python-pyudev.build b/pypilot_dependencies/python-pyudev/python-pyudev.build index 710be2c..0d8c2a1 100644 --- a/pypilot_dependencies/python-pyudev/python-pyudev.build +++ b/pypilot_dependencies/python-pyudev/python-pyudev.build @@ -5,67 +5,58 @@ # # # See .info for details # # # -# February 13, 2013 # ###################################################### ###################################################### # Configure extension creation parameters # ###################################################### -PYTHON=`cat /opt/python` +PYNAM=pyudev +NAM=pyudev -SRCNAM=pyudev-git160618.tar.gz -WRKDIR=pyudev -EXTNAM=$PYTHON-pyudev -TMPDIR=/tmp/$PYTHON-pyudev +PYTHONVERSION=`cat /opt/python` +PYTHON="python"$PYTHONVERSION +EXTNAM=$PYTHON-$NAM +TMPDIR=/tmp/$PYTHON-$NAM PYTDIR=/usr/local/lib/$PYTHON/site-packages ###################################################### # Prepare extension creation # ###################################################### +INITIALDIR=$PWD + # Remove dirs and files left from previous creation -rm -r -f $PYTDIR/$EXTNAM*.egg +#sudo pip3.8 uninstall Flask # Create temporary directory -mkdir -p $TMPDIR/$PYTDIR +mkdir -p $TMPDIR$PYTDIR ###################################################### # Compile extension # ###################################################### -INITIALDIR=$PWD - -# Export variables needed for compilation - -export CFLAGS="-Os -pipe" -export CXXFLAGS="-Os -pipe -fno-exceptions -fno-rtti" -export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig - -# Unpack source in current directory - -tar -xf $SRCNAM - -# Configure it - -cd $WRKDIR - # Install in place -sudo $PYTHON setup.py bdist -tar xvf dist/*tar.gz -C $TMPDIR +sudo pip3.8 install $PYNAM -# Delete compilation work directory +# Move files to tmp dir +mkdir -p $TMPDIR$PYTDIR +cp -rf $PYTDIR/$PYNAM-*-info $PYTDIR/$NAM $PYTDIR/$NAM*py $PYTDIR/$NAM*so $TMPDIR$PYTDIR -cd .. -rm -r -f $WRKDIR +# Delete *.pyc files + +find $TMPDIR/ -name *.pyc | xargs rm -r # Adjust directory access rigths find $TMPDIR/ -type d | xargs chmod -v 755; +find $TMPDIR | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded + + ################################################### # Create base extension in temp dir # ################################################### @@ -75,13 +66,14 @@ cd .. mksquashfs $TMPDIR $EXTNAM.tcz cd $TMPDIR find usr -not -type d > $EXTNAM.tcz.list -mv ../$EXTNAM.tcz . +mv -f ../$EXTNAM.tcz . # Create md5 file md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt -cp -fv $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional +# copy extension files +cp $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional # Cleanup temp directory diff --git a/pypilot_dependencies/python-scipy/python-scipy.build b/pypilot_dependencies/python-scipy/python-scipy.build index 95da79c..f496ed7 100644 --- a/pypilot_dependencies/python-scipy/python-scipy.build +++ b/pypilot_dependencies/python-scipy/python-scipy.build @@ -5,68 +5,47 @@ # # # See .info for details # # # -# February 13, 2013 # ###################################################### ###################################################### # Configure extension creation parameters # ###################################################### -SRCNAM=scipy-0.18.1.tar.gz -WRKDIR=scipy-0.18.1 +PYNAM=scipy +NAM=scipy + PYTHONVERSION=`cat /opt/python` PYTHON="python"$PYTHONVERSION -EXTNAM=$PYTHON-scipy -TMPDIR=/tmp/$PYTHON-scipy +EXTNAM=$PYTHON-$NAM +TMPDIR=/tmp/$PYTHON-$NAM PYTDIR=/usr/local/lib/$PYTHON/site-packages ###################################################### # Prepare extension creation # ###################################################### -# Create temporary directory - -mkdir -p $TMPDIR/$PYTDIR - -###################################################### -# Compile extension # -###################################################### - INITIALDIR=$PWD -# Export variables needed for compilation - -export CFLAGS="-Os -pipe" -export CXXFLAGS="-Os -pipe -fno-exceptions -fno-rtti" -export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig +# Remove dirs and files left from previous creation -if [ -e $PYTDIR/easy-install.pth ]; then - echo 'please remove the file:' - echo $PYTDIR/easy-install.pth -fi +#sudo pip3.8 uninstall Flask -# Unpack source in current directory - -tar -xf $SRCNAM +# Create temporary directory -# Configure it +mkdir -p $TMPDIR$PYTDIR -cd $WRKDIR +###################################################### +# Compile extension # +###################################################### # Install in place -sudo $PYTHON setup.py install - -# Delete compilation work directory - -cd .. -#rm -rf $WRKDIR +export TMPDIR=/mnt/mmcblk0p2/tmp +sudo -E pip3.8 install $PYNAM # Move files to tmp dir - -mkdir -p $TMPDIR/$PYTDIR -cp -r $PYTDIR/scipy* $TMPDIR/$PYTDIR -cp $PYTDIR/easy-install.pth $TMPDIR/$PYTDIR/scipy.pth +mkdir -p $TMPDIR$PYTDIR +cp -rf $PYTDIR/$PYNAM-*-info $PYTDIR/$NAM $PYTDIR/$NAM*py $TMPDIR$PYTDIR # Delete *.pyc files @@ -76,10 +55,9 @@ find $TMPDIR/ -name *.pyc | xargs rm -r find $TMPDIR/ -type d | xargs chmod -v 755; -# Strip executables - find $TMPDIR | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded + ################################################### # Create base extension in temp dir # ################################################### @@ -89,19 +67,17 @@ cd .. mksquashfs $TMPDIR $EXTNAM.tcz cd $TMPDIR find usr -not -type d > $EXTNAM.tcz.list -mv ../$EXTNAM.tcz . +mv -f ../$EXTNAM.tcz . # Create md5 file md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt -cp -fv $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional +# copy extension files +cp $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional # Cleanup temp directory rm -rf * cd $INITIALDIR - -sudo cp -fv $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional - diff --git a/pypilot_dependencies/python-serial.build b/pypilot_dependencies/python-serial.build index 869f750..541e135 100644 --- a/pypilot_dependencies/python-serial.build +++ b/pypilot_dependencies/python-serial.build @@ -39,7 +39,7 @@ mkdir -p $TMPDIR$PYTDIR # Install in place -sudo pip3.6 install $PYNAM +sudo pip3.8 install $PYNAM # Move files to tmp dir diff --git a/pypilot_dependencies/python-serial.patch b/pypilot_dependencies/python-serial.patch new file mode 100644 index 0000000..6565a67 --- /dev/null +++ b/pypilot_dependencies/python-serial.patch @@ -0,0 +1,11 @@ +--- /tmp/tcloop/python3.6-serial/usr/local/lib/python3.6/site-packages/serial/serialposix.py ++++ serialposix.py +@@ -287,7 +287,7 @@ + if not self._rtscts: + self._update_rts_state() + except IOError as e: +- if e.errno in (errno.EINVAL, errno.ENOTTY): ++ if e.errno in (errno.EINVAL, errno.ENOTTY, errno.EIO): + # ignore Invalid argument and Inappropriate ioctl + pass + else: diff --git a/pypilot_dependencies/python-spidev/python-spidev.build b/pypilot_dependencies/python-spidev/python-spidev.build index bb0a086..df8d4ff 100644 --- a/pypilot_dependencies/python-spidev/python-spidev.build +++ b/pypilot_dependencies/python-spidev/python-spidev.build @@ -5,67 +5,58 @@ # # # See .info for details # # # -# February 13, 2013 # ###################################################### ###################################################### # Configure extension creation parameters # ###################################################### -PYTHON=`cat /opt/python` +PYNAM=spidev +NAM=spidev -SRCNAM=spidev-3.4.tar.gz -WRKDIR=spidev-3.4 -EXTNAM=$PYTHON-spidev -TMPDIR=/tmp/$PYTHON-spidev +PYTHONVERSION=`cat /opt/python` +PYTHON="python"$PYTHONVERSION +EXTNAM=$PYTHON-$NAM +TMPDIR=/tmp/$PYTHON-$NAM PYTDIR=/usr/local/lib/$PYTHON/site-packages ###################################################### # Prepare extension creation # ###################################################### +INITIALDIR=$PWD + # Remove dirs and files left from previous creation -rm -r -f $PYTDIR/$EXTNAM*.egg +#sudo pip3.8 uninstall Flask # Create temporary directory -mkdir -p $TMPDIR/$PYTDIR +mkdir -p $TMPDIR$PYTDIR ###################################################### # Compile extension # ###################################################### -INITIALDIR=$PWD - -# Export variables needed for compilation - -export CFLAGS="-Os -pipe" -export CXXFLAGS="-Os -pipe -fno-exceptions -fno-rtti" -export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig - -# Unpack source in current directory - -tar -xf $SRCNAM - -# Configure it - -cd $WRKDIR - # Install in place -sudo $PYTHON setup.py bdist -tar xvf dist/*tar.gz -C $TMPDIR +sudo pip3.8 install $PYNAM -# Delete compilation work directory +# Move files to tmp dir +mkdir -p $TMPDIR$PYTDIR +cp -rf $PYTDIR/$PYNAM-*-info $PYTDIR/$NAM $PYTDIR/$NAM*py $PYTDIR/$NAM*so $TMPDIR$PYTDIR -cd .. -rm -r -f $WRKDIR +# Delete *.pyc files + +find $TMPDIR/ -name *.pyc | xargs rm -r # Adjust directory access rigths find $TMPDIR/ -type d | xargs chmod -v 755; +find $TMPDIR | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded + + ################################################### # Create base extension in temp dir # ################################################### @@ -75,13 +66,14 @@ cd .. mksquashfs $TMPDIR $EXTNAM.tcz cd $TMPDIR find usr -not -type d > $EXTNAM.tcz.list -mv ../$EXTNAM.tcz . +mv -f ../$EXTNAM.tcz . # Create md5 file md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt -cp -fv $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional +# copy extension files +cp $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional # Cleanup temp directory diff --git a/pypilot_dependencies/python-ujson/python-ujson.build b/pypilot_dependencies/python-ujson/python-ujson.build index 3ce8c50..2789d5a 100644 --- a/pypilot_dependencies/python-ujson/python-ujson.build +++ b/pypilot_dependencies/python-ujson/python-ujson.build @@ -12,11 +12,10 @@ ###################################################### PYNAM=ujson -NAM=ujson-3.0.0 -##NAM=ultrajson-d185144 +NAM=ujson PYTHON=python`cat /opt/python` -EXTNAM=$PYTHON-$PYNAM +EXTNAM=$PYTHON-$NAM TMPDIR=/tmp/$PYTHON-$NAM PYTDIR=/usr/local/lib/$PYTHON/site-packages @@ -27,10 +26,8 @@ PYTDIR=/usr/local/lib/$PYTHON/site-packages INITIALDIR=$PWD # Remove dirs and files left from previous creation -if [ -e $PYTDIR/easy-install.pth ]; then - echo 'please remove the file:' - echo $PYTDIR/easy-install.pth -fi + +sudo pip3.8 uninstall $PYNAM # Create temporary directory @@ -41,15 +38,12 @@ mkdir -p $TMPDIR$PYTDIR ###################################################### # Install in place -tar zxvf $NAM*tar.gz -cd $NAM* -sudo $PYTHON setup.py install +sudo pip3.8 install $PYNAM # Move files to tmp dir -mkdir -p $TMPDIR$PYTDIR -cp -rf $PYTDIR/ujson*egg/ujson*so $TMPDIR$PYTDIR +cp -rf $PYTDIR/$PYNAM-*-info $PYTDIR/$NAM $PYTDIR/$NAM*py $PYTDIR/$NAM*so $TMPDIR$PYTDIR # Delete *.pyc files diff --git a/pypilot_dependencies/signalk/python-certifi.build b/pypilot_dependencies/signalk/python-certifi.build index 1e131a1..298b87b 100644 --- a/pypilot_dependencies/signalk/python-certifi.build +++ b/pypilot_dependencies/signalk/python-certifi.build @@ -39,7 +39,7 @@ mkdir -p $TMPDIR$PYTDIR # Install in place -sudo -H pip3.6 --trusted-host pypi.org --trusted-host files.pythonhosted.org install $PYNAM +sudo -H pip3.8 --trusted-host pypi.org --trusted-host files.pythonhosted.org install $PYNAM # Move files to tmp dir diff --git a/pypilot_dependencies/signalk/python-chardet.build b/pypilot_dependencies/signalk/python-chardet.build index af75d36..6ace895 100644 --- a/pypilot_dependencies/signalk/python-chardet.build +++ b/pypilot_dependencies/signalk/python-chardet.build @@ -39,7 +39,7 @@ mkdir -p $TMPDIR$PYTDIR # Install in place -sudo -H pip3.6 --trusted-host pypi.org --trusted-host files.pythonhosted.org install $PYNAM +sudo -H pip3.8 --trusted-host pypi.org --trusted-host files.pythonhosted.org install $PYNAM # Move files to tmp dir diff --git a/pypilot_dependencies/signalk/python-idna.build b/pypilot_dependencies/signalk/python-idna.build index e32ce01..a87f218 100644 --- a/pypilot_dependencies/signalk/python-idna.build +++ b/pypilot_dependencies/signalk/python-idna.build @@ -39,7 +39,7 @@ mkdir -p $TMPDIR$PYTDIR # Install in place -sudo -H pip3.6 --trusted-host pypi.org --trusted-host files.pythonhosted.org install $PYNAM +sudo -H pip3.8 --trusted-host pypi.org --trusted-host files.pythonhosted.org install $PYNAM # Move files to tmp dir diff --git a/pypilot_dependencies/signalk/python-ifaddr.build b/pypilot_dependencies/signalk/python-ifaddr.build index d382c5b..0e64d0c 100644 --- a/pypilot_dependencies/signalk/python-ifaddr.build +++ b/pypilot_dependencies/signalk/python-ifaddr.build @@ -39,7 +39,7 @@ mkdir -p $TMPDIR$PYTDIR # Install in place -sudo pip3.6 --trusted-host pypi.org --trusted-host files.pythonhosted.org install $PYNAM +sudo pip3.8 --trusted-host pypi.org --trusted-host files.pythonhosted.org install $PYNAM # Move files to tmp dir diff --git a/pypilot_dependencies/signalk/python-requests.build b/pypilot_dependencies/signalk/python-requests.build index cc2f8c9..cd4e8e0 100644 --- a/pypilot_dependencies/signalk/python-requests.build +++ b/pypilot_dependencies/signalk/python-requests.build @@ -39,7 +39,7 @@ mkdir -p $TMPDIR$PYTDIR # Install in place -sudo -H pip3.6 --trusted-host pypi.org --trusted-host files.pythonhosted.org install $PYNAM +sudo -H pip3.8 --trusted-host pypi.org --trusted-host files.pythonhosted.org install $PYNAM # Move files to tmp dir diff --git a/pypilot_dependencies/signalk/python-urllib3.build b/pypilot_dependencies/signalk/python-urllib3.build index 190b6ae..6da5032 100644 --- a/pypilot_dependencies/signalk/python-urllib3.build +++ b/pypilot_dependencies/signalk/python-urllib3.build @@ -39,7 +39,7 @@ mkdir -p $TMPDIR$PYTDIR # Install in place -sudo -H pip3.6 --trusted-host pypi.org --trusted-host files.pythonhosted.org install $PYNAM +sudo -H pip3.8 --trusted-host pypi.org --trusted-host files.pythonhosted.org install $PYNAM # Move files to tmp dir diff --git a/pypilot_dependencies/signalk/python-websocket.build b/pypilot_dependencies/signalk/python-websocket.build index 8b4d5b3..26583fc 100644 --- a/pypilot_dependencies/signalk/python-websocket.build +++ b/pypilot_dependencies/signalk/python-websocket.build @@ -39,7 +39,7 @@ mkdir -p $TMPDIR$PYTDIR # Install in place -sudo -H pip3.6 --trusted-host pypi.org --trusted-host files.pythonhosted.org install $PYNAM +sudo -H pip3.8 --trusted-host pypi.org --trusted-host files.pythonhosted.org install $PYNAM # Move files to tmp dir diff --git a/pypilot_dependencies/signalk/python-zeroconf.build b/pypilot_dependencies/signalk/python-zeroconf.build index 0b8fb94..7bde710 100644 --- a/pypilot_dependencies/signalk/python-zeroconf.build +++ b/pypilot_dependencies/signalk/python-zeroconf.build @@ -39,7 +39,7 @@ mkdir -p $TMPDIR$PYTDIR # Install in place -sudo pip3.6 --trusted-host pypi.org --trusted-host files.pythonhosted.org install $PYNAM +sudo pip3.8 --trusted-host pypi.org --trusted-host files.pythonhosted.org install $PYNAM # Move files to tmp dir diff --git a/pypilot_dependencies/web/python-babel.build b/pypilot_dependencies/web/python-babel.build index fae241c..7dfa8f2 100644 --- a/pypilot_dependencies/web/python-babel.build +++ b/pypilot_dependencies/web/python-babel.build @@ -27,7 +27,9 @@ INITIALDIR=$PWD # Remove dirs and files left from previous creation -#sudo pip3.6 uninstall Flask +sudo pip3.8 uninstall $PYNAM +sudo pip3.8 uninstall pytz +sudo pip3.8 uninstall Flask_$PYNAM # Create temporary directory @@ -39,10 +41,12 @@ mkdir -p $TMPDIR$PYTDIR # Install in place -#sudo pip3.6 install $PYNAM -sudo pip3.6 install pytz*whl -sudo pip3.6 install $PYNAM*whl -sudo pip3.6 install Flask_$PYNAM*whl +#sudo pip3.8 install $PYNAM==2.9.1 +#sudo pip3.8 install pytz==2021.3 +#sudo pip3.8 install Flask_$PYNAM==2.0.0 +sudo pip3.8 install $PYNAM +sudo pip3.8 install pytz +sudo pip3.8 install Flask_$PYNAM # Move files to tmp dir @@ -60,7 +64,7 @@ find $TMPDIR/ -type d | xargs chmod -v 755; find $TMPDIR | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded -rm -r $TMPDIR/usr/local/lib/$PYTHON/site-packages/babel/locale-data +#rm -r $TMPDIR/usr/local/lib/$PYTHON/site-packages/babel/locale-data # NOTE # I made all locale-data dat files empty diff --git a/pypilot_dependencies/web/python-bidict.build b/pypilot_dependencies/web/python-bidict.build index 65ed0e0..4650993 100644 --- a/pypilot_dependencies/web/python-bidict.build +++ b/pypilot_dependencies/web/python-bidict.build @@ -27,7 +27,7 @@ INITIALDIR=$PWD # Remove dirs and files left from previous creation -#sudo pip3.6 uninstall Flask +sudo pip3.8 uninstall $PYNAM # Create temporary directory @@ -39,8 +39,9 @@ mkdir -p $TMPDIR$PYTDIR # Install in place -#sudo pip3.6 install $PYNAM -sudo pip3.6 install bidict-0.21.2-py2.py3-none-any.whl +sudo pip3.8 install $PYNAM +#sudo pip3.8 install $PYNAM==0.21.3 +#sudo pip3.8 install bidict-0.21.2-py2.py3-none-any.whl # Move files to tmp dir cp -rf $PYTDIR/$PYNAM-*-info $PYTDIR/$NAM $PYTDIR/$NAM*py $TMPDIR$PYTDIR diff --git a/pypilot_dependencies/web/python-click.build b/pypilot_dependencies/web/python-click.build index a0cdb25..cca6e64 100644 --- a/pypilot_dependencies/web/python-click.build +++ b/pypilot_dependencies/web/python-click.build @@ -14,7 +14,7 @@ PYNAM=click NAM=click -PYTHON=`cat /opt/$PYTHON` +PYTHON=python`cat /opt/python` EXTNAM=$PYTHON-$NAM TMPDIR=/tmp/$PYTHON-$NAM PYTDIR=/usr/local/lib/$PYTHON/site-packages @@ -27,7 +27,7 @@ INITIALDIR=$PWD # Remove dirs and files left from previous creation -#sudo pip3.6 uninstall Flask +sudo pip3.8 uninstall $PYNAM # Create temporary directory @@ -39,7 +39,8 @@ mkdir -p $TMPDIR$PYTDIR # Install in place -sudo pip3.63.6 install $PYNAM +#sudo pip3.8 install $PYNAM==7.1.2 +sudo pip3.8 install $PYNAM # Move files to tmp dir diff --git a/pypilot_dependencies/python-scipy/python-scipy2.build b/pypilot_dependencies/web/python-dataclasses.build similarity index 93% rename from pypilot_dependencies/python-scipy/python-scipy2.build rename to pypilot_dependencies/web/python-dataclasses.build index b31b30a..c3d6df7 100644 --- a/pypilot_dependencies/python-scipy/python-scipy2.build +++ b/pypilot_dependencies/web/python-dataclasses.build @@ -11,11 +11,10 @@ # Configure extension creation parameters # ###################################################### -PYNAM=scipy -NAM=scipy +PYNAM=dataclasses +NAM=dataclasses -PYTHONVERSION=`cat /opt/python` -PYTHON="python"$PYTHONVERSION +PYTHON=python`cat /opt/python` EXTNAM=$PYTHON-$NAM TMPDIR=/tmp/$PYTHON-$NAM PYTDIR=/usr/local/lib/$PYTHON/site-packages @@ -28,7 +27,7 @@ INITIALDIR=$PWD # Remove dirs and files left from previous creation -#sudo pip3.6 uninstall Flask +sudo pip3.8 uninstall $PYNAM # Create temporary directory @@ -40,7 +39,7 @@ mkdir -p $TMPDIR$PYTDIR # Install in place -sudo pip3.6 install $PYNAM +sudo pip3.8 install $PYNAM # Move files to tmp dir diff --git a/pypilot_dependencies/web/python-engineio.build b/pypilot_dependencies/web/python-engineio.build index d23ecbf..9fb4065 100644 --- a/pypilot_dependencies/web/python-engineio.build +++ b/pypilot_dependencies/web/python-engineio.build @@ -27,7 +27,7 @@ INITIALDIR=$PWD # Remove dirs and files left from previous creation -#sudo pip3.6 uninstall Flask +sudo pip3.8 uninstall $PYNAM # Create temporary directory @@ -39,8 +39,8 @@ mkdir -p $TMPDIR$PYTDIR # Install in place -#sudo pip3.6 install $PYNAM -sudo pip3.6 install $PYNAM* +sudo pip3.8 install $PYNAM +#sudo pip3.8 install $PYNAM* # Move files to tmp dir diff --git a/pypilot_dependencies/web/python-flask.build b/pypilot_dependencies/web/python-flask.build index 2e77df0..446e29c 100644 --- a/pypilot_dependencies/web/python-flask.build +++ b/pypilot_dependencies/web/python-flask.build @@ -14,7 +14,7 @@ PYNAM=Flask NAM=flask -PYTHON=`cat /opt/python` +PYTHON=python`cat /opt/python` EXTNAM=$PYTHON-$NAM TMPDIR=/tmp/$PYTHON-$NAM PYTDIR=/usr/local/lib/$PYTHON/site-packages @@ -27,7 +27,7 @@ INITIALDIR=$PWD # Remove dirs and files left from previous creation -#sudo pip3.6 uninstall Flask +sudo pip3.8 uninstall $PYNAM # Create temporary directory @@ -39,7 +39,8 @@ mkdir -p $TMPDIR$PYTDIR # Install in place -sudo pip3.6 install $PYNAM +#sudo pip3.8 install $PYNAM==1.1.2 +sudo pip3.8 install $PYNAM # Move files to tmp dir diff --git a/pypilot_dependencies/web/python-flask_socketio.build b/pypilot_dependencies/web/python-flask_socketio.build index 9b5511a..abe8901 100644 --- a/pypilot_dependencies/web/python-flask_socketio.build +++ b/pypilot_dependencies/web/python-flask_socketio.build @@ -27,7 +27,7 @@ INITIALDIR=$PWD # Remove dirs and files left from previous creation -#sudo pip3.6 uninstall Flask +sudo pip3.8 uninstall $PYNAM # Create temporary directory @@ -39,8 +39,8 @@ mkdir -p $TMPDIR$PYTDIR # Install in place -#sudo pip3.6 install $PYNAM -sudo pip3.6 install $PYNAM*whl +sudo pip3.8 install $PYNAM==5 +#sudo pip3.8 install $PYNAM*whl # Move files to tmp dir diff --git a/pypilot_dependencies/web/python-gevent.build b/pypilot_dependencies/web/python-gevent.build index 0b11290..af02080 100644 --- a/pypilot_dependencies/web/python-gevent.build +++ b/pypilot_dependencies/web/python-gevent.build @@ -14,7 +14,7 @@ PYNAM=gevent NAM=gevent -PYTHON=`cat /opt/python` +PYTHON=python`cat /opt/python` EXTNAM=$PYTHON-$NAM TMPDIR=/tmp/$PYTHON-$NAM PYTDIR=/usr/local/lib/$PYTHON/site-packages @@ -27,7 +27,7 @@ INITIALDIR=$PWD # Remove dirs and files left from previous creation -#sudo pip3.6 uninstall Flask +sudo pip3.8 uninstall $PYNAM # Create temporary directory @@ -39,7 +39,7 @@ mkdir -p $TMPDIR$PYTDIR # Install in place -sudo pip3.6 install $PYNAM +sudo pip3.8 install $PYNAM # Move files to tmp dir diff --git a/pypilot_dependencies/web/python-gevent_websocket.build b/pypilot_dependencies/web/python-gevent_websocket.build index 3316c37..3defa1a 100644 --- a/pypilot_dependencies/web/python-gevent_websocket.build +++ b/pypilot_dependencies/web/python-gevent_websocket.build @@ -14,7 +14,7 @@ PYNAM=gevent_websocket NAM=geventwebsocket -PYTHON=`cat /opt/python` +PYTHON=python`cat /opt/python` EXTNAM=$PYTHON-$NAM TMPDIR=/tmp/$PYTHON-$NAM PYTDIR=/usr/local/lib/$PYTHON/site-packages @@ -27,7 +27,7 @@ INITIALDIR=$PWD # Remove dirs and files left from previous creation -#sudo pip3.6 uninstall Flask +sudo pip3.8 uninstall $PYNAM # Create temporary directory @@ -39,7 +39,7 @@ mkdir -p $TMPDIR$PYTDIR # Install in place -sudo pip3.6 install $PYNAM +sudo pip3.8 install $PYNAM # Move files to tmp dir diff --git a/pypilot_dependencies/web/python-greenlet.build b/pypilot_dependencies/web/python-greenlet.build index da21f9b..72b5456 100644 --- a/pypilot_dependencies/web/python-greenlet.build +++ b/pypilot_dependencies/web/python-greenlet.build @@ -14,7 +14,7 @@ PYNAM=greenlet NAM=greenlet -PYTHON=`cat /opt/python` +PYTHON=python`cat /opt/python` EXTNAM=$PYTHON-$NAM TMPDIR=/tmp/$PYTHON-$NAM PYTDIR=/usr/local/lib/$PYTHON/site-packages @@ -27,7 +27,7 @@ INITIALDIR=$PWD # Remove dirs and files left from previous creation -#sudo pip3.6 uninstall Flask +sudo pip3.8 uninstall $PYNAM # Create temporary directory @@ -39,7 +39,7 @@ mkdir -p $TMPDIR$PYTDIR # Install in place -sudo pip3.6 install $PYNAM +sudo pip3.8 install $PYNAM # Move files to tmp dir diff --git a/pypilot_dependencies/web/python-itsdangerous.build b/pypilot_dependencies/web/python-itsdangerous.build index 7c237f9..a3bb867 100644 --- a/pypilot_dependencies/web/python-itsdangerous.build +++ b/pypilot_dependencies/web/python-itsdangerous.build @@ -14,7 +14,7 @@ PYNAM=itsdangerous NAM=itsdangerous -PYTHON=`cat /opt/python` +PYTHON=python`cat /opt/python` EXTNAM=$PYTHON-$NAM TMPDIR=/tmp/$PYTHON-$NAM PYTDIR=/usr/local/lib/$PYTHON/site-packages @@ -27,7 +27,7 @@ INITIALDIR=$PWD # Remove dirs and files left from previous creation -#sudo pip3.6 uninstall Flask +sudo pip3.8 uninstall $PYNAM # Create temporary directory @@ -39,7 +39,8 @@ mkdir -p $TMPDIR$PYTDIR # Install in place -sudo pip3.6 install $PYNAM +#sudo pip3.8 install $PYNAM==1.1.0 +sudo pip3.8 install $PYNAM # Move files to tmp dir diff --git a/pypilot_dependencies/web/python-jinja2.build b/pypilot_dependencies/web/python-jinja2.build index eb27a7c..7e358ad 100644 --- a/pypilot_dependencies/web/python-jinja2.build +++ b/pypilot_dependencies/web/python-jinja2.build @@ -14,7 +14,7 @@ PYNAM=Jinja2 NAM=jinja2 -PYTHON=`cat /opt/python` +PYTHON=python`cat /opt/python` EXTNAM=$PYTHON-$NAM TMPDIR=/tmp/$PYTHON-$NAM PYTDIR=/usr/local/lib/$PYTHON/site-packages @@ -27,7 +27,7 @@ INITIALDIR=$PWD # Remove dirs and files left from previous creation -#sudo pip3.6 uninstall Flask +sudo pip3.8 uninstall $PYNAM # Create temporary directory @@ -39,7 +39,7 @@ mkdir -p $TMPDIR$PYTDIR # Install in place -sudo pip3.6 install $PYNAM +sudo pip3.8 install $PYNAM # Move files to tmp dir diff --git a/pypilot_dependencies/web/python-markupsafe.build b/pypilot_dependencies/web/python-markupsafe.build index 51b69a9..da8b8b5 100644 --- a/pypilot_dependencies/web/python-markupsafe.build +++ b/pypilot_dependencies/web/python-markupsafe.build @@ -14,7 +14,7 @@ PYNAM=MarkupSafe NAM=markupsafe -PYTHON=`cat /opt/python` +PYTHON=python`cat /opt/python` EXTNAM=$PYTHON-$NAM TMPDIR=/tmp/$PYTHON-$NAM PYTDIR=/usr/local/lib/$PYTHON/site-packages @@ -27,7 +27,7 @@ INITIALDIR=$PWD # Remove dirs and files left from previous creation -#sudo pip3.6 uninstall Flask +sudo pip3.8 uninstall $PYNAM # Create temporary directory @@ -39,7 +39,7 @@ mkdir -p $TMPDIR$PYTDIR # Install in place -sudo pip3.6 install $PYNAM +sudo pip3.8 install $PYNAM # Move files to tmp dir diff --git a/pypilot_dependencies/web/python-six.build b/pypilot_dependencies/web/python-six.build index ab83c24..354ef08 100644 --- a/pypilot_dependencies/web/python-six.build +++ b/pypilot_dependencies/web/python-six.build @@ -14,7 +14,7 @@ PYNAM=six NAM=six -PYTHON=`cat /opt/python` +PYTHON=python`cat /opt/python` EXTNAM=$PYTHON-$NAM TMPDIR=/tmp/$PYTHON-$NAM PYTDIR=/usr/local/lib/$PYTHON/site-packages @@ -27,7 +27,7 @@ INITIALDIR=$PWD # Remove dirs and files left from previous creation -#sudo pip3.6 uninstall Flask +sudo pip3.8 uninstall $PYNAM # Create temporary directory @@ -39,7 +39,7 @@ mkdir -p $TMPDIR$PYTDIR # Install in place -sudo pip3.6 install $PYNAM +sudo pip3.8 install $PYNAM # Move files to tmp dir diff --git a/pypilot_dependencies/web/python-socketio.build b/pypilot_dependencies/web/python-socketio.build index 04163dd..6b023d9 100644 --- a/pypilot_dependencies/web/python-socketio.build +++ b/pypilot_dependencies/web/python-socketio.build @@ -11,7 +11,7 @@ # Configure extension creation parameters # ###################################################### -PYNAM=socketio +PYNAM=python_socketio NAM=socketio PYTHON=python`cat /opt/python` @@ -27,7 +27,7 @@ INITIALDIR=$PWD # Remove dirs and files left from previous creation -#sudo pip3.6 uninstall Flask +sudo pip3.8 uninstall $PYNAM # Create temporary directory @@ -39,8 +39,9 @@ mkdir -p $TMPDIR$PYTDIR # Install in place -#sudo pip3.6 install $PYNAM -sudo pip3.6 install python_socketio-5.3.0-py2.py3-none-any.whl +sudo pip3.8 install $PYNAM +#sudo pip3.8 install $PYNAM==5.4.1 +#sudo pip3.8 install python_socketio-5.3.0-py2.py3-none-any.whl # Move files to tmp dir diff --git a/pypilot_dependencies/web/python-werkzeug.build b/pypilot_dependencies/web/python-werkzeug.build index 986b50f..dbd25e4 100644 --- a/pypilot_dependencies/web/python-werkzeug.build +++ b/pypilot_dependencies/web/python-werkzeug.build @@ -14,7 +14,7 @@ PYNAM=Werkzeug NAM=werkzeug -PYTHON=`cat /opt/python` +PYTHON=python`cat /opt/python` EXTNAM=$PYTHON-$NAM TMPDIR=/tmp/$PYTHON-$NAM PYTDIR=/usr/local/lib/$PYTHON/site-packages @@ -27,7 +27,7 @@ INITIALDIR=$PWD # Remove dirs and files left from previous creation -#sudo pip3.6 uninstall Flask +sudo pip3.8 uninstall $PYNAM # Create temporary directory @@ -39,7 +39,8 @@ mkdir -p $TMPDIR$PYTDIR # Install in place -sudo pip3.6 install $PYNAM +#sudo pip3.8 install $PYNAM==1.0.1 +sudo pip3.8 install $PYNAM # Move files to tmp dir diff --git a/pypilot_dependencies/web/python-zope.interface.build b/pypilot_dependencies/web/python-zope.interface.build new file mode 100644 index 0000000..d24778e --- /dev/null +++ b/pypilot_dependencies/web/python-zope.interface.build @@ -0,0 +1,81 @@ +#!/bin/sh +# +###################################################### +# Build script for RPI # +# # +# See .info for details # +# # +###################################################### + +###################################################### +# Configure extension creation parameters # +###################################################### + +PYNAM=zope.interface +NAM=zope.interface + +PYTHON=python`cat /opt/python` +EXTNAM=$PYTHON-$NAM +TMPDIR=/tmp/$PYTHON-$NAM +PYTDIR=/usr/local/lib/$PYTHON/site-packages + +###################################################### +# Prepare extension creation # +###################################################### + +INITIALDIR=$PWD + +# Remove dirs and files left from previous creation + +sudo pip3.8 uninstall $PYNAM + +# Create temporary directory + +mkdir -p $TMPDIR$PYTDIR + +###################################################### +# Compile extension # +###################################################### + +# Install in place + +sudo pip3.8 install $PYNAM + +# Move files to tmp dir + +cp -rf $PYTDIR/$PYNAM-*-info $PYTDIR/zope $TMPDIR$PYTDIR + +# Delete *.pyc files + +find $TMPDIR/ -name *.pyc | xargs rm -r + +# Adjust directory access rigths + +find $TMPDIR/ -type d | xargs chmod -v 755; + +find $TMPDIR | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded + + +################################################### +# Create base extension in temp dir # +################################################### + +cd $TMPDIR +cd .. +mksquashfs $TMPDIR $EXTNAM.tcz +cd $TMPDIR +find usr -not -type d > $EXTNAM.tcz.list +mv -f ../$EXTNAM.tcz . + +# Create md5 file + +md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt + +# copy extension files +cp $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional + +# Cleanup temp directory + +rm -rf * + +cd $INITIALDIR diff --git a/scons/scons.build b/scons/scons.build index 2815319..8cdc047 100644 --- a/scons/scons.build +++ b/scons/scons.build @@ -5,69 +5,48 @@ # # # See .info for details # # # -# February 13, 2013 # ###################################################### ###################################################### # Configure extension creation parameters # ###################################################### -PYTHON=`cat /opt/python` +PYNAM=scons +NAM=scons - -WRKDIR=scons-3.1.2 -SRCNAM=$WRKDIR.tar.gz -EXTNAM=scons -TMPDIR=/tmp/$PYTHON-$EXTNAM +PYTHONVERSION=`cat /opt/python` +PYTHON="python"$PYTHONVERSION +EXTNAM=$PYTHON-$NAM +TMPDIR=/tmp/$PYTHON-$NAM PYTDIR=/usr/local/lib/$PYTHON/site-packages -wget -c http://prdownloads.sourceforge.net/scons/$SRCNAM - ###################################################### # Prepare extension creation # ###################################################### +INITIALDIR=$PWD + # Remove dirs and files left from previous creation -rm -r -f $PYTDIR/$EXTNAM*.egg +#sudo pip3.8 uninstall Flask # Create temporary directory -mkdir -p $TMPDIR/$PYTDIR +mkdir -p $TMPDIR$PYTDIR ###################################################### # Compile extension # ###################################################### -INITIALDIR=$PWD - -# Export variables needed for compilation - -export CFLAGS="-Os -pipe" -export CXXFLAGS="-Os -pipe -fno-exceptions -fno-rtti" -export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig - -# Unpack source in current directory - -tar xf $SRCNAM - -# Configure it - -cd $WRKDIR - # Install in place -sudo $PYTHON setup.py install - -# Delete compilation work directory - -cd .. -sudo rm -rf $WRKDIR +sudo pip3.8 install $PYNAM # Move files to tmp dir - -mkdir -p $TMPDIR/$PYTDIR -cp -rv $PYTDIR/RPi* $TMPDIR/$PYTDIR +mkdir -p $TMPDIR$PYTDIR +cp -rf $PYTDIR/SCons*-info $PYTDIR/SCons $TMPDIR$PYTDIR +mkdir -p $TMPDIR/usr/local/bin/ +cp /usr/local/bin/scons* $TMPDIR/usr/local/bin/ # Delete *.pyc files @@ -77,10 +56,9 @@ find $TMPDIR/ -name *.pyc | xargs rm -r find $TMPDIR/ -type d | xargs chmod -v 755; -# Strip executables - find $TMPDIR | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded + ################################################### # Create base extension in temp dir # ################################################### @@ -90,13 +68,14 @@ cd .. mksquashfs $TMPDIR $EXTNAM.tcz cd $TMPDIR find usr -not -type d > $EXTNAM.tcz.list -mv ../$EXTNAM.tcz . +mv -f ../$EXTNAM.tcz . # Create md5 file md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt -cp -fv $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional +# copy extension files +cp $EXTNAM.tcz* /mnt/mmcblk0p2/tce/optional # Cleanup temp directory