X-Original-To: alpine-user@lists.alpinelinux.org Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by lists.alpinelinux.org (Postfix) with ESMTP id C05F85C4DAF for ; Tue, 2 Jan 2018 17:24:56 +0000 (GMT) Received: by mail-wm0-f66.google.com with SMTP id y82so17065540wmg.1 for ; Tue, 02 Jan 2018 09:24:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:mime-version:subject:message-id:date:to; bh=4aNl9ga+JNcpDDeFAWd674qe7EFi7xPJpBO3mgveaX0=; b=BlKShloQ8ETK9cIcjnKTEtZ978qMhR0IytRLalG0lSJmjMwlpN8wgD0ZgFdnTYHYiT dzB1syVhiNcFcgNyvlaSyZef3scz8aKj8gb0VWgWxdNhR3sMSVxm5GUYakiKmGBOzok/ K/5mH0nu3fqJzZqe+MtZmMI1oVNBKsM82NZo9L1tMLGyAwsqMkOA87zvq7jVx9leR360 qtnPdCbRG7W+7WxXdDkRDM9mdDsTNz4Y78+NSGv8bgLu5NUoDYR/EkWcB9cTPGmlSZZ+ KzhqhCSrtpW8W3dvOxhR9z92q8jDsfnbxoiBMlTAZsIc8X5Rq5a1wfbWFbV5pSYwMBqd fPKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:subject:message-id:date:to; bh=4aNl9ga+JNcpDDeFAWd674qe7EFi7xPJpBO3mgveaX0=; b=mjn1O+/VPZwS2tgbls1vqwyGT/mUq9MxEhZYHrH5/onSM8bhLdx5rqDV/t8N6G4PUo Qm1wB+Dm6ca60xaSyhK+HrT7znVOTpSQMb3sVhOORm0BcKuYCsE89ueYyvPmCWucPksX d47YWqMjWR63KJLLbxCIYWWYKbkSi8yti1OFlO6RFGe8BJEKk7/j3Py3Nz/ii3qobvQX FeGWsvhAxIIwA1JOm/4tlIuPbTkyMIQl9vzF3xytOzY5S28gBNyADgUuhVdeEyz8FZDD pvI3NTkLPwFJttrGn7zEeMk4JiZkeyWsNYBpGxmQtMtrpT3Kcidxl/TZwxlch7L1o4FA 3IKg== X-Gm-Message-State: AKGB3mKVlWS06Oa6nPvb4ZYCqlLysXhHuAswP+d3LSkQSb9ynBY4kKP7 iuOZUgQCvQ8dV1vWoxHlBeZxTp1B X-Google-Smtp-Source: ACJfBovxkymsYSyoifBDbAhzjWf8ejFYzQ2rzJJSweax0oHlNBH3o1MHZqbCUALhyLBqCTsxUOC0TQ== X-Received: by 10.80.189.131 with SMTP id y3mr3814302edh.2.1514913895859; Tue, 02 Jan 2018 09:24:55 -0800 (PST) Received: from [192.168.1.103] (bs-router-apm.stwon.etc.tu-bs.de. [134.169.108.250]) by smtp.gmail.com with ESMTPSA id i6sm36050030eda.6.2018.01.02.09.24.54 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Jan 2018 09:24:55 -0800 (PST) From: Vanish Content-Type: multipart/alternative; boundary="Apple-Mail=_CDFEDBD5-AEE6-4EFD-A780-CFA7FD2B4D0D" X-Mailinglist: alpine-user Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: [alpine-user] Build kernel module for Alpine Message-Id: <12F65096-CC56-4F42-A1BA-6D4534F6F6BE@gmail.com> Date: Tue, 2 Jan 2018 18:24:54 +0100 To: alpine-user@lists.alpinelinux.org X-Mailer: Apple Mail (2.3273) --Apple-Mail=_CDFEDBD5-AEE6-4EFD-A780-CFA7FD2B4D0D Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Hi everyone, I'm going to build a little kernel module for Alpine, but get some = problems. Host: Ubuntu 16.04LTS 64bit Guest : Alpine-vanilla-3.7.0-x86(kernel version 4.9.65) in qemu It looks like there is no build environment for a kernel module natively = in Alpine, so I tried to use cross-compiler to build it in the host. I first get an i686-linux-musl-gcc cross-compiler from = https://github.com/richfelker/musl-cross-make = . It works fine since = a compiled Hello_World.c runs perfectly in the guest. Right now, I'm trying to build a kernel module hello_kernel.c. I = download linux kernel 4.9.65 first from kernel.org = (e.g. in /home/yuxing/linux 4.9.65 ), and compile it with the = cross-compiler mentioned above. Next, I use the build environment in = /home/yuxing/linux 4.9.65 with the cross compiler to build the = hello_kernel.ko . It looks fine since no errors come out. But when I insmod hello_kernel.ko in Alpine, the error Can someone please give me some advices to figure this problem or how to = build a kernel module for Alpine. Thanks in advance. Regards, Yuxing --Apple-Mail=_CDFEDBD5-AEE6-4EFD-A780-CFA7FD2B4D0D Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii Hi everyone,

I'm going to build a little kernel module for Alpine, but get = some problems.

Host: Ubuntu 16.04LTS 64bit
Guest : = Alpine-vanilla-3.7.0-x86(kernel version 4.9.65)  in qemu

It looks like there is = no build environment for a kernel module natively in Alpine, so I tried = to use cross-compiler to build it in the host.
I = first get an i686-linux-musl-gcc cross-compiler from  https://github.com/richfelker/musl-cross-make  =  . It works fine since a compiled Hello_World.c runs perfectly in = the guest.
Right now, I'm trying to build a kernel = module hello_kernel.c. I download linux kernel 4.9.65 first from kernel.org (e.g. in = /home/yuxing/linux 4.9.65 ), and compile it with the cross-compiler = mentioned above. Next, I use  the build environment in = /home/yuxing/linux 4.9.65  with the cross compiler to build the = hello_kernel.ko . It looks fine since no errors come out.
But when I insmod hello_kernel.ko in Alpine, the = error

Can = someone please give me some advices to figure this problem or how to = build a kernel module for Alpine. Thanks in advance.

Regards,
Yuxing


= --Apple-Mail=_CDFEDBD5-AEE6-4EFD-A780-CFA7FD2B4D0D-- --- Unsubscribe: alpine-user+unsubscribe@lists.alpinelinux.org Help: alpine-user+help@lists.alpinelinux.org ---