OLD | NEW |
(Empty) | |
| 1 #!/bin/bash |
| 2 |
| 3 . debian/debian.env |
| 4 |
| 5 echo "SUB_PROCESS $FROM => $TO" |
| 6 |
| 7 export from_pkg="linux-image-$ABI_RELEASE-$FROM" |
| 8 export to_pkg="linux-image-$ABI_RELEASE-$TO" |
| 9 |
| 10 from_moddir="debian/$from_pkg/lib/modules/$ABI_RELEASE-$FROM" |
| 11 to_moddir="debian/$to_pkg/lib/modules/$ABI_RELEASE-$FROM" |
| 12 |
| 13 install -d "debian/$to_pkg/boot" |
| 14 install -m644 debian/$from_pkg/boot/{vmlinuz,System.map,config}-$ABI_RELEASE-$FR
OM \ |
| 15 debian/$to_pkg/boot/ |
| 16 |
| 17 # |
| 18 # Print some warnings if there are files in the sub-flavours list |
| 19 # that do not actually exist. |
| 20 # |
| 21 cat ${DEBIAN}/sub-flavours/$TO.list | while read line |
| 22 do |
| 23 ( |
| 24 cd debian/$from_pkg/lib/modules/$ABI_RELEASE-$FROM/kernel; |
| 25 # |
| 26 # If its a wildcard, then check that there are files that match. |
| 27 # |
| 28 if echo "$line" | grep '\*' > /dev/null |
| 29 then |
| 30 if [ `eval find "$line" -name '*.ko' 2>/dev/null|wc -l` -lt 1 ] |
| 31 then |
| 32 echo SUB_INST Warning - No files in $line |
| 33 fi |
| 34 # |
| 35 # Else it should be a single file reference. |
| 36 # |
| 37 elif [ ! -f "$line" ] |
| 38 then |
| 39 echo SUB_INST Warning - could not find "$line" |
| 40 fi |
| 41 ) |
| 42 done |
| 43 |
| 44 cat ${DEBIAN}/sub-flavours/$TO.list | while read line; do |
| 45 ( |
| 46 cd debian/$from_pkg/lib/modules/$ABI_RELEASE-$FROM/kernel; |
| 47 if echo "$line" | grep '\*' > /dev/null |
| 48 then |
| 49 eval find "$line" -name '*.ko' 2>/dev/null || true |
| 50 elif [ -f "$line" ] |
| 51 then |
| 52 echo "$line" |
| 53 fi |
| 54 ); |
| 55 done | while read mod; do |
| 56 echo "SUB_INST checking: $mod" |
| 57 fromdir="/lib/modules/$ABI_RELEASE-$FROM/" |
| 58 egrep "^($fromdir)?kernel/$mod:" \ |
| 59 $from_moddir/modules.dep | sed -e "s|^$fromdir||" -e 's/://' -e
's/ /\n/g' | \ |
| 60 while read m; do |
| 61 m="${fromdir}$m" |
| 62 test -f debian/$to_pkg/$m && continue |
| 63 echo "SUB_INST installing: $m" |
| 64 install -D -m644 debian/$from_pkg/$m \ |
| 65 debian/$to_pkg/$m |
| 66 done |
| 67 done |
OLD | NEW |