RobertCNelson / stable-kernel

MIT License
74 stars 39 forks source link

kernel isn't recognized #2

Closed dtuber closed 13 years ago

dtuber commented 13 years ago

Hi there, So I'm running the pre-installed image of Ubuntu 11.04 on my Beagleboard xm rev A2. I needed to get i2c support, so I rebuilt your newest kernel. It built all the way, and I can see all the new modules and libraries, but my board still recognizes the old kernel as the default kernel. Do I just have to reboot the board and everything will change, or is there something else I have to do?

Thanks, David

RobertCNelson commented 13 years ago

On Thu, Jul 7, 2011 at 9:49 AM, dtuber reply@reply.github.com wrote:

Hi there, So I'm running the pre-installed image of Ubuntu 11.04 on my Beagleboard xm rev A2.  I needed to get i2c support, so I rebuilt your newest kernel.  It built all the way, and I can see all the new modules and libraries, but my board still recognizes the old kernel as the default kernel.  Do I just have to reboot the board and everything will change, or is there something else I have to do?

Hi David,

You need to make sure to copy your new kernel "uImage" to the small fat partition, then reboot the board.. As long as the modules are under /lib/modules/(version) it'll find it.. (in a worst case situation, you just have to run "depmod" to link all the modules together..)

Regards,

Robert Nelson http://www.rcn-ee.com/

dtuber commented 13 years ago

Hi again, If my new modules aren't in /lib/modules/(version), how can I get them there? Is it just a cp or mv command, or is there something wrong with my compiling? Also, where am I copying my uImage from?

Thanks, David

RobertCNelson commented 13 years ago

On Mon, Jul 11, 2011 at 8:52 AM, dtuber reply@reply.github.com wrote:

Hi again, If my new modules aren't in /lib/modules/(version), how can I get them there?  Is it just a cp or mv command, or is there something wrong with my compiling?  Also, where am I copying my uImage from?

Hi David,

If you built the kernel with my "build_kernel.sh" script in the stable-kernel repo, they'll be under the "deploy" directory.. The easiest way to copy the uImage/modules to your sd card is, thru a script in that repo...

First set "MMC=" in system.sh

On my laptop: MMC=/dev/mmcblk0p

From the same directory where you ran "./build_kernel.sh"

If you used a demo image: run: ". ./tools/load_uImage.sh"

If you used the "netinstall" run: ". ./tools/load_uImage-net.sh"

If you used a usb harddrive as a rootfs.. Manually copy:

Make sure you set the "MMC=" parameter correctly, there is ZERO error detection, i needed something quick cause when i'm testing patches i wanted something quick and easy for copying the uImage and modules..

Regards,

Robert Nelson http://www.rcn-ee.com/

dtuber commented 13 years ago

Hi, One last thing. When I'm setting the MMC, do I want to set it where my FAT partition is, or where everything else is? Also, whenever I try to run load_uImage, I get this error: version.sh: not found, even though I'm running it out of the stable-kernel folder. Is there a problem with the script, or what I'm doing?

Thanks, David

RobertCNelson commented 13 years ago

On Wed, Jul 13, 2011 at 8:13 AM, dtuber reply@reply.github.com wrote:

Hi, One last thing.  When I'm setting the MMC, do I want to set it where my FAT partition is, or where everything else is?

Just use the device id "/dev/sdx", no partitions...

 Also, whenever I try to run load_uImage, I get this error: version.sh: not found, even though I'm running it out of the stable-kernel folder.  Is there a problem with the script, or what I'm doing?

If it could not find 'version.sh' then you didn't run it from the base directory...

voodoo@voodoo-e6400:~/git_repo/stable-kernel$ ls build_deb.sh create_dsp_package.sh create_sgx_package.sh dl patches README system.sh.sample version.sh build_kernel.sh create_sgx_package_2.6.37.sh deploy KERNEL patch.sh system.sh tools voodoo@voodoo-e6400:~/git_repo/stable-kernel$ cat tools/load_uImage.sh | grep version . version.sh

run as: voodoo@voodoo-e6400:~/git_repo/stable-kernel$ . ./tools/load_uImage.sh

Regards,

Robert Nelson http://www.rcn-ee.com/

dtuber commented 13 years ago

I'm sure I sound stupid, but if my disk isn't just an sda partition and only mmcblk0p1 and mmckblk0p2, should i pick the bigger one, or are they both part of a bigger sda partition? also, if the script runs, should I just reboot when I'm done, and it'll all work out? Thanks, David

RobertCNelson commented 13 years ago

On Wed, Jul 13, 2011 at 8:45 AM, dtuber reply@reply.github.com wrote:

I'm sure I sound stupid, but if my disk isn't just an sda partition and only mmcblk0p1 and mmckblk0p2, should i pick the bigger one, or are they both part of a bigger sda partition?

sda is probally your x86's root file system.. so use "MMC=/dev/mmcblk0p"

also, if the script runs, should I just reboot when I'm done, and it'll all work out?

reboot? if your beagle's sd card is in your pc's card reader how you going to reboot the beagle? It should be off... ;)

Regards,

Robert Nelson http://www.rcn-ee.com/

dtuber commented 13 years ago

Hi again, Sort of success! So now load uImage is working, but now the board won't boot. how can I check if the new boot image made it onto the fat partition? Also, do you have any other suggestions as to how to fix my not-booting problem? I made sure that the MMC went to the right place and everything.

Thanks, David

RobertCNelson commented 13 years ago

On Wed, Jul 13, 2011 at 3:06 PM, dtuber reply@reply.github.com wrote:

Hi again, Sort of success!  So now load uImage is working, but now the board won't boot.  how can I check if the new boot image made it onto the fat partition?  Also, do you have any other suggestions as to how to fix my not-booting problem?  I made sure that the MMC went to the right place and everything.

What's it printing over the serial boot log? (from power on to... where it stops.. ) (use pastebin.com for posting)

Regards,

Robert Nelson http://www.rcn-ee.com/

RobertCNelson commented 13 years ago

On Wed, Jul 13, 2011 at 3:06 PM, dtuber reply@reply.github.com wrote:

Hi again, Sort of success!  So now load uImage is working, but now the board won't boot.  how can I check if the new boot image made it onto the fat partition?  Also, do you have any other suggestions as to how to fix my not-booting problem?  I made sure that the MMC went to the right place and everything.

ps.. all the script does is drop "uImage" into the fat parition and untar the modules to the rootfs partition.. On average i run the script 10-20 times a day, specially when bisecting commits.. it doesn't modify anything else..

Regards,

Robert Nelson http://www.rcn-ee.com/

dtuber commented 13 years ago

here's the pastebin: http://pastebin.com/fykzs5DN It looks like it works, but I'm not entirely sure how long booting the kernel should take.

Thanks, David

RobertCNelson commented 13 years ago

On Wed, Jul 13, 2011 at 3:57 PM, dtuber reply@reply.github.com wrote:

here's the pastebin: http://pastebin.com/fykzs5DN It looks like it works, but I'm not entirely sure how long booting the kernel should take.

Looks like it froze before loading the serial console..

You can add "earlyprintk" before console=ttyO2,115200n8 in your boot args (boot.scr) to see what the actual error is..

Otherwise, what did you change in the config? It might be something i've seen before.. "git diff | pastebinit"

Regards,

Robert Nelson http://www.rcn-ee.com/

dtuber commented 13 years ago

I didn't change anything in the config that would do that. The only thing I did was add i2c support and all the sound drivers and midi support. and how do I access the fat partition to check the boot script from another computer? Also, what file do you want me to send you? And I'm not so sure how to use pastebinit.

sorry about all these problems, I'm pretty new to linux, especially with these beagleboards.

RobertCNelson commented 13 years ago

On Thu, Jul 14, 2011 at 8:50 AM, dtuber reply@reply.github.com wrote:

I didn't change anything in the config that would do that.  The only thing I did was add i2c support and all the sound drivers and midi support.

any config changes you do will be saved to patches/defconfig, so git will notice..

if you do a "git diff | pastebinit" it'll get uploaded to a pastebin.com service showing all the changes made...

 and how do I access the fat partition to check the boot script from another computer?  Also, what file do you want me to send you?  And I'm not so sure how to use pastebinit.

Most of the directions are here: http://elinux.org/BeagleBoardUbuntu#Beagle_Bx.2FCx_.26_xM

Regards,

Robert Nelson http://www.rcn-ee.com/

dtuber commented 13 years ago

okay, so I tried resetting the boot.scr, and I got this error: http://pastebin.com/WX5Mu3iQ I also pasted in the boot.scr. And here's the pastebinit: http://paste.ubuntu.com/644159/

Thanks so much for your help. I've gotten farther in the days since emailing you than I have in the 2 weeks I've been previously trying.

RobertCNelson commented 13 years ago

On Thu, Jul 14, 2011 at 9:39 AM, dtuber reply@reply.github.com wrote:

okay, so I tried resetting the boot.scr, and I got this error: http://pastebin.com/WX5Mu3iQ I also pasted in the boot.scr.  And here's the pastebinit: http://paste.ubuntu.com/644159/

Thanks so much for your help.  I've gotten farther in the days since emailing you than I have in the 2 weeks I've been previously trying.

Hi David,

With that config it works for me:

http://paste.ubuntu.com/644401/

Any specific reason for:

+CONFIG_I2C_DESIGNWARE=y +CONFIG_I2C_OCORES=y +CONFIG_I2C_SIMTEC=y +CONFIG_I2C_XILINX=y

as that IP currently doesn't exist inside the omap3/4 family..?

setenv vrubuntu@omap:/boot/uboot$ cat uEnv.txt bootenv=boot.scr loaduimage=fatload mmc ${mmcdev} ${loadaddr} ${bootenv} mmcboot=echo Running boot.scr script from mmc ...; source ${loadaddr}

ubuntu@omap:/boot/uboot$ cat boot.scr 'V*�Ng��X�d�BBipt> �bug: Demo Image Install" setenv dvimode 1280x720MR-16@60 setenv vram 12MB setenv bootcmd 'fatload mmc 0:1 0x80300000 uImage; fatload mmc 0:1 0x81600000 uInitrd; bootm 0x80300000 0x81600000' setenv bootargs console=ttyO2,115200n8 console=tty0 root=/dev/mmcblk0p2 rootwait ro vram=${vram} omapfb.mode=dvi:${dvimode} fixrtc buddy=${buddy} mpurate=${mpurate} boot

Regards,

Robert Nelson http://www.rcn-ee.com/

dtuber commented 13 years ago

Hi there, Sorry to bug you again, but I got the beagleboard to boot, but I think it couldn't find the modules. I got these errors during boot: http://pastebin.com/9sGWMAhJ

Do you know what's going on? I'll also attach my bootscript: http://pastebin.com/qj9AJmbi

Thanks, David

RobertCNelson commented 13 years ago

On Wed, Aug 10, 2011 at 2:36 PM, dtuber reply@reply.github.com wrote:

Hi again, So I decided to try doing some other stuff, but I finally got the earlyprintk working when I was booting, and I got this error when booting (after I see the line "Uncompressing Linux...done, booting the kernel.") [    0.088378] Unable to get DVI reset GPIO

what does this mean?

Hi David,

It's just noise on xM boards, i don't believe that "reset" was wired on them.. Looking at the current kernel source which is pretty complete right now:

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob;f=arch/arm/mach-omap2/board-omap3beagle.c;h=32f5f895568a0c01e0b4566a3dfe600130ff87a9;hb=HEAD#l122

"beagle_config.reset_gpio" isn't set for the xM A/B or xM C... so unless we completely missed it.. (looking at schematic right now..)..

Regards,

Robert Nelson http://www.rcn-ee.com/

RobertCNelson commented 13 years ago

On Wed, Aug 10, 2011 at 2:56 PM, Robert Nelson robertcnelson@gmail.com wrote:

On Wed, Aug 10, 2011 at 2:36 PM, dtuber reply@reply.github.com wrote:

Hi again, So I decided to try doing some other stuff, but I finally got the earlyprintk working when I was booting, and I got this error when booting (after I see the line "Uncompressing Linux...done, booting the kernel.") [    0.088378] Unable to get DVI reset GPIO

what does this mean?

Hi David,

It's just noise on xM boards, i don't believe that "reset" was wired on them.. Looking at the current kernel source which is pretty complete right now:

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob;f=arch/arm/mach-omap2/board-omap3beagle.c;h=32f5f895568a0c01e0b4566a3dfe600130ff87a9;hb=HEAD#l122

"beagle_config.reset_gpio" isn't set for the xM A/B or xM C... so unless we completely missed it.. (looking at schematic right now..)..

Yeap, on the xM we don't have access to the reset line anymore...

Instead we control the powerup/powerdown pin.. ;)

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob;f=arch/arm/mach-omap2/board-omap3beagle.c;h=32f5f895568a0c01e0b4566a3dfe600130ff87a9;hb=HEAD#l288

http://circuitco.com/support/files/BeagleboardxM/BEAGLE-xM_SCHEMATIC_REV_C.pdf (Page: 9 of 10.. center left)

Regards,

Robert Nelson http://www.rcn-ee.com/

RobertCNelson commented 13 years ago

On Wed, Aug 10, 2011 at 2:50 PM, dtuber reply@reply.github.com wrote:

Hi there, Sorry to bug you again, but I got the beagleboard to boot, but I think it couldn't find the modules. I got these errors during boot: http://pastebin.com/9sGWMAhJ

Do you know what's going on? I'll also attach my bootscript: http://pastebin.com/qj9AJmbi

"sudo depmod" should take care of those..

After copying the new uImage and modules i will run this script.. "update_boot_files.sh" (if it didn't attach to the email, i can post it to http)..

it'll fix a lot of those up and regenerate the uInitrd...

Regards,

Robert Nelson http://www.rcn-ee.com/

RobertCNelson commented 13 years ago

On Wed, Aug 10, 2011 at 3:03 PM, Robert Nelson robertcnelson@gmail.com wrote:

On Wed, Aug 10, 2011 at 2:50 PM, dtuber reply@reply.github.com wrote:

Hi there, Sorry to bug you again, but I got the beagleboard to boot, but I think it couldn't find the modules.  I got these errors during boot: http://pastebin.com/9sGWMAhJ

Do you know what's going on?  I'll also attach my bootscript: http://pastebin.com/qj9AJmbi

"sudo depmod" should take care of those..

After copying the new uImage and modules i will run this script.. "update_boot_files.sh" (if it didn't attach to the email, i can post it to http)..

it'll fix a lot of those up and regenerate the uInitrd...

Yeap, it didn't.. so here it is:

https://raw.github.com/RobertCNelson/stable-kernel/b485c38d48dc972de0c051738f8ff93f3cfa395c/tools/update_boot_files.sh

it "assumes" the boot partition /dev/mmcblk0p1 is defined in your /etc/fstab as "/boot/uboot", when your looking thru it, the first "remount ,rw" is to a fix a bug in 2.6.35 when the xM's first came out, now safe to ignore as no one has the kernel anymore.. ;)

Regards,

Robert Nelson http://www.rcn-ee.com/

dtuber commented 13 years ago

i'm going to ask a really stupid question, but i don't run this update_boot_files script on the beagleboard, correct? also, where do I run the depmod command?

finally, if i'm running the update_boot_files script on my linux machine, should i set the first directory to wherever the beagleboard's boot partition is?

RobertCNelson commented 13 years ago

On Wed, Aug 10, 2011 at 3:24 PM, dtuber reply@reply.github.com wrote:

i'm going to ask a really stupid question, but i don't run this update_boot_files script on the beagleboard, correct? also, where do I run the depmod command?

You run depmod on the running system.. http://linux.die.net/man/8/depmod

finally, if i'm running the update_boot_files script on my linux machine, should i set the first directory to wherever the beagleboard's boot partition is?

only run it on the beagle, it calls initramfs-update which uses the current running kernel to help build the image.. ( so if you run it on the x86, you'll get an x86 uInitrd..)

Regards,

Robert Nelson http://www.rcn-ee.com/

dtuber commented 13 years ago

so I ran the depmod, and I checked under /lib/modules/3.01-x2/, and modules.dep is there like it should be, but the system still says that it isn't there whenever I try booting, and it always reverts back to the old kernel. And when I try running your script, I got these errors: mount: can't find /boot/ in /etc/fstab or /etc/mtab grep: /boot/config-3.0.1-x2: No such file or directory Can't find /boot/vmlinuz-3.0.1-x2 and /boot/initrd.img-3.0.1-x2 cp: cannot stat '/boot/boot.scr': No such file or directory

Could it be because I need to customize the paths for each command in your script?

Thanks, David

RobertCNelson commented 13 years ago

On Thu, Aug 11, 2011 at 9:12 AM, dtuber reply@reply.github.com wrote:

so I ran the depmod, and I checked under /lib/modules/3.01-x2/, and modules.dep is there like it should be, but the system still says that it isn't there whenever I try booting, and it always reverts back to the old kernel.  And when I try running your script, I got these errors: mount: can't find /boot/ in /etc/fstab or /etc/mtab grep: /boot/config-3.0.1-x2: No such file or directory Can't find /boot/vmlinuz-3.0.1-x2 and /boot/initrd.img-3.0.1-x2 cp: cannot stat '/boot/boot.scr': No such file or directory

That's expected did you "define dev/mmcblk0p1 in your /etc/fstab as /boot/uboot" as i mentioned in a previous email?

example: voodoo@voodoo-e6400:~$ cat /media/rootfs/etc/fstab proc /proc proc defaults 0 0 /dev/mmcblk0p2 / auto errors=remount-ro 0 1 /dev/mmcblk0p1 /boot/uboot auto defaults 0 0

Could it be because I need to customize the paths for each command in your script?

Regards,

Robert Nelson http://www.rcn-ee.com/