OpenWRT Build file --- Error


 
A couple of other observations.

The ~/heatermeter/openwrt/install.sh script references "patches/219-lucid-sysupgrade-url.patch", but the file in the patches dir is named 219-luci-sysupgrade-url.patch

You can replace the line

Code:
src-svn luci http://luci.subsignal.org/luci/tags/0.11.1/contrib/package

with

Code:
src-git luci http://github.com/openwrt/luci.git;luci-0.11

You will also need to change the line

Code:
LUCIP=$WRT_PATH/feeds/luci/luci/patches

to

Code:
LUCIP=$WRT_PATH/feeds/luci/patches
 
Awesome, so very helpful, Steve. I've updated the install.sh. Does the src-git have the ability to get the 0.11.1 tag for luci though instead of 0.11?
 
According to this, you're supposed to be able to do it by commit hashid as well, so for https://github.com/openwrt/luci/tree/0.11.1 is shows the last commit ID as adc4c2932ec7039a6b7effeace098e5bc46861c6

That should translate to:

Code:
 src-git luci http://github.com/openwrt/luci.git^adc4c2932ec7039a6b7effeace098e5bc46861c6

I can't try it out till later.
 
Ah I knew there had to be documentation on what is supported. My ability to read their perl script is not great. Now that I look at it though, the old version of /scripts/feeds in our tree doesn't support the "^" only a ";".

my ($base, $branch) = split(/;/, $src, 2);

But the good news is that it calls git clone --depth 1 --branch '%s' '%s' '%s' (branch, base, local path) so assuming you have git >= 1.8 the branch parameter can specify a tag as well. Try it like this if you don't mind.
Code:
src-git luci http://github.com/openwrt/luci.git;0.11.1

I don't think it makes a difference because they're not going back to add anything to 0.11 I'm sure, but at least this way we both use the same tag. I'd try it myself but I am afraid I might break my own build by swapping out just that part and end up having to manually repatch.
 
But the good news is that it calls git clone --depth 1 --branch '%s' '%s' '%s' (branch, base, local path) so assuming you have git >= 1.8 the branch parameter can specify a tag as well. Try it like this if you don't mind.
Code:
src-git luci http://github.com/openwrt/luci.git;0.11.1

Yep, that worked for me.

I've also found small differences between the 12.09 source tree at svn.openwrt.org compared to the git repo at git.openwrt.org. Your brcm2708/image/Makefile patch fails, as does the iwinfo patch.

The 12.09 repo at git.openwrt.org is more up to date than svn.openwrt.org and negates some of the patches you have.
 
The differences are because they didn't properly tag the OpenWrt release when they released it I think. I know this was the case with the packages, which I don't think ever got tagged. I've updated the script with the proper openwrt revision, thanks JMire! (Wow how did you know my exact version was r36422? Did I say that?)
 
Shows you the version if you ssh in.

Code:
 -----------------------------------------------------
 ATTITUDE ADJUSTMENT (Attitude Adjustment, r36422)
 -----------------------------------------------------
 
So, finally getting around to actually compiling this beast and I see that source files for 8192cu are missing.

Code:
make[3]: Entering directory `/home/steve/heatermeter/openwrt/package/8192cu'
mkdir -p /home/steve/openwrt/build_dir/linux-brcm2708/8192cu-3.4.3
cp -fpR ./src/* /home/steve/openwrt/build_dir/linux-brcm2708/8192cu-3.4.3/
cp: cannot stat './src/*': No such file or directory

Over at https://github.com/CapnBry/HeaterMeter/tree/master/openwrt/package/8192cu it says "Unzip driver download"

Got an official link for this? A google search found me a tarball in another repo, but I'll refrain from linking to it for now.

Also, another svn repo has vanished into the ether!
Code:
Checking out files from the svn repository...
svn: E670002: Unable to connect to a repository at URL 'http://svn.nomi.cz/svn/isteve/hotplug2'
svn: E670002: Name or service not known
You have to update the package/hotplug2/Makefile with the info listed here.
 
Last edited:
For a long time the 8192cu v3.4.3 driver was the only driver you could download from the RealTek site, I didn't think there would ever be any further development on it. I grabbed 4.0.3 and started porting the patches to it but I was getting kernel crashes and never had time to go back and debug them.

I've added a source tarball to heatermeter.com:
http://heatermeter.com/devel/depends/
EDIT: Also I've updated the package Makefile to pull this source

Then I started looking into if we need the hotplug package at all so I disabled the service on my device and rebooted it. As I thought it never loads the wifi driver so now I have to take my HeaterMeter apart and plug a keyboard into it to get it working again. Thanks a *lot*, Steve! :-D
 
Last edited:
For a long time the 8192cu v3.4.3 driver was the only driver you could download from the RealTek site, I didn't think there would ever be any further development on it. I grabbed 4.0.3 and started porting the patches to it but I was getting kernel crashes and never had time to go back and debug them.

I've added a source tarball to heatermeter.com:
http://heatermeter.com/devel/depends/
EDIT: Also I've updated the package Makefile to pull this source

Then I started looking into if we need the hotplug package at all so I disabled the service on my device and rebooted it. As I thought it never loads the wifi driver so now I have to take my HeaterMeter apart and plug a keyboard into it to get it working again. Thanks a *lot*, Steve! :-D

Hah. You're welcome!
 
Hrm. Still unable to compete a full compile.

This one is stumping me:

Code:
mkdosfs /home/steve/openwrt/build_dir/linux-brcm2708/boot.img -C 9216
mkdosfs 3.0.7 (24 Dec 2009)
# Raspberry Pi has no bootloader, instead the GPU loads and starts the kernel
mcopy -i /home/steve/openwrt/build_dir/linux-brcm2708/boot.img /home/steve/openwrt/build_dir/target-arm_v6zk_uClibc-0.9.33.2_eabi/brcm2708-gpu-fw-boot/bootcode.bin ::
mcopy -i /home/steve/openwrt/build_dir/linux-brcm2708/boot.img /home/steve/openwrt/build_dir/target-arm_v6zk_uClibc-0.9.33.2_eabi/brcm2708-gpu-fw-boot/start.elf ::
mcopy -i /home/steve/openwrt/build_dir/linux-brcm2708/boot.img /home/steve/openwrt/build_dir/target-arm_v6zk_uClibc-0.9.33.2_eabi/brcm2708-gpu-fw-boot/start_cd.elf ::
Disk full
make[5]: *** [install] Error 1
make[5]: Leaving directory `/home/steve/openwrt/target/linux/brcm2708/image'
make[4]: *** [install] Error 2
make[4]: Leaving directory `/home/steve/openwrt/target/linux/brcm2708'
make[3]: *** [install] Error 2
make[3]: Leaving directory `/home/steve/openwrt/target/linux'
make[2]: *** [target/linux/install] Error 2
make[2]: Leaving directory `/home/steve/openwrt'
make[1]: *** [/home/steve/openwrt/staging_dir/target-arm_v6zk_uClibc-0.9.33.2_eabi/stamp/.target_install] Error 2
make[1]: Leaving directory `/home/steve/openwrt'
make: *** [world] Error 2
 
The boot.img disk file (which is only like 9MB) is full? Something is the wrong size because there's a "lot" of extra space in the boot area.
bootcode.bin 18kb
start.elf 2.6MB
start_cd.elf 538kb
 
"Disk full" - I had the same problem on the HOST machine - Had 8 GB originally and then changed to 16GB VirtualBox --- Still have not managed to make it compile --- starting over.
 
The boot.img disk file (which is only like 9MB) is full? Something is the wrong size because there's a "lot" of extra space in the boot area.
bootcode.bin 18kb
start.elf 2.6MB
start_cd.elf 538kb

My start_cd.elf is 9MB, not 538K

Code:
$ ls -ld build_dir/target-arm_v6zk_uClibc-0.9.33.2_eabi/brcm2708-gpu-fw-boot/{bootcode.bin,start.elf,start_cd.elf}
-rw-r--r-- 1 steve steve   16528 Oct  2 00:31 build_dir/target-arm_v6zk_uClibc-0.9.33.2_eabi/brcm2708-gpu-fw-boot/bootcode.bin
-rw-rw-r-- 1 steve steve 9437184 Oct  2 01:54 build_dir/target-arm_v6zk_uClibc-0.9.33.2_eabi/brcm2708-gpu-fw-boot/start_cd.elf
-rw-r--r-- 1 steve steve 2047080 Oct  2 00:31 build_dir/target-arm_v6zk_uClibc-0.9.33.2_eabi/brcm2708-gpu-fw-boot/start.elf
 
Actually, the real problem is this error during make:

Code:
mcopy -i /home/steve/openwrt/build_dir/linux-brcm2708/boot.img /home/steve/openwrt/build_dir/target-arm_v6zk_uClibc-0.9.33.2_eabi/brcm2708-gpu-fw-boot/start_cd.elf ::
/home/steve/openwrt/build_dir/target-arm_v6zk_uClibc-0.9.33.2_eabi/brcm2708-gpu-fw-boot/start_cd.elf: No such file or directory

If I run it manually, I get the same error:

Code:
$ mcopy -i /home/steve/openwrt/build_dir/linux-brcm2708/boot.img /home/steve/openwrt/build_dir/target-arm_v6zk_uClibc-0.9.33.2_eabi/brcm2708-gpu-fw-boot/start_cd.elf
/home/steve/openwrt/build_dir/target-arm_v6zk_uClibc-0.9.33.2_eabi/brcm2708-gpu-fw-boot/start_cd.elf: No such file or directory

If I manually run mcopy without -i, it copies the full 9.4MB boot.img to start_cd.elf

Update:

For shiggles, I used touch to create a blank start_cd.elf, which then led to the same error for fixup.dat and finally fixup_cd.dat

After that the make job completed, but it's obviously not valid.

So, need to figure out what's up with those files.

This is a snippit from target/linux/brcm2708/image/Makefile

Code:
        mkdosfs $(KDIR)/boot.img -C $(FAT32_BLOCKS)
        # Raspberry Pi has no bootloader, instead the GPU loads and starts the kernel
        mcopy -i $(KDIR)/boot.img $(BUILD_DIR)/brcm2708-gpu-fw-boot/bootcode.bin ::
        mcopy -i $(KDIR)/boot.img $(BUILD_DIR)/brcm2708-gpu-fw-boot/start.elf ::
        mcopy -i $(KDIR)/boot.img $(BUILD_DIR)/brcm2708-gpu-fw-boot/start_cd.elf ::
        mcopy -i $(KDIR)/boot.img $(BUILD_DIR)/brcm2708-gpu-fw-boot/fixup.dat ::
        mcopy -i $(KDIR)/boot.img $(BUILD_DIR)/brcm2708-gpu-fw-boot/fixup_cd.dat ::
        mcopy -i $(KDIR)/boot.img config.txt ::
        mcopy -i $(KDIR)/boot.img cmdline.txt ::
        mcopy -i $(KDIR)/boot.img $(KDIR)/Image ::kernel.img  # Copy OpenWrt built kernel
        ./gen_rpi_sdcard_img.sh $(BIN_DIR)/$(IMG_PREFIX)-sdcard-vfat-$(1).img $(KDIR)/boot.img $(KDIR)/root.$(1) \
                $(CONFIG_BRCM2708_SD_BOOT_PARTSIZE) $(CONFIG_TARGET_ROOTFS_PARTSIZE)
 
Last edited:
From what I can tell, these files are missing from the git clone of github.com/raspberrypi/firmware.git that the bulld does.

I see them here https://github.com/raspberrypi/firmware/tree/master/boot

Yep. They're missing.

Code:
$ tar tvfj ./dl/brcm2708-gpu-fw-20120529.tar.bz2 brcm2708-gpu-fw-20120529/boot/
drwxr-xr-x steve/steve       0 2015-10-02 00:31 brcm2708-gpu-fw-20120529/boot/
-rw-r--r-- steve/steve   18693 2015-10-02 00:31 brcm2708-gpu-fw-20120529/boot/COPYING.linux
-rw-r--r-- steve/steve 2047080 2015-10-02 00:31 brcm2708-gpu-fw-20120529/boot/start.elf
-rw-r--r-- steve/steve 16344532 2015-10-02 00:31 brcm2708-gpu-fw-20120529/boot/kernel_emergency.img
-rw-r--r-- steve/steve  4187652 2015-10-02 00:31 brcm2708-gpu-fw-20120529/boot/kernel.img
-rw-r--r-- steve/steve  2047080 2015-10-02 00:31 brcm2708-gpu-fw-20120529/boot/arm128_start.elf
-rw-r--r-- steve/steve   314691 2015-10-02 00:31 brcm2708-gpu-fw-20120529/boot/loader.bin
-rw-r--r-- steve/steve  2047080 2015-10-02 00:31 brcm2708-gpu-fw-20120529/boot/arm224_start.elf
-rw-r--r-- steve/steve  6186420 2015-10-02 00:31 brcm2708-gpu-fw-20120529/boot/kernel_debug.img
-rw-r--r-- steve/steve    16528 2015-10-02 00:31 brcm2708-gpu-fw-20120529/boot/bootcode.bin
-rw-r--r-- steve/steve  2047080 2015-10-02 00:31 brcm2708-gpu-fw-20120529/boot/arm192_start.elf
-rw-r--r-- steve/steve     1447 2015-10-02 00:31 brcm2708-gpu-fw-20120529/boot/LICENCE.broadcom

Looks like they disappear upon checking out branch 29ce6bcf278e7e79cd8a2b84c6aa9db9864ca91d, which is what the build does.

Code:
echo "Checking out files from the git repository..."; mkdir -p /home/steve/openwrt/tmp/dl && cd /home/steve/openwrt/tmp/dl && rm -rf brcm2708-gpu-fw-20120529 && [ \! -d brcm2708-gpu-fw-20120529 ] && git clone git://github.com/raspberrypi/firmware.git brcm2708-gpu-fw-20120529 --recursive && (cd brcm2708-gpu-fw-20120529 && git checkout 29ce6bcf278e7e79cd8a2b84c6aa9db9864ca91d) && echo "Packing checkout..." && rm -rf brcm2708-gpu-fw-20120529/.git && 	/bin/tar cfj /home/steve/openwrt/tmp/dl/brcm2708-gpu-fw-20120529.tar.bz2 brcm2708-gpu-fw-20120529 && mv /home/steve/openwrt/tmp/dl/brcm2708-gpu-fw-20120529.tar.bz2 /home/steve/openwrt/dl/ && rm -rf brcm2708-gpu-fw-20120529;


Code:
$ git clone git://github.com/raspberrypi/firmware.git brcm2708-gpu-fw-20120529 --recursive
Cloning into 'brcm2708-gpu-fw-20120529'...

Code:
$ git status
On branch master
Your branch is up-to-date with 'origin/master'.

nothing to commit, working directory clean

$ ls -l boot 
total 19744
-rw-rw-r-- 1 steve steve    9846 Oct  2 15:24 bcm2708-rpi-b.dtb
-rw-rw-r-- 1 steve steve   10125 Oct  2 15:24 bcm2708-rpi-b-plus.dtb
-rw-rw-r-- 1 steve steve    9850 Oct  2 15:24 bcm2708-rpi-cm.dtb
-rw-rw-r-- 1 steve steve   11113 Oct  2 15:24 bcm2709-rpi-2-b.dtb
-rw-rw-r-- 1 steve steve   17900 Oct  2 15:24 bootcode.bin
-rw-rw-r-- 1 steve steve   18693 Oct  2 14:51 COPYING.linux
-rw-rw-r-- 1 steve steve    2447 Oct  2 15:24 fixup_cd.dat
-rw-rw-r-- 1 steve steve    6415 Oct  2 15:24 fixup.dat
-rw-rw-r-- 1 steve steve    9650 Oct  2 15:24 fixup_db.dat
-rw-rw-r-- 1 steve steve    9654 Oct  2 15:24 fixup_x.dat
-rw-rw-r-- 1 steve steve 4033240 Oct  2 15:24 kernel7.img
-rw-rw-r-- 1 steve steve 4057264 Oct  2 15:24 kernel.img
-rw-rw-r-- 1 steve steve    1447 Oct  2 14:51 LICENCE.broadcom
drwxrwxr-x 2 steve steve    4096 Oct  2 15:24 overlays
-rw-rw-r-- 1 steve steve  597112 Oct  2 15:24 start_cd.elf
-rw-rw-r-- 1 steve steve 4853288 Oct  2 15:24 start_db.elf
-rw-rw-r-- 1 steve steve 2720056 Oct  2 15:24 start.elf
-rw-rw-r-- 1 steve steve 3810600 Oct  2 15:24 start_x.elf

Code:
$ git checkout 29ce6bcf278e7e79cd8a2b84c6aa9db9864ca91d
Note: checking out '29ce6bcf278e7e79cd8a2b84c6aa9db9864ca91d'.

$ git status
HEAD detached at 29ce6bc
nothing to commit, working directory clean

$ ls -l boot 
total 34404
-rw-rw-r-- 1 steve steve  2047080 Oct  2 15:24 arm128_start.elf
-rw-rw-r-- 1 steve steve  2047080 Oct  2 15:24 arm192_start.elf
-rw-rw-r-- 1 steve steve  2047080 Oct  2 15:24 arm224_start.elf
-rw-rw-r-- 1 steve steve    16528 Oct  2 15:24 bootcode.bin
-rw-rw-r-- 1 steve steve    18693 Oct  2 14:51 COPYING.linux
-rw-rw-r-- 1 steve steve  6186420 Oct  2 15:24 kernel_debug.img
-rw-rw-r-- 1 steve steve 16344532 Oct  2 15:24 kernel_emergency.img
-rw-rw-r-- 1 steve steve  4187652 Oct  2 15:24 kernel.img
-rw-rw-r-- 1 steve steve     1447 Oct  2 14:51 LICENCE.broadcom
-rw-rw-r-- 1 steve steve   314691 Oct  2 15:24 loader.bin
-rw-rw-r-- 1 steve steve  2047080 Oct  2 15:24 start.elf

These files don't even show up in the code repo until October of 2012, and the build uses a commit from May of 2012.

commit c57ea9dd367f12bf4fb41b7b86806a2dc6281176
Author: popcornmix <popcornmix@gmail.com>
Date: Sat Oct 20 00:56:15 2012 +0100

Remove plethora of start.elf files.
Now use start.elf and fixup.dat. Add config.txt paramater gpu_mem to select GPU mem and ARM gets the remainder. E.g. gpu_mem=64
Should handle 256M and 512M parts. The start_cd.elf and fixup_cd.dat will be used when gpu_mem=16.
loader.bin no longer needed.
Switch to compressed kernel images.

commit 29ce6bcf278e7e79cd8a2b84c6aa9db9864ca91d
Author: popcornmix <popcornmix@gmail.com>
Date: Tue May 29 15:45:02 2012 +0100
 
Last edited:
I'm really enjoying this long conversation with myself!

So, Bryan, I see you've created a 0710-brcm2708-firmware.patch file, but it's not being called by ~/heatermeter/openwrt/install.sh
 
Last edited:

 

Back
Top