2011-06-27 16:19:58     BINFMT_FLAT: stack size with arguments exceeds scratch pad memory

Document created by Aaronwu Employee on Aug 27, 2013
Version 1Show Document
  • View in full screen mode

2011-06-27 16:19:58     BINFMT_FLAT: stack size with arguments exceeds scratch pad memory

wag hanna (UNITED STATES)

Message: 101723   

 

I'm running a CGI program with BOA web server, and when I run the CGI from a browser the HTML pages appears but the embdded image and style sheet are not returned. the BOA server outputs the following message:

 

---

 

BINFMT_FLAT: stack size with arguments exceeds scratch

pad memory

192.168.100.117 - - [01/May/2012:04:08:22 +0000] request "GET /cgi-bin/ePhone.cs

s HTTP/1.1" ("./ePhone.css"): Unable to execve/execl pathname: "04:08:22 +0000]

request "GET /cgi-bin/ePhone.css HTTP/1.1" ("./ePhone.css"): cgi_header: unable

to find LFLF

 

---

 

I'm looking for how to increase the CGI program's scratch pad size, to work around this issue.

QuoteReplyEditDelete

 

 

2011-06-27 16:23:02     Re: BINFMT_FLAT: stack size with arguments exceeds scratch pad memory

Mike Frysinger (UNITED STATES)

Message: 101724   

 

you cant.  scratch pad is hardcoded in L1 in all blackfin parts.  use the flthdr tool to clear the L1 stack bit from the FLAT files so that it uses normal external memory for its stack.

QuoteReplyEditDelete

 

 

2011-06-27 16:49:59     Re: BINFMT_FLAT: stack size with arguments exceeds scratch pad memory

wag hanna (UNITED STATES)

Message: 101725   

 

I ran the flthdr tool on the CGI program, output looked liked this:

 

---

 

colinux:/blackfin-linux-dist/user/ephone# file ephone

ephone: BFLT executable - version 4 ram

 

colinux:/blackfin-linux-dist/user/ephone# ./flthdr -p ephone

ephone

Magic:        bFLT

Rev:          4

Build Date:   Mon Jun 27 11:38:22 2011

Entry:        0x44

Data Start:   0xb180

Data End:     0xd260

BSS End:      0xdd60

Stack Size:   0x1000

Reloc Start:  0xd260

Reloc Count:  0x59b

Flags:        0x21 ( Load-to-Ram L1-Scratch-Stack )

 

colinux:/blackfin-linux-dist/user/ephone# ./flthdr -U ephone

 

colinux:/blackfin-linux-dist/user/ephone# ./flthdr -p ephone

ephone

Magic:        bFLT

Rev:          4

Build Date:   Mon Jun 27 11:38:22 2011

Entry:        0x44

Data Start:   0xb180

Data End:     0xd260

BSS End:      0xdd60

Stack Size:   0x1000

Reloc Start:  0xd260

Reloc Count:  0x59b

Flags:        0x1 ( Load-to-Ram )

 

colinux:/blackfin-linux-dist/user/ephone# cp ephone /tftpboot/

 

---

 

Then copied the CGI program to the target and tested but got the same result.

 

---

 

root:/home/httpd/cgi-bin> BINFMT_FLAT: stack size with arguments exceeds scratch

pad memory

192.168.100.117 - - [01/May/2012:04:41:57 +0000] request "GET /cgi-bin/ePhone.cs

s HTTP/1.1" ("./ePhone.css"): Unable to execve/execl pathname: "./ePhone.css"Can

not allocate memory

192.168.100.117 - - [01/May/2012:04:41:57 +0000] request "GET /cgi-bin/ePhone.cs

s HTTP/1.1" ("./ePhone.css"): cgi_headeable to find LFLF

 

---

 

Do I need to set something in the image and stylesheet files?

QuoteReplyEditDelete

 

 

2011-06-27 16:57:56     Re: BINFMT_FLAT: stack size with arguments exceeds scratch pad memory

Mike Frysinger (UNITED STATES)

Message: 101726   

 

you missed updating some file then

Attachments

    Outcomes