reboot -r on mips
Mori Hiroki
yamori813 at yahoo.co.jp
Tue Dec 26 07:25:10 UTC 2017
Hi
I have new good idea at upgrading flash.
https://translate.google.com/translate?sl=ja&tl=en&js=y&prev=_t&hl=ja&ie=UTF-8&u=https%3A%2F%2Fqiita.com%2Fyamori813%2Fitems%2F437dee80478fccac34ee&edit-text=
----- Original Message -----
> From: Mori Hiroki <yamori813 at yahoo.co.jp>
> To: Eugene Grosbein <eugen at grosbein.net>; "freebsd-mips at freebsd.org" <freebsd-mips at freebsd.org>
> Cc:
> Date: 2017/12/21, Thu 16:53
> Subject: Re: reboot -r on mips
>
> Hi.
>
> I found some time failed reboot -r. Log is here.
>
> Jan 1 09:01:04 init: cannot mount tmpfs on /dev/reroot: No space left on device
> Jan 1 09:01:04 init: reroot failed; going to single user mode
>
> I checked code. This error come from TMPFS_PAGES_MINRESERVED
> cheek in sys/fs/tmpfs/tmpfs_vfsops.c.
>
> Now TMPFS_PAGES_MINRESERVED is 4MByte. This is big because of
> my target have only 16MByte or 32Byte memory.
>
> I want change smaller value to TMPFS_PAGES_MINRESERVED.
>
> How to modify code?
>
> Regards
>
> Hiroki Mori
>
> ----- Original Message -----
>> From: Mori Hiroki <yamori813 at yahoo.co.jp>
>> To: Eugene Grosbein <eugen at grosbein.net>;
> "freebsd-mips at freebsd.org" <freebsd-mips at freebsd.org>
>> Cc:
>> Date: 2017/11/29, Wed 20:41
>> Subject: Re: reboot -r on mips
>>
>> 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 at yahoo.co.jp>
>>> To: Eugene Grosbein <eugen at grosbein.net>;
>> "freebsd-mips at freebsd.org" <freebsd-mips at 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 at grosbein.net>
>>>> To: Mori Hiroki <yamori813 at yahoo.co.jp>;
>>> "freebsd-mips at freebsd.org" <freebsd-mips at 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 at freebsd.org mailing list
>>> https://lists.freebsd.org/mailman/listinfo/freebsd-mips
>>> To unsubscribe, send any mail to
>>> "freebsd-mips-unsubscribe at freebsd.org"
>>>
>> _______________________________________________
>> freebsd-mips at freebsd.org mailing list
>> https://lists.freebsd.org/mailman/listinfo/freebsd-mips
>> To unsubscribe, send any mail to
>> "freebsd-mips-unsubscribe at freebsd.org"
>>
> _______________________________________________
> freebsd-mips at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-mips
> To unsubscribe, send any mail to
> "freebsd-mips-unsubscribe at freebsd.org"
>
More information about the freebsd-mips
mailing list