EDIT:
This would be just the same for a 3.4 - as the _defconfig is identical
-----------------------------------------------------------------------------------------
For my 500th Post I was hoping to be able to post something special
A buildroot of a linux 2.6.26-lab126 kernal with the benfits that brings seemed appropriately cool.
NOTE THIS IS TO BUILD A KERNAL = NOT INSTALL OR RUN ONE!!!
Can't help you there. We make the files here, do what you will.
I'll update the guide with tips as and if I find or make em.
READ THE DOCS!!!
The buildroot docs are your friend for general support on different platforms
I did this on Linux Mint 13 32 bit Lxde with the
CodeSourcery arm 2012.03 TC. CS 2007q3 TC (get it from Kek)
There are undoubtedly better ways of doing this.
For my part I am hoping that eventually compiling the sources against the right headers and relevant patches in an automated way will bring us a faster way to create and manage packages (Buildroot LOCAL and other flags are the way forward here I think, or maybe Git)
Buildroot needs Wget, subversion, bazaar, git, mercurial among others so make sure you are ready to install some stuff if it complains : )
Preamble ends.
EDIT: I have now compiled every relevant (I think) package in buildroot just to save you finding the fails - See post 2 for details)
OKAY SO THE GUIDE: (this is lilable to change and perhaps has a few tiny foofs - feel free to point fingers)
Open buildroot: I just used the newest one. It's a solid app.
If you don't already have it go get it via GIT.
First decide where to build it: read the docs. The easy decision here is "do nothing" the other is "create a build folder" we will talk about that first:
create a folder to build in or just grab the entire buildroot via git and build in there -
cd the buildroot build folder IF YOU MADE ONE.
OR: The other choice "Do nothing",
if you choose the "Do nothing" path the stuff is compiled into /output actually _in_ the Git repo version.
Re the whole build folder - not build folder thing - see buildroot docs, don't HAVE to make one, but it's tidy, up to _you_.
IF YOU CHOSE A BUILD FOLDER:
From your build folder
make xconfig (with -C your buildroot folder IF YOU MADE A BUILD FOLDER - like I say: read buildroot docs) (you also may need -O $PWD, read the docs)
OR IF YOU CHOSE DO NOTHING:
Simply, from the root of the buildroot Git repo type:
make xconfig
NEXT UP: Configure Buildroot: (In the make xconfig menu, you can also do gconfig or w/e)
Settings: For Kindle 3 Keyboard.
Arch: Arm (little endian)
Variant: arm1136jf_s
Target ABI: EABI
Build options, Commands, Mirrors as they are
Toolchain:
Type: External
Toolchain: Sourcery CodeBench ARM 2007.q3
Origin: Pre-installed
Path: /opt/arm-2007.q3 (or whatever)
[x] enable mmu support
SYSTEM:
/dev: static
Init: Busybox
(choose some packages if you want - or do it second pass)
FILESYSTEM IMAGES: tar (for easy access to files, usually just choose this to get at the files)
(optionally also choose cpio for emu kindle and iniramfs - WARNING THIS WILL BE HUGE AND BREAK WITH BIG SOFTWARE - THIS IS NOT A SUPPORTED OPTION _ YMMV _ DONT _ SAY _ I _ DIDNT _ WARN _ YOU)
Bootloaders: OPTIONALLY CHOOSE U-Boot - or nothing if you're not bothered about it actually loading in that way.
KERNAL:
Linux Version: Custom tarball
URL of custom tarball:
http://ThisIsNotARealDomain.net/linu...lab126.tar.bz2
(NB!!! insert your OWN HOSTING here, or serve it locally like:
http://localhost/linux-2.6.26-lab126.tar.bz2 from your machine via a local web service, the support for LOCAL on buildroot is quite new once I confirm it now works via file calls i'll update this guide)
So to confirm: Enter URL of linux-2.6.26-lab126.tar.bz2 of extracted from Kindle_src_3.3_611680021.tar.gz (host it yourself. find it online or just feed it via a local http)
CUSTOM KERNAL PATCHES: For some reason BR doesnt like applying this patch.
Have to apply it manually until we get that figure out. so leave PATH blank and apply it yourself as outlined below.
Path is at
https://svn.ak-team.com/svn/Configs/...buildfix.patch
Kernal Config: use a defconfig
Defconfig name: imx35_luigi
Kernal Binary Format: zImage (you can choose uImage or whatever works for you)
One note: You _CAN_ Choose from options of software in list... _BUT_ I chose hardly any as I want it to finish quick to let me manually interrupt the buildroot 'make' process when the kernal comes around to building. you can always just do a make again - the new software will just be added - the old work not lost.
Save it and close
run
make
Either read the buildroot docs and do the specific steps to incrementally make up the the kernal OR
This is what I do:
I have added I think copious notes extra here to determine WHEN TO STOP the automated build by Sigterm. There are better ways, this suits me fine however.
NOTES ON WHERE TO STOP THE INITIAL BUILDROOT BUILD MANUALLY, BEGIN
WHEN to STOP: The kernal build will appear highlighted in White on Black
[Kernal blah blah blah]
It will start the download from your Custom URL
THE DOWNLOAD HAS COMPLETED. THIS IS NOT A QUICK PROCESS. (unless you host locally) so wait for the DOWNLOAD to get to 100%
Then it will start the configure
just CTRL +C there.
So to confirm: Just CNTRL + C at some point there
after the dl has completed.
and
before the build has started - so at some point
during the configure
Its not critical really WHERE, just before buildroot starts making the kernal as the MAKE CLEAN is a bit overly aggressive according to Niluje so I have added these extra notes about WHERE to keep things simple.
Okay: NOTES ON WHERE TO STOP THE INITIAL BUILDROOT BUILD MANUALLY, conclude
So what now?
The kindle kernel source code Kindle_src_3.3_611680021.tar.gz will have appeared unzipped in /build/linux-custom - go there.
Edit the Makefile (in /build/linux-custom)
ARCH ?= (SUBARCH) BECOMES ARCH ?= arm
CROSS_COMPILE ?= BECOMES CROSS_COMPILE = arm-none-linux-gnueabi- (check your path has the bins in!)
Save it and close
run
make imx35_luigi_defconfig to generate a .config file.
Edit .config file
search "CONFIG_INITRAMFS_SOURCE" with the reference to a skeleton
change it to CONFIG_INITRAMFS_SOURCE="" (as in no value in quotes)
add modules you might want to build etc.
I added binfmt_misc as a module for example
Save it and close
One more thing:
$
cat> include/linux/kindle_version.h << EOF
# ifndef __KINDLE_VERSION_H__
# define __KINDLE_VERSION_H__
# define VERSION_TAG "000000"
# endif
EOF
as this is not generated by the makes (unless you applied the Niluje patch already, it does this for you as espoused below)
The mighty NiLuje has kindly provided
https://svn.ak-team.com/svn/Configs/...buildfix.patch which comprises this kindle_version.s file creation and some make cleansing for the Amazon makes. It
does not make the .config so that step is still required,
That's https: //svn.ak-team.com/svn/Configs/trunk/Kindle/Misc/kindle-3.3-kernel-buildfix.patch Without the space...
run
make
Should complete.
You should be able to then go back and install MORE options in the make xconfig stage and run make again in your root buildroot folder to create the additional packages without having to repeat the kernal steps.
Enjoy.
export LD_LIBRARY_PATH=/mnt/us/lib:/mnt/us/usr/lib:/lib:/usr/lib on the device for course testing of stuff splattered onto /mnt/us/*
: ) Thanks for being such a great community. I have had a solid time.
Here's to the future of tiny devices and tiny groups of people doing big things. And Happy Supercentenarian for me!