Skip to content

Commit

Permalink
tools: make sure initramfs-tools dtbo hook is installed on all systems
Browse files Browse the repository at this point in the history
fixes: RobertCNelson/bb-kernel#23 (comment)
Signed-off-by: Robert Nelson <[email protected]>
  • Loading branch information
RobertCNelson committed Mar 8, 2016
1 parent 53c83b4 commit 13b3fcc
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
5 changes: 3 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash -e
#
# Copyright (c) 2015 Robert Nelson <[email protected]>
# Copyright (c) 2015-2016 Robert Nelson <[email protected]>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -38,7 +38,8 @@ pkg="build-essential"
check_dpkg

if [ ! -f /usr/share/initramfs-tools/hooks/dtbo ] ; then
deb_pkgs="${deb_pkgs}bb-customizations "
sudo cp -v ./tools/dtbo /usr/share/initramfs-tools/hooks/dtbo
sudo chmod +x /usr/share/initramfs-tools/hooks/dtbo
else
if [ ! -x /usr/share/initramfs-tools/hooks/dtbo ] ; then
sudo chmod +x /usr/share/initramfs-tools/hooks/dtbo
Expand Down
15 changes: 15 additions & 0 deletions tools/dtbo
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh -e
# Copy the *.dtbo's into the initramfs

if [ "$1" = "prereqs" ]; then exit 0; fi

. /usr/share/initramfs-tools/hook-functions

if [ -d /lib/firmware/ ] ; then
unset check
check=$(ls /lib/firmware/ | grep dtbo | head -n 1)
if [ ! "x${check}" = "x" ] ; then
mkdir -p $DESTDIR/lib/firmware/
cp -a /lib/firmware/*.dtbo $DESTDIR/lib/firmware/
fi
fi

0 comments on commit 13b3fcc

Please sign in to comment.