comparison simple-root-filesystem.sh @ 1727:45c936d93711 draft

Drop ROOT_NODIRS, it's not worth the complexity to support both layouts.
author Rob Landley <rob@landley.net>
date Sun, 11 Jan 2015 12:01:30 -0600
parents b871f0e7b837
children
comparison
equal deleted inserted replaced
1726:36beae266f90 1727:45c936d93711
11 check_for_base_arch || exit 0 11 check_for_base_arch || exit 0
12 check_prerequisite "${ARCH}-cc" 12 check_prerequisite "${ARCH}-cc"
13 13
14 # Determine which directory layout we're using 14 # Determine which directory layout we're using
15 15
16 if [ -z "$ROOT_NODIRS" ] 16 mkdir -p "$STAGE_DIR"/{tmp,proc,sys,dev,home,mnt,root} &&
17 then 17 chmod a+rwxt "$STAGE_DIR/tmp" || dienow
18 mkdir -p "$STAGE_DIR"/{tmp,proc,sys,dev,home,mnt,root} &&
19 chmod a+rwxt "$STAGE_DIR/tmp" || dienow
20 18
21 STAGE_USR="$STAGE_DIR/usr" 19 STAGE_USR="$STAGE_DIR/usr"
22 20
23 # Having lots of repeated locations at / and also under /usr is silly, so 21 # Having lots of repeated locations at / and also under /usr is silly, so
24 # symlink them together. (The duplication happened back in the 1970's 22 # symlink them together. (The duplication happened back in the 1970's
25 # when Ken and Dennis ran out of space on their PDP-11's root disk and 23 # when Ken and Dennis ran out of space on their PDP-11's root disk and
26 # leaked the OS into the disk containing the user home directories. It's 24 # leaked the OS into the disk containing the user home directories. It's
27 # been mindlessly duplicated ever since.) 25 # been mindlessly duplicated ever since.)
28 for i in bin sbin lib etc 26 for i in bin sbin lib etc
29 do 27 do
30 mkdir -p "$STAGE_USR/$i" && ln -s "usr/$i" "$STAGE_DIR/$i" || dienow 28 mkdir -p "$STAGE_USR/$i" && ln -s "usr/$i" "$STAGE_DIR/$i" || dienow
31 done 29 done
32
33 else
34 STAGE_USR="$STAGE_DIR" && mkdir -p "$STAGE_DIR/bin" || dienow
35 fi
36 30
37 # Copy qemu setup script and so on. 31 # Copy qemu setup script and so on.
38 32
39 cp -r "$SOURCES/root-filesystem/." "$STAGE_USR/" && 33 cp -r "$SOURCES/root-filesystem/." "$STAGE_USR/" &&
40 echo -e "CROSS_TARGET=$CROSS_TARGET\nKARCH=$KARCH" > \ 34 echo -e "CROSS_TARGET=$CROSS_TARGET\nKARCH=$KARCH" > \