Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/distrib/utils/embedded these changes produce a bootable syst...



details:   https://anonhg.NetBSD.org/src/rev/a667e30655ae
branches:  trunk
changeset: 328334:a667e30655ae
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Mar 31 17:05:03 2014 +0000

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

diffstat:

 distrib/utils/embedded/conf/evbarm.conf |  5 ++++-
 distrib/utils/embedded/conf/x86.conf    |  4 +++-
 distrib/utils/embedded/mkimage          |  6 +++---
 3 files changed, 10 insertions(+), 5 deletions(-)

diffs (69 lines):

diff -r 136334a27b2b -r a667e30655ae distrib/utils/embedded/conf/evbarm.conf
--- a/distrib/utils/embedded/conf/evbarm.conf   Mon Mar 31 16:20:48 2014 +0000
+++ b/distrib/utils/embedded/conf/evbarm.conf   Mon Mar 31 17:05:03 2014 +0000
@@ -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 @@
 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 ))
diff -r 136334a27b2b -r a667e30655ae distrib/utils/embedded/conf/x86.conf
--- a/distrib/utils/embedded/conf/x86.conf      Mon Mar 31 16:20:48 2014 +0000
+++ b/distrib/utils/embedded/conf/x86.conf      Mon Mar 31 17:05:03 2014 +0000
@@ -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 @@
 size=0         # autocompute
 netbsdid=169
 
+ffsoffset=$((63 * 512))
+
 make_label_x86() {
        # compute all sizes in terms of sectors
        local totalsize=$(( ${newsize} * 1024 * 2 / 512 ))
diff -r 136334a27b2b -r a667e30655ae distrib/utils/embedded/mkimage
--- a/distrib/utils/embedded/mkimage    Mon Mar 31 16:20:48 2014 +0000
+++ b/distrib/utils/embedded/mkimage    Mon Mar 31 17:05:03 2014 +0000
@@ -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 @@
 
 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 @@
 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



Home | Main Index | Thread Index | Old Index