File: 98-uboot

package info (click to toggle)
python-diskimage-builder 3.37.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,572 kB
  • sloc: sh: 7,380; python: 6,444; makefile: 37
file content (37 lines) | stat: -rwxr-xr-x 916 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash

if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then
    set -x
fi
set -eu
set -o pipefail

function post_process()
{
    mkimage -A $1 -O linux -T kernel -C none -a $UBOOT_KERNEL_ADDR -e $UBOOT_KERNEL_EP -n "Kernel" -d $KERNEL uImage
    mv uImage $KERNEL
    mkimage -A $1 -O linux -T ramdisk -a 0 -n "RAMdisk" -C gzip -d $RAMDISK uInitrd
    mv uInitrd $RAMDISK
}

UBOOT_KERNEL_ADDR=${UBOOT_KERNEL_ADDR:-0x80000}
UBOOT_KERNEL_EP=${UBOOT_KERNEL_EP:-0x80000}
[ -n "$TARGET_ROOT" ]

# Check if RAMDISK is being built.
if [ -f "$TARGET_ROOT/tmp/ramdisk" ] ; then
    KERNEL="$TARGET_ROOT/tmp/kernel"
    RAMDISK="$TARGET_ROOT/tmp/ramdisk"
else
    source "$_LIB/img-functions"
    # Dig up the initrd and kernel to use.
    select_boot_kernel_initrd "$TARGET_ROOT"
    KERNEL="$TARGET_ROOT/boot/$KERNEL"
    RAMDISK="$TARGET_ROOT/boot/$RAMDISK"
fi

case "$ARCH" in
    arm*)
        post_process arm
        ;;
esac