Skip to content

Commit 01d35aa

Browse files
committed
Release 0.9.29
New Hardware, fixes, testet up to kernel 4.11.1
2 parents 37de742 + 40c3276 commit 01d35aa

23 files changed

Lines changed: 977 additions & 574 deletions

CHANGELOG

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
0.9.29 compiles with most kernels up to 4.11.1
2+
3+
see git commit messages for newer changes
4+
15
0.9.24 2016.08.03
26
- suport new V2 modulator cards
37

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# DDBridge Driver
22

3+
###Patches
4+
We can only accept patches which don't break compilation for older kernels (as far back as 2.6.37).
5+
36
###Prepare for Building
47

58
TBD

apps/Makefile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
all: cit citin flashprog modt ddtest setmod ddflash setmod2
22

33
cit: cit.c
4-
gcc -o cit cit.c -lpthread
4+
$(CC) -o cit cit.c -lpthread
55

66
modt: modt.c
7-
gcc -o modt modt.c -lpthread
7+
$(CC) -o modt modt.c -lpthread
88

99
setmod: setmod.c
10-
gcc -o setmod setmod.c -I../include/
10+
$(CC) -o setmod setmod.c -I../include/
1111

1212
setmod2: setmod2.c
13-
gcc -o setmod2 setmod2.c -I../include/
13+
$(CC) -o setmod2 setmod2.c -I../include/
1414

1515
flashprog: flashprog.c
16-
gcc -o flashprog flashprog.c
16+
$(CC) -o flashprog flashprog.c
1717

1818
ddtest: ddtest.c
19-
gcc -o ddtest ddtest.c
19+
$(CC) -o ddtest ddtest.c
2020

2121
ddflash: ddflash.c
22-
gcc -o ddflash ddflash.c
22+
$(CC) -o ddflash ddflash.c

apps/cit.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ void *get_ts(void *a)
9191
if (!buf)
9292
return NULL;
9393
sprintf(fname, "/dev/dvb/adapter%u/ci%u", adapter, device);
94+
printf("using %s for reading\n", fname);
9495
fdi = open(fname, O_RDONLY);
9596

9697
while (1) {
@@ -122,6 +123,7 @@ int send(void)
122123
if (!buf)
123124
return -1;
124125
sprintf(fname, "/dev/dvb/adapter%u/ci%u", adapter, device);
126+
printf("using %s for writing\n", fname);
125127
fdo=open(fname, O_WRONLY);
126128

127129
while (1) {

apps/flashprog.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,13 @@ int main(int argc, char **argv)
210210
printf("Octopus 35\n");
211211
break;
212212
case 0x0003:
213-
fname="DVBBridgeV1B_DVBBridgeV1B.bit";
213+
fname="DVBBridgeV1B_DVBBridgeV1B.fpga";
214214
printf("Octopus\n");
215215
break;
216+
case 0x0005:
217+
fname="DVBBridgeV2A_DD01_0005_STD.fpga";
218+
printf("Octopus Classic\n");
219+
break;
216220
case 0x0006:
217221
fname="DVBBridgeV2A_DD01_0006_STD.fpga";
218222
printf("CineS2 V7\n");
@@ -249,6 +253,10 @@ int main(int argc, char **argv)
249253
fname="DVBModulatorV2A_DD01_0210.fpga";
250254
printf("Modulator V2\n");
251255
break;
256+
case 0x0220:
257+
fname="SDRModulatorV1A_DD01_0220.fpga";
258+
printf("SDRModulator\n");
259+
break;
252260
default:
253261
printf("UNKNOWN\n");
254262
break;
@@ -314,6 +322,7 @@ int main(int argc, char **argv)
314322
err = FlashWritePageMode(ddb,FlashOffset,buffer,BufferSize,0x3C);
315323
break;
316324
case SPANSION_S25FL116K:
325+
case SPANSION_S25FL164K:
317326
err = FlashWritePageMode(ddb,FlashOffset,buffer,BufferSize,0x1C);
318327
break;
319328
}

apps/octonet/ddflash.c

Lines changed: 44 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ static int flash_detect(struct ddflash *ddf)
426426
}
427427
if (ddf->sector_size) {
428428
ddf->buffer = malloc(ddf->sector_size);
429-
printf("allocated buffer %08x@%08x\n", ddf->sector_size, (uint32_t) ddf->buffer);
429+
//printf("allocated buffer %08x@%08x\n", ddf->sector_size, (uint32_t) ddf->buffer);
430430
if (!ddf->buffer)
431431
return -1;
432432
}
@@ -510,7 +510,12 @@ static int check_fw(struct ddflash *ddf, char *fn, uint32_t *fw_off)
510510
goto out;
511511
}
512512
} else if (!strcasecmp(key, "Version")) {
513-
sscanf(val, "%x", &version);
513+
if (strchr(val,'.')) {
514+
int major = 0, minor = 0;
515+
sscanf(val,"%d.%d",&major,&minor);
516+
version = (major << 16) + minor;
517+
} else
518+
sscanf(val, "%x", &version);
514519
} else if (!strcasecmp(key, "Length")) {
515520
sscanf(val, "%u", &length);
516521
}
@@ -565,8 +570,13 @@ static int update_image(struct ddflash *ddf, char *fn,
565570
if (res < 0)
566571
goto out;
567572
res = flashwrite(ddf, fs, adr, len, fw_off);
568-
if (res == 0)
569-
res = 1;
573+
if (res == 0) {
574+
res = flashcmp(ddf, fs, adr, len, fw_off);
575+
if (res == -2) {
576+
res = 1;
577+
}
578+
}
579+
570580
out:
571581
close(fs);
572582
return res;
@@ -607,18 +617,40 @@ static int update_flash(struct ddflash *ddf)
607617
if ((res = update_image(ddf, "/boot/fpga.img", 0x10000, 0xa0000, 1, 0)) == 1)
608618
stat |= 1;
609619
} else {
610-
if ((res = update_image(ddf, "/config/fpga.img", 0x10000, 0xa0000, 1, 1)) == 1)
611-
stat |= 1;
612-
if (res == -1)
613-
if ((res = update_image(ddf, "/boot/fpga.img", 0x10000, 0xa0000, 1, 1)) == 1)
620+
if (ddf->id.device == 0x0307) {
621+
if (res == -1)
622+
if ((res = update_image(ddf, "/config/fpga_gtl.img", 0x10000, 0xa0000, 1, 1)) == 1)
623+
stat |= 1;
624+
if (res == -1)
625+
if ((res = update_image(ddf, "/boot/fpga_gtl.img", 0x10000, 0xa0000, 1, 1)) == 1)
626+
stat |= 1;
627+
} else {
628+
if ((res = update_image(ddf, "/config/fpga.img", 0x10000, 0xa0000, 1, 1)) == 1)
614629
stat |= 1;
615-
if (res == -1)
616-
if ((res = update_image(ddf, "/config/fpga_gtl.img", 0x10000, 0xa0000, 1, 1)) == 1)
630+
if (res == -1)
631+
if ((res = update_image(ddf, "/boot/fpga.img", 0x10000, 0xa0000, 1, 1)) == 1)
632+
stat |= 1;
633+
}
634+
}
635+
#if 1
636+
if ( (stat&1) && (ddf->id.hw & 0xffffff) <= 0x010001) {
637+
if (ddf->id.device == 0x0307) {
638+
if ((res = update_image(ddf, "/config/fpga_gtl.img", 0x160000, 0x80000, 1, 0)) == 1)
617639
stat |= 1;
618-
if (res == -1)
619-
if ((res = update_image(ddf, "/boot/fpga_gtl.img", 0x10000, 0xa0000, 1, 1)) == 1)
640+
if (res == -1)
641+
if ((res = update_image(ddf, "/boot/fpga_gtl.img", 0x160000, 0x80000, 1, 0)) == 1)
642+
stat |= 1;
643+
} else {
644+
if ((res = update_image(ddf, "/config/fpga.img", 0x160000, 0x80000, 1, 0)) == 1)
620645
stat |= 1;
646+
if (res == -1)
647+
if ((res = update_image(ddf, "/boot/fpga.img", 0x160000, 0x80000, 1, 0)) == 1)
648+
stat |= 1;
649+
650+
}
621651
}
652+
#endif
653+
622654
break;
623655
case 0x320:
624656
//fname="/boot/DVBNetV1A_DD01_0300.bit";

0 commit comments

Comments
 (0)