Привет всем
на столе лежит несколько роутеров с IXP425 -а именно Netgear WG302 WAG302 WGR826v
16Mb Flash 32Mb Ram
Хотелось бы закомпилировать ядро и GPL сорсы чтобы воспроизвести firmware и возможно добавить
туда свои два цента- например драйвер 802.11n и карточку в mini PCI слот
или драйвер WiMax и тд
На Netgear лежат GPL исходники ядра и приложений
например здесь
http://ftp.gpl-devices.org/pub/vendors/Netgear/WG302/Внизу последовательности компилляции описанная каким то корейцем
Нужен DevKit Montavista для ARM/Xscale "xscale_be-gcc"
-------------------------------------------------
который был общедоступным несколько лет назад
но потом пропал со всех сайтов
Вдруг у кого есть и может поделиться - а может кто собирал ядро
другим тулчейном и может уверенно сказать что заработает
---------------------
Может кому будет интересно проучаствовать :-)
Cпасибо
MontaVista v3.1 Configuration and Compiling
Assume MVL was in folder /opt/montavista/, your board is intel ixdp425.
Your cross compiler should set to $PATH first. We use xscale_be-gcc.
Add following lines to /etc/profile.
pathmunge /opt/montavista/common/eclipse
pathmunge /opt/montavista/pro/host/bin
pathmunge /opt/montavista/pro/devkit/arm/xscale_be/bin
1. Prepare your working folder
#cd /opt
#mkdir MVL
#cd MVL
#mkdir linux-2.4.20_mvl31 app target mkramdisk ramdisk
2. Copy montavista files
#cd /opt/MVL/linux-2.4.20_mvl31
#cp -a /opt/montavista/pro/devkit/lsp/intel-ixdp4xx-arm_xscale_be/linux-2.4.20_mvl31/ .
#cd /opt/MVL/target
#cp -a /opt/montavista/pro/devkit/arm/xscale_be/target .
You can export this directory using NFS. Kernel files are 169M, target files are 921M.
3. Apply patch
(1)For frame buffer support
#cd /opt/MVL/linux-2.4.20_mvl31
#cp /mvl31-ixp425-fb-support.patch .
#patch –p0 < mvl31-ixp425-fb-support.patch
(2)For socket reuse
#cd /opt/MVL/linux-2.4.20_mvl31
#cp /SO_REUSEPORT.patch .
#patch –p1 < SO_REUSEPORT.patch
4. Configure Kernel
#cd /opt/MVL/linux-2.4.20_mvl31
#make oldconfig
#make menuconfig
Configuration:
(1)Support Frame Buffer
"Character devices"---Enable the "Virtual terminal"
"Console drivers" --- "Frame-buffer support"--- Enable "Support for frame buffer devices"
Enable the "Advanced low level driver options", and then enable all sub-options (i.e. Monochrome, 2, 4, 8,…bpp packed pixels) as yes instead of module.
Enable the "Select compiled-in fonts", and then enable all font types.
NOTE: You should also change vfb.c in SigmaDesings Driver as below. vfb.c is located in folder
mrua_EM8620L_v2_3_49_0_dcc_dev.ixdp425/MRUA_src/mambolfb.
Static int mambolfb_mmap(……….)
{
#ifndef __arm__
BLOCK A …
#if (RMPLATFORM==RMPLATFORMID_AOE6_SH4)
BLOCK B …
#else
BLOCK C …
#endif
BLOCK D …
/* Code added start */
#ifdef CONFIG_ARCH_IXP425
/* In the IXP425 architecture, the 'videomemory' is located on PCI MEM
and not mapped to virtual address, so treate 'videomemory'
as physical memory. */
if (kc_remap_page_range((struct kc_vm_area_struct *) vma,
vma->vm_start, videomemory,
vma->vm_end-vma->vm_start,
(struct kc_pgprot_t *) &vma->vm_page_prot))
return -EAGAIN;
printk("remapped %ld bytes in userland of process %d at address "
"0x%08lx to 0x%08lx\n",
vma->vm_end-vma->vm_start,current->pid,vma->vm_start, videomemory);
#endif
/* Code added end */
#endif
return 0;
}
After the save the modified source file, the read have to compile the driver module again. Type the command “make” under the directory of which the vfb.c locates in will start the compiling for "mambolfb.o" module.
NOTE: The driver module MUST be compiled after the kernel configuration is changed.
(2)Kernel Command Line
"General Setup"---"Default Kernel Command String" input:
console=ttyS1,115200 root=/dev/ram initrd=0x00800000,2000K mem=128M@0x00000000
(3)
"File Systems"---"Network File Systems"--- Disable "Root file system on NFS"
5. Compile kernel
#make dep
#make zImage
#make modules
Compiled kernel is in /opt/MVL/kernel/arch/arm/boot/. Copy kernel file zImage to /tftpboot/gdzImage.
NOTE: If Loadable Module Support is not set, disregard the make modules command and all installation directions for modules.
6. Install Modules
#make modules_install INSTALL_MOD_PATH=<mod_install_dir>
This will place the modules into <mod_install_dir>/lib/modules/x.y.z on the host, which can then be transferred to the target machine. The target directory for the modules on the MVL should be /lib/modules/x.y.z.
7. Rebuild ramdisk
#cd /opt/MVL/mkramdisk
#cp -a /opt/montavista/pro/devkit/arm/xscale_be/images/mkramdisk .
#./mkramdisk -r /opt/montavista/pro/ gdramdisk
#gzip -v9 gdramdisk
It will create 6M ramdisk with 4.1M contents. You can use command 'mount -o loop gdramdisk /mnt' to see contents.