Date: Wed, 29 Nov 2017 20:41:23 +0900 (JST) From: Mori Hiroki <yamori813@yahoo.co.jp> To: Eugene Grosbein <eugen@grosbein.net>, "freebsd-mips@freebsd.org" <freebsd-mips@freebsd.org> Subject: Re: reboot -r on mips Message-ID: <115897.36610.qm@web101713.mail.ssk.yahoo.co.jp> In-Reply-To: <409601.10493.qm@web101716.mail.ssk.yahoo.co.jp> References: <129336.4485.qm@web101707.mail.ssk.yahoo.co.jp> <5A1C0240.8000102@grosbein.net> <409601.10493.qm@web101716.mail.ssk.yahoo.co.jp>
index | next in thread | previous in thread | raw e-mail
Hi
I found new method at upgrade. That is use pipe.
This is upgrade script. This method only use 6MByte md
any size flash.
#!/bin/sh
ZBOARD=`uname -i`
. /etc/upgrade.conf
cd /tmp
mkdir bin
mkdir sbin
mkdir libexec
mkdir dev
mkdir lib
mkdir etc
mkdir -p usr/bin
cp /sbin/init sbin/
cp /bin/sh bin/
cp /bin/dd bin/
cp /bin/kill bin/
cp /libexec/ld-elf.so.1 libexec/
cp /etc/login.conf.db etc/
cp /usr/bin/tftp usr/bin/
cp /lib/libedit.so.7 lib/
cp /lib/libncursesw.so.8 lib/
cp /lib/libc.so.7 lib/
mkfifo flashpipe
kenv vfs.root.mountfrom="ufs:md0"
#echo ${ZBOARD}.zimage
echo "#!/bin/sh" > etc/rc
echo "dd if=/flashpipe of=${UPGRADEDEV} obs=${UPGRADEBS} conv=osync &" >> etc/rc
echo "echo ¥"bin
get ${ZBOARD}.zimage /flashpipe
quit¥" | tftp ${UPGRADETFTP} 69" >> etc/rc
echo "kill -INT 1" >> etc/rc
chmod a+x etc/rc
reboot -r
Hiroki Mori
----- Original Message -----
> From: Mori Hiroki <yamori813@yahoo.co.jp>
> To: Eugene Grosbein <eugen@grosbein.net>; "freebsd-mips@freebsd.org" <freebsd-mips@freebsd.org>
> Cc:
> Date: 2017/11/28, Tue 16:38
> Subject: Re: reboot -r on mips
>
> Hi
>
> Thanks for your advice. I missing your mail.
>
> I use ZRouter build system. This build use md file system at /tmp.
>
> But small(10M) than 8M flash upgrade. Then I do this way.
>
> 1. nomal boot process
>
> 2. set kenv to prepareupgrade=1
>
> 3. reboot -r
>
> 4. if set prepareupgrade then delete old md and make big(16M) md in rc.
>
> 5. make minimum rootfs in md and save new image by tftp.
>
> 6. reboot -r
>
> 7. image to flash by dd
>
> 8. kill -INT 1
>
> Thanks again.
>
> Hiroki Mori
>
> ----- Original Message -----
>> From: Eugene Grosbein <eugen@grosbein.net>
>> To: Mori Hiroki <yamori813@yahoo.co.jp>;
> "freebsd-mips@freebsd.org" <freebsd-mips@freebsd.org>
>> Cc:
>> Date: 2017/11/27, Mon 21:17
>> Subject: Re: reboot -r on mips
>>
>> 27.11.2017 18:56, Mori Hiroki пишет:
>>> Hi.
>>>
>>> I found reboot -r today. I try this function on my Atheros AR9.
>>
>> [skip]
>>
>>> This function make complete flash update method.
>>
>> Yes, it's great. Also, look at
>> https://lists.freebsd.org/pipermail/freebsd-mips/2016-February/004431.html
>>
> _______________________________________________
> freebsd-mips@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-mips
> To unsubscribe, send any mail to
> "freebsd-mips-unsubscribe@freebsd.org"
>
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?115897.36610.qm>
