Module Name:    src
Committed By:   christos
Date:           Mon Mar 31 17:05:03 UTC 2014

Modified Files:
        src/distrib/utils/embedded: mkimage
        src/distrib/utils/embedded/conf: evbarm.conf x86.conf

Log Message:
these changes produce a bootable system under qemu, but its root is trashed.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/distrib/utils/embedded/mkimage
cvs rdiff -u -r1.14 -r1.15 src/distrib/utils/embedded/conf/evbarm.conf
cvs rdiff -u -r1.1 -r1.2 src/distrib/utils/embedded/conf/x86.conf

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/utils/embedded/mkimage
diff -u src/distrib/utils/embedded/mkimage:1.45 src/distrib/utils/embedded/mkimage:1.46
--- src/distrib/utils/embedded/mkimage:1.45	Mon Mar 31 12:20:48 2014
+++ src/distrib/utils/embedded/mkimage	Mon Mar 31 13:05:03 2014
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $NetBSD: mkimage,v 1.45 2014/03/31 16:20:48 christos Exp $
+# $NetBSD: mkimage,v 1.46 2014/03/31 17:05:03 christos Exp $
 #
 # Copyright (c) 2013, 2014 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -52,7 +52,7 @@ bar="==="
 
 tmp="$(mktemp -d "/tmp/$PROG.XXXXXX")"
 mnt="${tmp}/mnt"
-mkdir -p "${mnt}/etc" "${mnt}/dev" "${mnt}/boot"
+mkdir -p "${mnt}/etc" "${mnt}/dev"
 
 trap "cleanup" 0 1 2 3 15
 
@@ -178,7 +178,7 @@ fi
 if [ -z "${bootonly}" ]; then
 	echo ${bar} Populating ffs filesystem ${bar}
 	${MAKEFS} -N ${release}/etc -t ffs -rx \
-	    -O $(((${init} + ${boot} + ${swap}) / 2))m \
+	    -O ${ffsoffset} \
 	    -o d=4096 -b $((${extra}))m \
 	    -F "$tmp/selected_sets" ${image} "${release}" "${mnt}"
 fi

Index: src/distrib/utils/embedded/conf/evbarm.conf
diff -u src/distrib/utils/embedded/conf/evbarm.conf:1.14 src/distrib/utils/embedded/conf/evbarm.conf:1.15
--- src/distrib/utils/embedded/conf/evbarm.conf:1.14	Mon Mar 31 12:20:49 2014
+++ src/distrib/utils/embedded/conf/evbarm.conf	Mon Mar 31 13:05:03 2014
@@ -1,4 +1,4 @@
-# $NetBSD: evbarm.conf,v 1.14 2014/03/31 16:20:49 christos Exp $
+# $NetBSD: evbarm.conf,v 1.15 2014/03/31 17:05:03 christos Exp $
 # evbarm shared config
 #
 image=$HOME/${board}.img
@@ -10,10 +10,13 @@ swap=256
 extra=8		# spare space
 boot=112
 init=8
+ffsoffset=$(( (${init} + ${boot} + ${swap}) / 2 ))m
 
 size=0		# autocompute
 msdosid=12
 
+mkdir -p ${mnt}/boot
+
 make_label_evbarm() {
 	# compute all sizes in terms of sectors
 	local totalsize=$(( ${newsize} * 1024 * 2 / 512 ))

Index: src/distrib/utils/embedded/conf/x86.conf
diff -u src/distrib/utils/embedded/conf/x86.conf:1.1 src/distrib/utils/embedded/conf/x86.conf:1.2
--- src/distrib/utils/embedded/conf/x86.conf:1.1	Mon Mar 31 12:20:49 2014
+++ src/distrib/utils/embedded/conf/x86.conf	Mon Mar 31 13:05:03 2014
@@ -1,4 +1,4 @@
-# $NetBSD: x86.conf,v 1.1 2014/03/31 16:20:49 christos Exp $
+# $NetBSD: x86.conf,v 1.2 2014/03/31 17:05:03 christos Exp $
 # x86 shared config
 #
 image=$HOME/${board}.img
@@ -11,6 +11,8 @@ extra=8		# spare space
 size=0		# autocompute
 netbsdid=169
 
+ffsoffset=$((63 * 512))
+
 make_label_x86() {
 	# compute all sizes in terms of sectors
 	local totalsize=$(( ${newsize} * 1024 * 2 / 512 ))

Reply via email to