Commit 48255c97 authored by root's avatar root

Refs #2826 - initial raspbian buster pxe/netboot files

parent 1fba0681
#!/bin/sh
PREREQ=""
prereqs()
{
echo "$PREREQ"
}
case $1 in
prereqs)
prereqs
exit 0
;;
esac
. /usr/share/initramfs-tools/hook-functions
# Begin real processing below this line
copy_exec /bin/ip /sbin
copy_exec /sbin/ifconfig /sbin
copy_exec /usr/bin/cut /sbin
copy_exec /bin/grep /sbin
copy_exec /bin/sed /sbin
#
# initramfs.conf
#
#
# MODULES: [ most | netboot | dep | list ]
#
# most - Add all framebuffer, acpi, filesystem, and harddrive drivers.
#
# netboot - Add the base modules, network modules, but skip block devices.
#
# dep - Try and guess which modules to load.
#
# list - Only include modules from the 'additional modules' list
#
MODULES=most
# BUSYBOX: [ y | n ]
#
# Use busybox if available. You MUST use the -static version
#
BUSYBOX=y
#
# COMPCACHE_SIZE: [ "x K" | "x M" | "x G" | "x %" ]
#
# Amount of RAM to use for RAM-based compressed swap space.
#
# An empty value - compcache isn't used, or added to the initramfs at all.
# An integer and K (e.g. 65536 K) - use a number of kilobytes.
# An integer and M (e.g. 256 M) - use a number of megabytes.
# An integer and G (e.g. 1 G) - use a number of gigabytes.
# An integer and % (e.g. 50 %) - use a percentage of the amount of RAM.
#
# You can optionally install the compcache package to configure this setting
# via debconf and have userspace scripts to load and unload compcache.
#
COMPCACHE_SIZE=""
#
# COMPRESS: [ gzip | bzip2 | lzma | lzop | xz ]
#
COMPRESS=gzip
#
# BOOT: [ local | nfs ]
#
# local - Boot off of local media (harddrive, USB stick).
#
# nfs - Boot using an NFS drive as the root of the drive.
#
BOOT=nfs
#
# NFS Section of the config.
#
#
# DEVICE: ...
#
# Specify the network device, like eth0
#
DEVICE=
#
# NFSROOT: [ auto | HOST:MOUNT ]
#
NFSROOT=auto
# Hardcode partition to resume from so it doesn't have to be specified
# on the command line. If the initramfs-tools package installation was
# able to guess a reasonable default for this setting, you can find it
# configured in conf.d/resume. Manually specifying "resume=" on your
# kernel command line will always override this setting.
#RESUME=
# NOTE: when you add a module to this list,
# NOTE: please be sure to update and rebuild linux-image-diskless too
# NOTE: reference: ubuntu/linux-image-dummy/makepackage.sh
#smsc95xx
#!/bin/sh
PREREQ=""
# Output pre-requisites
prereqs()
{
echo "$PREREQ"
}
case "$1" in
prereqs)
prereqs
exit 0
;;
esac
DT=2216
#for d in /sys/bus/pci/devices/*; do
# if [[ ! -f "$d/vendor" ]]; then
# continue
# fi
# vendor=$(cat "$d/vendor")
# device=$(cat "$d/device")
# if [[ "$vendor:$device" == "0x1106:0x3157" ]]; then
# DT=1893 # Fiire Station 1
# break
# fi
#done
echo "$DT"
#!/bin/sh
PREREQ=""
# Output pre-requisites
prereqs()
{
echo "$PREREQ"
}
case "$1" in
prereqs)
prereqs
exit 0
;;
esac
exec 1>&2
sleep 5
wait_for_udev 10
#DT=$(/scripts/DeviceTemplate)
#PNP_ID=$(/scripts/PlugNPlayID)
PNP_ID="rpi_b"
MyIP=`ifconfig eth0 | grep "inet addr" | sed -r 's/^.* inet addr:([0-9.]*).*/\1/g'`
MyMAC=`ifconfig eth0 | grep "HWaddr " | sed -r 's/^.* HWaddr ([a-zA-Z0-9:]*)/\1/g'`
Gateway=`ip route | grep "default via" | cut -d " " -f3`
#Temporarily Removed until amd64 builds are re-instated. -tschak
#if grep -q "^flags.* lm" /proc/cpuinfo ;then
# Architecture="amd64"
#fi
#Architecture="i386"
Architecture="armhf"
DD="$Architecture"
CpuSerial=$(cat /proc/cpuinfo | grep Serial | cut -d' ' -f2 | sed 's/^0*//')
DD="$DD|161|$CpuSerial"
echo "IP: $MyIP; MAC: $MyMAC; Gateway: $Gateway; DeviceData: $DD; PNP_ID: $PNP_ID"
/scripts/interactor "$Gateway" "$MyIP" "$MyMAC" "$DD" "$PNP_ID" "select"
clear
echo "ERROR: Cannot connect to router, rebooting in 5 seconds.."
sleep 5
reboot
#!/bin/sh
PREREQ=""
# Output pre-requisites
prereqs()
{
echo "$PREREQ"
}
case "$1" in
prereqs)
prereqs
exit 0
;;
esac
wait_for_udev 10
sleep 10
wait_for_udev 10
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment