Recompiling kernel (linux-sun7i)

Ask questions about Arch Linux ARM. Please search before making a new topic.

Recompiling kernel (linux-sun7i)

Postby cptG » Thu May 14, 2015 4:43 pm

Hello!

I'm trying to recompile the kernel with different config options. My first step is trying to reproduce the installed kernel, i.e. "makepkg -si" without changing anything in the config.
* I cloned the PKGBUILDs repo at https://github.com/archlinuxarm/PKGBUILDs
* I entered core/linux-sun7i and simply did makepkg -si
I'm using the distcc setup described at http://archlinuxarm.org/developers/dist ... -compiling more specifically: I'm using the binary package mentioned in there (WarheadsSE's distccd-alarm package)

After successfully building and installing the package my board does not boot up anymore.

One thing I noticed: the linux-sun7i.install file runs depmod with the wrong kernel version - the version built is 3.4.103-5-ARCH and the version given to depmod is 3.4.79-6-ARCH. I don't know if this is a big problem as there is no error given upon installation so it seems depmod finds the correct modules-dir just fine.
I'd expect my kernel to behave identically to the one that was installed beforehand so I really don't understand why my board doesn't boot anymore.
Are there any obvious things I'm doing wrong? Are the official packages built with the distcc setup as well? If so: with WarheadsSE's package or another one?

Specifics:
my board is the A20 LIME2 from Olimex

atm I'm restoring by backup image, after that is done I'll provide more info, try recompiling the kernel again with "fixed" linux-sun7.install file and post where the boot process hangs...
cptG
 
Posts: 3
Joined: Thu May 14, 2015 4:31 pm

Re: Recompiling kernel (linux-sun7i)

Postby moonman » Thu May 14, 2015 5:23 pm

.install file is updated with a new version after build process is done automatically.
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3388
Joined: Sat Jan 15, 2011 3:36 am

Re: Recompiling kernel (linux-sun7i)

Postby cptG » Thu May 14, 2015 5:25 pm

I see. So now I'm recompiling just for recompilation's sake :/
Either way. Recompilation ongoing, will provide more info after that.
cptG
 
Posts: 3
Joined: Thu May 14, 2015 4:31 pm

Re: Recompiling kernel (linux-sun7i)

Postby cptG » Thu May 14, 2015 8:02 pm

OK. Here's more info.
I disabled everything in /etc/modules-load.d/*.conf and installed the kernel.
The last messages I am getting via serial is:
$this->bbcode_second_pass_code('', '
<6>[mmc-msg] sdc0 set round clock 42857143, src 600000000
[ 4.594213] [mmc-msg] sdc0 set round clock 42857143, src 600000000
<6>[mmc-msg] sdc0 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B
[ 4.659694] [mmc-msg] sdc0 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B
<6>mmc0: new high speed SDHC card at address b368
[ 4.673637] mmc0: new high speed SDHC card at address b368
<6>mmcblk0: mmc0:b368 MS 7.35 GiB
[ 4.688050] mmcblk0: mmc0:b368 MS 7.35 GiB
<6> mmcblk0: p1
[ 4.696031] mmcblk0: p1


insmod_device_driver

[ 5.743671]
[ 5.743677]
[ 5.743679] insmod_device_driver
[ 5.743683]
[sw_udc]: [ 5.752294] [sw_udc]: sw_usb_device_enable start
sw_usb_device_enable start
[sw_udc]: [ 5.760242] [sw_udc]: usb_vbase = 0xf1c13000
usb_vbase = 0xf1c13000
[sw_udc]: [ 5.767679] [sw_udc]: sram_vbase = 0xf1c00000
sram_vbase = 0xf1c00000
[sw_udc]: [ 5.775139] [sw_udc]: open_usb_clock
open_usb_clock
[sw_udc]: [ 5.801017] [sw_udc]: CONFIG_USB_GADGET_DUALSPEED
CONFIG_USB_GADGET_DUALSPEED
udc->driver is null, udc is need not start
[ 5.812097] udc->driver is null, udc is need not start
[sw_udc]: [ 5.818123] [sw_udc]: sw_usb_device_enable end
sw_usb_device_enable end

')

and then there's nothing but eternal silence. The heartbeat-LED is blinking though.

I took a look at the original linux-sun7i package from pacman's cache and my own rebuilt package file.
The kernel images do differ in size slightly but this is nothing that surprises me too much, I guess there's bound to be some differences between two builds...
I extracted the configs from both images and there differences are:

$this->bbcode_second_pass_code('', '
--- old.config 2015-05-14 20:23:07.029250540 +0200
+++ new.config 2015-05-14 20:23:14.815917552 +0200
@@ -1407,7 +1407,6 @@
# CONFIG_FTRACE is not set
CONFIG_FUSE_FS=m
CONFIG_FUTEX=y
-# CONFIG_FW_LOADER_USER_HELPER is not set
CONFIG_FW_LOADER=y
# CONFIG_GADGET_UAC1 is not set
# CONFIG_GAMEPORT is not set
@@ -3689,7 +3688,7 @@
# LED drivers
# LED Triggers
# Library routines
-# Linux/arm 3.4.103-4 Kernel Configuration
+# Linux/arm 3.4.103-5 Kernel Configuration
# LPDDR flash memory drivers
# Mapping drivers for chip access
# Memory mapped GPIO drivers:

')

What strikes me as odd is "# Linux/arm 3.4.103-4 Kernel Configuration" in the old config, although the package is 3.4.103-5 so there might a difference between my build setup and the official build setup.

Another oddity: the distccd-arm package claims to provide gcc 4.9.2 although the gcc version contained therein is 4.9.3 these are the "official" binaries from http://archlinuxarm.org/builder/xtools/x-tools7h.tar.xz though

Are my expectations wrong? Shouldn't I be able to reproduce the official kernel package from this PKGBUILD?
What can I do to investigate further?

Thanks,
cptG

PS: I'm attaching the complete serial dump of the boot proceses
cptG
 
Posts: 3
Joined: Thu May 14, 2015 4:31 pm

Re: Recompiling kernel (linux-sun7i)

Postby moonman » Fri May 15, 2015 4:01 am

Replace all instances of 'git apply' with "patch -Np1 -i". git apply apparantly works on our build system, but not if you compile packages yourself. Don't ask me why as i don't know since I didn't write the code for the build system. :)
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3388
Joined: Sat Jan 15, 2011 3:36 am

Re: Recompiling kernel (linux-sun7i)

Postby WarheadsSE » Sun May 17, 2015 3:16 pm

Yes, you should always build the sources OUTSIDE the git tree. Why? Because `git apply` can't apply to a sub-tree inside an existing git checkout :geek:
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Recompiling kernel (linux-sun7i)

Postby moonman » Sun May 17, 2015 5:37 pm

Makes sense. Thanks WarheadsSE
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3388
Joined: Sat Jan 15, 2011 3:36 am


Return to User Questions

Who is online

Users browsing this forum: No registered users and 19 guests