Skip to content

Automatically exported from code.google.com/p/debwrtcn

License

Notifications You must be signed in to change notification settings

mike22437120/debwrtcn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is the DebWrt build environment. It is heavily based on OpenWrt's build environment and heavily uses Emdebian and Debootstrap for all Debian related actions. DebWrt connects two very powerfull technologies: Debian and OpenWrt. Debian has a great package management system and includes thousands of packages for many architectures. OpenWrt has great Linux kernel support for many embedded devices. Bringing these two strenghts together opens a whole new world of possibilities.
 DebWrtSvn  
Updated Nov 3, 2010 by [email protected]
SVN HTTP Repository Access
To checkout the DebWrt build environment, use:
svn co http://debwrtcn.googlecode.com/svn/trunk
The DebWrt build environment has been developed and tested on Ubuntu. However I do expect that building on other Linux distributions should work.
Much more information on using the DebWrt build environment will follow.
Pre-requisites
Kernel:
make openwrt/all will give a list of dependencies
Root filesystem & Cross compile environment:
debootstrap, comes with any Debian or Ubuntu versions
run as normal user
gid of the normal user must be >= 1000
uid of the normal user must be >= 1000
this normal user must have sudo rights
debian packages
subversion
build-essentails
fakeroot
chroot
Do it all in one turn
make menuconfig
make V=99
Detailed build instructions
Kernel compile
make menuconfig
Select your target device type
And that should be it
( optional ) make openwrt/menuconfig
make openwrt/all V=99
binaries in bin/
follow instructions on OpenWrt how to flash the firmware to your specific device

Root filesystem creation: Stage 1
Preferably compile a kernel first, but this is not necessary
Make sure you have full sudo rights, preferably without the need for typing a password
All work is done in a chroot jail to prevent messing up the host root filesystem
make menuconfig
Select your target device type
Optional: selection Debian version
make debian/rootfs
rootfs in: build/rootfs-<ARCH>-<DEBWRT_RELEASE>-<DEBWRT_VERSION>-<RELEASE>/
install by copying manually or:
mount your USB Disk/USB Stick/SD Card/CF Card/IDE/SATA root partition with ext3 on /media/DEBWRT_ROOT
make debian/rootfs/install
it will install the rootfs in /media/DEBWRT_ROOT ( an rm -rf is done first! )
continue with stage 2
Root filesystem creation: Stage 2
Stage one prepared a filesystem with debootstrap. A DebWrt Debian root filesystem for the selected architecture(mips, mipsel, ...) has been created. It includes a default Debian installation with some important DebWrt cross-compiled packages installed. Flash the device with the appropriate DebWrt kernel. Boot the device. It will boot in 'firstboot' mode. When having a serial port, one will be able to immediately follow progress and see bash starting with some instructions. Otherwise connect to the device using ssh. Basically what needs to be done after logging in, is the debootstrap second stage install, which will install all Debian packages properly. This is a step that can not be done on the build host, because of the architecture mismatch. (I invested a lot of time in QEMU, but QEMU is not reliable for MIPS and MIPSEL. ARM works fine with QEMU )
When using SSH, the post-install instructions will not appear. Therefore see the instructions below which come from debwrt/trunk/debian/rootfs/files/init.d/rcS.firstboot:
/bin/echo
/bin/echo "Welcome to the DebWrt post installation!"
/bin/echo
/bin/echo "Press ctrl-d for normal boot. Use vim.tiny to edit files."
/bin/echo
/bin/echo "Note that both telnetd and sshd are running on: 192.168.1.1 and on 192.168.1.20."
/bin/echo
/bin/echo "Second stage install instructions:"
/bin/echo
/bin/echo "- /debootstrap/debootstrap --second-stage"
/bin/echo "- rm -rf /var/cache/apt/archives"
/bin/echo "- mkdir -p /var/cache/apt/archives/partial"
/bin/echo "- echo \"deb http://ftp.debian.org/debian squeeze main\" >>/etc/apt/sources.list"
/bin/echo "  OR"
/bin/echo "- echo \"deb http://ftp.debian.org/debian sid main\" >>/etc/apt/sources.list"
/bin/echo "- for Lenny: dpkg-reconfigure dash"
/bin/echo
/bin/echo " Don't execute these lines, these are a reminder for myself(amain) when preparing an DebWrt release:"
/bin/echo "- rm -rf /lib/modules/*"
/bin/echo "- rm -rf /lib/firmware/*"
/bin/echo
Root filesystem image information
See DebWrtRootfsImageInformation for default IP address, password, installed packages, etc.
How to use the Emdebian based cross-compile environment
Preferably compile a kernel first, but this is not necessary
Make sure you have full sudo rights, preferably without the need for typing a password
All work is done in a chroot jail to prevent messing up the host root filesystem
make menuconfig
Select your target device type
Optional: selection Debian version
make debian/buildenv
make chu - enter chroot as normal user
make ch - enter chroot as root
make debian/package/all - build all packages
make debian/package/XX - build a specific package
make debian/package/XX/clean - clean up a specific package
note: have a look in the Makefiles, there are a lot more Makefile targets ( pre setup commands ) available doing all kinds of handy stuff.

About

Automatically exported from code.google.com/p/debwrtcn

Resources

License

Stars

Watchers

Forks

Packages

No packages published