Debian Codegraph @

initrd/make-arm-initrd.sh

raw symbols SCIP
1 #!/bin/bashscip-shell filesystem . . `/bin/bash`.
2 # prototype to create initrd for arm.
3 set -o pipefail
4 set -e
5 rmscip-shell system . . rm. -rf .initrd-arm
6 mkdirscip-shell system . . mkdir. .initrd-arm || truescip-shell system . . true.
7 (
8 for DIR in etc root proc dev dev/pts mnt; do
9 echoscip-shell system . . echo. "mkdir .initrd-arm/$DIR"
10 done
11 for DEBS in arm/*.deb; do
12 echoscip-shell system . . echo. "dpkg -x $DEBS .initrd-arm"
13 done
14 for DEV in "dev/sda b 8 0" "dev/sdb b 8 16"; do
15 echoscip-shell system . . echo. "mknod .initrd-arm/${DEV}"
16 done
17 echoscip-shell system . . echo. "cp ./quick-arm-init.sh .initrd-arm/init"
18 echoscip-shell system . . echo. "chmod a+x .initrd-arm/init"
19 echoscip-shell system . . echo. "mv .initrd-arm/lib/modules/{2.6.26-2-versatile,linux-live}"
20 echoscip-shell system . . echo. "touch .initrd-arm/etc/fstab"
21 echoscip-shell system . . echo. "(cd .initrd-arm && find . | cpio -H newc -o | gzip -9 > ../initrd.arm.gz.tmp)"
22 # for debugging
23 # echo "find .initrd-arm/ -ls"
24 echoscip-shell system . . echo. "ls -l .initrd-arm/dev"
25 ) | fakerootscip-shell system . . fakeroot.
26 mvscip-shell system . . mv. initrd.arm.gz.tmp initrd.arm.gz
27
28 # this requires base-armel.qemu image accessible from user
29 qemu-system-arm -kernel .initrd-arm/boot/vmlinuz-2.6.26-2-versatile \
30 -hda ~/tmp/base-armel.qemu \
31 -hdb /dev/zeroscip-shell filesystem . . `/dev/zero`. \
32 -initrd ./initrd.arm.gz \
33 -serial stdio \
34 -append "console=ttyAMA0 pbuilderarch=armel init=/bin/bash" \
35 -M versatilepb
36