cleaner nas eclass design

This commit is contained in:
Mario Fetka 2011-12-11 13:52:41 +01:00
parent 9db96852e3
commit 9d18de7992

View File

@ -430,84 +430,61 @@ _kernel_src_compile() {
if [ "${K_NASKERNEL_NAME}" = "buffalo_ls_pro_live" ]; then
devio > foo 'wl 0xe3a01c06,4' 'wl 0xe3811031,4' # Linkstation Pro/Live (2.6.26)
cat foo "${WORKDIR}"/boot/kernel-genkernel-${ARCH}-${KV_FULL} > zImage.new
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n uImage-${KV_FULL} \
-d zImage.new "${WORKDIR}"/boot/uImage-genkernel-${ARCH}-${KV_FULL}.buffalo
rm foo zImage.new
mkimage -A arm -O linux -T ramdisk -C none -a 0x00000000 -e 0x00000000 -n initrd-${KV_FULL} \
-d "${WORKDIR}"/boot/initramfs-genkernel-${ARCH}-${KV_FULL} "${WORKDIR}"/boot/initrd-genkernel-${ARCH}-${KV_FULL}.buffalo
rm "${WORKDIR}"/boot/kernel-genkernel-${ARCH}-${KV_FULL} "${WORKDIR}"/boot/initramfs-genkernel-${ARCH}-${KV_FULL}
K_NASKERNEL_TYPE="buffalo"
fi
if [ "${K_NASKERNEL_NAME}" = "buffalo_ls_pro" ]; then
devio > foo 'wl 0xe3a01c06,4' 'wl 0xe3811031,4' # Linkstation Pro/Live (2.6.26)
K_NASKERNEL_TYPE="buffalo"
fi
if [ "${K_NASKERNEL_NAME}" = "buffalo_ls_live" ]; then
devio > foo 'wl 0xe3a01c06,4' 'wl 0xe3811031,4' # Linkstation Pro/Live (2.6.26)
K_NASKERNEL_TYPE="buffalo"
fi
if [ "${K_NASKERNEL_NAME}" = "buffalo_ls_pro_duo" ]; then
devio > foo 'wl 0xe3a01c07,4' 'wl 0xe3811027,4' # Linkstation Pro Duo (2.6.30)
cat foo "${WORKDIR}"/boot/kernel-genkernel-${ARCH}-${KV_FULL} > zImage.new
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n uImage-${KV_FULL} \
-d zImage.new "${WORKDIR}"/boot/uImage-genkernel-${ARCH}-${KV_FULL}.buffalo
rm foo zImage.new
mkimage -A arm -O linux -T ramdisk -C none -a 0x00000000 -e 0x00000000 -n initrd-${KV_FULL} \
-d "${WORKDIR}"/boot/initramfs-genkernel-${ARCH}-${KV_FULL} "${WORKDIR}"/boot/initrd-genkernel-${ARCH}-${KV_FULL}.buffalo
rm "${WORKDIR}"/boot/kernel-genkernel-${ARCH}-${KV_FULL} "${WORKDIR}"/boot/initramfs-genkernel-${ARCH}-${KV_FULL}
K_NASKERNEL_TYPE="buffalo"
fi
if [ "${K_NASKERNEL_NAME}" = "buffalo_ls_xhl" ]; then
devio > foo 'wl 0xe3a01c0a,4' 'wl 0xe3811067,4' # Linkstation XHL/CHLv2 (2.6.30)
cat foo "${WORKDIR}"/boot/kernel-genkernel-${ARCH}-${KV_FULL} > zImage.new
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n uImage-${KV_FULL} \
-d zImage.new "${WORKDIR}"/boot/uImage-genkernel-${ARCH}-${KV_FULL}.buffalo
rm foo zImage.new
mkimage -A arm -O linux -T ramdisk -C none -a 0x00000000 -e 0x00000000 -n initrd-${KV_FULL} \
-d "${WORKDIR}"/boot/initramfs-genkernel-${ARCH}-${KV_FULL} "${WORKDIR}"/boot/initrd-genkernel-${ARCH}-${KV_FULL}.buffalo
rm "${WORKDIR}"/boot/kernel-genkernel-${ARCH}-${KV_FULL} "${WORKDIR}"/boot/initramfs-genkernel-${ARCH}-${KV_FULL}
K_NASKERNEL_TYPE="buffalo"
fi
if [ "${K_NASKERNEL_NAME}" = "buffalo_ls_chl2" ]; then
devio > foo 'wl 0xe3a01c0a,4' 'wl 0xe3811067,4' # Linkstation XHL/CHLv2 (2.6.30)
K_NASKERNEL_TYPE="buffalo"
fi
if [ "${K_NASKERNEL_NAME}" = "buffalo_ls_chl" ]; then
devio > foo 'wl 0xe3a01c0B,4' 'wl 0xe3811061,4' # Linkstation Live V3 (2.6.34)
cat foo "${WORKDIR}"/boot/kernel-genkernel-${ARCH}-${KV_FULL} > zImage.new
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n uImage-${KV_FULL} \
-d zImage.new "${WORKDIR}"/boot/uImage-genkernel-${ARCH}-${KV_FULL}.buffalo
rm foo zImage.new
mkimage -A arm -O linux -T ramdisk -C none -a 0x00000000 -e 0x00000000 -n initrd-${KV_FULL} \
-d "${WORKDIR}"/boot/initramfs-genkernel-${ARCH}-${KV_FULL} "${WORKDIR}"/boot/initrd-genkernel-${ARCH}-${KV_FULL}.buffalo
rm "${WORKDIR}"/boot/kernel-genkernel-${ARCH}-${KV_FULL} "${WORKDIR}"/boot/initramfs-genkernel-${ARCH}-${KV_FULL}
K_NASKERNEL_TYPE="buffalo"
fi
if [ "${K_NASKERNEL_NAME}" = "buffalo_ls_wxl" ]; then
devio > foo 'wl 0xe3a01c0b,4' 'wl 0xe38110c4,4' # Linkstation WXL (2.6.30)
cat foo "${WORKDIR}"/boot/kernel-genkernel-${ARCH}-${KV_FULL} > zImage.new
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n uImage-${KV_FULL} \
-d zImage.new "${WORKDIR}"/boot/uImage-genkernel-${ARCH}-${KV_FULL}.buffalo
rm foo zImage.new
mkimage -A arm -O linux -T ramdisk -C none -a 0x00000000 -e 0x00000000 -n initrd-${KV_FULL} \
-d "${WORKDIR}"/boot/initramfs-genkernel-${ARCH}-${KV_FULL} "${WORKDIR}"/boot/initrd-genkernel-${ARCH}-${KV_FULL}.buffalo
rm "${WORKDIR}"/boot/kernel-genkernel-${ARCH}-${KV_FULL} "${WORKDIR}"/boot/initramfs-genkernel-${ARCH}-${KV_FULL}
devio > foo 'wl 0xe3a01c0b,4' 'wl 0xe38110c4,4' # Linkstation WXL (2.6.35)
K_NASKERNEL_TYPE="buffalo"
fi
if [ "${K_NASKERNEL_NAME}" = "buffalo_ls_hgl" ]; then
devio > foo 'wl 0xe3a01c07,4' 'wl 0xe38110d5,4' # Linkstation HGL (2.6.30)
cat foo "${WORKDIR}"/boot/kernel-genkernel-${ARCH}-${KV_FULL} > zImage.new
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n uImage-${KV_FULL} \
-d zImage.new "${WORKDIR}"/boot/uImage-genkernel-${ARCH}-${KV_FULL}.buffalo
rm foo zImage.new
mkimage -A arm -O linux -T ramdisk -C none -a 0x00000000 -e 0x00000000 -n initrd-${KV_FULL} \
-d "${WORKDIR}"/boot/initramfs-genkernel-${ARCH}-${KV_FULL} "${WORKDIR}"/boot/initrd-genkernel-${ARCH}-${KV_FULL}.buffalo
rm "${WORKDIR}"/boot/kernel-genkernel-${ARCH}-${KV_FULL} "${WORKDIR}"/boot/initramfs-genkernel-${ARCH}-${KV_FULL}
devio > foo 'wl 0xe3a01c07,4' 'wl 0xe38110d5,4' # Linkstation HGL (2.6.31)
K_NASKERNEL_TYPE="buffalo"
fi
if [ "${K_NASKERNEL_NAME}" = "buffalo_ls_mini" ]; then
devio > foo 'wl 0xe3a01c07,4' 'wl 0xe3811042,4' # Linkstation mini (2.6.30)
cat foo "${WORKDIR}"/boot/kernel-genkernel-${ARCH}-${KV_FULL} > zImage.new
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n uImage-${KV_FULL} \
-d zImage.new "${WORKDIR}"/boot/uImage-genkernel-${ARCH}-${KV_FULL}.buffalo
rm foo zImage.new
mkimage -A arm -O linux -T ramdisk -C none -a 0x00000000 -e 0x00000000 -n initrd-${KV_FULL} \
-d "${WORKDIR}"/boot/initramfs-genkernel-${ARCH}-${KV_FULL} "${WORKDIR}"/boot/initrd-genkernel-${ARCH}-${KV_FULL}.buffalo
rm "${WORKDIR}"/boot/kernel-genkernel-${ARCH}-${KV_FULL} "${WORKDIR}"/boot/initramfs-genkernel-${ARCH}-${KV_FULL}
devio > foo 'wl 0xe3a01c07,4' 'wl 0xe3811042,4' # Linkstation mini (2.6.29)
K_NASKERNEL_TYPE="buffalo"
fi
if [ "${K_NASKERNEL_NAME}" = "buffalo_ls_vl" ]; then
devio > foo 'wl 0xe3a01c0d,4' 'wl 0xe381100a,4' # Linkstation vl (2.6.30)
devio > foo 'wl 0xe3a01c0d,4' 'wl 0xe381100a,4' # Linkstation vl (2.6.35)
K_NASKERNEL_TYPE="buffalo"
fi
# Buffalo Boxes have a special naming and start address
if [ "${K_NASKERNEL_TYPE}" = "buffalo" ]; then
cat foo "${WORKDIR}"/boot/kernel-genkernel-${ARCH}-${KV_FULL} > zImage.new
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n uImage-${KV_FULL} \
-d zImage.new "${WORKDIR}"/boot/uImage-genkernel-${ARCH}-${KV_FULL}.buffalo
rm foo zImage.new
mkimage -A arm -O linux -T ramdisk -C none -a 0x00000000 -e 0x00000000 -n initrd-${KV_FULL} \
-d "${WORKDIR}"/boot/initramfs-genkernel-${ARCH}-${KV_FULL} "${WORKDIR}"/boot/initrd-genkernel-${ARCH}-${KV_FULL}.buffalo
rm "${WORKDIR}"/boot/kernel-genkernel-${ARCH}-${KV_FULL} "${WORKDIR}"/boot/initramfs-genkernel-${ARCH}-${KV_FULL}
fi
# cleanup
rm foo zImage.new
rm "${WORKDIR}"/boot/kernel-genkernel-${ARCH}-${KV_FULL} "${WORKDIR}"/boot/initramfs-genkernel-${ARCH}-${KV_FULL}
}
nas-kernel_src_install() {