Building and Debugging

To see all output and errors:

make V=99

To build packages which are not (yet) selected:

make package/xyz-compile V=99 DEVELOPER=1

Rebuild package index (for opkg download)

make package/index

Rebuild the kernel

make target/linux-compile

Configuration

Authorized SSH keys

Put DSA public key in /etc/dropbear/authorized_keys

scp ~/.ssh/id_dsa.pub root@IP:/etc/dropbear/authorized_keys
(or to keep old keys)
cat ~/.ssh/id_dsa.pub | ssh root@IP "cat >> /etc/dropbear/authorized_keys"

Creating a Public Key on OpenWRT:

 dropbearkey -y -t rsa -f /etc/dropbear/dropbear_rsa_host_key | grep ssh-dss
(or)
 dropbearkey -y -t dss -f /etc/dropbear/dropbear_dss_host_key | grep ssh-dss

Login:

ssh -i /etc/dropbear/dropbear_dss_host_key IP

Misc

Seeing the contents of a jffs2 "image" file

modprobe mtdcore
modprobe jffs2
modprobe mtdram total_size=25600 erase_size=256
modprobe mtdchar
modprobe mtdblock

dd if=jffs2.image of=/dev/mtd0
mount -t jffs2 /dev/mtdblock0 /mnt/

If the image is in a different endian format than your host, you need to convert it first. E.g:

jffs2dump -b -r -e conv.jffs2 openwrt-ar71xx-root.jffs2-128k

If you have a full disk image with 2 partitions, you need to mount the partitions separately:

fdisk -l -u -C 592 image

Multiply the result in "Start" column by the sectors (from the output of the command). Use this value as offset to mount; in this case it's 63*512.

Mount the ext2 boot partition:

mount -o loop,offset=32256 image /mnt/part1

Preparing the jffs2 partition:

dd if=bin/openwrt-x86-jffs2-128k.image bs=512 skip=9135 of=/dev/mtd0

OpenWrtNotes (last edited 2010-11-25 02:52:40 by Br1)