Confirmed update procedure for a self-hosted armv6hf system
Ian Lepore
ian at freebsd.org
Tue May 24 03:36:01 UTC 2016
On Mon, 2016-05-23 at 20:18 -0700, bob prohaska wrote:
> On Mon, May 23, 2016 at 08:49:57PM -0600, Ian Lepore wrote:
> >
> > Ut oh. It just popped into my head that the standard freebsd
> > update
> > procedure is to install the kernel, then reboot, then install the
> > world, right? (I've never once done it that way in 20 years of
> > using
> > freebsd, I always install both at once then reboot.)
> >
> My custom has been to build world and kernel, install world and
> kernel,
> then reboot promptly. Not sure where I got the habit from, the idea
> was to minimize mismatch between kernel and userland.
>
> > I think that may be the problem here, if you did it the right way.
> > Once you're running on the new kernel, TARGET_ARCH=armv6 isn't a
> > crossbuild anymore because it thinks armv6 is the current arch. I
> > wonder if it would work for you to try:
> >
> > setenv UNAME_P armv6hf
> > make -j6 installworld TARGET_ARCH=armv6
> >
> If I did this right, no luck...
>
> root at www:/usr/src # uname -p
> armv6hf
> root at www:/usr/src # setenv UNAME_P armv6hf
> root at www:/usr/src # make -j6 installworld TARGET_ARCH=armv6 >
> installworld.log &
> [1] 69457
> root at www:/usr/src # 1 error
>
> [1] Exit 2 make -j6 installworld
> TARGET_ARCH=armv6 > installworld.log
> root at www:/usr/src #
> root at www:/usr/src # tail -n100 installworld.log
> --- installworld ---
> --- __installcheck_UGID ---
> --- installworld ---
> mkdir -p /tmp/install.XvgDGNcF
> progs=$(for prog in [ awk cap_mkdb cat chflags chmod chown cmp cp
> date echo egrep find grep id install ln make mkdir mtree mv
> pwd_mkdb rm sed services_mkdb sh strip sysctl test true uname wc zic
> tzsetup makewhatis; do if progpath=`which $prog`; then echo
> $progpath; else echo "Required tool $prog not found in PATH." >&2;
> exit 1; fi; done); libs=$(ldd -f "%o %p\n" -f "%o %p\n" $progs
> 2>/dev/null | sort -u | while read line; do $line; if [ "$2 $3" !=
> "not found" ]; then echo $2; else echo "Required library $1 not
> found." >&2; exit 1; fi; done); cp $libs $progs
> /tmp/install.XvgDGNcF
> cp -R ${PATH_LOCALE:-"/usr/share/locale"}
> /tmp/install.XvgDGNcF/locale
> cd /usr/src; MAKEOBJDIRPREFIX=/usr/obj MACHINE_ARCH=armv6
> MACHINE=arm CPUTYPE=
> GROFF_BIN_PATH=/usr/obj/usr/src/tmp/legacy/usr/bin
> GROFF_FONT_PATH=/usr/obj/usr/src/tmp/legacy/usr/share/groff_font
> GROFF_TMAC_PATH=/usr/obj/usr/src/tmp/legacy/usr/share/tmac CC="cc "
> CXX="c++ " CPP="cpp " AS="as" AR="ar" LD="ld" NM=nm
> OBJDUMP=objdump OBJCOPY="objcopy" RANLIB=ranlib STRINGS=
> SIZE="size"
> PATH=/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/usr/src/tmp/legacy
> /usr/bin:/usr/obj/usr/src/tmp/legacy/bin:/usr/obj/usr/src/tmp/usr/sbi
> n:/usr/obj/usr/src/tmp/usr/bin:/tmp/install.XvgDGNcF
> LD_LIBRARY_PATH=/tmp/install.XvgDGNcF
> PATH_LOCALE=/tmp/install.XvgDGNcF/locale make -f Makefile.inc1
> __MAKE_SHELL=/tmp/install.XvgDGNcF/sh reinstall;
> MAKEOBJDIRPREFIX=/usr/obj MACHINE_ARCH=armv6 MACHINE=arm CPUTYPE=
> GROFF_BIN_PATH=/usr/obj/usr/src/tmp/legacy/usr/bin
> GROFF_FONT_PATH=/usr/obj/usr/src/tmp/legacy/usr/share/groff_font
> GROFF_TMAC_PATH=/usr/obj/usr/src/tmp/legacy/usr/share/tmac CC="cc "
> CXX="c++ " CPP="cpp " AS="as" AR="ar" LD="ld" NM=nm
> OBJDUMP=objdump OBJCOPY="objcopy" RANLIB=ranlib STRINGS=
> SIZE="size"
> PATH=/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/usr/src/tmp/legacy
> /usr/bin:/usr/obj/usr/src/tmp/legacy/bin:/usr/obj/usr/src/tmp/usr/sbi
> n:/usr/obj/usr/src/tmp/usr/bin:/tmp/install.XvgDGNcF
> LD_LIBRARY_PATH=/tmp/install.XvgDGNcF
> PATH_LOCALE=/tmp/install.XvgDGNcF/locale rm -rf
> /tmp/install.XvgDGNcF
> sh: cc: not found
> make[2]: "/usr/src/share/mk/bsd.compiler.mk" line 142: Unable to
> determine compiler type for CC=cc . Consider setting COMPILER_TYPE.
> *** [installworld] Error code 1
>
> Perhaps it's time to install the new kernel and reboot.
>
> I also have two kernels that report uname -p as armv6, one pre-hf and
> one post-hf. Worth a try?
>
> > As long as the build system uses uname (not sysctl
> > hw.machine_arch),
> > that should fool it enough to do the proper install.
>
> Thanks for all your help!
>
> bob prohaska
>
Hmm, apparently my guess at the problem was wrong (although I think it
is true that the standard freebsd update sequence of booting to the new
kernel before installing world will fail here).
I'm out of ideas right now.
-- Ian
More information about the freebsd-arm
mailing list