OpenWRT Build file --- Error


 
I just tried using a fresh download and it's ok for me.

Code:
Collecting package info: done
Updating feed 'luci' from 'http://github.com/openwrt/luci.git;0.11.1' ...
Cloning into './feeds/luci'...
remote: Counting objects: 3142, done.
remote: Compressing objects: 100% (2159/2159), done.
Receiving objects: 100% (3142/3142), 3.73 MiB | 3.44 MiB/s, done.
remote: Total 3142 (delta 661), reused 2665 (delta 399), pack-reused 0
Resolving deltas: 100% (661/661), done.
Checking connectivity... done.
Note: checking out 'adc4c2932ec7039a6b7effeace098e5bc46861c6'.


Hrm. Fresh download and I'm getting the error.

Code:
Collecting package info: done
Updating feed 'luci' from 'http://github.com/openwrt/luci.git;0.11.1' ...
Cloning into './feeds/luci'...
error: RPC failed; result=22, HTTP code = 408
fatal: The remote end hung up unexpectedly
failed.

Lets see what the feeds script is doing when specifying src-git

Code:
'src-git' => {
                'init'          => "git clone --depth 1 '%s' '%s'",
                'init_branch'   => "git clone --depth 1 --branch '%s' '%s' '%s'",
                'update'        => "git pull",
                'controldir'    => ".git",
                'revision'      => "git show --abbrev-commit HEAD | head -n 1 | cut -d ' ' -f 2 | tr -d '\n'"},

We are specifying a branch so lets try running init_branch command by itself.

Code:
$ git clone --depth 1 --branch '0.11.1' 'http://github.com/openwrt/luci.git' '~/luci1'
Cloning into '~/luci1'...
error: RPC failed; result=22, HTTP code = 408
fatal: The remote end hung up unexpectedly

and if we add HTTPS?

Code:
$ git clone --depth 1 --branch '0.11.1' 'https://github.com/openwrt/luci.git' '~/luci1'
Cloning into '~/luci1'...
remote: Counting objects: 12531, done.
remote: Compressing objects: 100% (6649/6649), done.
remote: Total 12531 (delta 4242), reused 10433 (delta 2695), pack-reused 0
Receiving objects: 100% (12531/12531), 8.76 MiB | 6.32 MiB/s, done.
Resolving deltas: 100% (4242/4242), done.
warning: Remote branch 0.11.1 not found in upstream origin, using HEAD instead

Only thing I can think of is that you are using a newer version of git?

Code:
$ git --version
git version 1.7.9.5
 
Last edited:
That was it.

Code:
$ sudo apt-get install software-properties-common python-software-properties
$ sudo add-apt-repository ppa:git-core/ppa
$ sudo apt-get update
$ sudo apt-get install git

$ git --version
git version 2.6.2

Updating feed 'luci' from 'http://github.com/openwrt/luci.git;0.11.1' ...
Cloning into './feeds/luci'...
remote: Counting objects: 3142, done.
remote: Compressing objects: 100% (2159/2159), done.
remote: Total 3142 (delta 661), reused 2665 (delta 399), pack-reused 0
Receiving objects: 100% (3142/3142), 3.73 MiB | 5.44 MiB/s, done.
Resolving deltas: 100% (661/661), done.
Checking connectivity... done.
Note: checking out 'adc4c2932ec7039a6b7effeace098e5bc46861c6'.
 
That's what you get for using an old LTS version of Ubuntu! Glad to see you got it working.

Ubuntu 14.04 ships with git 1.9.1
 
Ya. I started the build on 14.04 in a VM on a Macbook Air and ran into a bunch of problems plus it was slow. Had a 12.04 server online at the datacenter I work at and figured that would do. I'll rerun on 14.04 again and see if that cleans up any of the other problems I've been running in to.
 
So close though! git started letting you clone a tag at 1.8.5.2 so you were just one minor version from it working. Good sleuthing, this is how I know everything I know about OpenWrt as well.
 
Thanks, Bryan. Love the unit. Great work! I rolled out 14.04 and ran through the compile again. Luci patches still aren't being applied but other than that, everything else seems to be in order.
 
Strange. I'm using a fresh install of 14.04 without issue.

My build script:

Code:
#!/bin/sh
cd ~
rm -rf ~/heatermeter ~/openwrt
git clone git://github.com/CapnBry/HeaterMeter.git heatermeter
svn co svn://svn.openwrt.org/openwrt/tags/attitude_adjustment_12.09 -r36422 openwrt
cd ~/heatermeter/openwrt
./install.sh BCM2708 ~/openwrt
cd ~/openwrt
make oldconfig
make 
make package/mac80211/compile
while [ ! -f ~/openwrt/bin/brcm2708/openwrt-brcm2708-sdcard-vfat-ext4.img ]
do make   
done
ls -ld ~/openwrt/bin/brcm2708/*.img
 
I've been using pretty much the same script. When you load the image on the rPI and go to System -> Backup/Flash Firmware page, do you see the option to specify a URL for the new flash image? If its missing, then the Luci patches aren't being applied. Or at least this particular patch isn't.


No patche(s) applied
flashfirmware.png




Patches applied
flashfirmwaregood.png
 
Last edited:
I used the GUI to upgrade a freshly compiled img file, but it looks to be b0rked and I'll have to reflash the SD card.
 
Alright, finally had a break from the craziness of life to get things back up and running again.

Looks like you're right about the LUCI patches not being properly applied. I don't have the option to specify a URL when booting off my self compiled image.

9iA95tM.png
 
I've updated the ~/heatermeter/openwrt/install.sh file to patch the luci files. I'm running a build now to see if it works.

Code:
LUCIP=$WRT_PATH/feeds/luci
patch -N -p1 -d $LUCIP < patches/200-luci-inreq-fix.patch
patch -N -p1 -d $LUCIP < patches/215-luci-adminfull-inreq.patch
patch -N -p1 -d $LUCIP < patches/217-luci-login-urltok.patch
patch -N -p1 -d $LUCIP < patches/218-lucid-cacheloader.patch
patch -N -p1 -d $LUCIP < patches/219-luci-sysupgrade-url.patch
patch -N -p1 -d $LUCIP < patches/226-lucid-no-redirect.patch
patch -N -p1 -d $LUCIP < patches/227-lucid-keepalive-fix.patch
patch -N -p1 -d $LUCIP < patches/228-luci-no-dhcp-dhcpc.patch

Code:
patching file libs/web/luasrc/dispatcher.lua
Hunk #1 succeeded at 676 (offset -1 lines).
patching file modules/admin-full/luasrc/controller/admin/index.lua
patching file modules/admin-full/luasrc/controller/admin/system.lua
patching file modules/admin-full/luasrc/controller/admin/uci.lua
patching file libs/web/luasrc/dispatcher.lua
patching file modules/admin-core/luasrc/view/sysauth.htm
patching file libs/lucid/luasrc/lucid.lua
patching file modules/admin-full/luasrc/controller/admin/system.lua
patching file modules/admin-full/luasrc/view/admin_system/flashops.htm
patching file libs/lucid-http/luasrc/lucid/http/server.lua
patching file libs/lucid-http/luasrc/lucid/http/server.lua
patching file modules/admin-full/luasrc/model/cbi/admin_network/wifi_add.lua
 
Last edited:
Bryan, did you ever figure out the whacky patching issue for luci? Nothing I could find indicates that simply making a patches/ dir and placing the files in there should trigger an automagic patch process during the build.
 
I have not had a chance to look at it or really do anything at all HeaterMeter related in the past two weeks due to work-related issues. The good/bad news is that I'll be leaving this position more urgently that anticipated (Any Day Now as opposed to in February) but the bad news being I'll be out of town 4-6 weeks following that to train my replacements. I still have it on my todo list but I hope to make time soon.

The even better news is that after all of the dust settles I'll be working more or less full time on HeaterMeter for a while!
 
For anyone feeling brave, you can kick off a full build with a single line.

This has only be tested on an ubuntu/trusty64 Vagrant image and works.

Code:
bash <(curl -s0 https://ww0.ca/build-hm-github.sh)

The script runs
Code:
sudo apt-get update && \
sudo apt-get -y install \
git-core \
build-essential \
libssl-dev \
libncurses5-dev \
unzip \
lua5.1 \
libxml-parser-perl \
subversion \
mercurial && \
cat <<EOF >> build.sh
cd ~
date
rm -rf ~/heatermeter ~/openwrt
git clone https://github.com/CapnBry/HeaterMeter heatermeter
svn co svn://svn.openwrt.org/openwrt/tags/attitude_adjustment_12.09 -r36422 openwrt
cd ~/heatermeter/openwrt
./install.sh BCM2708 ~/openwrt
cd ~/openwrt
make oldconfig
date
make 
date
make package/mac80211/compile
while [ ! -f ~/openwrt/bin/brcm2708/openwrt-brcm2708-sdcard-vfat-ext4.img ]
do date ; make 
done
date
ls -ld ~/openwrt/bin/brcm2708/*.img
EOF
chmod +x ./build.sh && ./build.sh

For those wondering about Vagrant, this is how easy it is, once it's installed.

Code:
vagrant box add ubuntu/trusty64 < downloads the ubuntu/trusty64 ( 14.04 ) VM
mkdir heatermeter
cd heatermeter
vagrant init ubuntu/trusty64 < tells Vagrant you plan to use this directory for an Ubuntu VM
vagrant up < fires up the Ubuntu VM 
vagrant ssh < ssh's into the Ubuntu VM
vagrant@vagrant-ubuntu-trusty-64:~$ bash <(curl -s0 https://ww0.ca/build-hm-github.sh)

Start again with a fresh install:

Code:
vagrant destroy < destroys the current VM
vagrant up < fires up a fresh VM from the already downloaded ubuntu/trusty64 image.
vagrant ssh < ssh into a pristine Ubuntu 14.04 VM
 
Last edited:

 

Back
Top