PR/49596: mkimage: incorrect permissions on evbarm images
Use NetBSD.dist in our mtree specification to populate the top level directories, etc. For each generated file hand craft an mtree entry. Remove specialdirs as NetBSD.dist creates /proc and /kern.
This commit is contained in:
parent
132c2164b7
commit
1714369b9e
|
@ -1,9 +1,8 @@
|
|||
# $NetBSD: evbarm.conf,v 1.17 2014/11/25 13:42:31 jmcneill Exp $
|
||||
# $NetBSD: evbarm.conf,v 1.18 2015/01/23 15:17:58 skrll Exp $
|
||||
# evbarm shared config
|
||||
#
|
||||
image=$HOME/${board}.img
|
||||
|
||||
specialdirs="/kern /proc"
|
||||
MACHINE=evbarm
|
||||
|
||||
swap=256
|
||||
|
@ -107,6 +106,8 @@ make_fstab_evbarm() {
|
|||
else
|
||||
make_fstab_evbarm_normal
|
||||
fi
|
||||
echo "./etc/fstab type=file uname=root gname=wheel mode=0644" \
|
||||
>> "$tmp/selected_sets"
|
||||
}
|
||||
|
||||
customize_evbarm() {
|
||||
|
@ -133,6 +134,7 @@ EOF
|
|||
${HOST_SH} ${release}/dev/MAKEDEV -s all | sed -e 's:^\./:\./dev/:' \
|
||||
>> "$tmp/selected_sets"
|
||||
|
||||
echo "${bar} creating directories ${bar}"
|
||||
mkdir ${mnt}/proc ${mnt}/kern
|
||||
echo "${bar} fixing up permissions"
|
||||
echo "./boot type=dir uname=root gname=wheel mode=0755" \
|
||||
>> "$tmp/selected_sets"
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: rpi_inst.conf,v 1.5 2014/04/03 01:36:20 ozaki-r Exp $
|
||||
# $NetBSD: rpi_inst.conf,v 1.6 2015/01/23 15:17:58 skrll Exp $
|
||||
# Raspberry Pi customization script used by mkimage
|
||||
#
|
||||
|
||||
|
@ -9,8 +9,6 @@ kernel=$src/sys/arch/evbarm/compile/RPI/netbsd-RPI_INSTALL.bin
|
|||
|
||||
image=$HOME/${board}.img
|
||||
|
||||
specialdirs="/kern /proc"
|
||||
|
||||
swap=8
|
||||
extra=8 # spare space
|
||||
boot=112
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: usermode.conf,v 1.3 2013/02/03 09:16:25 christos Exp $
|
||||
# $NetBSD: usermode.conf,v 1.4 2015/01/23 15:17:58 skrll Exp $
|
||||
# NetBSD/usermode customization script used by mkimage
|
||||
|
||||
# XXX: BROKEN, needs to be converted to makefs
|
||||
|
@ -8,7 +8,6 @@ overhead=8 # in MB
|
|||
sets="base etc modules"
|
||||
setsdir=/usr/build/release/$(uname -m)/binary/sets
|
||||
size=0 # in MB
|
||||
specialdirs="/kern /proc"
|
||||
usermodedirs="/var.cow /etc.cow /root.cow /pkgs"
|
||||
|
||||
make_filesystems() {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: x86.conf,v 1.5 2014/12/14 00:28:46 christos Exp $
|
||||
# $NetBSD: x86.conf,v 1.6 2015/01/23 15:17:58 skrll Exp $
|
||||
# x86 shared config
|
||||
#
|
||||
|
||||
|
@ -7,8 +7,6 @@ MACHINE=${board}
|
|||
kernel=$src/sys/arch/${board}/compile/GENERIC/netbsd
|
||||
bootfile=$release/usr/mdec/boot
|
||||
|
||||
specialdirs="/kern /proc"
|
||||
|
||||
extra=8 # spare space
|
||||
size=0 # autocompute
|
||||
netbsdid=169
|
||||
|
@ -93,6 +91,8 @@ make_fstab() {
|
|||
else
|
||||
make_fstab_normal
|
||||
fi
|
||||
echo "./etc/fstab type=file uname=root gname=wheel mode=0755" \
|
||||
>> "$tmp/selected_sets"
|
||||
}
|
||||
|
||||
customize() {
|
||||
|
@ -136,4 +136,9 @@ populate() {
|
|||
exit 1
|
||||
fi
|
||||
cp ${bootfile} ${mnt}/boot
|
||||
|
||||
echo "./netbsd type=file uname=root gname=wheel mode=0755" \
|
||||
>> "$tmp/selected_sets"
|
||||
echo "./boot type=file uname=root gname=wheel mode=0444" \
|
||||
>> "$tmp/selected_sets"
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/bin/sh
|
||||
# $NetBSD: mkimage,v 1.50 2015/01/18 17:37:54 skrll Exp $
|
||||
# $NetBSD: mkimage,v 1.51 2015/01/23 15:17:58 skrll Exp $
|
||||
#
|
||||
# Copyright (c) 2013, 2014 The NetBSD Foundation, Inc.
|
||||
# All rights reserved.
|
||||
|
@ -154,7 +154,7 @@ esac
|
|||
|
||||
if [ -z "${bootonly}" ]; then
|
||||
echo ${bar} configuring sets ${bar}
|
||||
(echo '/set type=dir uname=root gname=wheel mode=0755'
|
||||
(cat "${release}/etc/mtree/NetBSD.dist"
|
||||
for i in $selected_sets; do
|
||||
s="${release}/etc/mtree/set.$i"
|
||||
if [ -f "$s" ]; then
|
||||
|
@ -167,10 +167,6 @@ make_fstab
|
|||
customize
|
||||
populate
|
||||
|
||||
if [ -z "${bootonly}" ]; then
|
||||
(cd ${mnt}; ${MTREE} -N ${release}/etc -c -k all |
|
||||
${MTREE} -N ${release}/etc -C -k all) >> "$tmp/selected_sets"
|
||||
fi
|
||||
if [ -n "${msdosid}" ]; then
|
||||
echo ${bar} Populating msdos filesystem ${bar}
|
||||
${MAKEFS} -N ${release}/etc -t msdos \
|
||||
|
|
Loading…
Reference in New Issue