Skip to content

Commit

Permalink
Merge branch 'devel'
Browse files Browse the repository at this point in the history
  • Loading branch information
FooDeas committed Dec 28, 2018
2 parents e393980 + 734281b commit cf07db8
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 14 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## raspberrypi-ua-netinst v2.3.0

- support for version 3 model A+

**Bugfixes:**

- allow reinstall with new kernel versions
- minor fixes and improvements

## raspberrypi-ua-netinst v2.2.2

- build improvements
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ The installer with the default settings configures eth0 with DHCP to get interne

## Requirements

- a Raspberry Pi (from model 1B up to 3B, 3B+ or Zero including Zero W)
- a Raspberry Pi (from model 1B up to 3B, 3A+, 3B+ or Zero including Zero W)
- SD card with at least 1GB, or at least 128MB for USB root install (without customization)
- ethernet or wireless LAN with a working internet connection

Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,7 @@ mv raspberrypi-ua-netinst.cpio.gz bootfs/raspberrypi-ua-netinst/
echo "enable_uart=1"
} >> bootfs/config.txt

echo "rootfstype=ramfs dwc_otg.lpm_enable=0 consoleblank=0 console=serial0,115200 console=tty1 elevator=deadline rootwait" > bootfs/cmdline.txt
echo "dwc_otg.lpm_enable=0 consoleblank=0 console=serial0,115200 console=tty1 elevator=deadline rootwait" > bootfs/cmdline.txt

if [ ! -f bootfs/TIMEOUT ] ; then
touch bootfs/TIMEOUT
Expand Down
2 changes: 1 addition & 1 deletion doc/INSTALL_CUSTOM.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@

| Parameter | Default | Options | Description |
|-------------------------|------------|--------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `gpu_mem` | `16` | | Specifies the amount of RAM in MB that should be reserved for the GPU. To allow the VideoCore GPU kernel driver to be loaded correctly, you should use at least "32". If not defined, the bootloader sets it to 64MB. The minimum value is "16". |
| `gpu_mem` | | | Specifies the amount of RAM in MB that should be reserved for the GPU. To allow the VideoCore GPU kernel driver to be loaded correctly, you should use at least "32". If not defined, the bootloader sets it to 64MB. The minimum value is "16". |
| `console_blank` | | | Sets console blanking timeout (screensaver) in seconds. Default kernel setting is 10 minutes (`600`). The value `0` disables the blanking completely. |
| `hdmi_type` | | `tv`/ `monitor` | Forces HDMI mode and disables automatic display identification. Choose between TV or monitor mode and specify the resolution with the options below. If not defined, the automatic display setting is used to determine the information sent by the display. |
| `hdmi_tv_res` | `1080p` | `720p`/ `1080i`/ `1080p` | Specifies the display resolution if `hdmi_type` is set to TV mode. |
Expand Down
43 changes: 32 additions & 11 deletions scripts/opt/raspberrypi-ua-netinst/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,7 @@ case "${rpi_hardware}" in
"a22082") rpi_hardware_version="3 Model B" ;;
"a32082") rpi_hardware_version="3 Model B" ;;
"a020d3") rpi_hardware_version="3 Model B+" ;;
"9020e0") rpi_hardware_version="3 Model A+" ;;
*) rpi_hardware_version="unknown (${rpi_hardware})" ;;
esac

Expand All @@ -674,6 +675,10 @@ echo "=================================================="
echo "https://github.com/FooDeas/raspberrypi-ua-netinst/"
echo "=================================================="

echo -n "Remounting TempFS... "
mount -o remount,size=80% / || fail
echo "OK"

echo -n "Mounting boot partition... "
mount "${bootpartition}" /boot || fail
echo "OK"
Expand Down Expand Up @@ -866,6 +871,23 @@ fi
echo " online_config = ${online_config}"
echo

# create symlink for other kernel modules if needed
if [ ! -e "/lib/modules/$(uname -r)" ]; then
echo "Kernel modules for the kernel version \"$(uname -r)\" could not be found. Searching for alternatives..."
if [[ "$(uname -r)" =~ -v7\+$ ]]; then
kernel_modulepath="$(find /lib/modules/ -maxdepth 1 -type d ! -path /lib/modules/ | grep -e "[^/]\+-v7+$" | head -1)"
else
kernel_modulepath="$(find /lib/modules/ -maxdepth 1 -type d ! -path /lib/modules/ | grep -ve "[^/]\+-v7+$" | head -1)"
fi
if [ -z "${kernel_modulepath}" ] ; then
echo "ERROR: No kernel modules could be found!"
fail_blocking
fi
#kernel_modulename="$("${kernel_modulepath}" | grep -oe "[^/]\+$"\")"
echo " Using modules of kernel version \"$(echo "${kernel_modulepath}" | grep -oe "[^/]\+$")\"."
ln -s "${kernel_modulepath}" "/lib/modules/$(uname -r)"
fi

# depmod needs to update modules.dep before using modprobe
depmod -a
find /sys/ -name modalias -print0 | xargs -0 sort -u | xargs modprobe -abq
Expand Down Expand Up @@ -1119,7 +1141,7 @@ if [ -z "${cdebootstrap_cmdline}" ]; then

# always add packages if requested or needed
if [ "${firmware_packages}" = "1" ]; then
custom_packages_postinstall="${custom_packages_postinstall},firmware-atheros,firmware-brcm80211,firmware-libertas,firmware-ralink,firmware-realtek"
custom_packages_postinstall="${custom_packages_postinstall},firmware-atheros,firmware-brcm80211,firmware-libertas,firmware-misc-nonfree,firmware-realtek"
fi
if [ -n "${locales}" ] || [ -n "${system_default_locale}" ]; then
custom_packages="${custom_packages},locales"
Expand Down Expand Up @@ -1155,7 +1177,7 @@ if [ -z "${cdebootstrap_cmdline}" ]; then
base_packages_postinstall="${base_packages_postinstall},raspberrypi-kernel"
fi
base_packages_postinstall="${custom_packages_postinstall},${base_packages_postinstall}"

# minimal
minimal_packages="cpufrequtils,ifupdown,net-tools,openssh-server,dosfstools"
if [ "${init_system}" != "systemd" ]; then
Expand Down Expand Up @@ -1567,11 +1589,10 @@ for i in $(seq 1 "${installer_pkg_downloadretries}"); do
else
unset http_proxy
if [ "${i}" -eq "${installer_pkg_downloadretries}" ]; then
echo
echo " ERROR: ${cdebootstrap_exitcode}"
echo -e "\n ERROR: ${cdebootstrap_exitcode}"
fail
else
echo " ERROR: ${cdebootstrap_exitcode}, trying again ($((i+1))/${installer_pkg_downloadretries})..."
echo -e "\n ERROR: ${cdebootstrap_exitcode}, trying again ($((i+1))/${installer_pkg_downloadretries})..."
fi
fi
done
Expand Down Expand Up @@ -1763,7 +1784,7 @@ if echo "${cdebootstrap_cmdline} ${packages_postinstall}" | grep -q "ifupdown";
echo "auto lo" >> /rootfs/etc/network/interfaces
echo "iface lo inet loopback" >> /rootfs/etc/network/interfaces
fi

# configured interface
echo >> /rootfs/etc/network/interfaces
echo "allow-hotplug ${ifname}" >> /rootfs/etc/network/interfaces
Expand All @@ -1778,7 +1799,7 @@ if echo "${cdebootstrap_cmdline} ${packages_postinstall}" | grep -q "ifupdown";
echo " gateway ${ip_gateway}"
} >> /rootfs/etc/network/interfaces
fi

# wlan config
if echo "${ifname}" | grep -q "wlan"; then
if [ -e "${wlan_configfile}" ]; then
Expand All @@ -1794,15 +1815,15 @@ if echo "${cdebootstrap_cmdline} ${packages_postinstall}" | grep -q "ifupdown";
echo "iface eth0 inet dhcp"
} >> /rootfs/etc/network/interfaces
fi

# Customize cmdline.txt
if [ "${disable_predictable_nin}" = "1" ]; then
# as described here: https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames
# adding net.ifnames=0 to /boot/cmdline and disabling the persistent-net-generator.rules
line_add cmdline_custom "net.ifnames=0"
ln -s /dev/null /rootfs/etc/udev/rules.d/75-persistent-net-generator.rules
fi

# copy resolv.conf
echo -n " Configuring nameserver... "
if [ -e "/etc/resolv.conf" ]; then
Expand All @@ -1816,7 +1837,7 @@ if echo "${cdebootstrap_cmdline} ${packages_postinstall}" | grep -q "ifupdown";
echo "MISSING !"
fail
fi

echo "OK"
fi

Expand Down Expand Up @@ -2096,7 +2117,7 @@ if [ "${kernel_module}" = true ]; then
else
echo "FAILED !"
fi

unset DEBIAN_FRONTEND
fi

Expand Down

0 comments on commit cf07db8

Please sign in to comment.