|
Revision 3379, 1.6 kB
(checked in by tg, 5 years ago)
|
nuke FWRT_KILL_FWCF
|
| Line | |
|---|
| 1 |
|
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
install-prepare_DEPS?= |
|---|
| 8 |
|
|---|
| 9 |
install-prepare: install-prepare-dirs ${install-prepare_DEPS} \ |
|---|
| 10 |
install-prepare-mi-pre install-prepare-md install-prepare-mi-post |
|---|
| 11 |
|
|---|
| 12 |
install-prepare-dirs: |
|---|
| 13 |
mkdir -p ${KDIR}/root |
|---|
| 14 |
|
|---|
| 15 |
install-prepare-mi-pre: |
|---|
| 16 |
|
|---|
| 17 |
install-prepare-mi-post: |
|---|
| 18 |
mkdir -p $(KDIR)/root/tmp |
|---|
| 19 |
rng=/dev/arandom; test -e $$rng || rng=/dev/urandom; \ |
|---|
| 20 |
dd if=$$rng bs=512 count=1 >>${KDIR}/root/etc/.rnd; \ |
|---|
| 21 |
chmod 600 ${KDIR}/root/etc/.rnd |
|---|
| 22 |
@if [[ -d ${TOPDIR}/target/extra ]]; then \ |
|---|
| 23 |
echo Copying extra files into the filesystem image; \ |
|---|
| 24 |
cd ${TOPDIR}/target/extra; \ |
|---|
| 25 |
pax -rw -v -pe . ${KDIR}/root/; \ |
|---|
| 26 |
fi |
|---|
| 27 |
|
|---|
| 28 |
@cd ${KDIR}; ls=; ln=; li=; x=1; md5sum $$(find root -type f) | \ |
|---|
| 29 |
while read sum name; do \ |
|---|
| 30 |
inode=$$(ls -i "$$name"); \ |
|---|
| 31 |
echo "$$sum $${inode%% *} $$name"; \ |
|---|
| 32 |
done | sort | while read sum inode name; do \ |
|---|
| 33 |
if [[ $$sum = $$ls ]]; then \ |
|---|
| 34 |
[[ $$li = $$inode ]] && continue; \ |
|---|
| 35 |
case $$x in \ |
|---|
| 36 |
1) echo 'WARNING: duplicate files found' \ |
|---|
| 37 |
'in filesystem! Please fix them.' >&2; \ |
|---|
| 38 |
echo -n "> $$ln "; \ |
|---|
| 39 |
;; \ |
|---|
| 40 |
2) echo -n "> $$ln "; \ |
|---|
| 41 |
;; \ |
|---|
| 42 |
3) echo -n ' '; \ |
|---|
| 43 |
;; \ |
|---|
| 44 |
esac; \ |
|---|
| 45 |
echo -n "$$name"; \ |
|---|
| 46 |
x=3; \ |
|---|
| 47 |
else \ |
|---|
| 48 |
case $$x in \ |
|---|
| 49 |
3) echo; \ |
|---|
| 50 |
x=2; \ |
|---|
| 51 |
;; \ |
|---|
| 52 |
esac; \ |
|---|
| 53 |
fi; \ |
|---|
| 54 |
ls=$$sum; \ |
|---|
| 55 |
ln=$$name; \ |
|---|
| 56 |
li=$$inode; \ |
|---|
| 57 |
done |
|---|
| 58 |
chmod 4511 ${KDIR}/root/bin/busybox |
|---|
| 59 |
chmod 1777 ${KDIR}/root/tmp |
|---|
| 60 |
|
|---|
| 61 |
|
|---|