diff options
Diffstat (limited to 'packages/linux/ixp4xx-kernel.inc')
-rw-r--r-- | packages/linux/ixp4xx-kernel.inc | 45 |
1 files changed, 22 insertions, 23 deletions
diff --git a/packages/linux/ixp4xx-kernel.inc b/packages/linux/ixp4xx-kernel.inc index 3a80703420..57d3028742 100644 --- a/packages/linux/ixp4xx-kernel.inc +++ b/packages/linux/ixp4xx-kernel.inc @@ -26,6 +26,8 @@ SECTION = "kernel" DESCRIPTION = "Linux kernel for the Intel IXP4xx device" LICENSE = "GPL" +DEPENDS = "arm-kernel-shim devio-native" + # Linux kernel source has the general form linux-X.Y.Z-patchP, # X.Y is the major version number, Z (which may have multiple # parts) is a sub-version and 'patch' is something like 'mm' or @@ -298,12 +300,8 @@ pkg_postrm_kernel-image-fsg3 () { update-alternatives --remove ${KERNEL_IMAGETYPE} /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-fsg3${SITEINFO_ENDIANESS}-${KERNEL_VERSION} || true } -#FIXUP: the correct instructions to copy the kernel prepended with the le fixup -#FIXME: do a fixup for BE too... -FIXUP_armeb = "cp$" -FIXUP_arm = "wb 0xee110f10,4;wb 0xe3c00080,4;wb 0xee010f10,4;xp $,4" - -DEPENDS += "devio-native" +BYTESWAP_armeb = "cp$" +BYTESWAP_arm = "xp $,4" # We need the alternatives to happen in the kernel-image packages, not in # the kernel package, because only the images know the name of the kernel. @@ -312,22 +310,23 @@ pkg_postinst_kernel () { pkg_postrm_kernel () { } -# copy_image <dest> <cmdline> <machine-id> +# copy_image <dest> <machine> # copy the zImage and append the appropriate shim # dest: where to copy to -# cmdline: command line to pass to image -# machine-id: decimal machine id to prepend, empty for none +# machine: machine shim to prepend, empty for none copy_image() { - local setmach + local shim - setmach="" - test -n "$2" && setmach="wb $2 . 256/ 255& 0xe3a01c00+, 4; wb 255& 0xe3811000+, 4;" + shim="/dev/null" + test -n "$2" && shim="${STAGING_LOADER_DIR}/arm-kernel-shim-$2.bin" - rm -f "$1".new - devio '<<${KERNEL_OUTPUT}' >"$1".new "$setmach"'${FIXUP}' || { + rm -f "$1".new "$1".shimmed + cat $shim ${KERNEL_OUTPUT} > "$1".shimmed + devio '<<'"$1"'.shimmed' >"$1".new '${BYTESWAP}' || { echo 'ERROR: ${KERNEL_OUTPUT}: failed to copy zImage' >&2 return 1 } + rm -f "$1".shimmed mv "$1".new "$1" } @@ -338,14 +337,14 @@ install_image() { do_install_append() { # Overwrite the unshimmed generic image with a shimmed one (but without # any command line or machine id override). - rm -f '${D}/${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${KERNEL_VERISON}' + rm -f '${D}/${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${KERNEL_VERSION}' install_image '${MACHINE_ARCH}' # Add the machine specific images, with appropriate suffixes - install_image 'nslu2${SITEINFO_ENDIANESS}' '${nslu2_MACHID}' - install_image 'nas100d${SITEINFO_ENDIANESS}' '${nas100d_MACHID}' - install_image 'dsmg600${SITEINFO_ENDIANESS}' '${dsmg600_MACHID}' - install_image 'fsg3${SITEINFO_ENDIANESS}' '${fsg3_MACHID}' + install_image 'nslu2${SITEINFO_ENDIANESS}' 'nslu2' + install_image 'nas100d${SITEINFO_ENDIANESS}' 'nas100d' + install_image 'dsmg600${SITEINFO_ENDIANESS}' 'dsmg600' + install_image 'fsg3${SITEINFO_ENDIANESS}' 'fsg3' } do_deploy[dirs] = "${S}" @@ -359,10 +358,10 @@ do_deploy() { deploy_image '${MACHINE_ARCH}' # And the machine specific images - deploy_image 'nslu2${SITEINFO_ENDIANESS}' '${nslu2_MACHID}' - deploy_image 'nas100d${SITEINFO_ENDIANESS}' '${nas100d_MACHID}' - deploy_image 'dsmg600${SITEINFO_ENDIANESS}' '${dsmg600_MACHID}' - deploy_image 'fsg3${SITEINFO_ENDIANESS}' '${fsg3_MACHID}' + deploy_image 'nslu2${SITEINFO_ENDIANESS}' 'nslu2' + deploy_image 'nas100d${SITEINFO_ENDIANESS}' 'nas100d' + deploy_image 'dsmg600${SITEINFO_ENDIANESS}' 'dsmg600' + deploy_image 'fsg3${SITEINFO_ENDIANESS}' 'fsg3' } addtask deploy before do_build after do_compile |