Discussion
How to get a working kernel
108
24488
View: 24488|Reply: 108
|
[Discussion]
How to get a working kernel
[Copy link]
|
|
Edited by tony_zhang at Tue Nov 25, 2014 19:39
hi everyone
i need a kernel 3.14+ , there some new drivers for webcams included like mine.
i read much of tuturials on linux-sunix and here in the forum.
i get all compiled u-boot kernel 3.18-rc2 and merge them all in an debian but it doenst boot.
i build kernel with dtb an write an boot.cmd + parse them to boot.src , but nothing works
i tried many versions from git denx sunix and much other .
tried kernel 3.14 and sunix-next everything with same result, no booting system.
|
|
|
|
|
|
|
|
I can't really help you much, but I do have a few hints for you:
1) Kernel 3.19 is supposed to bring support for BananaPi. You can try to find and apply the planned patches to a Kernel 3.18 source, if they are not already in sunxi-next.
2) Forget about Kernel 3.14. The sunxi repos for Kernel 3.14 haven't been touched in quite a while and LeMaker also didn't patch the 3.14 branch in their fork of the sunxi-repo to add support for the BananaPi.
3) Aside from a working Kernel image, you also need a compatible and recent u-boot image. Support for BananaPi in mainline U-boot is supposed to be introduced in early 2015. So you might check the developement versions of uboot-sunxi to see if BananaPi support is already added there.
4) Fedora 21 for ARM is supposed to run on Banana Pi and have a working kernel (3.16 or 3.17) for it. You could try beta images or wait for the official release expected in December and use that uboot, kernel and dtb for BananaPi. I read that they successfully booted a Kernel 3.16 on BananaPi already. But who knows which features are supported and which are missing. Don't expect anything more than support for a headless system. |
|
|
|
|
|
|
|
i think my worst problem is uboot and the boot.cmd files
kernel today i used was sunix-next- git clone -b sunxi-next https://github.com/linux-sunxi
Copy the Code this is now 3.18-rc2 with sun7i-a20-bananapi.dts inside- make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- LOADADDR=0x40008000 uImage modules dtbs
Copy the Code for u-boot i test different sources
https://github.com/jwrdegoede/u-boot-sunxi
lemaker and some other
boot.cmd (dont know what earlyprintk mean- fatload mmc 0 0x46000000 uImage
- fatload mmc 0 0x49000000 sun7i-a20-bananapi.dtb
- setenv bootargs console=ttyS0,115200 <earlyprintk> root=/dev/mmcblk0p2 rootwait panic=10 ${extra}
- bootm 0x46000000 - 0x49000000
Copy the Code |
|
|
|
|
|
|
|
Update : 
i build a working kernel 3.18-rc2 with an debian jessie  |
|
|
|
|
|
|
|
Great !
With working GMAC ethernet ? |
|
|
|
|
|
|
|
i can only test 100mbit , that works , have to rebuild the kernel , forget some wifi driver lol
will upload later an image for testing |
|
|
|
|
|
|
|
You can check with Igor, IIRC when he tried GMAC was not working |
|
|
|
|
|
|
|
Apart from an image, I guess it might me more interesting and helpful if you provided instructions on how you built the kernel and u-boot. Thanks. |
|
|
|
|
|
|
|
The most things(steps) explained before but i used for u-boot an tree from denx. I will write it later in my blog. |
|
|
|
|
|
|
|
Edited by a1d3s at Wed Nov 5, 2014 01:09
ok for now , will post here all steps i do without the debootstrap thing for my jessie
- cat <<EOT | sfdisk --force --in-order -uS /dev/mmcblk0
- 2048,524288,L
- 526336,,L
- EOT
- mkfs.vfat /dev/mmcblk0p1
- mkfs.ext4 /dev/mmcblk0p2
- apt-get install bc libncurses5-dev gcc-arm-gnueabihf u-boot-tools build-essential binutils-arm-linux-gnueabihf libusb-1.0-0 libusb-1.0-0-dev git wget fakeroot
- mkdir bpi
- cd bpi
- git clone -b sunxi-next https://github.com/linux-sunxi/linux-sunxi
- cd linux-sunxi
- make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- sunxi_defconfig
- make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- menuconfig
- enable loadable module support
- enable some usefull drivers like webcam or wifi
- make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- LOADADDR=0x40008000 uImage dtbs
- make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- INSTALL_MOD_PATH=output modules && modules_install
- mkdir /mnt/boot
- cp arch/arm/boot/uImage /mnt/boot
- cp arch/arm/boot/dts/sun7i-a20-bananapi.dtb /mnt/boot
- nano /mnt/boot/boot.cmd
- fatload mmc 0 0x46000000 uImage
- fatload mmc 0 0x49000000 sun7i-a20-bananapi.dtb
- setenv bootargs console=ttyS0,115200 root=/dev/mmcblk0p2 rw rootwait panic=10 ${extra}
- bootm 0x46000000 - 0x49000000
- mkimage -C none -A arm -T script -d /mnt/boot/boot.cmd /mnt/boot/boot.scr
- mkdir /mnt/rootfs
- mount /dev/mmcblk0p2 /mnt/rootfs
- cp output/* /mnt/rootfs/
- cd ..
- git clone http://git.denx.de/u-boot-sunxi.git
- cd u-boot-sunxi
- make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- Bananapi_defconfig
- make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-
- dd if=spl/sunxi-spl.bin of=/dev/mmcblk0 bs=1024 seek=8
- dd if=u-boot.img of=/dev/mmcblk0 bs=1024 seek=40
Copy the Code |
|
|
|
|
|
|