![]() |
![]() ![]() |
![]() |
![]()
Post
#1
|
|
Group: Members Posts: 11 Joined: 16-September 19 From: China Member No.: 855,729 ![]() |
Hi, I'm trying to build linux kernel for c3100, can anybody give me some cross compile tutorials.
Thanks in advance |
|
|
![]()
Post
#2
|
|
![]() Group: Admin Posts: 938 Joined: 30-April 08 From: Italy Member No.: 21,713 ![]() |
Hi, you should ask for help to our Zaurus kernel expert, greguu. Why would you want to compile it yourself btw, is there any feature or module in the current kernel which you need and is missing?
Varti |
|
|
![]()
Post
#3
|
|
Group: Members Posts: 11 Joined: 16-September 19 From: China Member No.: 855,729 ![]() |
Hi, you should ask for help to our Zaurus kernel expert, greguu. Why would you want to compile it yourself btw, is there any feature or module in the current kernel which you need and is missing? Varti em.... Just wanna try. I'm free recently, have a lot time to try something. |
|
|
![]()
Post
#4
|
|
![]() Group: Moderators Posts: 374 Joined: 14-November 05 From: New Zealand Member No.: 8,535 ![]() |
Hi, you should ask for help to our Zaurus kernel expert, greguu. Why would you want to compile it yourself btw, is there any feature or module in the current kernel which you need and is missing? Varti em.... Just wanna try. I'm free recently, have a lot time to try something. I switched to Void Linux for building some time ago. You can find my kernel build template here:https://github.com/greguu/voidz-packages/tree/voidz-packages-v03-(build8)/srcpkgs/linux5.0-zaurus I would recommend to use Void Linux 64 bit musl as a build host for building voidz rootfs images and packages. You find some instructions on how to build using xbps-src here: https://github.com/greguu/voidz-packages You can also build the kernel under Arch Linux. For this get the ArchLinuxARM toolchain for armv5tel.https://archlinuxarm.org/builder/xtools/x-tools.tar.xz Then get the kernel src 5.0.0 and patch it with the patches provided under my void template. or write a pkgbuild file to apply the patches. "Manual" cross-compile you can do with a wrapper bash/sh file like this: CODE export ARCH=arm export PATH='/usr/local/x-tools/arm-unknown-linux-gnueabi/bin':$PATH export CROSS_COMPILE=arm-unknown-linux-gnueabi- export STAGING_DIR=/usr/local/x-tools/arm-unknown-linux-gnueabi export CC=arm-unknown-linux-gnueabi-gcc export LD=arm-unknown-linux-gnueabi-ld export TARGET=arm export HOSTCC=gcc make -j4 "$1" |
|
|
![]()
Post
#5
|
|
Group: Members Posts: 11 Joined: 16-September 19 From: China Member No.: 855,729 ![]() |
Thanks greguu.
My target is to write a detailed document to help anothers to build a Linux distribution by themself, include boot loader, kernel and rootfs. I had built the linux 5.0 kernel successfully with the config file and patch files in https://github.com/greguu/voidz-packages/tr...linux5.0-zaurus, and it works well with the ZALARM rootfs which provide by you. Many thanks. Now I'm trying to build the kexecboot, here are the steps I'm working on: 1. build kexecboot 2. make a initramfs with the kexecboot in step one and kexec. 3. build the linux kernel zImage with the initramfs in step two. Are the steps correct? |
|
|
![]()
Post
#6
|
|
Group: Members Posts: 11 Joined: 16-September 19 From: China Member No.: 855,729 ![]() |
Hi, you should ask for help to our Zaurus kernel expert, greguu. Why would you want to compile it yourself btw, is there any feature or module in the current kernel which you need and is missing? Varti em.... Just wanna try. I'm free recently, have a lot time to try something. I switched to Void Linux for building some time ago. You can find my kernel build template here:https://github.com/greguu/voidz-packages/tree/voidz-packages-v03-(build8)/srcpkgs/linux5.0-zaurus I would recommend to use Void Linux 64 bit musl as a build host for building voidz rootfs images and packages. You find some instructions on how to build using xbps-src here: https://github.com/greguu/voidz-packages You can also build the kernel under Arch Linux. For this get the ArchLinuxARM toolchain for armv5tel.https://archlinuxarm.org/builder/xtools/x-tools.tar.xz Then get the kernel src 5.0.0 and patch it with the patches provided under my void template. or write a pkgbuild file to apply the patches. "Manual" cross-compile you can do with a wrapper bash/sh file like this: CODE export ARCH=arm export PATH='/usr/local/x-tools/arm-unknown-linux-gnueabi/bin':$PATH export CROSS_COMPILE=arm-unknown-linux-gnueabi- export STAGING_DIR=/usr/local/x-tools/arm-unknown-linux-gnueabi export CC=arm-unknown-linux-gnueabi-gcc export LD=arm-unknown-linux-gnueabi-ld export TARGET=arm export HOSTCC=gcc make -j4 "$1" Hi greguu I want to build Kexecboot with linux 5.0, but I don't know how to start, the wiki in https://github.com/kexecboot/kexecboot/wiki is too old and I don't want to use OpenEmbedded. Can you give me some tutorials how to start the work? Thanks. |
|
|
![]()
Post
#7
|
|
![]() Group: Moderators Posts: 374 Joined: 14-November 05 From: New Zealand Member No.: 8,535 ![]() |
Hi greguu I want to build Kexecboot with linux 5.0, but I don't know how to start, the wiki in https://github.com/kexecboot/kexecboot/wiki is too old and I don't want to use OpenEmbedded. Can you give me some tutorials how to start the work? Thanks. Hi cain2pang, I am not sure you will get a 5.0.0 kernel kexecboot to work without taking out some features from the kernel config. The last version I build was using 4.14 kernel.After that version the kexec kernel got too large to fit in the Zaurus kernel partition. ![]() This is the latest kexecboot kernel. https://github.com/greguu/voidz-packages-ol...execboot.tar.xz I need to check my build server and get the .config file and patches for the kexecboot kernel. Its the same source as https://github.com/greguu/linux-4.14.18-c3x00 but does need a different .config and initramfs.cpio containing kexecboot. Do you want to rebuild kexecboot as well or just the kernel ? Cheers! This post has been edited by Varti: Sep 25 2019, 11:31 PM
Reason for edit: Removed most of the quoted text.
|
|
|
![]()
Post
#8
|
|
![]() Group: Moderators Posts: 374 Joined: 14-November 05 From: New Zealand Member No.: 8,535 ![]() |
Hi cain2pang, I am not sure you will get a 5.0.0 kernel kexecboot to work without taking out some features from the kernel config. The last version I build was using 4.14 kernel.After that version the kexec kernel got too large to fit in the Zaurus kernel partition. ![]() This is the latest kexecboot kernel. https://github.com/greguu/voidz-packages-ol...execboot.tar.xz I need to check my build server and get the .config file and patches for the kexecboot kernel. Its the same source as https://github.com/greguu/linux-4.14.18-c3x00 but does need a different .config and initramfs.cpio containing kexecboot. Do you want to rebuild kexecboot as well or just the kernel ? Cheers! Attached the 4.14.18 kernel .config for void linux kexecboot and the initramfs. This should help you get going. Source is same as https://github.com/greguu/linux-4.14.18-c3x00 This post has been edited by Varti: Sep 25 2019, 11:32 PM
Reason for edit: Removed most of the quoted text.
Attached File(s)
|
|
|
![]()
Post
#9
|
|
Group: Members Posts: 11 Joined: 16-September 19 From: China Member No.: 855,729 ![]() |
Hi cain2pang, I am not sure you will get a 5.0.0 kernel kexecboot to work without taking out some features from the kernel config. The last version I build was using 4.14 kernel.After that version the kexec kernel got too large to fit in the Zaurus kernel partition. ![]() This is the latest kexecboot kernel. https://github.com/greguu/voidz-packages-ol...execboot.tar.xz I need to check my build server and get the .config file and patches for the kexecboot kernel. Its the same source as https://github.com/greguu/linux-4.14.18-c3x00 but does need a different .config and initramfs.cpio containing kexecboot. Do you want to rebuild kexecboot as well or just the kernel ? Cheers! Thanks greguu, I had built the kexecboot, my problems is how to make a image with the kexecboot. I noticed the CONFIG_INITRAMFS_SOURCE="initramfs.cpio.xz" in you config file, I will try to make a initramfs.cpio.xz file and then the kernel image. I will have a 7 days holiday from October 1st, hope I can go through the building of kernel and kexecboot, and make them boot on my c3100 device. If everything is OK, I will organize these steps to write a tutorial document. Thanks again for all your help, greguu. |
|
|
![]()
Post
#10
|
|
![]() Group: Moderators Posts: 374 Joined: 14-November 05 From: New Zealand Member No.: 8,535 ![]() |
Hi cain2pang, I am not sure you will get a 5.0.0 kernel kexecboot to work without taking out some features from the kernel config. The last version I build was using 4.14 kernel.After that version the kexec kernel got too large to fit in the Zaurus kernel partition. ![]() This is the latest kexecboot kernel. https://github.com/greguu/voidz-packages-ol...execboot.tar.xz I need to check my build server and get the .config file and patches for the kexecboot kernel. Its the same source as https://github.com/greguu/linux-4.14.18-c3x00 but does need a different .config and initramfs.cpio containing kexecboot. Do you want to rebuild kexecboot as well or just the kernel ? Cheers! Thanks greguu, I had built the kexecboot, my problems is how to make a image with the kexecboot. I noticed the CONFIG_INITRAMFS_SOURCE="initramfs.cpio.xz" in you config file, I will try to make a initramfs.cpio.xz file and then the kernel image. I will have a 7 days holiday from October 1st, hope I can go through the building of kernel and kexecboot, and make them boot on my c3100 device. If everything is OK, I will organize these steps to write a tutorial document. Thanks again for all your help, greguu. You can build your own initramfs.cpio.xz like this example: CODE cd cpio/ find . | cpio -o -H newc | xz --check=crc32 --lzma2=dict=512KB > ../initramfs.cpio.xz |
|
|
![]()
Post
#11
|
|
![]() Group: Moderators Posts: 374 Joined: 14-November 05 From: New Zealand Member No.: 8,535 ![]() |
|
|
|
![]()
Post
#12
|
|
Group: Members Posts: 11 Joined: 16-September 19 From: China Member No.: 855,729 ![]() |
|
|
|
![]()
Post
#13
|
|
![]() Group: Moderators Posts: 374 Joined: 14-November 05 From: New Zealand Member No.: 8,535 ![]() |
If everything is OK, I will organize these steps to write a tutorial document. Please share your success with our community. ![]() OK, this is the reason why I do these things. ![]() No worries, nice to see someone working on Zaurus. Happy to help anytime ![]() |
|
|
![]() ![]() |
![]() |
Lo-Fi Version | Time is now: 12th December 2019 - 09:31 PM |