aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm63xx/modules.mk
Commit message (Expand)AuthorAgeFilesLines
* kernel: remove kernel module checks/dependencies for 3.14Felix Fietkau2015-04-111-2/+1
* brcm63xx: kmod-bcm63xx-udc: fix module path for 3.18+Jonas Gorski2015-03-151-1/+3
* brcm63xx: package the USB gadget module (bcm63xx_udc)Florian Fainelli2014-01-141-0/+16
* bcm63xx: move bcm63xx-spi into the kernelJonas Gorski2013-01-231-16/+0
* bcm63xx: bcm63xx-spi does not depend on spi-bitbangJonas Gorski2012-07-031-1/+1
* bcm63xx: drop linux 3.2 supportJonas Gorski2012-04-241-7/+2
* bcm63xx: replace SPI driver with latest upstream versionJonas Gorski2012-03-281-2/+7
* fix and make usable kmod-pcmcia-rsrcFlorian Fainelli2011-06-211-1/+1
* massive: replace occurences of .$(LINUX_KMOD_SUFFIX) with .ko after r21950Claudio Mignanti2010-07-121-2/+2
* package/kernel: move PCMCIA modules to their own file & submenuNicolas Thill2010-04-241-1/+1
* package/kernel: move target specific modules to their own target filesNicolas Thill2010-04-241-0/+37
dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
#!/bin/sh

BLKSZ=65536

[ -f "$1" -a -f "$2" ] || {
	echo "Usage: $0 <kernel image> <rootfs image> [output file]"
	exit 1
}

IMAGE=${3:-openwrt-combined.img}

# Make sure provided images are 64k aligned.
kern="${IMAGE}.kernel"
root="${IMAGE}.rootfs"
dd if="$1" of="$kern" bs=$BLKSZ conv=sync 2>/dev/null
dd if="$2" of="$root" bs=$BLKSZ conv=sync 2>/dev/null

# Calculate md5sum over combined kernel and rootfs image.
md5=$(cat "$kern" "$root" | md5sum -)

# Write image header followed by kernel and rootfs image.
# The header is padded to 64k, format is:
#  CI               magic word ("Combined Image")
#  <kernel length>  length of kernel encoded as zero padded 8 digit hex
#  <rootfs length>  length of rootfs encoded as zero padded 8 digit hex
#  <md5sum>         checksum of the combined kernel and rootfs image
( printf "CI%08x%08x%32s" \
	$(stat -c "%s" "$kern") $(stat -c "%s" "$root") "${md5%% *}" | \
	dd bs=$BLKSZ conv=sync;
  cat "$kern" "$root"
) > ${IMAGE} 2>/dev/null

# Clean up.
rm -f "$kern" "$root"