Debian on NAND using BSP and or LiveSuit

Started by aquarat, June 22, 2013, 12:14:09 AM

Previous topic - Next topic

aquarat

Oldpenguin... at the risk of sounding lazy... would it be possible for you to make one of your images available for me download ? I can download the image and then host it on my Google Drive so other don't have to go through this.

oldpenguin

I am uploading my image to google drive...but it is painfully slow.

Concerning files bat0.bmp and linux.ini, they all belong to the allwinner-tools below sunxi-bsp
If they are missing, it means your build process may not be working as expected.



oldpenguin

@aquarat
Try my image https://docs.google.com/file/d/0B_6t4W1iA8KqWm03Z0tLcVg5Tnc/edit?usp=sharing

Please keep in mind this is the Linaro image which is fairly minimal.

To start you have to set the network configuration manually and then do apt-get update and apt-get upgrade.

aquarat

#18
Thanks oldpenguin... I'm surprised you didn't compress it with xz ? I've made a copy to my G-Drive and I've started downloading. Looking forward to trying it! If it works I'll move it to my http server for others if you want.

-edit-
I downloaded the file onto my server and then went :
ssh -R 9000:localhost:9000 user@host -p 10022
and then on sending machine
dd if=a13.img | xz -z | netcat localhost 9000
and on the receiver
netcat -l 9000 | dd of=a13uk.img

Damn my slow home connection.

Do you perhaps have an md5sum of the image ?

oldpenguin

f58ae01f6ef1457ac25dca245c7e75a5  a13_olinuxino_livesuit.img

aquarat

#20
Your image works oldpenguin :D :D :D

Although I'm surprised it has 1.6GB of usage on root for a "nano" image and I see the running kernel is 3.0.62 but only the modules for 3.0.42+ are present.

I'm still going to look into why my build setup isn't working... but this is great! A somewhat working Debian installation on the A13's NAND yay.

I found that your image was reduced in size to 1.2GB when it was compressed using xz (level 6 of 10). I'm busy compressing the file and I'll rehost it shortly.

Once again thank you oldpenguin!

Any idea how I can expand the rootfs so it uses more of the nand ?

aquarat

#21
!!!!! OMW YES!!!

I took your image, flashed it to my a13... then I rebooted to my SD card (which has a working Debian on it with wifi etc.). I then mounted the boot nand partition and the rootfs nand partition. Erased the rootfs partition and replaced it's contents with the rootfs on my SD card. I then also swapped in a replacement headless kernel (from jwischka) ... it boots :D and it works beautifully.

Can I go dd if=/dev/nand and then write that image file to another A13 using dd ?

Tele

This is not a generic solution, I think.

I think you aqua only have had some luck.
I have followed your recipe, and installed penguin's image on NAND. Its working like charm, Oli boots his Debian from NAND.
But I want my own kernel, and rootfs. So I rebooted my SD card and mounted NANDA (boot vfat) and NANDC (rootfs ext4). NANDB and NANDD have unknown filesystems, I ignored them.
I have overwritten the files on NANDA with my SD cards boot partition (mmcblk0p1 vfat) and I have done the same to NANDC (mmcblk0p2, ext4 onto it).

My NAND starts to boot without error (I got serial debug output), but after it writes "Starting Kernel...", it gets frozen, nothing happens.

Any idea? What have I missed?

aquarat

#23
Hey Tele

I've recompiled kernels for other ARM SBCs without trouble so far (Pi and ODROID-x) but so far my attempts to compile iMX233 kernel have resulted in a system that crashes. Although I have compiled the a13 kernel, I haven't actually tested it so far... I just used jwischka's kernel from his r18 image(headless). I also used the rootfs from the same image.

I erased the rootfs partition (mkfs.ext4 /dev/nandc) and I copied all directories minus some* from mmcblk0p2 to the nandc partition. I used cp -ax for copying.

I didn't copy directories that were empty in the linaro rootfs image, but I did create the empty directories on nandc. These directories included mnt, proc, run, selinux, tmp, media and sys.

For the kernel I copied the uImage from my sd card's boot partition to the nand boot partition (nanda). I didn't change any other files, I suspect this is where your situation has gone wrong... but really I am very n00b, so don't trust me ;) .

As far as I understand it, to copy in a new kernel all you need to do is replace uImage on the boot partition and copy over the correct /lib/modules/YOURKERNEL directory to the rootfs.

There is also a copy of uImage in the root of the rootfs... although this is probably unnecessary.

I'm just busy testing the dd replication technique and then I'll post a heavily stripped-down version of jwischka's headless image.

-update-
So yes, if you dd /dev/nand to an image file and then you dd the image back to to /dev/nand on another a13 it looks like you'll have an exact replica.

Tele

QuoteFor the kernel I copied the uImage from my sd card's boot partition to the nand boot partition (nanda). I didn't change any other files, I suspect this is where your situation has gone wrong...

Unfortunately no. I do the same. I overwrite uImage and only that one, nothing else. I copy the appropriate modules of kernel to nandc /lib/modules/.... as well.
I do nothing else and I leave penguin's rootfs as is.
And it can't boot, although that kernel works on SD card without any problem.

I guess the problem is inside the kernel itself. Maybe I don't enable some important things in the kernel config.
For example Device drivers --> Memory Technology (MTD) Support, or something like that.
Would you upload your kernel .config please, I could check and compare things to mine.

P.S: BTW, if I build the whole image and everything just like you (http://linux-sunxi.org/BSP), the result is the same. I can make my own LiveSuit image, I got debug output, it starts booting (at least u-boot), "Starting Kernel"... then a big silence. 

aquarat

Hi Tele

http://pastebin.com/J8XK5uB7

Taken from /proc/config.gz . Originally from jwischka's R18 headless kernel (you can download his kernel from his thread).

Hope that helps.

techn

Quote from: Tele on June 28, 2013, 12:48:43 PM
P.S: BTW, if I build the whole image and everything just like you (http://linux-sunxi.org/BSP), the result is the same. I can make my own LiveSuit image, I got debug output, it starts booting (at least u-boot), "Starting Kernel"... then a big silence.
Which compiler you are using? Yesterday sunxi-linux kernel got merged some fixes which fixes boot problem with latest compilers (4.7.2 upwards)
https://github.com/linux-sunxi/linux-sunxi/commits/stage/sunxi-3.4

Tele

#27
My compiler is a DIY, self made by crosstoolNG : arm cortex-A8 - gcc 4.6.3 - eglibc 2.15 - gnueabihf
Its not a linaro, but worked without any problem so far.

The strange thing is that specific kernel(3.4.12) we are talking about works on SD. It boots. Its perfect.
It gets frozen on NAND only.

hhhle

Quote from: oldpenguin on June 26, 2013, 04:41:12 PM
@aquarat
Try my image https://docs.google.com/file/d/0B_6t4W1iA8KqWm03Z0tLcVg5Tnc/edit?usp=sharing

Please keep in mind this is the Linaro image which is fairly minimal.

To start you have to set the network configuration manually and then do apt-get update and apt-get upgrade.

Thanks for your image. It works fine.

hhhle

I downloaded the image and succeeded to flash in the NAND. It works fine but I have now access to internet to update or upgrade. Has anybody succeeded to install the embedded RTL8188CUS wifi module? I try to compile from source (downloaded from Realtek website) unsuccessfully :(. Error message:

make ARCH=armv7l CROSS_COMPILE= -C /lib/modules/3.0.62/build M=/root/Drivers/RTL8188C_wifi/driver/rtl8188C_8192C_usb_linux_v4.0.2_9000.20130911  modules
make[1]: Entering directory `/lib/modules/3.0.62/build'
make[1]: *** No rule to make target `modules'.  Stop.
make[1]: Leaving directory `/lib/modules/3.0.62/build'
make: *** [modules] Error 2

PLEASE HELP