|
|
|
@ -18,7 +18,7 @@ DIR=$PWD
|
|
|
|
|
|
|
|
|
|
function dl_xload_uboot {
|
|
|
|
|
# sudo rm -rfd ${DIR}/deploy/ || true
|
|
|
|
|
mkdir -p ${DIR}/deploy/
|
|
|
|
|
mkdir -p ${DIR}/deploy/${DIST}
|
|
|
|
|
|
|
|
|
|
echo ""
|
|
|
|
|
echo "Downloading X-loader, Uboot, Kernel and Debian Installer"
|
|
|
|
@ -39,20 +39,20 @@ function dl_xload_uboot {
|
|
|
|
|
case "$DIST" in
|
|
|
|
|
lucid)
|
|
|
|
|
KERNEL=${KERNEL_REL}-l${KERNEL_PATCH}
|
|
|
|
|
rm -f ${DIR}/deploy/initrd.gz || true
|
|
|
|
|
wget -c --directory-prefix=${DIR}/deploy/ http://ports.ubuntu.com/ubuntu-ports/dists/${DIST}/main/installer-armel/current/images/versatile/netboot/initrd.gz
|
|
|
|
|
wget -c --directory-prefix=${DIR}/deploy/ http://ports.ubuntu.com/pool/universe/m/mtd-utils/mtd-utils_20090606-1_armel.deb
|
|
|
|
|
rm -f ${DIR}/deploy/${DIST}/initrd.gz || true
|
|
|
|
|
wget -c --directory-prefix=${DIR}/deploy/${DIST} http://ports.ubuntu.com/ubuntu-ports/dists/${DIST}/main/installer-armel/current/images/versatile/netboot/initrd.gz
|
|
|
|
|
wget -c --directory-prefix=${DIR}/deploy/${DIST} http://ports.ubuntu.com/pool/universe/m/mtd-utils/mtd-utils_20090606-1_armel.deb
|
|
|
|
|
;;
|
|
|
|
|
squeeze)
|
|
|
|
|
KERNEL=${KERNEL_REL}-x${KERNEL_PATCH}
|
|
|
|
|
rm -f ${DIR}/deploy/initrd.gz || true
|
|
|
|
|
wget -c --directory-prefix=${DIR}/deploy/ http://ftp.debian.org/debian/dists/${DIST}/main/installer-armel/current/images/versatile/netboot/initrd.gz
|
|
|
|
|
rm -f ${DIR}/deploy/${DIST}/initrd.gz || true
|
|
|
|
|
wget -c --directory-prefix=${DIR}/deploy/${DIST} http://ftp.debian.org/debian/dists/${DIST}/main/installer-armel/current/images/versatile/netboot/initrd.gz
|
|
|
|
|
;;
|
|
|
|
|
esac
|
|
|
|
|
|
|
|
|
|
wget -c --directory-prefix=${DIR}/deploy/ ${MIRROR}${DIST}/v${KERNEL}/linux-image-${KERNEL}_1.0${DIST}_armel.deb
|
|
|
|
|
wget -c --directory-prefix=${DIR}/deploy/${DIST} ${MIRROR}${DIST}/v${KERNEL}/linux-image-${KERNEL}_1.0${DIST}_armel.deb
|
|
|
|
|
|
|
|
|
|
wget -c --directory-prefix=${DIR}/deploy/ ${MIRROR}${DIST}/v${KERNEL}/initrd.img-${KERNEL}
|
|
|
|
|
wget -c --directory-prefix=${DIR}/deploy/${DIST} ${MIRROR}${DIST}/v${KERNEL}/initrd.img-${KERNEL}
|
|
|
|
|
|
|
|
|
|
if [ "${FIRMWARE}" ] ; then
|
|
|
|
|
|
|
|
|
@ -62,8 +62,8 @@ if [ "${FIRMWARE}" ] ; then
|
|
|
|
|
|
|
|
|
|
case "$DIST" in
|
|
|
|
|
lucid)
|
|
|
|
|
wget -c --directory-prefix=${DIR}/deploy/ http://ports.ubuntu.com/pool/main/l/linux-firmware/linux-firmware_1.34_all.deb
|
|
|
|
|
wget -c --directory-prefix=${DIR}/deploy/ http://ports.ubuntu.com/pool/multiverse/l/linux-firmware-nonfree/linux-firmware-nonfree_1.8_all.deb
|
|
|
|
|
wget -c --directory-prefix=${DIR}/deploy/${DIST} http://ports.ubuntu.com/pool/main/l/linux-firmware/linux-firmware_1.34_all.deb
|
|
|
|
|
wget -c --directory-prefix=${DIR}/deploy/${DIST} http://ports.ubuntu.com/pool/multiverse/l/linux-firmware-nonfree/linux-firmware-nonfree_1.8_all.deb
|
|
|
|
|
;;
|
|
|
|
|
squeeze)
|
|
|
|
|
#from: http://packages.debian.org/source/squeeze/firmware-nonfree
|
|
|
|
@ -72,28 +72,28 @@ case "$DIST" in
|
|
|
|
|
rm -f ${DIR}/deploy/index.html || true
|
|
|
|
|
wget --directory-prefix=${DIR}/deploy/ ftp://ftp.us.debian.org/debian/pool/non-free/a/atmel-firmware/
|
|
|
|
|
ATMEL_FW=$(cat ${DIR}/deploy/index.html | grep atmel | grep -v diff.gz | grep -v .dsc | grep -v orig.tar.gz | tail -1 | awk -F"\"" '{print $2}')
|
|
|
|
|
wget -c --directory-prefix=${DIR}/deploy/ ${ATMEL_FW}
|
|
|
|
|
wget -c --directory-prefix=${DIR}/deploy/${DIST} ${ATMEL_FW}
|
|
|
|
|
ATMEL_FW=${ATMEL_FW##*/}
|
|
|
|
|
|
|
|
|
|
#Ralink
|
|
|
|
|
rm -f ${DIR}/deploy/index.html || true
|
|
|
|
|
wget --directory-prefix=${DIR}/deploy/ ftp://ftp.us.debian.org/debian/pool/non-free/f/firmware-nonfree/
|
|
|
|
|
RALINK_FW=$(cat ${DIR}/deploy/index.html | grep ralink | grep -v lenny | tail -1 | awk -F"\"" '{print $2}')
|
|
|
|
|
wget -c --directory-prefix=${DIR}/deploy/ ${RALINK_FW}
|
|
|
|
|
wget -c --directory-prefix=${DIR}/deploy/${DIST} ${RALINK_FW}
|
|
|
|
|
RALINK_FW=${RALINK_FW##*/}
|
|
|
|
|
|
|
|
|
|
#libertas
|
|
|
|
|
rm -f ${DIR}/deploy/index.html || true
|
|
|
|
|
wget --directory-prefix=${DIR}/deploy/ ftp://ftp.us.debian.org/debian/pool/non-free/libe/libertas-firmware/
|
|
|
|
|
LIBERTAS_FW=$(cat ${DIR}/deploy/index.html | grep libertas | grep -v diff.gz | grep -v .dsc | grep -v orig.tar.gz | tail -1 | awk -F"\"" '{print $2}')
|
|
|
|
|
wget -c --directory-prefix=${DIR}/deploy/ ${LIBERTAS_FW}
|
|
|
|
|
wget -c --directory-prefix=${DIR}/deploy/${DIST} ${LIBERTAS_FW}
|
|
|
|
|
LIBERTAS_FW=${LIBERTAS_FW##*/}
|
|
|
|
|
|
|
|
|
|
#zd1211
|
|
|
|
|
rm -f ${DIR}/deploy/index.html || true
|
|
|
|
|
wget --directory-prefix=${DIR}/deploy/ ftp://ftp.us.debian.org/debian/pool/non-free/z/zd1211-firmware/
|
|
|
|
|
ZD1211_FW=$(cat ${DIR}/deploy/index.html | grep zd1211 | grep -v diff.gz | grep -v tar.gz | grep -v .dsc | tail -1 | awk -F"\"" '{print $2}')
|
|
|
|
|
wget -c --directory-prefix=${DIR}/deploy/ ${ZD1211_FW}
|
|
|
|
|
wget -c --directory-prefix=${DIR}/deploy/${DIST} ${ZD1211_FW}
|
|
|
|
|
ZD1211_FW=${ZD1211_FW##*/}
|
|
|
|
|
;;
|
|
|
|
|
esac
|
|
|
|
@ -106,29 +106,29 @@ function prepare_uimage {
|
|
|
|
|
sudo rm -rfd ${DIR}/kernel || true
|
|
|
|
|
mkdir -p ${DIR}/kernel
|
|
|
|
|
cd ${DIR}/kernel
|
|
|
|
|
sudo dpkg -x ${DIR}/deploy/linux-image-${KERNEL}_1.0${DIST}_armel.deb ${DIR}/kernel
|
|
|
|
|
sudo dpkg -x ${DIR}/deploy/${DIST}/linux-image-${KERNEL}_1.0${DIST}_armel.deb ${DIR}/kernel
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function prepare_initrd {
|
|
|
|
|
sudo rm -rfd ${DIR}/initrd-tree || true
|
|
|
|
|
mkdir -p ${DIR}/initrd-tree
|
|
|
|
|
cd ${DIR}/initrd-tree
|
|
|
|
|
sudo zcat ${DIR}/deploy/initrd.gz | sudo cpio -i -d
|
|
|
|
|
sudo dpkg -x ${DIR}/deploy/linux-image-${KERNEL}_1.0${DIST}_armel.deb ${DIR}/initrd-tree
|
|
|
|
|
sudo zcat ${DIR}/deploy/${DIST}/initrd.gz | sudo cpio -i -d
|
|
|
|
|
sudo dpkg -x ${DIR}/deploy/${DIST}/linux-image-${KERNEL}_1.0${DIST}_armel.deb ${DIR}/initrd-tree
|
|
|
|
|
|
|
|
|
|
if [ "${FIRMWARE}" ] ; then
|
|
|
|
|
|
|
|
|
|
case "$DIST" in
|
|
|
|
|
lucid)
|
|
|
|
|
sudo dpkg -x ${DIR}/deploy/linux-firmware_1.34_all.deb ${DIR}/initrd-tree
|
|
|
|
|
sudo dpkg -x ${DIR}/deploy/linux-firmware-nonfree_1.8_all.deb ${DIR}/initrd-tree
|
|
|
|
|
sudo dpkg -x ${DIR}/deploy/${DIST}/linux-firmware_1.34_all.deb ${DIR}/initrd-tree
|
|
|
|
|
sudo dpkg -x ${DIR}/deploy/${DIST}/linux-firmware-nonfree_1.8_all.deb ${DIR}/initrd-tree
|
|
|
|
|
;;
|
|
|
|
|
squeeze)
|
|
|
|
|
#from: http://packages.debian.org/source/squeeze/firmware-nonfree
|
|
|
|
|
sudo dpkg -x ${DIR}/deploy/${ATMEL_FW} ${DIR}/initrd-tree
|
|
|
|
|
sudo dpkg -x ${DIR}/deploy/${RALINK_FW} ${DIR}/initrd-tree
|
|
|
|
|
sudo dpkg -x ${DIR}/deploy/${LIBERTAS_FW} ${DIR}/initrd-tree
|
|
|
|
|
sudo dpkg -x ${DIR}/deploy/${ZD1211_FW} ${DIR}/initrd-tree
|
|
|
|
|
sudo dpkg -x ${DIR}/deploy/${DIST}/${ATMEL_FW} ${DIR}/initrd-tree
|
|
|
|
|
sudo dpkg -x ${DIR}/deploy/${DIST}/${RALINK_FW} ${DIR}/initrd-tree
|
|
|
|
|
sudo dpkg -x ${DIR}/deploy/${DIST}/${LIBERTAS_FW} ${DIR}/initrd-tree
|
|
|
|
|
sudo dpkg -x ${DIR}/deploy/${DIST}/${ZD1211_FW} ${DIR}/initrd-tree
|
|
|
|
|
;;
|
|
|
|
|
esac
|
|
|
|
|
|
|
|
|
@ -183,7 +183,7 @@ case "$DIST" in
|
|
|
|
|
#sudo cp -v ${DIR}/scripts/e2fsck.conf ${DIR}/initrd-tree/etc/e2fsck.conf
|
|
|
|
|
sudo cp -v ${DIR}/scripts/flash-kernel.conf ${DIR}/initrd-tree/etc/flash-kernel.conf
|
|
|
|
|
sudo cp -v ${DIR}/scripts/ttyS2.conf ${DIR}/initrd-tree/etc/ttyS2.conf
|
|
|
|
|
sudo dpkg -x ${DIR}/deploy/mtd-utils_20090606-1_armel.deb ${DIR}/initrd-tree
|
|
|
|
|
sudo dpkg -x ${DIR}/deploy/${DIST}/mtd-utils_20090606-1_armel.deb ${DIR}/initrd-tree
|
|
|
|
|
;;
|
|
|
|
|
squeeze)
|
|
|
|
|
sudo cp -v ${DIR}/scripts/e2fsck.conf ${DIR}/initrd-tree/etc/e2fsck.conf
|
|
|
|
@ -241,7 +241,7 @@ sudo cp -v ${DIR}/deploy/${MLO} ${DIR}/disk/MLO
|
|
|
|
|
sudo cp -v ${DIR}/deploy/${UBOOT} ${DIR}/disk/u-boot.bin
|
|
|
|
|
|
|
|
|
|
sudo mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n initramfs -d ${DIR}/initrd.mod ${DIR}/disk/uInitrd
|
|
|
|
|
sudo mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n initramfs -d ${DIR}/deploy/initrd.img-${KERNEL} ${DIR}/disk/uInitrd.final
|
|
|
|
|
sudo mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n initramfs -d ${DIR}/deploy/${DIST}/initrd.img-${KERNEL} ${DIR}/disk/uInitrd.final
|
|
|
|
|
sudo mkimage -A arm -O linux -T kernel -C none -a 0x80008000 -e 0x80008000 -n ${KERNEL} -d ${DIR}/kernel/boot/vmlinuz-* ${DIR}/disk/uImage
|
|
|
|
|
|
|
|
|
|
if [ "${SERIAL_MODE}" ] ; then
|
|
|
|
|