From owner-freebsd-mips@freebsd.org Wed Feb 15 01:02:56 2017 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0CA40CDF182 for ; Wed, 15 Feb 2017 01:02:56 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wm0-x230.google.com (mail-wm0-x230.google.com [IPv6:2a00:1450:400c:c09::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ADA0615AE for ; Wed, 15 Feb 2017 01:02:55 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-wm0-x230.google.com with SMTP id c85so30837014wmi.1 for ; Tue, 14 Feb 2017 17:02:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=zLj5viKG6I9tK+70tXpSLAkKfxuSrSsErI2DAD3Hgcc=; b=LNtYM8TPZH7O+0eG7TnvjUd2ppvhSqpXPJ9q4xz5m19ZVy1LifQ8H90T+7Ta7GoOjJ 2wMgxTWqSscN1fLyPmxrVEbqte0pCMi6I3vjU3R8G/bud3yoLPYPVk1UABWNNgPPz1ln IhO0/3pmTwH59Tm7rAJHIKNiniil8gmX+ed1g0rHWUArobiQjUxECDGTwUQu2fN3GD4r 7cHnt3oXJFQc49R7W2YresGNkErTSTY6VwbUMZQ/yA4t/JTd/ecHgoEiGEkkU3FD1cdz 5rcuhDv6m2wvmef8drAS405zvPbYeaxVtQeVDmXT6R8DRUmpFvVDAeglLiKEv3QY6xxX NoCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=zLj5viKG6I9tK+70tXpSLAkKfxuSrSsErI2DAD3Hgcc=; b=r5/u83lNMS7A62bhukFv1srhzzmIbjbwJWbUThdKKbi4rWrqB2Tkf6bxU7gKxtAlfd m1DExe+kPjUDbQXF2BLiQwmiEVSf2/JU+lZHsxFRO6uyVVyk/5K1rNFZpmtxxFpVHtZ8 5QZKyjRoVtwKUIeUljy6Hks0uMMt8HXxF2lbq2s7Pa4KPuYFsP3EghxCvOcOVhX7+KrJ yhf9Mck9ze70XnXOLp7RFxX+RhgA0SQd3EsMEXM7s2B/kGNO2E7Ti0oWVb9EIfBp9W3l W7qZOH0ec82gUnPTwOeMJPC50yTfYj8Fm5TZlj73hOIKcyg9LFOf015V9QuBX/bPLIeJ 6o8g== X-Gm-Message-State: AMke39kCSRR/6n1p7OMGs3fUyXsHexrKb/UnoxNoQ/gErkNutaerwf4hhkL2yQkFRAiA9QWoe88wTp5y8JDuLA== X-Received: by 10.28.47.7 with SMTP id v7mr5241551wmv.138.1487120573011; Tue, 14 Feb 2017 17:02:53 -0800 (PST) MIME-Version: 1.0 Received: by 10.28.128.135 with HTTP; Tue, 14 Feb 2017 17:02:52 -0800 (PST) In-Reply-To: <623774.68843.qm@web101719.mail.ssk.yahoo.co.jp> References: <632017.92175.qm@web101706.mail.ssk.yahoo.co.jp> <805328.90571.qm@web101707.mail.ssk.yahoo.co.jp> <108182.74391.qm@web101702.mail.ssk.yahoo.co.jp> <623774.68843.qm@web101719.mail.ssk.yahoo.co.jp> From: Adrian Chadd Date: Tue, 14 Feb 2017 17:02:52 -0800 Message-ID: Subject: Re: kld problem at Atheros AR9132 To: Mori Hiroki Cc: "freebsd-mips@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Feb 2017 01:02:56 -0000 Hiya, ok. why can't it boot ELF? Just set entry point to after the ELF header. -adrian On 9 February 2017 at 19:35, Mori Hiroki wrote: > Hi. > > I use ZRouter build system. This tools build ELF kernel first by buildkernel. > Then ELF kernel convert to kbin by use objcopy command. > > ELF -> kbin -> LZMA -> U-BOOT -> block pad > > microserver % file Buffalo_WZR-HP-G301NH_kernel* > Buffalo_WZR-HP-G301NH_kernel: ELF 32-bit MSB executable, > MIPS, MIPS32 version 1 (FreeBSD), dynamically linked, interpreter /red/herring, > not stripped > Buffalo_WZR-HP-G301NH_kernel.kbin: data > Buffalo_WZR-HP-G301NH_kernel.kbin.oldlzma: LZMA compressed data, non- > streamed, size 4127856 > Buffalo_WZR-HP-G301NH_kernel.kbin.oldlzma.uboot: u-boot legacy uImage, Free > BSD Kernel Image, Linux/MIPS, OS Kernel Image (lzma), 1250861 bytes, Wed Feb 8 > 02:46:30 2017, Load Address: 0x80001100, Entry Point: 0x80001100, Header CRC: 0x > B20327B9, Data CRC: 0x670E041D > Buffalo_WZR-HP-G301NH_kernel.kbin.oldlzma.uboot.sync: u-boot legacy uImage, Free > BSD Kernel Image, Linux/MIPS, OS Kernel Image (lzma), 1250861 bytes, Wed Feb 8 > 02:46:30 2017, Load Address: 0x80001100, Entry Point: 0x80001100, Header CRC: 0x > B20327B9, Data CRC: 0x670E041D > > Old U-Boot can't boot ELF kernel dirctory. > > This is good command. > > microserver % objcopy -V > GNU objcopy 2.17.50 [FreeBSD] 2007-07-03 > Copyright 2007 Free Software Foundation, Inc. > This program is free software; you may redistribute it under the terms of > the GNU General Public License. This program has absolutely no warranty. > > > > ----- Original Message ----- >> From: Adrian Chadd >> To: Mori Hiroki >> Cc: "freebsd-mips@freebsd.org" >> Date: 2017/2/9, Thu 07:02 >> Subject: Re: kld problem at Atheros AR9132 >> >> How are you building that again? I know my way of doing it always >> outputs elf kernels. >> >> >> -a >> >> >> On 7 February 2017 at 15:28, Mori Hiroki wrote: >>> Hi >>> >>> I still have this problem. I use workaround by old objcopy command. >>> It's unconvenient. >>> >>> "link_elf_lookup_symbol: missing symbol hash table" at boot log >> indicate >>> this problem. >>> >>> Copyright (c) 1992-2017 The FreeBSD Project. >>> Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 >>> The Regents of the University of California. All rights reserved. >>> FreeBSD is a registered trademark of The FreeBSD Foundation. >>> FreeBSD 12.0-CURRENT #2 50b7905(rt_patch)-dirty: Tue Feb 7 22:10:26 JST >> 2017 >>> >> hiroki@microserver:/storage/home/hiroki/obj/storage/home/hiroki/zrouter/tmp/ >>> mips.mips/storage/home/hiroki/freebsd/sys/Buffalo_WZR-HP-G301NH mips >>> gcc version 4.2.1 20070831 patched [FreeBSD] >>> Preloaded elf kernel "kernel" at 0x804332a0. >>> link_elf_lookup_symbol: missing symbol hash table >>> link_elf_lookup_symbol: missing symbol hash table >>> real memory = 67108864 (65536K bytes) >>> >>> >>> ----- Original Message ----- >>>> From: Mori Hiroki >>>> To: "freebsd-mips@freebsd.org" >> >>>> Date: 2016/9/23, Fri 22:52 >>>> Subject: Re: kld problem at Atheros AR9132 >>>> >>>> Hi. >>>> >>>> Still I have this problem. Dose any one have this problem >>>> process to kernel use by objcopy for u-boot. >>>> >>>> I doubt this is big endian issue. >>>> >>>> My AR231x port have no problem. Because of redboot not need >>>> obycopy process. >>>> >>>> Regards. >>>> >>>> Hiroki Mori >>>> >>>> ----- Original Message ----- >>>>> From: Mori Hiroki >>>>> To: "freebsd-mips@freebsd.org" >> >>>>> Date: 2016/4/25, Mon 17:41 >>>>> Subject: kld problem at Atheros AR9132 >>>>> >>>>> Hi >>>>> >>>>> I build Atheros AR9132 kernel by head source. I have problem that is >>>>> can't load kld module. RT3050 have no problem same source. I do >>>>> delete old object and full build but still have problem. >>>>> >>>>> # kldload -v ufs >>>>> linker_load_file: trying to load /boot/kernel/ufs.ko >>>>> >>>>> linker_make_file: new file, filename='ufs.ko' for >> pathname='/boot/kernel/ufs.ko' >>>>> linker_file_add_dependency: adding kernel as dependency for ufs.ko >>>>> KLD ufs.ko: depends on kernel - not available or version mismatch >>>>> >>>>> linker_file_unload: lf->refs=1 >>>>> linker_file_unload: file is unloading, informing modules >>>>> linker_file_unload: lf->refs=2 >>>>> linker_load_file: trying to load /boot/kernel/ufs.ko >>>>> linker_load_file: Unsupported file type >>>>> kldload: an error occurred while loading the module. Please check >> dmesg(8) for m >>>>> ore details. >>>>> >>>>> If you have advice, please let me know. >>>>> >>>>> Thanks >>>>> >>>>> Hiroki Mori >>>>> _______________________________________________ >>>>> 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" >>>>> >>>>> >>>>> >>>> _______________________________________________ >>>> 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" >>>> >>>> >>>> >>> _______________________________________________ >>> 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" >>