Recompile Kernel

This forum is for all other ARMv5 devices

Recompile Kernel

Postby acansado » Mon Oct 24, 2011 5:13 pm

Hi,
I'm trying to recompile my Pogoplug Pro's kernel (2.6.31.6_SMP_820) to enable PPP Filtering (required in order to setup a PPTP VPN).

I have succeeded compiling a new kernel (downloaded from http://download.pogoplug.com/opensource/pro/pogopro-linux-2.6.31.6-r2.tar.bz2) and its modules, however I'm stuck on how to deploy it.
Is it enough to put it in my HDD's /boot? Or do I need to reflash the NAND as done in oxnas-install.sh (code below)?

$this->bbcode_second_pass_code('', '
echo "## FLASHING NAND & UBOOT VARS"
echo "# backing up mtd1"
/usr/sbin/nanddump -o -f mtd1.dump /dev/mtd1
echo "# Erasing mtd1 @ 0x500000 for 17 erase blocks (kernel location)"
/usr/sbin/flash_erase /dev/mtd1 0x500000 17
echo "# Erasing mtd1 @ 0xB00000 for 17 erase blocks (2nd kernel location)"
/usr/sbin/flash_erase /dev/mtd1 0xB00000 17

########
## flash kernel
########
echo "# Flashing Kernel..."
if [ $PCI = 1 ]
then
echo "# - @ 0x500000"
/usr/sbin/nandwrite -p -s 0x500000 /dev/mtd1 /tmp/usb/boot/uImage.pci
echo "# - @ 0xB00000"
/usr/sbin/nandwrite -p -s 0xB00000 /dev/mtd1 /tmp/usb/boot/uImage.pci
')

I don't understand how uBoot works so I'm afraid of bricking my pogo.

Thanks!
acansado
 
Posts: 3
Joined: Fri Oct 21, 2011 9:13 pm

Re: Recompile Kernel

Postby WarheadsSE » Mon Oct 24, 2011 8:04 pm

Did you use the newer /arch/arm/mm/cache-v6.S? If not it will freak out!

For now, I would suggest testing with tftp, but that requires having a serial cable, or being very, very careful.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Recompile Kernel

Postby acansado » Mon Oct 24, 2011 9:46 pm

I guess I'm using the patched arch/arm/mm/cache-v6.S since I made a "diff" with respect to vanilla kernel 2.6.31.6 and the file has been modified within Pogoplug pro's version:

$this->bbcode_second_pass_code('', '
$ diff linux-2.6.31.6/arch/arm/mm/cache-v6.S pogopro-linux-2.6.31.6-r2/arch/arm/mm/cache-v6.S
146c146
< * v6_flush_kern_dcache_page(kaddr)
---
> * v6_flush_kern_dcache_area(void *addr, size_t size)
151c151,152
< * - kaddr - kernel address (guaranteed to be page aligned)
---
> * - addr - kernel address
> * - size - region size
153,154c154,155
< ENTRY(v6_flush_kern_dcache_page)
< add r1, r0, #PAGE_SZ
---
> ENTRY(v6_flush_kern_dcache_area)
> add r1, r0, r1
258c259
< .long v6_flush_kern_dcache_page
---
> .long v6_flush_kern_dcache_area
')

I do have a serial cable from my Bifferboard (http://bifferos.co.uk/buy/000012.html), though I have not tried it with Pogoplug.
acansado
 
Posts: 3
Joined: Fri Oct 21, 2011 9:13 pm

Re: Recompile Kernel

Postby WarheadsSE » Tue Oct 25, 2011 12:03 am

Nope, I have an updated file in my pogoplug share, which is plastered many places around this forum, that should be used. There are recent changes to glibc that require that update.

And it is good that you have a serial cable. That way you can safely test via uboot & tftp before writing to NAND.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm


Return to Community Supported

Who is online

Users browsing this forum: No registered users and 45 guests