From patchwork Wed Mar 6 10:21:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andrew Randrianasulu X-Patchwork-Id: 10840811 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3DC711390 for ; Wed, 6 Mar 2019 10:26:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 25E1D2CDCB for ; Wed, 6 Mar 2019 10:26:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 19F422CDE1; Wed, 6 Mar 2019 10:26:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.4 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,TRACKER_ID autolearn=no version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 617B32CDCB for ; Wed, 6 Mar 2019 10:26:27 +0000 (UTC) Received: from localhost ([127.0.0.1]:58494 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h1Tko-00017i-PF for patchwork-qemu-devel@patchwork.kernel.org; Wed, 06 Mar 2019 05:26:26 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54650) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h1TkF-0000p2-BO for qemu-devel@nongnu.org; Wed, 06 Mar 2019 05:25:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h1TkD-0000an-Sz for qemu-devel@nongnu.org; Wed, 06 Mar 2019 05:25:51 -0500 Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]:36065) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h1TkC-0000VI-5Z for qemu-devel@nongnu.org; Wed, 06 Mar 2019 05:25:49 -0500 Received: by mail-pf1-x42a.google.com with SMTP id n22so8249698pfa.3 for ; Wed, 06 Mar 2019 02:25:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:user-agent:mime-version :content-transfer-encoding:content-disposition:message-id; bh=l6G+zij8kZWp3dQkj26NjYHBGEqJJVPngP1NKrDhsTI=; b=kPLY6m8rurxMfjYRnBAaISyJWTW2glqb7B3G9Wb477Wi6OqZVrxBCpJzqzCE5Flo96 wyIywuncOWzh5xquHjr82zkeDFY9jsyPnt75qmHQ7wZMoajj2vQ634dlUq0nXd69sW3S cVfQzxitDtJdYrsWZ0qV7kU2hc8p1cXaBhKpVxgKjbtyIB8O9G2Ak5uahlC5sl72Azme XWKlftlR7afPRabh94sFteg8NCMTRs3enRheze2URvtj44PtKOgZL5ZEQ0eromqUAV41 YC5ASCJJ7cI5k1Ux99Kon7OiPjWUdKYUxc3zrW4vSCLBagkI3xnxVifRtnK6Pue9gptS s0hA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:user-agent:mime-version :content-transfer-encoding:content-disposition:message-id; bh=l6G+zij8kZWp3dQkj26NjYHBGEqJJVPngP1NKrDhsTI=; b=XBxN2AGBAAhKUyLhryxnnUKNDkChe3s/s+tXIb5MiJfaod5FrcBmNNzreODq2XHz9B 2Ya0kjXsnOxHzBWLVAdPh8PBu5AhzbN6wyqys6rN9TvP6N43WORRJBbmnAwxO/qp0jhu B42/pm+6coHRVFRrMhyJZ4YKWgEsj1I20VOLTRK4Giu8lxENPtGz4fGxm158LWvd0WJl gZ9Mai5muqFIMekvYys7tdqu5/FWuCHi75bWsUSLqf8cfBUBPxUIW3ZcOjyyF3RBbxje kfKWa4/MMqJm/N/leiSc1mjbBzFhjJEaVjuY9XxRKljNh9qGHiFDDpmbm1IJMGzr+p35 EuKw== X-Gm-Message-State: APjAAAXawsSjPGhrm/HOKZriweklyKV98L7v0ZHU8MQhf0Y9BcHWTSS3 WZZA2f0+Yd1MJKsXJfTmzKTxQcx/ X-Google-Smtp-Source: APXvYqyNeoS/FQ9FU8cqnOHDTE/xmB6g7dXIKdXtyzGmgfpbF9TMJpGmnQde1IxSXVtxXp0P3hlTcw== X-Received: by 2002:a17:902:7890:: with SMTP id q16mr6184137pll.63.1551867939418; Wed, 06 Mar 2019 02:25:39 -0800 (PST) Received: from [192.168.1.102] ([176.116.252.109]) by smtp.gmail.com with ESMTPSA id p11sm4551939pfi.10.2019.03.06.02.25.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Mar 2019 02:25:38 -0800 (PST) From: Andrew Randrianasulu To: qemu-devel@nongnu.org, balaton@eik.bme.hu Date: Wed, 6 Mar 2019 13:21:58 +0300 User-Agent: KMail/1.9.10 MIME-Version: 1.0 Content-Disposition: inline Message-Id: <201903061321.58890.randrianasulu@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::42a Subject: [Qemu-devel] PMON2000 compilation and kernel question X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Hello, all. I was compiling those pmons for last two days, and I happy to say most of my hackery was unnecessary. Just unpack pmon_1c.tar.gz and toolchain-pmon.tar.bz2 compile tools in pmon/tools (just make), create directory /opt/pmon2000/tools, install tools, be sure /opt/pmon2000/tools/bin in your $PATH, put compiler in /usr/local/comp, put build.sh script from unpacked toolchain tree into pmon.zloader dir, reset tree (git checkout -b label) to some known or desired commit few of them I tested: 9048810a267835e8efb0496fd99884bd500c43a0 17471780223332a7016959bcb9784ba249bd8660 dd26466da98371470af957993a600719466305f9 for last one you probably want to revert "move highmemcpy highset into lib.", because it was breaking zloader.2edev compilation for me. Now, most of my hacks were unnecessary, you can just use this Bonito file in Targets/Bonito2edev/conf/: otherwise pmon was not scrolling help text or any messages up. ============== # $Id: Bonito,v 1.1.1.1 2006/09/14 01:59:09 root Exp $ # # GENERIC configuration for Galileo EV64240 # # This file is supposed to be included by target file after # endian has been defined. # machine Bonito2edev mips # CPU Architecture, Platform config pmon # # Define target endian # makeoptions ENDIAN=EL # Little endian version. #include "conf/GENERIC_ALL" # # System Name and Target Name # option SYSTYPE="\"Bonito\"" option TARGETNAME="\"Bonito\"" # # Platform options # option BONITOEL option DEVBD2E option MIPS option INET select mod_flash_amd # AMD flash device programming select mod_flash_intel # intel flash device programming select mod_flash_sst # intel flash device programming select mod_debugger # Debugging module select mod_symbols # Symbol table handling select mod_s3load # Srecord loading #select mod_fastload # LSI Fastload select mod_elfload # ELF loading # # Command selection. Selects pmon commands # select cmd_newmt select cmd_setup select mod_display select cmd_about # Display info about PMON select cmd_boot # Boot wrapper select cmd_mycmd select cmd_xmodem select ramfiles select cmd_newmt select cmd_cache # Cache enabling #select cmd_call # Call a function command select cmd_date # Time of day command select cmd_env # Full blown environment command set select cmd_flash # Flash programming cmds select cmd_hist # Command history select cmd_ifaddr # Interface address command select cmd_l # Disassemble select cmd_mem # Memory manipulation commands select cmd_more # More paginator select cmd_mt # Simple memory test command select cmd_misc # Reboot & Flush etc. #select cmd_stty # TTY setings command select cmd_tr # Host port-through command select cmd_devls # Device list select cmd_set # As cmd_env but not req. cmd_hist select cmd_testdisk select cmd_test select pmon_zmodem_rz # select cmd_shell # Shell commands, vers, help, eval # # # Platform options # select mod_uart_ns16550 # Standard UART driver #option CONS_BAUD=B9600 option CONS_BAUD=B115200 select ext2 select fatfs #select mod_x86emu # X86 emulation for VGA option MY40IO #select mod_x86emu_int10 select mod_vgacon select mod_framebuffer option X640x480 option CONFIG_VIDEO_16BPP option NOPCINAMES # Save some space for x86emu #option FASTBOOT select vt82c686 #via686a/b code # # Functional options. # option NOSNOOP # Caches are no-snooping # # HAVE options. What tgt level provide # option HAVE_TOD # Time-Of-Day clock option HAVE_NVENV # Platform has non-volatile env mem option HAVE_LOGO # Output splash logo option USE_SUPERIO_UART #option USE_LEGACY_RTC #option GODSONEV2A #option LINUX_PC #option LONGMENG option RADEON7000 #option DEBUG_EMU_VGA option AUTOLOAD #option CONFIG_PCI0_LARGE_MEM #option CONFIG_PCI0_HUGE_MEM #option CONFIG_PCI0_GAINT_MEM option CONFIG_CACHE_64K_4WAY option NVRAM_IN_FLASH # # Now the Machine specification # mainbus0 at root localbus0 at mainbus0 #fd0 at mainbus0 pcibr* at mainbus0 #pcibr1 at mainbus0 pci* at pcibr? #ppb* at pci? dev ? function ? # PCI-PCI bridges #pci* at ppb? bus ? #### USB #uhci* at pci? dev ? function ? #### SCSI support #siop* at pci? dev ? function ? # Symbios/NCR 53c... #scsibus* at siop? #sd* at scsibus? target ? lun ? #cd* at scsibus? target ? lun ? #### Networking Devices #gt0 at localbus? base 4 #gt1 at localbus? base 5 #gt2 at localbus? base 6 # fxp normally only used for debugging (enable/disable both) fxp* at pci? dev ? function ? # Intel 82559 Device inphy* at mii? phy ? # Intel 82555 PHYs rtl* at pci? dev ? function ? uhci* at pci? dev ? function ? #ohci0 at pci? dev ? function ? usb* at usbbus ? #ohci1 at pci? dev ? function ? select mod_usb select mod_usb_storage select mod_usb_uhci #select mod_usb_ohci select mod_usb_kbd #### IDE controllers pciide* at pci ? dev ? function ? flags 0x0000 atp* at pci? dev ? function ? #sata atp8620 sata* at atp? #### IDE hard drives wd* at pciide? channel ? drive ? flags 0x0000 #### Pseudo devices pseudo-device loop 1 # network loopback ide_cd* at pciide? channel ? drive ? flags 0x0001 select iso9660 option IDECD #option HAVE_NB_SERIAL option USE_ENVMAC #option LOOKLIKE_PC #select cmd_lwdhcp #select cmd_bootp option WDC_NORESET option FOR_GXEMUL select fatfs option FLOATINGPT select gzip option VIA686B_POWERFIXUP option INPUT_FROM_BOTH option OUTPUT_TO_BOTH option PCI_IDSEL_VIA686B=17 ========== In other words, just DISABLE both x86_emu and x86_emu_int10h, enable framebuffer, set 640x480 resolution and 16 bpp bit depth. After this, you can make it cd zloader.2edev LANG=C ./build.sh (otherwise in can put localized date in pmon, it will be shown wrong). ========== #!/bin/bash export MKDEP=makedepend export PATH=/usr/local/comp/mips-elf/gcc-2.95.3/bin/:$PATH make cfg #ёьРВЕдЦГ make tgt=ram mv gzram pmon_ram.bin make tgt=rom #ІъЙъЙХЦЖОДјю gzrom.bin mv gzrom.bin pmon.bin mkdir -d /var/lib/tftpboot cp pmon.bin pmon_ram.bin /var/lib/tftpboot ============= note, my mkdir doesn't understand 'd' option, but script finishes anyway. watch for errors, especially if you enabled some more options. Newer pmon source fails to compile for me due to some mtd changes. After this , I run resulted pmon like this (using Zoltan's patch for ati-vga device on top of current qemu): mips64el-softmmu/qemu-system-mips64el -M fulong2e -cpu Loongson-2E -m 1G -bios /dev/shm/pmon-my/pmon/zloader.2edev/pmon.bin -device ati-vga,model=rv100 -hda /dev/shm/LONGSOON_disk -cdrom /dev/shm/debian-8.0.0-mipsel-xfce-CD-1.iso -display sdl,gl=on it can see both disk and CD, but sadly I was unable to find any working kernel?! vmlinux-2e just hangs early, and vmlinux-3.16.0-4-loongson-2e extracted from debian pkg hangs a litle latter in boot process. Tried without -m option, and with 2F CPU. I mean even with just -kernel, no bios involved. Also, while I was able to compile-in uhci support, adding usb-kbd device freezes pmon. And newly-added EHCI support apparently limited to only some CPUs/boards :/ At least I was unable to compile pmon in this config and with mod_usb_ehci. Oh, and sadly my little "disable bitblit" patch was still needed: diff --git a/fb/cfb_console.c b/fb/cfb_console.c index 6663ef7..f29c43f 100644 --- a/fb/cfb_console.c +++ b/fb/cfb_console.c @@ -113,7 +113,7 @@ CONFIG_VIDEO_HW_CURSOR: - Uses the hardware cursor capability of the #define CONFIG_VIDEO_LOGO #define CONFIG_VIDEO_BMP_LOGO //#define DEBUG_CFG_CONSOLE -#define VIDEO_HW_BITBLT +//#define VIDEO_HW_BITBLT #elif defined(SMI712) #define CONFIG_VIDEO_SW_CURSOR //#define CONFIG_VIDEO_LOGO