OpenWrt Forum Archive

Topic: OpenWRT on BT Homehub V1/V1.5 - what is the best approach?

The content of this topic has been archived on 11 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Dear all,

there is an active comunity hacking the BT Homehub V1/V1.5, and we've now enabled flashing of the unit from broadcom CFE to Redboot (built from source) and OpenWRT.
Starting from the Livebox OpenWRT implementation (a very similar router), a couple of us have modified OpenWRT to boot on the router.
Now we're at a state where we need guidance on correct procedure, and correct approach to adding OpenWRT patches to support the BT Homehub in this configuration.

I don't really understand the build system in terms of what is SVNed and what is not - currently we've modified/added files in the build directory, but this folder seems to be generated by the build process from the target definition?  So to make/submit a patch, exactly where in the directory structure do we make modifications?

What is the correct approach to adding board support?  There is the generic BCM963xx target (includes neufbox, etc. but is tuned for CFE use?), but also a 'separate' livebox target.  Our first approach was to duplicate the livebox target, and modify appropriately, as this includes redboot support, etc., so we would add a new file for mtd support and for board support.  Is this the right approach, or should we shoe-horn it into the (seemingly more modern) BCM963xx files with #defines to change the required functionality?

all advice gratefully received,

Simon

Hi,

your Kernel modifications must be added in the form of patches to target/linux/brcm63xx/patches[-2.6.x]/.
If you have completely new files, e.g. a new flashmap or something, you can put it into target/linux/brcm63xx/files[-2.6.x]/.

A subtarget is probably the best way to add this board.

so, if I understand correctly...

modify files in build directory, build, test, test, test,

then create patches to go into the patches folder in the target folder.
(how is this done?  do I need to keep the original files and then diff them?)
At this point, a clean/rebuild should automagically make modified files and build correctly...

Then run
svn diff > all_changes.patch
to gather all the new patches and build file changes into one patch for submission?
(do i need to svn add the new patch files I created?).

please confirm..

I'll look into how to make it a sub-target.

br,

simon

simonh wrote:

modify files in build directory, build, test, test, test,

Start with a clean, unmodified build_dir

simonh wrote:

then create patches to go into the patches folder in the target folder.
(how is this done?  do I need to keep the original files and then diff them?)

http://wiki.openwrt.org/doc/devel/patches
Summary:

$ make target/linux/{clean,prepare} V=99 QUILT=1
$ cd build_dir/linux-brcm63xx/linux-2.6.*/
$ quilt push -a
$ quilt new platform/990-add-my-board.patch
$ quilt edit arch/mips/...
$ quilt edit drivers/...
$ quilt refresh
$ cd ../../../
$ make target/linux/update
$ make target/linux/{clean,compile,install} V=99
simonh wrote:

Then run
svn diff > all_changes.patch
to gather all the new patches and build file changes into one patch for submission?

Correct. You should split it into parts though, one for modifying the kernel, one for adding the subtarget definitions etc.

simonh wrote:

(do i need to svn add the new patch files I created?).

Yes.

Note that I forgot "make target/linux/update" in my previous post, I updated it accordingly. Will add a link to the wiki page as well.

ok, patch submitted;

how does the patch get included in the trunk?  What is the procedure, and do I need to progress it with anyone specific?

The discussion might have continued from here.