I'm having trouble building the Thumb2 kernel on, I actually believe
this same code worked some time ago before a toolchain update. There
are actually two problems described below. I get past the first with
a config change but don't know how to fix the second one.
Start with mx51_defconfig, it builds uImage fine:
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- mx51_defconfig
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- uImage
Save the working .config to config1
$ cp .config config1
Edit .config and remove this line then run make oldconfig.
$ CONFIG_THUMB2_KERNEL is not set
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- oldconfig
Answer y to THUMB2_KERNEL and THUMB2_AVOID_R_ARM_THM_JUMP11
Save new Thumb2 enabled config to config2
Here is the diff:
$ diff -u config1 config2
--- config1 2011-08-21 14:50:23.014654705 -0600
+++ config2 2011-08-21 14:51:13.164654727 -0600
@@ -339,9 +339,10 @@
CONFIG_PREEMPT_VOLUNTARY=y
# CONFIG_PREEMPT is not set
CONFIG_HZ=100
-# CONFIG_THUMB2_KERNEL is not set
+CONFIG_THUMB2_KERNEL=y
+CONFIG_THUMB2_AVOID_R_ARM_THM_JUMP11=y
+CONFIG_ARM_ASM_UNIFIED=y
CONFIG_AEABI=y
-# CONFIG_OABI_COMPAT is not set
# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
CONFIG_HAVE_ARCH_PFN_VALID=y
@@ -1417,7 +1418,6 @@
# CONFIG_DEBUG_SG is not set
# CONFIG_DEBUG_NOTIFIERS is not set
# CONFIG_DEBUG_CREDENTIALS is not set
-CONFIG_FRAME_POINTER=y
# CONFIG_BOOT_PRINTK_DELAY is not set
# CONFIG_RCU_TORTURE_TEST is not set
# CONFIG_BACKTRACE_SELF_TEST is not set
@@ -1429,7 +1429,6 @@
# CONFIG_SYSCTL_SYSCALL_CHECK is not set
# CONFIG_DEBUG_PAGEALLOC is not set
CONFIG_HAVE_FUNCTION_TRACER=y
-CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
CONFIG_HAVE_DYNAMIC_FTRACE=y
CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
CONFIG_HAVE_C_RECORDMCOUNT=y
Attempt to build this:
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- uImage
...
LD init/built-in.o
LD .tmp_vmlinux1
arch/arm/kernel/built-in.o: In function `get_wchan':
early_printk.c:(.text+0x1400): undefined reference to `unwind_frame'
arch/arm/kernel/built-in.o: In function `walk_stackframe':
early_printk.c:(.text+0x2832): undefined reference to `unwind_frame'
make: *** [.tmp_vmlinux1] Error 1
Poke around a bit and it looks like setting ARM_UNWIND could make
difference so try that. Edit .config the remove
# CONFIG_ARM_UNWIND is not set
then run make old config again.
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- oldconfig
Call the result config3
$ cp .config config3
So here is the cumulative diff
$ diff -u config1 config3
--- config1 2011-08-21 14:50:23.014654705 -0600
+++ config3 2011-08-21 14:54:29.584654811 -0600
@@ -339,9 +339,10 @@
CONFIG_PREEMPT_VOLUNTARY=y
# CONFIG_PREEMPT is not set
CONFIG_HZ=100
-# CONFIG_THUMB2_KERNEL is not set
+CONFIG_THUMB2_KERNEL=y
+CONFIG_THUMB2_AVOID_R_ARM_THM_JUMP11=y
+CONFIG_ARM_ASM_UNIFIED=y
CONFIG_AEABI=y
-# CONFIG_OABI_COMPAT is not set
# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
CONFIG_HAVE_ARCH_PFN_VALID=y
@@ -1417,7 +1418,6 @@
# CONFIG_DEBUG_SG is not set
# CONFIG_DEBUG_NOTIFIERS is not set
# CONFIG_DEBUG_CREDENTIALS is not set
-CONFIG_FRAME_POINTER=y
# CONFIG_BOOT_PRINTK_DELAY is not set
# CONFIG_RCU_TORTURE_TEST is not set
# CONFIG_BACKTRACE_SELF_TEST is not set
@@ -1429,7 +1429,6 @@
# CONFIG_SYSCTL_SYSCALL_CHECK is not set
# CONFIG_DEBUG_PAGEALLOC is not set
CONFIG_HAVE_FUNCTION_TRACER=y
-CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
CONFIG_HAVE_DYNAMIC_FTRACE=y
CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
CONFIG_HAVE_C_RECORDMCOUNT=y
@@ -1443,7 +1442,7 @@
# CONFIG_KGDB is not set
# CONFIG_TEST_KSTRTOX is not set
# CONFIG_STRICT_DEVMEM is not set
-# CONFIG_ARM_UNWIND is not set
+CONFIG_ARM_UNWIND=y
# CONFIG_DEBUG_USER is not set
CONFIG_DEBUG_LL=y
CONFIG_EARLY_PRINTK=y
Try building again.
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- uImage
...
LD vmlinux
SYSMAP System.map
SYSMAP .tmp_System.map
OBJCOPY arch/arm/boot/Image
Kernel: arch/arm/boot/Image is ready
AS arch/arm/boot/compressed/head.o
arch/arm/boot/compressed/head.S: Assembler messages:
arch/arm/boot/compressed/head.S:127: Error: selected processor does
not support requested special purpose register -- `mrs r2,cpsr'
arch/arm/boot/compressed/head.S:134: Error: selected processor does
not support requested special purpose register -- `mrs r2,cpsr'
arch/arm/boot/compressed/head.S:136: Error: selected processor does
not support requested special purpose register -- `msr cpsr_c,r2'
make[2]: *** [arch/arm/boot/compressed/head.o] Error 1
make[1]: *** [arch/arm/boot/compressed/vmlinux] Error 2
make: *** [uImage] Error 2
Here is my gcc version:
$ arm-linux-gnueabi-gcc --version
arm-linux-gnueabi-gcc (Ubuntu/Linaro 4.6.1-5ubuntu2~ppa1) 4.6.1
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
And as version:
GNU assembler (GNU Binutils for Ubuntu) 2.21.52.20110707
Copyright 2011 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or later.
This program has absolutely no warranty.
This assembler was configured for a target of `arm-linux-gnueabi'.
Three configs attached:
config1 -- original config from make mx51_defconfig
config2 -- config after turning on thumb2
config3 -- config after setting ARM_UNWIND
Any help would be appreciated.
Thanks
John
Zach reminded me that this month is compressed, so a linaro+android
kernel would be needed immediately for 11.12. As Andrey is just ramping
up in taking over for the Linaro Android kernel maintenance, I wanted to
just get a kernel out, using the older kernel workflow, so that we had
something current for 11.12.
Anyway. This is straight from Andy Green's
linaro-androidization-tracking branch, with a few small build fixes
added on that I found in my testing and the base android_*_defconfig
files.
You can find the tree here:
git://android.git.linaro.org/kernel/linaro-android.git linaro-android-3.2-agreen-rebase
The current sha is tagged as: linux-linaro-3.2-2011.12-0-android-0
Known issues:
There seems to be something in the androidization branch that is causing
problems on beagle xm and origen. In my testing beagle xm kernel ends up
hanging in mid-boot(after ~4 seconds). And the orgien board doesn't
show anything past "Uncompressing Linux... done, booting the kernel". If
I drop the androidization patches and go back to the v3.2-rc4 base, both
kernels boot until the Android userland environment starts and falls
over because the android features are missing. I mucked about for awhile
on both of these tonight, but wasn't able to solve either of them, so
I'd appreciate any help trying to narrow down what is wrong on Origen
(beagle is apparently lower priority).
Andy, one issue with the re-factored android patch tree: Its not very
bisect-able. If I jump back to a topic branch, frequently there are
missing dependencies that keep it from building. Any thoughts on how we
can better chase down these sorts of issues?
thanks
-john
Greetings,
I have disabled power saving features in linaro ubuntu 11.10 on a
PandaBoard, in order to prevent the screen going black, since there is no
mouse nor keyboard attached to the board (It is simply displaying videos,
in a closed loop). But when I reboot (Or power up after a time with the
board off) sometimes this works, and sometimes not. There seems not to be
any kind of rule for it to work, it can fail 5 or 6 times (going black
after 10 minutes, even when it is set to "never"), and later work ok for 3
or 4 reboots. And then, fail again.
Can anyone enlighten me a bit? Sorry for the joke, but my brain is almost
as dark as black the screen goes...
thanks in advance,
Hi,
I have encountered a failure running live-build that I could use
some help debugging.
Using the instructions in the LiveBuild wiki page:
https://wiki.linaro.org/Platform/DevPlatform/CrossCompile/LiveBuild
the procedure fails during the adduser step. The failure is:
I: create linaro user
Can't set $0 with prctl(): Bad address at /usr/sbin/adduser line 86.
Here is the perl code around line 86 in adduser:
----
my %config; # configuration hash
my @defaults = ("/etc/adduser.conf");
my $nogroup_id = getgrnam("nogroup") || 65534;
$0 =~ s+.*/++; <<<<<<<<< Line 86 >>>>>>>>>>>
----
This is the call to adduser from the 01-setup_user_linaro.chroot
script that causes the problem:
adduser --gecos linaro --disabled-login linaro
The funny thing about this failure, if I chroot into the build
area and run that command manually, everything works fine.
1st, what is that perl command doing?
2nd, anybody have any ideas on what would cause this failure?
TIA,
Matt
This fixes the thrd->req_running field being accessed before thrd
is checked for null. The error was introduced in abb959f.
Signed-off-by: Mans Rullgard <mans.rullgard(a)linaro.org>
---
arch/arm/common/pl330.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/arch/arm/common/pl330.c b/arch/arm/common/pl330.c
index 8d8df74..67abef5 100644
--- a/arch/arm/common/pl330.c
+++ b/arch/arm/common/pl330.c
@@ -1496,12 +1496,13 @@ int pl330_chan_ctrl(void *ch_id, enum pl330_chan_op op)
struct pl330_thread *thrd = ch_id;
struct pl330_dmac *pl330;
unsigned long flags;
- int ret = 0, active = thrd->req_running;
+ int ret = 0, active;
if (!thrd || thrd->free || thrd->dmac->state == DYING)
return -EINVAL;
pl330 = thrd->dmac;
+ active = thrd->req_running;
spin_lock_irqsave(&pl330->lock, flags);
--
1.7.8.3
PATCH 1) [thermal: Add a new trip type to use cooling device instance number]
This patch adds a new trip type THERMAL_TRIP_STATE_ACTIVE which passes
cooling device instance number and may be helpful for cpufreq cooling devices
to take the correct cooling action.
PATCH 2) [thermal: Add generic cpu cooling implementation]
This patch adds generic cpu cooling low level implementation through frequency
clipping and cpu hotplug. In future, other cpu related cooling devices may be
added here. An ACPI version of this already exists(drivers/acpi/processor_thermal.c).
But this will be useful for platforms like ARM using the generic thermal interface
along with the generic cpu cooling devices. The cooling device registration API's
return cooling device pointers which can be easily binded with the thermal zone
trip points.
Amit Daniel Kachhap (2):
thermal: Add a new trip type to use cooling device instance number
thermal: Add generic cpu cooling implementation
Documentation/thermal/cpu-cooling-api.txt | 52 +++++
Documentation/thermal/sysfs-api.txt | 4 +-
drivers/thermal/Kconfig | 11 +
drivers/thermal/Makefile | 1 +
drivers/thermal/cpu_cooling.c | 302 +++++++++++++++++++++++++++++
drivers/thermal/thermal_sys.c | 27 +++-
include/linux/cpu_cooling.h | 45 +++++
include/linux/thermal.h | 1 +
8 files changed, 440 insertions(+), 3 deletions(-)
create mode 100644 Documentation/thermal/cpu-cooling-api.txt
create mode 100644 drivers/thermal/cpu_cooling.c
create mode 100644 include/linux/cpu_cooling.h
The driver is based on clock and regulator APIs and support single core
and multi core ARM SoCs. For multi core, it assume all cores share the
same clock and voltage.
Thanks Arnd, Mark, Jamie, Shawn, Rob, for your review.
Changes in V6:
- add scaling_available_freqs
Changes in V5:
- add more comments
- rename trans-latency to clk-trans-latency, and it only describe clk
latency. Regulator latency is got from regulator_set_voltage_time.
Changes in v4:
- add depends on HAVE_CLK && OF && REGULATOR
- add set_cpu_freq fail check
- regulator_put wehn module exit
- add pr_fmt and convert all printk to pr_xxx
- use voltage range
- comment and doc fix
- add cpu_volts value pre-check in module init
- add helpfull module parameter max_freq
- remove compatible string check on Arnd's comment.
- remove generic-cpufreq to clk-reg-cpufreq
Changes in v3:
- move adjusting smp loops_per_jiffy to arm common code,
and also adjust global loops_per_jiffy.
- remove adjusting loops_per_jiffy in imx and omap cpufreq drivers.
- check compatible "generic-cpufreq" when module_init
- change printk to pr_xxx
- add generic-cpufreq DT binding doc
Changes in v2:
- add volatage change support
- change '_' in property name to '-'
- use initial value to calculate loops_per_jiffy
- fix reading cpu_volts property bug
- let cpufreq_frequency_table_cpuinfo routines handle cpu_freq_khz_max/min
- don't change freq in arm_cpufreq_exit, because every core share the same freq.
- use unsigned long describe frequency as much as possible. Because clk use
unsigned long, but cpufreq use unsigned int.
[PATCH V6 1/7] ARM: add cpufreq transiton notifier to adjust
[PATCH V6 2/7] arm/imx: cpufreq: remove loops_per_jiffy recalculate
[PATCH V6 3/7] cpufreq: OMAP: remove loops_per_jiffy recalculate for
[PATCH V6 4/7] cpufreq: add clk-reg cpufreq driver
[PATCH V6 5/7] dts/imx6q: add cpufreq property
[PATCH V6 6/7] arm/imx6q: register arm_clk as cpu to clkdev
[PATCH V6 7/7] arm/imx6q: select ARCH_HAS_CPUFREQ
Thanks
Richard