[IMAGE] A13(-WIFI) headless linaro nano, flashable (updated 25-Jan-2013: R1)

Started by jwischka, January 25, 2013, 06:15:56 PM

Previous topic - Next topic

jwischka

Speed? Power? Size? This is the image for you.

What this is:
This is a headless image built for the Olinuxino-A13 and A13-WIFI boards, built on the Linaro Nano distribution. It incorporates my custom kernel, and is optimized for you to build your own stuff on top. The only main things that have been added to the stock nano image are ssh, wpa-supplicant and vi - everything else you'll have to add yourself.

The image is slick, lean, and boots in well under 10 seconds on a class 10 card. Memory usage on boot is about 32MB.

This requires a 4GB card. I do not own a 2GB MicroSD card. Do not ask if you can flash it on a 2GB card, or if I can make one for a 2GB card. If you want to use a larger card, you can use resize2fs to increase the main partition. If you want to send me a 2GB card, I will make you an image.

Features
* Custom kernel, full 512MB of memory available
* 512MB swap file
* WPA-supplicant installed
* Minimial distribution for your installation pleasure.

Release info
R1 - Initial build. Based on linaro-nano and jwischka-3.4-headless-R11 kernel.

Download link
Get the current version (R1) here (133MB)

How to install:

Windows:
Download Win32 Disk Imager.
Insert card
Start program
Select file
Click "write"

Linux:
dd to card

Logging in
User and password are olinuxino/olinuxino. Sudo has been included, so you shouldn't have any problems becoming su.

Obligatory information
This is provided with absolutely zero warranty. If it screws up your card, your board, or your life, that's not my fault. I am not responsible if you put this on a mission critical application and it costs you money, or causes someone harm. This was made for my personal use, and I'm sharing it with you in case it is helpful. If you are planning on using it in an industrial application, do your own due diligence.

I'll try to fix stuff that doesn't work and update it, if you tell me what it is. That being said, I have a day job, and this is being done on the side. I'll try to be responsive, but don't expect things to be fixed tomorrow.

My XXXXXX stopped working
Tough cookies. Let me know, and I'll see if I can get a fix. I don't make any promises, but I'm trying to keep a better record of what I've changed.

Can you add XXXXXX feature?
Maybe. This is a small, lightweight image. If there is a compelling need that *everyone* will have, then I'll consider adding. Otherwise, add it yourself.

Does XXXXXX work?
I don't know. This is a headless build. It is likely that I don't have your XXXXXX adapter, and I haven't tested it. If it doesn't work, let me know.

My video isn't working!?!
This is a headless build. Your video isn't supposed to work.

My board doesn't boot!
You made a backup, right? No, seriously. I don't guarantee this will work on your board. I don't guarantee that the next revision will work on your board either. There seem to be gremlins out there that are making some boards behave in what I might call a non-deterministic manner. I'll do my best to get things working for you, but again, this is my day job, and it's on the side.

If you look at the console, check and see what is happening. Completely power down the board for a few seconds, then apply power again. There seem to be some odd issues with SD cards and such. Even my board tries to boot into Android and kernel panics on boot occasionally. Who knows.

I tried to compile XXXXXX driver, but it gives me an error
You need to compile your whole kernel. There are instructions!

Do you get paid for this?
No. So be nice to me, please.

Feedback and comments welcome.

Bernd

Thanks! This is a nice system for doing some development where no UI is needed on the device and for working on the kernel a fast reboot is a nice feature!

I probably will need to compile my own kernel to add a module or two, but that should be no problem. Did you need to do modify the original sun4i kernel in some way to build the kernel used here or can I just use the config from the /proc filesystem from this image and get the same result?

nvd

"Custom kernel, full 512MB of memory available"

Can you please specify which section in the ".config" file helped you fix it?


jwischka

Quote from: nvd on January 26, 2013, 09:49:45 PM
"Custom kernel, full 512MB of memory available"

Can you please specify which section in the ".config" file helped you fix it?

Disable Mali and CEDAR, and change default kernel string to 512MB from 448MB.

There may be some other things, but that will get you most of the way there.

nvd

Thanks.

Here is the "dmesg" chunk:

Memory: 512MB = 512MB total
[    0.000000] Memory: 478568k/478568k available, 45720k reserved, 0K highmem
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     DMA     : 0xffc00000 - 0xffe00000   (   2 MB)
[    0.000000]     vmalloc : 0xe0800000 - 0xf0000000   ( 248 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .init : 0xc0008000 - 0xc0032000   ( 168 kB)
[    0.000000]       .text : 0xc0032000 - 0xc0723000   (7108 kB)
[    0.000000]       .data : 0xc0724000 - 0xc0776410   ( 330 kB)
[    0.000000]        .bss : 0xc0776434 - 0xc0826b88   ( 706 kB)

"free -m":
             total       used       free     shared    buffers     cached
Mem:           467         78        389          0         11         46
-/+ buffers/cache:         20        447

I have packaged the kernel with its modules and the ".config" file:

http://goo.gl/dHwnR

To recompile the kernel:
git clone git://github.com/linux-sunxi/linux-sunxi.git
git checkout sunxi-3.0

copy the provided ".config" file to "linux-sunxi" folder to get started:

cd linux-sunxi

make clean

make menuconfig
# If needed

make uImage
make modules

mkdir /mnt/a

mount /dev/mmcblk0p1 /mnt/a && mv /mnt/a/uImage /mnt/a/uImage.backup && cp ./arch/arm/boot/uImage /mnt/a

make INSTALL_MOD_PATH=/ modules_install

umount /dev/mmcblk0p1
rmdir /mnt/a

reboot

jwischka

Look to be still missing something:

[    0.000000] Memory: 512MB = 512MB total
[    0.000000] Memory: 512048k/512048k available, 12240k reserved, 0K highmem
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xe0800000 - 0xff000000   ( 488 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0xc0008000 - 0xc065e000   (6488 kB)
[    0.000000]       .init : 0xc065e000 - 0xc0684000   ( 152 kB)
[    0.000000]       .data : 0xc0684000 - 0xc06d5120   ( 325 kB)
[    0.000000]        .bss : 0xc06d5144 - 0xc0773128   ( 632 kB)

I can of course send you the .config, if you'd like? I guess I'm just not sure what you're asking, or posting? (could just be I am confused)

Quote from: nvd on January 29, 2013, 09:12:38 PM
Thanks.

Here is the "dmesg" chunk:

Memory: 512MB = 512MB total
[    0.000000] Memory: 478568k/478568k available, 45720k reserved, 0K highmem
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     DMA     : 0xffc00000 - 0xffe00000   (   2 MB)
[    0.000000]     vmalloc : 0xe0800000 - 0xf0000000   ( 248 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .init : 0xc0008000 - 0xc0032000   ( 168 kB)
[    0.000000]       .text : 0xc0032000 - 0xc0723000   (7108 kB)
[    0.000000]       .data : 0xc0724000 - 0xc0776410   ( 330 kB)
[    0.000000]        .bss : 0xc0776434 - 0xc0826b88   ( 706 kB)

"free -m":
             total       used       free     shared    buffers     cached
Mem:           467         78        389          0         11         46
-/+ buffers/cache:         20        447

I have packaged the kernel with its modules and the ".config" file:

http://goo.gl/dHwnR

To recompile the kernel:
git clone git://github.com/linux-sunxi/linux-sunxi.git
git checkout sunxi-3.0

copy the provided ".config" file to "linux-sunxi" folder to get started:

cd linux-sunxi

make clean

make menuconfig
# If needed

make uImage
make modules

mkdir /mnt/a

mount /dev/mmcblk0p1 /mnt/a && mv /mnt/a/uImage /mnt/a/uImage.backup && cp ./arch/arm/boot/uImage /mnt/a

make INSTALL_MOD_PATH=/ modules_install

umount /dev/mmcblk0p1
rmdir /mnt/a

reboot


nvd

Quote from: jwischka on January 29, 2013, 09:17:31 PM
Look to be still missing something:

[    0.000000] Memory: 512MB = 512MB total
[    0.000000] Memory: 512048k/512048k available, 12240k reserved, 0K highmem
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xe0800000 - 0xff000000   ( 488 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0xc0008000 - 0xc065e000   (6488 kB)
[    0.000000]       .init : 0xc065e000 - 0xc0684000   ( 152 kB)
[    0.000000]       .data : 0xc0684000 - 0xc06d5120   ( 325 kB)
[    0.000000]        .bss : 0xc06d5144 - 0xc0773128   ( 632 kB)

I can of course send you the .config, if you'd like? I guess I'm just not sure what you're asking, or posting? (could just be I am confused)

Quote from: nvd on January 29, 2013, 09:12:38 PM
Thanks.

Here is the "dmesg" chunk:

Memory: 512MB = 512MB total
[    0.000000] Memory: 478568k/478568k available, 45720k reserved, 0K highmem
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     DMA     : 0xffc00000 - 0xffe00000   (   2 MB)
[    0.000000]     vmalloc : 0xe0800000 - 0xf0000000   ( 248 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .init : 0xc0008000 - 0xc0032000   ( 168 kB)
[    0.000000]       .text : 0xc0032000 - 0xc0723000   (7108 kB)
[    0.000000]       .data : 0xc0724000 - 0xc0776410   ( 330 kB)
[    0.000000]        .bss : 0xc0776434 - 0xc0826b88   ( 706 kB)

"free -m":
             total       used       free     shared    buffers     cached
Mem:           467         78        389          0         11         46
-/+ buffers/cache:         20        447

I have packaged the kernel with its modules and the ".config" file:

http://goo.gl/dHwnR

To recompile the kernel:
git clone git://github.com/linux-sunxi/linux-sunxi.git
git checkout sunxi-3.0

copy the provided ".config" file to "linux-sunxi" folder to get started:

cd linux-sunxi

make clean

make menuconfig
# If needed

make uImage
make modules

mkdir /mnt/a

mount /dev/mmcblk0p1 /mnt/a && mv /mnt/a/uImage /mnt/a/uImage.backup && cp ./arch/arm/boot/uImage /mnt/a

make INSTALL_MOD_PATH=/ modules_install

umount /dev/mmcblk0p1
rmdir /mnt/a

reboot


Added the instructions to answer the question related to kernel building process.

It will be nice if you share the ".config" file. It seems that some more memory can be freed.
What are you getting from "free -m"?
I do not know if DMA is needed or not.

iso9660

Quote from: jwischka on January 27, 2013, 04:41:51 PM
Quote from: nvd on January 26, 2013, 09:49:45 PM
"Custom kernel, full 512MB of memory available"

Can you please specify which section in the ".config" file helped you fix it?

Disable Mali and CEDAR, and change default kernel string to 512MB from 448MB.

There may be some other things, but that will get you most of the way there.

Please, do you know what string is needed for the MICRO with and without video memory? Thanks.

jwischka

Compile the kernel and disable the Mali module and CEDAR options. Using menuconfig is the easiest way to find the appropriate options.

Quote from: iso9660 on January 30, 2013, 03:44:58 PM
Quote from: jwischka on January 27, 2013, 04:41:51 PM
Quote from: nvd on January 26, 2013, 09:49:45 PM
"Custom kernel, full 512MB of memory available"

Can you please specify which section in the ".config" file helped you fix it?

Disable Mali and CEDAR, and change default kernel string to 512MB from 448MB.

There may be some other things, but that will get you most of the way there.

Please, do you know what string is needed for the MICRO with and without video memory? Thanks.

nvd

Quote from: iso9660 on January 30, 2013, 03:44:58 PM
Quote from: jwischka on January 27, 2013, 04:41:51 PM
Quote from: nvd on January 26, 2013, 09:49:45 PM
"Custom kernel, full 512MB of memory available"

Can you please specify which section in the ".config" file helped you fix it?

Disable Mali and CEDAR, and change default kernel string to 512MB from 448MB.

There may be some other things, but that will get you most of the way there.

Please, do you know what string is needed for the MICRO with and without video memory? Thanks.

# CONFIG_MALI is not set
# CONFIG_MALI400 is not set
# CONFIG_VIDEO_SUN5I_CEDAR is not set

CONFIG_CMDLINE="mem=512M@0x40000000 console=ttyS0,115200"
CONFIG_CMDLINE_FROM_BOOTLOADER=y
# CONFIG_CMDLINE_EXTEND is not set
# CONFIG_CMDLINE_FORCE is not set