View previous topic :: View next topic |
Author |
Message |
grant123 l33t

Joined: 23 Mar 2005 Posts: 994
|
Posted: Tue Dec 31, 2013 10:32 pm Post subject: Predefined kernel configs |
|
|
How can I configure my kernel with a predefined config such as this one:
arch/arm/boot/dts/omap4-panda-es.dts
Or am I missing something? |
|
Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 44171 Location: 56N 3W
|
Posted: Tue Dec 31, 2013 11:02 pm Post subject: |
|
|
grant123,
Rename the file to .config and put it at the lop level of the kernel source tree.
The make system will then use it _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
 |
grant123 l33t

Joined: 23 Mar 2005 Posts: 994
|
Posted: Wed Jan 01, 2014 12:14 am Post subject: |
|
|
That doesn't seem to work but it's my fault because I don't think that file is a "predefined config" like I said it was. I think I need to rephrase my question.
1. How can I get a working .config for a weird device like the Pandaboard ES? There is a Gentoo guide for the Pandaboard but it uses a special Ubuntu kernel. I know people are booting it on the latest kernels these days but I don't know how to configure it.
2. What is arch/arm/boot/dts/omap4-panda-es.dts? |
|
Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 44171 Location: 56N 3W
|
Posted: Wed Jan 01, 2014 1:40 pm Post subject: |
|
|
grant123,
arch/arm/boot/dts/omap4-panda-es.dts is a relative path to something. Assuming its /usr/src/linux, its a file related to sound.
Code: | /*
* Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
/dts-v1/;
#include "omap4460.dtsi"
#include "omap4-panda-common.dtsi"
/* Audio routing is differnet between PandaBoard4430 and PandaBoardES */
&sound {
ti,model = "PandaBoardES";
/* Audio routing */
ti,audio-routing =
"Headset Stereophone", "HSOL",
"Headset Stereophone", "HSOR",
"Ext Spk", "HFL",
"Ext Spk", "HFR",
"Line Out", "AUXL",
"Line Out", "AUXR",
"AFML", "Line In",
"AFMR", "Line In";
};
/* PandaboardES has external pullups on SCL & SDA */ |
The default configs are in arch/arm/configs/ but they are only intended as starting points.
You need to pick one then customise it. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
 |
heiwa n00b

Joined: 24 Oct 2012 Posts: 70
|
Posted: Wed Jan 01, 2014 3:24 pm Post subject: |
|
|
*.dts files contain device trees describing the hardware of your board. It'll be converted to a binary *.dtb format. At boot time the correct (binary) device tree has to be loaded together with the kernel into memory so that the kernel loads (only) the correct drivers.
For the config file I'd start out with the one from Ubuntu and update it using 'make oldconfig'. |
|
Back to top |
|
 |
grant123 l33t

Joined: 23 Mar 2005 Posts: 994
|
Posted: Thu Jan 02, 2014 2:35 am Post subject: |
|
|
I tried 'make omap2plus_defconfig' and I also tried downloading http://dev.gentoo.org/~armin76/arm/pandaboard/kconfig but neither will boot. I must be doing something wrong somewhere in the process. Here's what I'm doing right on the pandaboard:
# cd /usr/src/linux-3.12.6-gentoo
# 'make omap2plus_defconfig' or 'wget http://dev.gentoo.org/~armin76/arm/pandaboard/kconfig -O .config && make oldconfig'
# make LOADADDR=0x80000000 uImage
# mount /dev/mmcblk0p1 /boot
# cp arch/arm/boot/uImage /boot
This is how I'm acquiring MLO and u-boot.img:
# wget ftp://ftp.denx.de/pub/u-boot/u-boot-latest.tar.bz2
# tar xjpf u-boot-latest.tar.bz2
# cd u-boot-*
# make omap4_panda_config
# make
# mount /dev/mmcblk0p1 /boot
# cp MLO /boot
# cp u-boot.img /boot
'make uImage' complains if I don't include a LOADADDR so I chose one arbitrarily. |
|
Back to top |
|
 |
cwr Veteran

Joined: 17 Dec 2005 Posts: 1969
|
Posted: Thu Jan 02, 2014 9:02 am Post subject: |
|
|
An arbitrary address is probably not a good idea - you may well overwrite bits of the kernel.
On the BeagleBone Black uboot is controlled by a uEnv.txt file on the loader partition; I don't
know if the Pandaboard does the same.
The dtbs file is compiled from a dts file using the dtc compier, which should be somewhere
on your (Arm) system. If you can find the sources, you can compile it for x86 or whatever.
Some systems load the dtbs file as part of the kernel, and some separately, loading it at
a known address after the kernel. Really your best bet is to connect a terminal program
to the first serial port of the board (via FTDI?) and watch what uboot does when it's booting.
uboot's configuration is maniacally complicated, and I've never found another way to debug
boot problems, but at least it's pretty gabby on bootup.
Will
PS I am covered with pure vegetable oil and I am writing a best seller! |
|
Back to top |
|
 |
grant123 l33t

Joined: 23 Mar 2005 Posts: 994
|
Posted: Thu Jan 02, 2014 10:12 pm Post subject: |
|
|
I used 'mkimage -l uImage' on the uImage I downloaded which does boot and it has the LOADADDR at 80008000 so I changed 'make' to that one but it still won't boot. I also tried adding the following uEnv.txt but still no boot:
bootfile=/uImage
mmcroot=/dev/mmcblk0p2 rw
mmcrootfstype=ext4 rootwait
optargs=ip=none
I just ordered a USB to serial cable so I can get a better idea of what's going on. |
|
Back to top |
|
 |
grant123 l33t

Joined: 23 Mar 2005 Posts: 994
|
Posted: Sat Jan 04, 2014 3:07 pm Post subject: |
|
|
Gabby indeed. It's booting! I did need the uEnv.txt file from above.
The first issue was this:
** File not found /boot//uImage **
So I changed uEnv.txt to bootfile=uImage and moved uImage to /boot/uImage on the root partition.
Next issue was this:
Bad Linux ARM zImage magic!
So I did 'cp /usr/src/linux/arch/arm/boot/zImage /boot/zImage' and changed uEnv.txt to bootfile=zImage and it boots. For the kernel config I did 'make omap2plus_defconfig' and added CONFIG_USB_EHCI_HCD and CONFIG_USB_EHCI_HCD_OMAP for the ethernet interface.
u-boot said:
** File not found /boot/omap4-panda-es.dtb **
but booted fine anyway. I did 'make omap4-panda-es.dtb' which compiled /usr/src/linux/arch/arm/boot/dts/omap4-panda-es.dtb which I then copied to /boot/omap4-panda-es.dtb and the error went away.
The only other issue I see with u-boot is this message:
reading boot.scr
** Unable to read file boot.scr **
reading uEnv.txt
but I guess that's OK. Thank you for your help! |
|
Back to top |
|
 |
|