[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

debian u-boot and the 2GB nitrogen6x.



I thought it would be a good idea to have support for the 2GB nitrogen6x in debian u-boot. So after some discussion with vagrantc and zumbi I made the trivial change of adding

armhf  imx             nitrogen6q2g      u-boot.imx

to debian/targets in the sid u-boot source (note: I was working in a wheezy environment but I doubt that makes any difference) and building the package.

After successfully putting the debian u-boot on my SD card the first issue I ran into was a boot loop. I use a 6x_bootscript file to make the boundary u-boot on the onboard flash reboot and load u-boot from the SD card (I could flash my own u-boot to the onboard flash but I'd rather not, having it on the SD card makes it easier to swap out).

I started looking for ways to make the boot script detect whether it was running on the boundary u-boot or the debian u-boot. There is apparently a u-boot variable called "ver" but unfortunately neither the debian or the boundary u-boot had it turned on.

Before I could modify the u-boot package further I needed to get the machine booted. So I interrupted the boot process once debian u-boot had been loaded and started issuing commands to boot the machine. After some trial and error and looking at existing configs I came up with the following sequence.

setenv mmcdev 0
setenv mmcpart 1
mmc dev 0
mmc rescan
load mmc ${mmcdev}:${mmcpart} ${loadaddr} /boot/zImage
setenv fdt_addr 0x11000000
setenv fdt_file imx6q-nitrogen6x.dtb
load mmc ${mmcdev}:${mmcpart} ${fdt_addr} /boot/dtbs/${fdt_file}
setenv mmcroot '/dev/mmcblk0p2 ro'
setenv mmcrootfstype 'ext4 rootwait fixrtc'
setenv bootargs console=${console},${baudrate} root=${mmcroot} rootfstype=${mmcrootfstype}
setenv initrd_addr 0x13000000
load mmc ${mmcdev}:${mmcpart} ${initrd_addr} /boot/initrd.img
bootz ${loadaddr} ${initrd_addr}:${filesize} ${fdt_addr};

unfortunately after the "starting kernel" message there was no further output on serial and the system did not appear on the network. I tried various changes to the commands (loading the dtb at a higher address, trying the sabrelite dtb instead, changing the console device to 0 instead of the 1 it defaulted to) but to no avail.

In the end I had to put my old custom u-boot* back on to get the machine back up.

I'm not sure if there is a problem with my commands (they look ok though) or something wrong with the u-boot build.

Some irc snippets for reference:

<plugwash> in a u-boot script is there a way to test the u-boot version?
* vakkov_ (~vakkov@134.83.207.39) has joined #u-boot
* vakkov has quit (Read error: Connection reset by peer)
* tjagad (~t@triband-mum-59.182.178.154.mtnl.net.in) has joined #u-boot
* systmkor1 has quit (Ping timeout: 258 seconds)
* tjagad_ has quit (Ping timeout: 245 seconds)
* smartin_ has quit (Quit: leaving)
<Marex> plugwash: possibly using setexpr ?
<Marex> plugwash: btw there's also a 'ver' variable
* mmu_man has quit (Ping timeout: 258 seconds)
<plugwash> Marex, hmm, I don't see "ver" in printenv
<Marex> it contains the U-Boot version etc etc ... so you can apply GREPENV or something onto it
<Marex> plugwash: do you use some old version of U-Boot maybe ?
<plugwash> how old is old, the newer of the two versions i'm working with is 2014.07, the older is 2013.01
* nullvibe (~nv@gateway/tor-sasl/nullvibe) has joined #u-boot
<vagrantc> so, i wrote up a patch series, and using patman it looks like it's going to CC around 11 people... is that reasonable?
<vagrantc> in addition to the list
<Marex> vagrantc: it's okay-ish
<Marex> plugwash: those two should have it
<Marex> plugwash: oh, you need CONFIG_VERSION_VARIABLE


<plugwash> any idea how one goes about changing the configuation in the debian u-boot package?
<vagrantc> plugwash: editing the appropriate include/config/*.h files

* See https://lists.debian.org/debian-arm/2013/05/msg00085.html


Reply to: