Date: Tue, 15 Aug 2017 23:07:15 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 221550] kern.bootfile returns only /kernel on mips64 (ERL) platform Message-ID: <bug-221550-8@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D221550 Bug ID: 221550 Summary: kern.bootfile returns only /kernel on mips64 (ERL) platform Product: Base System Version: CURRENT Hardware: mips OS: Any Status: New Severity: Affects Some People Priority: --- Component: kern Assignee: freebsd-bugs@FreeBSD.org Reporter: lidl@FreeBSD.org The kern.bootfile sysctl returns just /kernel on an ERL, using the stock configuration where the boot filesystem (a FAT32 filesystem) is mounted into /boot. root@erl2-148: df Filesystem 1K-blocks Used Avail Capacity Mounted on /dev/da0s2a 28810359 9965044 16540487 38% / devfs 1 1 0 100% /dev /dev/da0s1 262008 181248 80760 69% /boot fdescfs 1 1 0 100% /dev/fd tmpfs 2062880 4 2062876 0% /tmp >From the perspective of the uboot system, this is correct, as my uboot boot command is similar to the ones referenced at rtfm.net: setenv boot_freebsd 'fatload usb 0 $loadaddr kernel/kernel ; bootoctlinux $loadaddr coremask=3D0x3' However, since the uboot boot partition is mounted as /boot, the sysctl ans= wer is wrong. Why do I care? Because the logic that backs up the old kernel to kernel.old when running 'make installkernel' doesn't work right - my existing kernel is always destroyed and the new kernel installed as /boot/kernel. e.g.: thiskernel=3D`sysctl -n kern.bootfile` ; if [ ! "`dirname "$thiskernel"`" = -ef /boot/kernel ] ; then chflags -R noschg /boot/kernel ; rm -rf /boot/kerne= l ;=20 rm -rf /usr/lib/debug/boot/kernel ; else if [ -d /boot/kernel.old ] ; the= n=20 chflags -R noschg /boot/kernel.old ; rm -rf /boot/kernel.old ; fi ; mv /boot/kernel /boot/kernel.old ; if [ -n "/usr/lib/debug" -a -d /usr/lib/debug/boot/kernel ]; then rm -rf /usr/lib/debug/boot/kernel.old ;= mv /usr/lib/debug/boot/kernel /usr/lib/debug/boot/kernel.old ; fi ; sysctl kern.bootfile=3D/boot/kernel.old/"`basename "$thiskernel"`" ; fi mkdir -p /boot/kernel install -p -m 555 -o root -g wheel kernel /boot/kernel/ --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-221550-8>