Menu

Debian_Linux_Kernel_Package_Installation

Gerhard Pircher

Debian Linux Kernel Package Installation

Please take a look at the amigaworld.net forum for the installation instructions at the moment.

However the following script can be used with the AmigaOne Debian kernel packages to build suitable boot images that consist of a cuImage and a generated initrd image:

#!/bin/sh

if [ -e "/etc/issue.net" ]; then
    issue=`cat /etc/issue.net`
else
    issue="Linux boot image"
fi

#
# Generate boot images.
#

for cuimage in /boot/cuImage.amigaone-*; do
    image=`mkimage -l "$cuimage"`

    compression=`echo "$image" | grep "uncompressed"`
    # <cut> could be replaced with <awk '{ print $3 }'>
    loadaddr=`echo "$image" | grep "Load Address" | cut -f3 -d' '`
    # <cut> could be replaced with <awk '{ print $3 }'>
    entryaddr=`echo "$image" | grep "Entry Point" | cut -f4 -d' '`
    rawcuimage="/boot/cuImage.amigaone.img-${cuimage#*-}"
    initrd="/boot/initrd.img-${cuimage#*-}"
    bootimg="/boot/boot.img.amigaone-${cuimage#*-}"

    if [ -z "$compression" ]; then
        echo "Warning: ignoring ${cuimage}, because it is a compressed image!"
        continue
    fi
    if [ ! -e "$rawcuimage" ]; then
        echo "Error: couldn't find raw image for ${cuimage}!"
        continue
    fi
    if [ ! -e "$initrd" ]; then
        echo "Error: couldn't find initrd for ${cuimage}!"
        continue
    fi

    mkimage -A ppc -O Linux -T multi -C none -a $loadaddr -e $entryaddr \
            -n "$issue" -d "$rawcuimage":"$initrd" "$bootimg"
done

#
# Install boot images in corresponding boot directory.
#

# Gather UUID of root filesystem with blkid command.
root=`mount | grep " / " | cut -d' ' -f1`
fs=`blkid "$root" | cut -d' ' -f2- | tr -d '"'`

installed=false

for keyvalue in $fs; do
    key=`echo "$keyvalue" | cut -d'=' -f1`
    value=`echo "$keyvalue" | cut -d'=' -f2`

    if [ "$key" = "UUID" ]; then
        if [ -e "/boot/a1boot/${value}" ]; then
            cp -a /boot/boot.img.amigaone-* "/boot/a1boot/${value}/"
            installed=true
            break
        fi
    fi
done

if ! $installed ; then
    echo "Error: Couldn't find boot directory for this installation!"
    exit 100
fi

This wiki article will be updated as soon as possible.


Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.