Sign up here and you can log into the forum!

cross compile help apache apr for Gen3/SMP

Have a question about devices internals, memory layout, reverse engineering, etc---This is the place for anything so technical that it would cause a n00b's head to 'splode

Re: cross compile help apache apr for Gen3/SMP   

Postby KAD » Mon Jan 26, 2015 8:54 am

ok, thanks for the info

at least my workaround, for xmount does work
If you like my work please consider a Donation. Donate
Please read the appropriate documentation before posting questions! READ ME FAQ WIKI
PM's are for private matters. Post support questions to the appropriate forum, or they will be ignored.
User avatar
KAD
Global Moderator
 
Posts: 5103
Joined: Mon Apr 12, 2010 4:59 pm
Location: Seattle, WA USA

Re: cross compile help apache apr for Gen3/SMP   

Postby mad_ady » Tue Jan 27, 2015 5:38 am

Sorry for the delay, this is b-rad's buildroot he started for wdlxtv. I got it from recliq and I am passing it onto you :P

Code: Select all
wdlxtv_buildroot.tar.gz 586.5 MB
[url]https://mega.co.nz/#!wtpkhCIb!1m19ubIS6adTBE04MTLXtJzjbi8R6YXAZNvXOd8SpU4[/url]


According to the readme, you'll need to:
To run:
1: make wdlxtv-smp865x_defconfig
2: make
3: make menuconfig - select packages
4: make
5: goto 3



Expect the make in step #2 to fail at some point (It tries to build everything and some dependencies will fail). Run with make menuconfig and select what you want/need (like apr/apr-util) and run make again. It will probably fail again.

You can try to build just the bits you need by running
Code: Select all
make apr; make apr-util

and it should compile all its dependencies and the package.

You can customize package build dependencies and build options by modifying package/$pkg/$pkg.mk. Have a look at php for instance. I added some extensions I needed for it.

The build process involves downloading a package (a specific version), compiling it and copying files and libs to output/

To rebuild a package (after changing config settings), you need to run make $pkg-rebuild. To redownload and recompile a package you can do make $pkg-dirclean.

This manual will take a while to read, but should give you most of the information you need: http://buildroot.uclibc.org/downloads/manual/manual.html

As an exercise, you should try to build a package that is included, then build apr/apr-util and then find a way to add svn to the list. Maybe try to find a buildroot environment that has svn and move the svn files to the package directory.

Also, if you when you run into make errors, you can paste the error here and I can search through my logs and see what I changed to make it move on along...

Good luck!
User avatar
mad_ady
Developer
 
Posts: 4552
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: cross compile help apache apr for Gen3/SMP   

Postby KAD » Tue Jan 27, 2015 9:08 am

thanks, of coarse I just got to work, but I'll try it out tonight
If you like my work please consider a Donation. Donate
Please read the appropriate documentation before posting questions! READ ME FAQ WIKI
PM's are for private matters. Post support questions to the appropriate forum, or they will be ignored.
User avatar
KAD
Global Moderator
 
Posts: 5103
Joined: Mon Apr 12, 2010 4:59 pm
Location: Seattle, WA USA

Re: cross compile help apache apr for Gen3/SMP   

Postby KAD » Thu Jan 29, 2015 11:28 pm

well, I made it nowhere with buildroot
apr compiled, but apr-util would actuall error with compiler error

but I have had some success tonight
I decided to try and some older versions, to see if they would work

so I went with
apr 1.4.2 (why this version, because that's what was successful in buildroot, it's apr-util that was problematic in buildroot env)
apr-util 1.5.4
subversion 1.7.19

manged to get them to compile
of coarse svn repo is down so I have no way to test, but here's to hoping that they work
If you like my work please consider a Donation. Donate
Please read the appropriate documentation before posting questions! READ ME FAQ WIKI
PM's are for private matters. Post support questions to the appropriate forum, or they will be ignored.
User avatar
KAD
Global Moderator
 
Posts: 5103
Joined: Mon Apr 12, 2010 4:59 pm
Location: Seattle, WA USA

Re: cross compile help apache apr for Gen3/SMP   

Postby mad_ady » Thu Jan 29, 2015 11:51 pm

Congratulations!

Did you compile the packages manually in the end, or integrated them in buildroot?

To test svn, before it's ready, you can directly use recliq's server. Don't commit anything yet until recliq gives the go ahead:
Code: Select all
217.70.199.8    svn.wdlxtv.com
User avatar
mad_ady
Developer
 
Posts: 4552
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: cross compile help apache apr for Gen3/SMP   

Postby KAD » Fri Jan 30, 2015 12:13 am

thanks

yeah, I ended up cross compiling myself and not using buildroot
the buildroot env had quite a lot of errors
If you like my work please consider a Donation. Donate
Please read the appropriate documentation before posting questions! READ ME FAQ WIKI
PM's are for private matters. Post support questions to the appropriate forum, or they will be ignored.
User avatar
KAD
Global Moderator
 
Posts: 5103
Joined: Mon Apr 12, 2010 4:59 pm
Location: Seattle, WA USA

Re: cross compile help apache apr for Gen3/SMP   

Postby KAD » Mon Feb 02, 2015 7:00 pm

my initial 1.7.19 build had a few issues
like ah missing libserf so could not handle http or https

I ended up returning to my earlier attempt to build inside debian-squeeze.img
and got it to work

Code: Select all
WDTVDEV login: root
Password:
# which svn
/usr/sbin/svn
# svn --version
svn, version 1.8.11 (r1643975)
   compiled Jan 18 2015, 18:06:02 on mipsel-unknown-linux-gnu

Copyright (C) 2014 The Apache Software Foundation.
This software consists of contributions made by many people;
see the NOTICE file for more information.
Subversion is open source software, see http://subversion.apache.org/

The following repository access (RA) modules are available:

* ra_svn : Module for accessing a repository using the svn network protocol.
  - handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' scheme
* ra_serf : Module for accessing a repository via WebDAV protocol using serf.
  - using serf 1.3.8
  - handles 'http' scheme
  - handles 'https' scheme

# ldd /usr/sbin/svn
        libsvn_client-1.so.0 => /usr/lib/libsvn_client-1.so.0 (0x2aaaa000)
        libsvn_wc-1.so.0 => /usr/lib/libsvn_wc-1.so.0 (0x2ab0c000)
        libsvn_ra-1.so.0 => /usr/lib/libsvn_ra-1.so.0 (0x2abc4000)
        libsvn_diff-1.so.0 => /usr/lib/libsvn_diff-1.so.0 (0x2abe0000)
        libsvn_ra_local-1.so.0 => /usr/lib/libsvn_ra_local-1.so.0 (0x2ac06000)
        libsvn_repos-1.so.0 => /usr/lib/libsvn_repos-1.so.0 (0x2ac1e000)
        libsvn_fs-1.so.0 => /usr/lib/libsvn_fs-1.so.0 (0x2ac60000)
        libsvn_fs_fs-1.so.0 => /usr/lib/libsvn_fs_fs-1.so.0 (0x2ac78000)
        libsvn_fs_util-1.so.0 => /usr/lib/libsvn_fs_util-1.so.0 (0x2acc0000)
        libsvn_ra_svn-1.so.0 => /usr/lib/libsvn_ra_svn-1.so.0 (0x2acd2000)
        libsvn_ra_serf-1.so.0 => /usr/lib/libsvn_ra_serf-1.so.0 (0x2acfe000)
        libserf-1.so.1 => /usr/lib/libserf-1.so.1 (0x2ad3a000)
        libsvn_delta-1.so.0 => /usr/lib/libsvn_delta-1.so.0 (0x2ad62000)
        libsvn_subr-1.so.0 => /usr/lib/libsvn_subr-1.so.0 (0x2ad84000)
        libz.so.1 => /lib/libz.so.1 (0x2ae16000)
        libsqlite3.so.0 => /lib/libsqlite3.so.0 (0x2ae3c000)
        libaprutil-1.so.0 => /usr/lib/libaprutil-1.so.0 (0x2af7a000)
        libexpat.so.0 => /usr/lib/libexpat.so.0 (0x2afba000)
        libapr-1.so.0 => /usr/lib/libapr-1.so.0 (0x2b004000)
        libuuid.so.1 => /lib/libuuid.so.1 (0x2b052000)
        librt.so.1 => /lib/librt.so.1 (0x2b066000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x2b07e000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x2b0c0000)
        libdl.so.2 => /lib/libdl.so.2 (0x2b0ea000)
        libc.so.6 => /lib/libc.so.6 (0x2b0fe000)
        libssl.so.0.9.8 => /lib/libssl.so.0.9.8 (0x2b260000)
        libcrypto.so.0.9.8 => /lib/libcrypto.so.0.9.8 (0x2b2d8000)
        /lib/ld.so.1 (0x55550000)
# svn update
Updating '.':
Error validating server certificate for 'https://svn.wdlxtv.com:443':
- The certificate is not issued by a trusted authority. Use the
   fingerprint to validate the certificate manually!
Certificate information:
- Hostname: svn.wdlxtv.com
- Valid: from Dec 31 23:00:42 1998 GMT until Dec 26 23:00:42 2018 GMT
- Issuer: WDLXTV, Some-State, DE(webmaster@wdlxtv.com)
- Fingerprint: AF:13:DD:17:45:33:8C:DB:F8:2D:5C:66:22:4E:52:E8:BB:96:25:15
(R)eject, accept (t)emporarily or accept (p)ermanently? p
svn: E000030: Can't create directory '/mnt/fwup': Read-only file system
#
# cat /proc/mounts | grep squashfs
/dev/loop0 /mnt squashfs ro,relatime 0 0
/dev/loop1 /mnt/opt/osd squashfs ro,relatime 0 0


however, it looks like an svn updated firmware file is not in the cards
I can't find what mount /dev/loop0
and later in boot process
homebrew scripts perform some operations on /mnt

unless somebody else has an idea
I'll leave svn in the firmware, but it just will not be updatable
If you like my work please consider a Donation. Donate
Please read the appropriate documentation before posting questions! READ ME FAQ WIKI
PM's are for private matters. Post support questions to the appropriate forum, or they will be ignored.
User avatar
KAD
Global Moderator
 
Posts: 5103
Joined: Mon Apr 12, 2010 4:59 pm
Location: Seattle, WA USA

Re: cross compile help apache apr for Gen3/SMP   

Postby mad_ady » Mon Feb 02, 2015 11:42 pm

Where does the homebrew firmware reside? It should be on a writable filesystem, right?

You could try this:
Code: Select all
cd /path/to/firmware/on/usb/device
svn update
User avatar
mad_ady
Developer
 
Posts: 4552
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: cross compile help apache apr for Gen3/SMP   

Postby KAD » Tue Feb 03, 2015 12:06 am

the firmwate is mounted to / as rootfs

but the squashfs bits, have to be some sort of left overs from the original boot process before /init rootfs

Code: Select all
# cat /proc/mounts
rootfs / rootfs rw 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
/dev/mtdblock8 /system yaffs2 rw,relatime 0 0
/dev/loop0 /mnt squashfs ro,relatime 0 0
/dev/mtdblock9 /mnt/usrdata yaffs2 rw,relatime 0 0
/dev/loop1 /mnt/opt/osd squashfs ro,relatime 0 0
/dev/sda1 /share vfat rw,relatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 0
/dev/loop2 / ext3 rw,noatime,nodiratime,errors=continue,barrier=0,data=writeback 0 0
/dev/sda1 /sysconfig vfat rw,relatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 0
none /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
usb /proc/bus/usb usbfs rw,relatime 0 0
mdev /dev tmpfs rw,relatime 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
none /tmp tmpfs rw,relatime 0 0
/dev/mtdblock9 /usrdata yaffs2 rw,relatime 0 0
/dev/mtdblock10 /tmp/static_config yaffs2 rw,relatime 0 0
/dev/loop3 /usr/local/sbin romfs ro,relatime 0 0
/dev/loop2 /bin/busybox ext3 rw,noatime,nodiratime,errors=continue,barrier=0,data=writeback 0 0
unionfs /apps fuse.unionfs rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions 0 0
/dev/sda1 /tmp/mnt/965D-5276 vfat rw,relatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 0
tmpfs /webserver/logs tmpfs rw,relatime 0 0
none /lib/sigma ramfs rw,relatime 0 0
none /usr/share/umsp/hardware-dependent.php tmpfs rw,relatime 0 0
/dev/sda1 /tmp/media/usb/USB1140/965D-5276 vfat rw,relatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 0


although I wonder that might work, for a rootfs filesystem on ext3 drive
ie. not xxxx.bin by a folder containing the firmware
although currently there's no support for rootfs, I'd guess it shouldn't be hard to add rootfs firmware support
just add another if statement, I already added root tag support
http://svn.wdlxtv.com/filedetails.php?repname=2.02.32-wdlxtv-gen3&path=%2FBootScripts%2Frunsit.sh
If you like my work please consider a Donation. Donate
Please read the appropriate documentation before posting questions! READ ME FAQ WIKI
PM's are for private matters. Post support questions to the appropriate forum, or they will be ignored.
User avatar
KAD
Global Moderator
 
Posts: 5103
Joined: Mon Apr 12, 2010 4:59 pm
Location: Seattle, WA USA

Re: cross compile help apache apr for Gen3/SMP   

Postby mad_ady » Tue Feb 03, 2015 1:54 am

As far as I've seen, losetup can still show images and mount points setup before running pivot_root, but those mount points are currently outside your root filesystem. Once the process that was started by pivot_root ends (your init), it should be visible again. :)
User avatar
mad_ady
Developer
 
Posts: 4552
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

PreviousNext

Return to WDTV Live

Who is online

Users browsing this forum: No registered users and 1 guest

cron