From nobody Tue Jan 31 13:32:27 2023 X-Original-To: freebsd-mips@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4P5mFL0DbKz3cX2f for ; Tue, 31 Jan 2023 13:32:38 +0000 (UTC) (envelope-from emz@zhegan.in) Received: from elf.hq.norma.perm.ru (mail.norman-retail.ru [128.127.146.8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mail.norma.perm.ru", Issuer "Let's Encrypt Authority X3" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4P5mFK02Yjz3mP1 for ; Tue, 31 Jan 2023 13:32:36 +0000 (UTC) (envelope-from emz@zhegan.in) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of emz@zhegan.in designates 128.127.146.8 as permitted sender) smtp.mailfrom=emz@zhegan.in; dmarc=none Received: from [192.168.57.177] (net208-181.perm.ertelecom.ru [46.146.208.181] (may be forged)) by elf.hq.norma.perm.ru (8.16.1/8.15.2) with ESMTPS id 30VDWWlo036284 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO) for ; Tue, 31 Jan 2023 18:32:33 +0500 (+05) (envelope-from emz@zhegan.in) Message-ID: <5ba0d8a0-ea7d-c855-e36e-0ec109da5c8f@zhegan.in> Date: Tue, 31 Jan 2023 18:32:27 +0500 List-Id: Porting FreeBSD to MIPS List-Archive: https://lists.freebsd.org/archives/freebsd-mips List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-mips@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: qemu and mips64 - init died (signal 6, exit 0) Content-Language: en-US To: freebsd-mips@freebsd.org References: <43b04de7-46d9-0980-bbb9-dca45577c1ef@zhegan.in> From: "Eugene M. Zheganin" In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Pre-Result: action=no action; module=multimap; Matched map: ip_whitelist X-Rspamd-Server: elf.hq.norma.perm.ru X-Spamd-Result: default: False [-3.30 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; FROM_EQ_ENVFROM(0.00)[]; MLMMJ_DEST(0.00)[freebsd-mips@freebsd.org]; MID_RHS_MATCH_FROM(0.00)[]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:212494, ipnet:128.127.146.0/24, country:RU]; DMARC_NA(0.00)[zhegan.in]; RCPT_COUNT_ONE(0.00)[1]; PREVIOUSLY_DELIVERED(0.00)[freebsd-mips@freebsd.org]; ARC_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_HAS_DN(0.00)[]; TO_DN_NONE(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_TLS_ALL(0.00)[] X-Rspamd-Queue-Id: 4P5mFK02Yjz3mP1 X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N Hello, On 31.01.2023 17:58, Łukasz Moskała wrote: > Some time ago I was trying to run FreeBSD on SRX240. > > I don't know about SRX300, but SRX240 has soldered-in flash that is connected via usb so I couldn't take image from that. > > I could load kernel over tftp and it started to boot, however: > > - it hung on initializing USB controller > - when I removed USB support from kernel, it couldn't find root fs (as only storage media is attached via usb) > > I didn't get to any promising result. I was more or less trying to guess which configuration of kernel will work. > > If you want, I can search for commands that I used to load kernel over tftp and boot it. I couldn't get freebsd's loader to work, nor junos loader to load freebsd kernel from external USB drive. I just used u-boot (or j-loader) to load kernel from tftp to RAM, then boot it directly. > > BTW, openwrt did boot to initramfs(which I linked into kernel) and could run shell, 3 NICs were detected however none was mapped to any port on SRX. > I guess some or all NICs that you will see in non-junos distributions are connected to ASIC only, and then ASIC handles VLANs. > > Also, you can try changing init to /bin/sh and see what will happen. > > Sorry for rather chaotic message, this was more than year ago and I don't remember this exactly. > I hope something from here helps you and email me if you have any further questions. Thanks for the tips, but here I'm trying to boot (with qemu) sock FreeBSD image that I built myself, I'm very far at this point from booting FreeBSD on SRX (and, to be honest, this just sin't the goal). Any thoughts on why the init is ABRTing ? Or may be the howtos on the FreeBSD wiki arent that precise ? I've also tried to google prebuilt image for mips64 of any FreeBSD version but it seems like those don't exist. :/ Thanks. From nobody Sat Feb 25 22:29:20 2023 X-Original-To: freebsd-mips@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PPLzG0txcz3twj1 for ; Sat, 25 Feb 2023 22:29:30 +0000 (UTC) (envelope-from yamori813@yahoo.co.jp) Received: from sonicconh5003-vm5.mail.kks.yahoo.co.jp (sonicconh5003-vm5.mail.kks.yahoo.co.jp [114.110.61.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4PPLzC2Np2z4MCy for ; Sat, 25 Feb 2023 22:29:26 +0000 (UTC) (envelope-from yamori813@yahoo.co.jp) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.co.jp header.s=yj20110701 header.b=hKEmT8kB; spf=pass (mx1.freebsd.org: domain of yamori813@yahoo.co.jp designates 114.110.61.48 as permitted sender) smtp.mailfrom=yamori813@yahoo.co.jp; dmarc=pass (policy=quarantine) header.from=yahoo.co.jp X-YMail-OSG: u4LrVPYVM1mq4aeQ7Cot8xBmvX2T.iKqWF7J_3t4J40wn3MMXmP3kCEziH7HE0H aEbizckI_38v.YBWMYBkEri7PHQs.gmIB59nrGZoBhHmcT4RzwiL4CoRiujTI.rZfaDIY2CBLqOh SvBt0ErYHJtGRXIYiYG4L6.1r5ZV1HPy.Rvr5BW1QAqtpp0pHPGxBea_Oz6e_QmqH78PegCbc4Y4 jc9FpRXyh8MbSf.4Sxp452SuQplRGmZjKcAFO_48vSsNxzKJJn07Zv8yuynkWMm1tezDCDpTaLu. 4eoGCSzJYqW2.OGy0t8HaZmsdJCoIQzHMIb5UtJVlcjusd6LmYkpcs0R5KndY_mR9goyeRpOly6B saMm217RXild2rBL92aCxH8ecr4F7HuvDX2MdsVg4yBb0HJz6HznEQ3hfYxD6Eg8O6SNC9_h5pr6 HNXiXHhm5EjbvrYvU2PodXMNuw4TsWK5iZakt0nYhlhSL6kyroBZMohGnJp119cud.JbMih3PKGv 9QbFBHghyQ4EMy9q_ywIEUZgjQV4woPUFqszqB3XoUa8XLo3G3tUWhilUwM3YeF9jkSEyJwXWlOY tCLbTRZeiaymskvAxu_0VNavzvAY0kGlWVykOE.muquSfTPeL6Hh8yY00wwFGnuDDpzuYqCZg2It P4qcP6z3h690CFeQuMbaxMW.nHIqAqVSwGBcbzolo34vombVAw4VFNi18inUwktC8DdyHYh_ebPX gzNewVhzhYARztME_.YhQp9xp9WcxdeD3pTXmoEci4Xdd1vO2vZW8Q8p0dXoKtiddOozuB4jac.p WhDopeUnW0yA4_VyknmDbYF4QX46grTqZSIyoJgzTgiEDg21ndY4348qjgOlT3YD3GwrRnOAAIBB j5XJnQ8LYfu1l5YNAM_KVuZ7Sc45ng7JSX3c- Received: from sonicgw.mail.yahoo.co.jp by sonicconh5003.mail.kks.yahoo.co.jp with HTTP; Sat, 25 Feb 2023 22:29:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1677364162; s=yj20110701; d=yahoo.co.jp; h=Date:From:Reply-To:To:Message-ID:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding:References; bh=MvjuffhzdsjUDR2UX+aSz9SN5GFykx5DFRohJUJh7gg=; b=hKEmT8kBiFQJbf2t6IivdlTESLXP++fmSREp+B6LYs7vvPzWwjDUsDx6O/eZISWV H4CSdjC3ZHQnVFNAe/YCrHHt7+DFhlYjPpyxDFzfCkLXOlASHf1DULRbDCAeTbgK0iT No+uuA/VsEKsa0NMSaGKf6CZic9HeGzQa1+9CYMQ= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=yj20110701; d=yahoo.co.jp; h=Date:From:Reply-To:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:References; b=EhvkqcOInzNikaqfmGNmFjHTFLaqMop45nfzUVz2Cg2Lr5H25xJfn7inVKqV4ms6 YGbzVzo1Yjr7iYLucqRwzk7h7R42c8LJ18D7OWYn88ke0wCQjH2qDuq9ag47eHgGy1M uNadbiLQ0IC1qPl0Pw8kCji+ZnWfWxUylcbdgjTY=; Date: Sun, 26 Feb 2023 07:29:20 +0900 (JST) From: Mori Hiroki Reply-To: Mori Hiroki To: "freebsd-mips@freebsd.org" Message-ID: <507818037.1743060.1677364160616.JavaMail.yahoo@mail.yahoo.co.jp> Subject: post not work mini_httpd List-Id: Porting FreeBSD to MIPS List-Archive: https://lists.freebsd.org/archives/freebsd-mips List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-mips@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit References: <507818037.1743060.1677364160616.JavaMail.yahoo.ref@mail.yahoo.co.jp> X-Spamd-Result: default: False [-3.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.97)[-0.970]; DMARC_POLICY_ALLOW(-0.50)[yahoo.co.jp,quarantine]; R_DKIM_ALLOW(-0.20)[yahoo.co.jp:s=yj20110701]; R_SPF_ALLOW(-0.20)[+ip4:114.110.48.0/20]; MIME_GOOD(-0.10)[text/plain]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FREEMAIL_REPLYTO(0.00)[yahoo.co.jp]; RCVD_IN_DNSWL_NONE(0.00)[114.110.61.48:from]; RCPT_COUNT_ONE(0.00)[1]; TO_DN_EQ_ADDR_ALL(0.00)[]; HAS_REPLYTO(0.00)[yamori813@yahoo.co.jp]; ARC_NA(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.co.jp:dkim]; DKIM_TRACE(0.00)[yahoo.co.jp:+]; MID_RHS_MATCH_FROMTLD(0.00)[]; FREEMAIL_FROM(0.00)[yahoo.co.jp]; MLMMJ_DEST(0.00)[freebsd-mips@freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:24572, ipnet:114.110.48.0/20, country:JP]; FREEMAIL_ENVFROM(0.00)[yahoo.co.jp]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Queue-Id: 4PPLzC2Np2z4MCy X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N Hi I use mini_httpd on RT3050. I try this cgi. #!/bin/sh echo "Content-Type: text/html" echo "" echo "OK" if [ "${REQUEST_METHOD}" = "POST" ]; then echo `cat` > /tmp/xxx fi This cgi work on GET but not work on POST. Firefox say connection reset. I seem FreeBSD/amd64 is same. This is patch. --- mini_httpd.c.org 2018-10-27 04:47:50.000000000 +0900 +++ mini_httpd.c 2023-02-26 07:25:15.504936000 +0900 @@ -1842,7 +1842,8 @@ /* Interposer process. */ (void) close( p[0] ); cgi_interpose_input( p[1] ); - finish_request( 0 ); +// finish_request( 0 ); + exit ( 0 ); } (void) close( p[1] ); if ( p[0] != STDIN_FILENO ) Work fine both. Regards.. Hiroki Mori