Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failure to write image to emmc via Ethernet connection #3

Open
KE8SOJ opened this issue Jun 22, 2021 · 0 comments
Open

failure to write image to emmc via Ethernet connection #3

KE8SOJ opened this issue Jun 22, 2021 · 0 comments

Comments

@KE8SOJ
Copy link

KE8SOJ commented Jun 22, 2021

I encountered this error when attempting to write an image to a VIM3 which was built using the Manjaro buildarmimg tool and prepared with khadas-rescue-tools.

curl -v http://10.0.10.16/shell/write | sh -s - VIM3.Manjaro-ARM-sway-vim3-doombaby.img.xz                                                                                   
*   Trying 10.0.10.16:80...                                                                                                                                                                    
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current                                                                                                                
                                 Dload  Upload   Total   Spent    Left  Speed                                                                                                                  
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0* Connected to 10.0.10.16 (10.0.10.16) port 80 (#0)                                                              
> GET /shell/write HTTP/1.1                                                                                                                                                                    
> Host: 10.0.10.16                                                                                                                                                                             
> User-Agent: curl/7.77.0                                                                                                                                                                      
> Accept: */*                                                                                                                                                                                  
>                                                                                                                                                                                              
* Mark bundle as not supporting multiuse                                                                                                                                                       
< HTTP/1.1 200 OK                                                                                                                                                                              
< Connection: Keep-Alive                                                                                                                                                                       
< Transfer-Encoding: chunked                                                                                                                                                                   
< Keep-Alive: timeout=20                                                                                                                                                                       
< Date: Thu, 01 Jan 1970 01:47:13 GMT                                                                                                                                                          
< Cache-Control: no-cache,no-store,max-age=0,must-revalidate                                                                                                                                   
< Content-type: application/octet-stream                                                                                                                                                       
< Pragma: no-cache                                                                                                                                                                             
< Expires: 0                                                                                                                                                                                   
< Connection: close                                                                                                                                                                            
<                                                                                                                                                                                              
{ [1236 bytes data]                                                                                                                                                                            
100  1649    0  1649    0     0  41437      0 --:--:-- --:--:-- --:--:-- 42282                                                                                                                 
* Closing connection 0                                                                                                                                                                         
[i] VIM3.Manjaro-ARM-sway-vim3-doombaby.img.xz (.xz) write => 10.0.10.16 // mmc                                                                                                                
curl: option --data-binary: out of memory                                                                                                                                                      
curl: try 'curl --help' for more information                                                                                                                                                   
head: cannot open '/tmp/kwrite_http.862834.log' for reading: No such file or directory

The suggested solution I found to the curl: option --data-binary: out of memory issue is to pass the "-T " option to curl. Once I modified the curl option in /www/tools/kwrite I was able to write the image to emmc over Ethernet.

LOG=/tmp/kwrite_http.$$.log                                                  
[ "$IN" ] && {                                                               
echo "[i] $IN ($ext) write => $krescue // $DST">&2                           
#curl --data-binary @"$IN" \   
curl -T "$IN" \                                              
    -o $LOG \                                                                
    $krescue/api/disk/write/$DST$ext                                         
head -n20 $LOG                                                               
}              

BTW thank you for developing this awesome tool!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant